1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6 Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 /* This file was created with the aid of ``gdbarch.sh''.
27 The Bourne shell script ``gdbarch.sh'' creates the files
28 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29 against the existing ``gdbarch.[hc]''. Any differences found
32 If editing this file, please also run gdbarch.sh and merge any
33 changes into that script. Conversely, when making sweeping changes
34 to this file, modifying gdbarch.sh and using its output may prove
39 #include "arch-utils.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
45 #include "floatformat.h"
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
52 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 int gdbarch_debug = GDBARCH_DEBUG;
66 /* Maintain the struct gdbarch object */
70 /* Has this architecture been fully initialized? */
73 /* An obstack bound to the lifetime of the architecture. */
74 struct obstack *obstack;
76 /* basic architectural information */
77 const struct bfd_arch_info * bfd_arch_info;
81 /* target specific vector. */
82 struct gdbarch_tdep *tdep;
83 gdbarch_dump_tdep_ftype *dump_tdep;
85 /* per-architecture data-pointers */
89 /* per-architecture swap-regions */
90 struct gdbarch_swap *swap;
94 When extending this structure you must:
98 Declare set/get functions and define the corresponding
101 gdbarch_alloc(): If zero/NULL is not a suitable default,
102 initialize the new field.
104 verify_gdbarch(): Confirm that the target updated the field
107 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
110 ``startup_gdbarch()'': Append an initial value to the static
111 variable (base values on the host's c-type system).
113 get_gdbarch(): Implement the set/get functions (probably using
114 the macro's as shortcuts).
129 gdbarch_read_pc_ftype *read_pc;
130 gdbarch_write_pc_ftype *write_pc;
131 gdbarch_read_sp_ftype *read_sp;
132 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
133 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
134 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
141 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
142 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
143 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
144 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
145 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
146 gdbarch_register_name_ftype *register_name;
147 gdbarch_register_type_ftype *register_type;
148 gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
149 int deprecated_register_bytes;
150 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
151 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
152 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
153 int deprecated_max_register_raw_size;
154 int deprecated_max_register_virtual_size;
155 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
156 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
157 int deprecated_fp_regnum;
158 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
159 gdbarch_push_dummy_call_ftype *push_dummy_call;
160 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
161 int deprecated_use_generic_dummy_frames;
162 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
163 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
164 int deprecated_register_size;
165 int call_dummy_location;
166 CORE_ADDR deprecated_call_dummy_start_offset;
167 CORE_ADDR deprecated_call_dummy_breakpoint_offset;
168 LONGEST * deprecated_call_dummy_words;
169 int deprecated_sizeof_call_dummy_words;
170 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
171 gdbarch_push_dummy_code_ftype *push_dummy_code;
172 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
173 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
174 gdbarch_print_registers_info_ftype *print_registers_info;
175 gdbarch_print_float_info_ftype *print_float_info;
176 gdbarch_print_vector_info_ftype *print_vector_info;
177 gdbarch_register_sim_regno_ftype *register_sim_regno;
178 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
179 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
180 gdbarch_cannot_store_register_ftype *cannot_store_register;
181 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
182 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
183 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
184 int believe_pcc_promotion;
185 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
186 gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
187 gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
188 gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
189 gdbarch_convert_register_p_ftype *convert_register_p;
190 gdbarch_register_to_value_ftype *register_to_value;
191 gdbarch_value_to_register_ftype *value_to_register;
192 gdbarch_pointer_to_address_ftype *pointer_to_address;
193 gdbarch_address_to_pointer_ftype *address_to_pointer;
194 gdbarch_integer_to_address_ftype *integer_to_address;
195 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
196 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
197 gdbarch_return_value_ftype *return_value;
198 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
199 gdbarch_extract_return_value_ftype *extract_return_value;
200 gdbarch_store_return_value_ftype *store_return_value;
201 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
202 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
203 gdbarch_use_struct_convention_ftype *use_struct_convention;
204 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
205 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
206 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
207 gdbarch_skip_prologue_ftype *skip_prologue;
208 gdbarch_inner_than_ftype *inner_than;
209 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
210 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
211 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
212 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
213 CORE_ADDR decr_pc_after_break;
214 CORE_ADDR function_start_offset;
215 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
216 CORE_ADDR frame_args_skip;
217 gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
218 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
219 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
220 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
221 gdbarch_unwind_pc_ftype *unwind_pc;
222 gdbarch_unwind_sp_ftype *unwind_sp;
223 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
224 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
225 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
226 gdbarch_frame_num_args_ftype *frame_num_args;
227 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
228 gdbarch_frame_align_ftype *frame_align;
229 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
230 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
231 int frame_red_zone_size;
233 const struct floatformat * float_format;
234 const struct floatformat * double_format;
235 const struct floatformat * long_double_format;
236 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
237 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
238 gdbarch_smash_text_address_ftype *smash_text_address;
239 gdbarch_software_single_step_ftype *software_single_step;
240 gdbarch_print_insn_ftype *print_insn;
241 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
242 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
243 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
244 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
245 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
246 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
247 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
248 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
249 const char * name_of_malloc;
250 int cannot_step_breakpoint;
251 int have_nonsteppable_watchpoint;
252 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
253 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
254 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
255 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
256 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
257 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
261 /* The default architecture uses host values (for want of a better
264 extern const struct bfd_arch_info bfd_default_arch_struct;
266 struct gdbarch startup_gdbarch =
268 1, /* Always initialized. */
269 NULL, /* The obstack. */
270 /* basic architecture information */
271 &bfd_default_arch_struct, /* bfd_arch_info */
272 BFD_ENDIAN_BIG, /* byte_order */
273 GDB_OSABI_UNKNOWN, /* osabi */
274 /* target specific vector and its dump routine */
276 /*per-architecture data-pointers and swap regions */
278 /* Multi-arch values */
279 8 * sizeof (short), /* short_bit */
280 8 * sizeof (int), /* int_bit */
281 8 * sizeof (long), /* long_bit */
282 8 * sizeof (LONGEST), /* long_long_bit */
283 8 * sizeof (float), /* float_bit */
284 8 * sizeof (double), /* double_bit */
285 8 * sizeof (long double), /* long_double_bit */
286 8 * sizeof (void*), /* ptr_bit */
287 8 * sizeof (void*), /* addr_bit */
288 8 * sizeof (void*), /* bfd_vma_bit */
293 0, /* virtual_frame_pointer */
294 0, /* pseudo_register_read */
295 0, /* pseudo_register_write */
297 0, /* num_pseudo_regs */
302 0, /* stab_reg_to_regnum */
303 0, /* ecoff_reg_to_regnum */
304 0, /* dwarf_reg_to_regnum */
305 0, /* sdb_reg_to_regnum */
306 0, /* dwarf2_reg_to_regnum */
307 0, /* register_name */
308 0, /* register_type */
309 0, /* deprecated_register_virtual_type */
310 0, /* deprecated_register_bytes */
311 generic_register_byte, /* deprecated_register_byte */
312 generic_register_size, /* deprecated_register_raw_size */
313 generic_register_size, /* deprecated_register_virtual_size */
314 0, /* deprecated_max_register_raw_size */
315 0, /* deprecated_max_register_virtual_size */
316 0, /* unwind_dummy_id */
317 0, /* deprecated_save_dummy_frame_tos */
318 -1, /* deprecated_fp_regnum */
319 0, /* deprecated_target_read_fp */
320 0, /* push_dummy_call */
321 0, /* deprecated_push_arguments */
322 0, /* deprecated_use_generic_dummy_frames */
323 0, /* deprecated_push_return_address */
324 0, /* deprecated_dummy_write_sp */
325 0, /* deprecated_register_size */
326 0, /* call_dummy_location */
327 0, /* deprecated_call_dummy_start_offset */
328 0, /* deprecated_call_dummy_breakpoint_offset */
329 0, /* deprecated_call_dummy_words */
330 0, /* deprecated_sizeof_call_dummy_words */
331 0, /* deprecated_fix_call_dummy */
332 0, /* push_dummy_code */
333 0, /* deprecated_push_dummy_frame */
334 0, /* deprecated_do_registers_info */
335 default_print_registers_info, /* print_registers_info */
336 0, /* print_float_info */
337 0, /* print_vector_info */
338 0, /* register_sim_regno */
339 0, /* register_bytes_ok */
340 0, /* cannot_fetch_register */
341 0, /* cannot_store_register */
342 0, /* get_longjmp_target */
343 deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
344 0, /* deprecated_init_frame_pc */
345 0, /* believe_pcc_promotion */
346 0, /* deprecated_get_saved_register */
347 0, /* deprecated_register_convertible */
348 0, /* deprecated_register_convert_to_virtual */
349 0, /* deprecated_register_convert_to_raw */
350 0, /* convert_register_p */
351 0, /* register_to_value */
352 0, /* value_to_register */
353 0, /* pointer_to_address */
354 0, /* address_to_pointer */
355 0, /* integer_to_address */
356 0, /* deprecated_pop_frame */
357 0, /* deprecated_store_struct_return */
358 0, /* return_value */
359 0, /* return_value_on_stack */
360 0, /* extract_return_value */
361 0, /* store_return_value */
362 0, /* deprecated_extract_return_value */
363 0, /* deprecated_store_return_value */
364 0, /* use_struct_convention */
365 0, /* deprecated_extract_struct_value_address */
366 0, /* deprecated_frame_init_saved_regs */
367 0, /* deprecated_init_extra_frame_info */
368 0, /* skip_prologue */
370 0, /* breakpoint_from_pc */
371 0, /* adjust_breakpoint_address */
372 0, /* memory_insert_breakpoint */
373 0, /* memory_remove_breakpoint */
374 0, /* decr_pc_after_break */
375 0, /* function_start_offset */
376 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
377 0, /* frame_args_skip */
378 0, /* deprecated_frameless_function_invocation */
379 0, /* deprecated_frame_chain */
380 0, /* deprecated_frame_chain_valid */
381 0, /* deprecated_frame_saved_pc */
384 get_frame_base, /* deprecated_frame_args_address */
385 get_frame_base, /* deprecated_frame_locals_address */
386 0, /* deprecated_saved_pc_after_call */
387 0, /* frame_num_args */
388 0, /* deprecated_stack_align */
390 0, /* deprecated_reg_struct_has_addr */
391 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
392 0, /* frame_red_zone_size */
393 0, /* parm_boundary */
394 0, /* float_format */
395 0, /* double_format */
396 0, /* long_double_format */
397 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
398 0, /* addr_bits_remove */
399 0, /* smash_text_address */
400 0, /* software_single_step */
402 0, /* skip_trampoline_code */
403 generic_skip_solib_resolver, /* skip_solib_resolver */
404 0, /* in_solib_call_trampoline */
405 0, /* in_solib_return_trampoline */
406 generic_in_function_epilogue_p, /* in_function_epilogue_p */
407 construct_inferior_arguments, /* construct_inferior_arguments */
408 0, /* elf_make_msymbol_special */
409 0, /* coff_make_msymbol_special */
410 "malloc", /* name_of_malloc */
411 0, /* cannot_step_breakpoint */
412 0, /* have_nonsteppable_watchpoint */
413 0, /* address_class_type_flags */
414 0, /* address_class_type_flags_to_name */
415 0, /* address_class_name_to_type_flags */
416 default_register_reggroup_p, /* register_reggroup_p */
417 0, /* fetch_pointer_argument */
418 0, /* regset_from_core_section */
419 /* startup_gdbarch() */
422 struct gdbarch *current_gdbarch = &startup_gdbarch;
424 /* Create a new ``struct gdbarch'' based on information provided by
425 ``struct gdbarch_info''. */
428 gdbarch_alloc (const struct gdbarch_info *info,
429 struct gdbarch_tdep *tdep)
431 /* NOTE: The new architecture variable is named ``current_gdbarch''
432 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
433 the current local architecture and not the previous global
434 architecture. This ensures that the new architectures initial
435 values are not influenced by the previous architecture. Once
436 everything is parameterised with gdbarch, this will go away. */
437 struct gdbarch *current_gdbarch;
439 /* Create an obstack for allocating all the per-architecture memory,
440 then use that to allocate the architecture vector. */
441 struct obstack *obstack = XMALLOC (struct obstack);
442 obstack_init (obstack);
443 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
444 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
445 current_gdbarch->obstack = obstack;
447 alloc_gdbarch_data (current_gdbarch);
449 current_gdbarch->tdep = tdep;
451 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
452 current_gdbarch->byte_order = info->byte_order;
453 current_gdbarch->osabi = info->osabi;
455 /* Force the explicit initialization of these. */
456 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
457 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
458 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
459 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
460 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
461 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
462 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
463 current_gdbarch->ptr_bit = TARGET_INT_BIT;
464 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
465 current_gdbarch->char_signed = -1;
466 current_gdbarch->write_pc = generic_target_write_pc;
467 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
468 current_gdbarch->num_regs = -1;
469 current_gdbarch->sp_regnum = -1;
470 current_gdbarch->pc_regnum = -1;
471 current_gdbarch->ps_regnum = -1;
472 current_gdbarch->fp0_regnum = -1;
473 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
474 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
475 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
476 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
477 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
478 current_gdbarch->deprecated_register_byte = generic_register_byte;
479 current_gdbarch->deprecated_register_raw_size = generic_register_size;
480 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
481 current_gdbarch->deprecated_fp_regnum = -1;
482 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
483 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
484 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
485 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
486 current_gdbarch->print_registers_info = default_print_registers_info;
487 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
488 current_gdbarch->cannot_fetch_register = cannot_register_not;
489 current_gdbarch->cannot_store_register = cannot_register_not;
490 current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
491 current_gdbarch->convert_register_p = legacy_convert_register_p;
492 current_gdbarch->register_to_value = legacy_register_to_value;
493 current_gdbarch->value_to_register = legacy_value_to_register;
494 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
495 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
496 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
497 current_gdbarch->extract_return_value = legacy_extract_return_value;
498 current_gdbarch->store_return_value = legacy_store_return_value;
499 current_gdbarch->use_struct_convention = generic_use_struct_convention;
500 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
501 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
502 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
503 current_gdbarch->deprecated_frame_args_address = get_frame_base;
504 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
505 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
506 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
507 current_gdbarch->addr_bits_remove = core_addr_identity;
508 current_gdbarch->smash_text_address = core_addr_identity;
509 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
510 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
511 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
512 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
513 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
514 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
515 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
516 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
517 current_gdbarch->name_of_malloc = "malloc";
518 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
519 /* gdbarch_alloc() */
521 return current_gdbarch;
525 /* Allocate extra space using the per-architecture obstack. */
528 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
530 void *data = obstack_alloc (arch->obstack, size);
531 memset (data, 0, size);
536 /* Free a gdbarch struct. This should never happen in normal
537 operation --- once you've created a gdbarch, you keep it around.
538 However, if an architecture's init function encounters an error
539 building the structure, it may need to clean up a partially
540 constructed gdbarch. */
543 gdbarch_free (struct gdbarch *arch)
545 struct obstack *obstack;
546 gdb_assert (arch != NULL);
547 gdb_assert (!arch->initialized_p);
548 obstack = arch->obstack;
549 obstack_free (obstack, 0); /* Includes the ARCH. */
554 /* Ensure that all values in a GDBARCH are reasonable. */
556 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
557 just happens to match the global variable ``current_gdbarch''. That
558 way macros refering to that variable get the local and not the global
559 version - ulgh. Once everything is parameterised with gdbarch, this
563 verify_gdbarch (struct gdbarch *current_gdbarch)
566 struct cleanup *cleanups;
569 log = mem_fileopen ();
570 cleanups = make_cleanup_ui_file_delete (log);
572 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
573 fprintf_unfiltered (log, "\n\tbyte-order");
574 if (current_gdbarch->bfd_arch_info == NULL)
575 fprintf_unfiltered (log, "\n\tbfd_arch_info");
576 /* Check those that need to be defined for the given multi-arch level. */
577 /* Skip verify of short_bit, invalid_p == 0 */
578 /* Skip verify of int_bit, invalid_p == 0 */
579 /* Skip verify of long_bit, invalid_p == 0 */
580 /* Skip verify of long_long_bit, invalid_p == 0 */
581 /* Skip verify of float_bit, invalid_p == 0 */
582 /* Skip verify of double_bit, invalid_p == 0 */
583 /* Skip verify of long_double_bit, invalid_p == 0 */
584 /* Skip verify of ptr_bit, invalid_p == 0 */
585 if (current_gdbarch->addr_bit == 0)
586 current_gdbarch->addr_bit = TARGET_PTR_BIT;
587 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
588 if (current_gdbarch->char_signed == -1)
589 current_gdbarch->char_signed = 1;
590 /* Skip verify of read_pc, has predicate */
591 /* Skip verify of write_pc, invalid_p == 0 */
592 /* Skip verify of read_sp, has predicate */
593 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
594 /* Skip verify of pseudo_register_read, has predicate */
595 /* Skip verify of pseudo_register_write, has predicate */
596 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
597 && (current_gdbarch->num_regs == -1))
598 fprintf_unfiltered (log, "\n\tnum_regs");
599 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
600 /* Skip verify of sp_regnum, invalid_p == 0 */
601 /* Skip verify of pc_regnum, invalid_p == 0 */
602 /* Skip verify of ps_regnum, invalid_p == 0 */
603 /* Skip verify of fp0_regnum, invalid_p == 0 */
604 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
605 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
606 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
607 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
608 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
609 /* Skip verify of register_type, has predicate */
610 /* Skip verify of deprecated_register_virtual_type, has predicate */
611 /* Skip verify of deprecated_register_byte, has predicate */
612 /* Skip verify of deprecated_register_raw_size, has predicate */
613 /* Skip verify of deprecated_register_virtual_size, has predicate */
614 /* Skip verify of deprecated_max_register_raw_size, has predicate */
615 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
616 /* Skip verify of unwind_dummy_id, has predicate */
617 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
618 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
619 /* Skip verify of deprecated_target_read_fp, has predicate */
620 /* Skip verify of push_dummy_call, has predicate */
621 /* Skip verify of deprecated_push_arguments, has predicate */
622 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
623 /* Skip verify of deprecated_push_return_address, has predicate */
624 /* Skip verify of deprecated_dummy_write_sp, has predicate */
625 /* Skip verify of call_dummy_location, invalid_p == 0 */
626 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
627 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
628 /* Skip verify of deprecated_fix_call_dummy, has predicate */
629 /* Skip verify of push_dummy_code, has predicate */
630 /* Skip verify of deprecated_push_dummy_frame, has predicate */
631 /* Skip verify of deprecated_do_registers_info, has predicate */
632 /* Skip verify of print_registers_info, invalid_p == 0 */
633 /* Skip verify of print_float_info, has predicate */
634 /* Skip verify of print_vector_info, has predicate */
635 /* Skip verify of register_sim_regno, invalid_p == 0 */
636 /* Skip verify of register_bytes_ok, has predicate */
637 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
638 /* Skip verify of cannot_store_register, invalid_p == 0 */
639 /* Skip verify of get_longjmp_target, has predicate */
640 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
641 /* Skip verify of deprecated_init_frame_pc, has predicate */
642 /* Skip verify of deprecated_get_saved_register, has predicate */
643 /* Skip verify of deprecated_register_convertible, has predicate */
644 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
645 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
646 /* Skip verify of convert_register_p, invalid_p == 0 */
647 /* Skip verify of register_to_value, invalid_p == 0 */
648 /* Skip verify of value_to_register, invalid_p == 0 */
649 /* Skip verify of pointer_to_address, invalid_p == 0 */
650 /* Skip verify of address_to_pointer, invalid_p == 0 */
651 /* Skip verify of integer_to_address, has predicate */
652 /* Skip verify of deprecated_pop_frame, has predicate */
653 /* Skip verify of deprecated_store_struct_return, has predicate */
654 /* Skip verify of return_value, has predicate */
655 /* Skip verify of return_value_on_stack, invalid_p == 0 */
656 /* Skip verify of extract_return_value, invalid_p == 0 */
657 /* Skip verify of store_return_value, invalid_p == 0 */
658 /* Skip verify of use_struct_convention, invalid_p == 0 */
659 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
660 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
661 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
662 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
663 && (current_gdbarch->skip_prologue == 0))
664 fprintf_unfiltered (log, "\n\tskip_prologue");
665 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
666 && (current_gdbarch->inner_than == 0))
667 fprintf_unfiltered (log, "\n\tinner_than");
668 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
669 && (current_gdbarch->breakpoint_from_pc == 0))
670 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
671 /* Skip verify of adjust_breakpoint_address, has predicate */
672 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
673 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
674 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
675 /* Skip verify of function_start_offset, invalid_p == 0 */
676 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
677 /* Skip verify of frame_args_skip, invalid_p == 0 */
678 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
679 /* Skip verify of deprecated_frame_chain, has predicate */
680 /* Skip verify of deprecated_frame_chain_valid, has predicate */
681 /* Skip verify of deprecated_frame_saved_pc, has predicate */
682 /* Skip verify of unwind_pc, has predicate */
683 /* Skip verify of unwind_sp, has predicate */
684 /* Skip verify of deprecated_frame_args_address, has predicate */
685 /* Skip verify of deprecated_frame_locals_address, has predicate */
686 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
687 /* Skip verify of frame_num_args, has predicate */
688 /* Skip verify of deprecated_stack_align, has predicate */
689 /* Skip verify of frame_align, has predicate */
690 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
691 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
692 if (current_gdbarch->float_format == 0)
693 current_gdbarch->float_format = default_float_format (current_gdbarch);
694 if (current_gdbarch->double_format == 0)
695 current_gdbarch->double_format = default_double_format (current_gdbarch);
696 if (current_gdbarch->long_double_format == 0)
697 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
698 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
699 /* Skip verify of addr_bits_remove, invalid_p == 0 */
700 /* Skip verify of smash_text_address, invalid_p == 0 */
701 /* Skip verify of software_single_step, has predicate */
702 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
703 && (current_gdbarch->print_insn == 0))
704 fprintf_unfiltered (log, "\n\tprint_insn");
705 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
706 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
707 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
708 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
709 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
710 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
711 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
712 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
713 /* Skip verify of name_of_malloc, invalid_p == 0 */
714 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
715 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
716 /* Skip verify of address_class_type_flags, has predicate */
717 /* Skip verify of address_class_type_flags_to_name, has predicate */
718 /* Skip verify of address_class_name_to_type_flags, has predicate */
719 /* Skip verify of register_reggroup_p, invalid_p == 0 */
720 /* Skip verify of fetch_pointer_argument, has predicate */
721 /* Skip verify of regset_from_core_section, has predicate */
722 buf = ui_file_xstrdup (log, &dummy);
723 make_cleanup (xfree, buf);
724 if (strlen (buf) > 0)
725 internal_error (__FILE__, __LINE__,
726 "verify_gdbarch: the following are invalid ...%s",
728 do_cleanups (cleanups);
732 /* Print out the details of the current architecture. */
734 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
735 just happens to match the global variable ``current_gdbarch''. That
736 way macros refering to that variable get the local and not the global
737 version - ulgh. Once everything is parameterised with gdbarch, this
741 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
743 fprintf_unfiltered (file,
744 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
746 fprintf_unfiltered (file,
747 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
748 (long) current_gdbarch->convert_from_func_ptr_addr);
749 fprintf_unfiltered (file,
750 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
751 gdbarch_frame_align_p (current_gdbarch));
752 fprintf_unfiltered (file,
753 "gdbarch_dump: frame_align = 0x%08lx\n",
754 (long) current_gdbarch->frame_align);
755 fprintf_unfiltered (file,
756 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
757 gdbarch_regset_from_core_section_p (current_gdbarch));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
760 (long) current_gdbarch->regset_from_core_section);
761 fprintf_unfiltered (file,
762 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
763 gdbarch_return_value_p (current_gdbarch));
764 fprintf_unfiltered (file,
765 "gdbarch_dump: return_value = 0x%08lx\n",
766 (long) current_gdbarch->return_value);
767 fprintf_unfiltered (file,
768 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
769 (long) current_gdbarch->in_function_epilogue_p);
770 fprintf_unfiltered (file,
771 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
772 (long) current_gdbarch->register_reggroup_p);
773 fprintf_unfiltered (file,
774 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
775 (long) current_gdbarch->stabs_argument_has_addr);
776 fprintf_unfiltered (file,
777 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
778 gdbarch_pseudo_register_read_p (current_gdbarch));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
781 (long) current_gdbarch->pseudo_register_read);
782 fprintf_unfiltered (file,
783 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
784 gdbarch_pseudo_register_write_p (current_gdbarch));
785 fprintf_unfiltered (file,
786 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
787 (long) current_gdbarch->pseudo_register_write);
788 fprintf_unfiltered (file,
789 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
790 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
793 (long) current_gdbarch->address_class_name_to_type_flags);
794 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
795 fprintf_unfiltered (file,
796 "gdbarch_dump: %s # %s\n",
797 "ADDRESS_CLASS_TYPE_FLAGS_P()",
798 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
801 ADDRESS_CLASS_TYPE_FLAGS_P ());
803 #ifdef ADDRESS_CLASS_TYPE_FLAGS
804 fprintf_unfiltered (file,
805 "gdbarch_dump: %s # %s\n",
806 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
807 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
810 (long) current_gdbarch->address_class_type_flags
811 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
813 fprintf_unfiltered (file,
814 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
815 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
816 fprintf_unfiltered (file,
817 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
818 (long) current_gdbarch->address_class_type_flags_to_name);
819 #ifdef ADDRESS_TO_POINTER
820 fprintf_unfiltered (file,
821 "gdbarch_dump: %s # %s\n",
822 "ADDRESS_TO_POINTER(type, buf, addr)",
823 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
826 (long) current_gdbarch->address_to_pointer
827 /*ADDRESS_TO_POINTER ()*/);
829 #ifdef ADDR_BITS_REMOVE
830 fprintf_unfiltered (file,
831 "gdbarch_dump: %s # %s\n",
832 "ADDR_BITS_REMOVE(addr)",
833 XSTRING (ADDR_BITS_REMOVE (addr)));
834 fprintf_unfiltered (file,
835 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
836 (long) current_gdbarch->addr_bits_remove
837 /*ADDR_BITS_REMOVE ()*/);
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
841 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
844 (long) current_gdbarch->adjust_breakpoint_address);
845 #ifdef BELIEVE_PCC_PROMOTION
846 fprintf_unfiltered (file,
847 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
848 XSTRING (BELIEVE_PCC_PROMOTION));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
851 BELIEVE_PCC_PROMOTION);
853 #ifdef BREAKPOINT_FROM_PC
854 fprintf_unfiltered (file,
855 "gdbarch_dump: %s # %s\n",
856 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
857 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
858 fprintf_unfiltered (file,
859 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
860 (long) current_gdbarch->breakpoint_from_pc
861 /*BREAKPOINT_FROM_PC ()*/);
863 #ifdef CALL_DUMMY_LOCATION
864 fprintf_unfiltered (file,
865 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
866 XSTRING (CALL_DUMMY_LOCATION));
867 fprintf_unfiltered (file,
868 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
869 CALL_DUMMY_LOCATION);
871 #ifdef CANNOT_FETCH_REGISTER
872 fprintf_unfiltered (file,
873 "gdbarch_dump: %s # %s\n",
874 "CANNOT_FETCH_REGISTER(regnum)",
875 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
876 fprintf_unfiltered (file,
877 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
878 (long) current_gdbarch->cannot_fetch_register
879 /*CANNOT_FETCH_REGISTER ()*/);
881 #ifdef CANNOT_STEP_BREAKPOINT
882 fprintf_unfiltered (file,
883 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
884 XSTRING (CANNOT_STEP_BREAKPOINT));
885 fprintf_unfiltered (file,
886 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
887 CANNOT_STEP_BREAKPOINT);
889 #ifdef CANNOT_STORE_REGISTER
890 fprintf_unfiltered (file,
891 "gdbarch_dump: %s # %s\n",
892 "CANNOT_STORE_REGISTER(regnum)",
893 XSTRING (CANNOT_STORE_REGISTER (regnum)));
894 fprintf_unfiltered (file,
895 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
896 (long) current_gdbarch->cannot_store_register
897 /*CANNOT_STORE_REGISTER ()*/);
899 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
900 fprintf_unfiltered (file,
901 "gdbarch_dump: %s # %s\n",
902 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
903 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
904 fprintf_unfiltered (file,
905 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
906 (long) current_gdbarch->coff_make_msymbol_special
907 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
909 fprintf_unfiltered (file,
910 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
911 (long) current_gdbarch->construct_inferior_arguments);
912 #ifdef CONVERT_REGISTER_P
913 fprintf_unfiltered (file,
914 "gdbarch_dump: %s # %s\n",
915 "CONVERT_REGISTER_P(regnum, type)",
916 XSTRING (CONVERT_REGISTER_P (regnum, type)));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
919 (long) current_gdbarch->convert_register_p
920 /*CONVERT_REGISTER_P ()*/);
922 #ifdef DECR_PC_AFTER_BREAK
923 fprintf_unfiltered (file,
924 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
925 XSTRING (DECR_PC_AFTER_BREAK));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
928 (long) DECR_PC_AFTER_BREAK);
930 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
931 fprintf_unfiltered (file,
932 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
933 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
934 fprintf_unfiltered (file,
935 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
936 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
938 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
939 fprintf_unfiltered (file,
940 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
941 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
944 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
946 #ifdef DEPRECATED_CALL_DUMMY_WORDS
947 fprintf_unfiltered (file,
948 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
949 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
952 (long) DEPRECATED_CALL_DUMMY_WORDS);
954 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
955 fprintf_unfiltered (file,
956 "gdbarch_dump: %s # %s\n",
957 "DEPRECATED_DO_REGISTERS_INFO_P()",
958 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
961 DEPRECATED_DO_REGISTERS_INFO_P ());
963 #ifdef DEPRECATED_DO_REGISTERS_INFO
964 fprintf_unfiltered (file,
965 "gdbarch_dump: %s # %s\n",
966 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
967 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
970 (long) current_gdbarch->deprecated_do_registers_info
971 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
973 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
974 fprintf_unfiltered (file,
975 "gdbarch_dump: %s # %s\n",
976 "DEPRECATED_DUMMY_WRITE_SP_P()",
977 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
980 DEPRECATED_DUMMY_WRITE_SP_P ());
982 #ifdef DEPRECATED_DUMMY_WRITE_SP
983 fprintf_unfiltered (file,
984 "gdbarch_dump: %s # %s\n",
985 "DEPRECATED_DUMMY_WRITE_SP(val)",
986 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
987 fprintf_unfiltered (file,
988 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
989 (long) current_gdbarch->deprecated_dummy_write_sp
990 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
992 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
993 fprintf_unfiltered (file,
994 "gdbarch_dump: %s # %s\n",
995 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
996 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
999 (long) current_gdbarch->deprecated_extract_return_value
1000 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1002 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: %s # %s\n",
1005 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1006 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1009 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1011 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: %s # %s\n",
1014 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1015 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1018 (long) current_gdbarch->deprecated_extract_struct_value_address
1019 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1021 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: %s # %s\n",
1024 "DEPRECATED_FIX_CALL_DUMMY_P()",
1025 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1028 DEPRECATED_FIX_CALL_DUMMY_P ());
1030 #ifdef DEPRECATED_FIX_CALL_DUMMY
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: %s # %s\n",
1033 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1034 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1037 (long) current_gdbarch->deprecated_fix_call_dummy
1038 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1040 #ifdef DEPRECATED_FP_REGNUM
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1043 XSTRING (DEPRECATED_FP_REGNUM));
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1046 DEPRECATED_FP_REGNUM);
1048 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: %s # %s\n",
1051 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
1052 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
1055 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
1057 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: %s # %s\n",
1060 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
1061 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1064 (long) current_gdbarch->deprecated_frameless_function_invocation
1065 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
1067 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: %s # %s\n",
1070 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1071 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1074 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1076 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: %s # %s\n",
1079 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1080 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1083 (long) current_gdbarch->deprecated_frame_args_address
1084 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1086 #ifdef DEPRECATED_FRAME_CHAIN_P
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: %s # %s\n",
1089 "DEPRECATED_FRAME_CHAIN_P()",
1090 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1093 DEPRECATED_FRAME_CHAIN_P ());
1095 #ifdef DEPRECATED_FRAME_CHAIN
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: %s # %s\n",
1098 "DEPRECATED_FRAME_CHAIN(frame)",
1099 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1102 (long) current_gdbarch->deprecated_frame_chain
1103 /*DEPRECATED_FRAME_CHAIN ()*/);
1105 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1109 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1112 DEPRECATED_FRAME_CHAIN_VALID_P ());
1114 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: %s # %s\n",
1117 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1118 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1121 (long) current_gdbarch->deprecated_frame_chain_valid
1122 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1124 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: %s # %s\n",
1127 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1128 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1131 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1133 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: %s # %s\n",
1136 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1137 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1140 (long) current_gdbarch->deprecated_frame_init_saved_regs
1141 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1143 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: %s # %s\n",
1146 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1147 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1150 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1152 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: %s # %s\n",
1155 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1156 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1159 (long) current_gdbarch->deprecated_frame_locals_address
1160 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1162 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: %s # %s\n",
1165 "DEPRECATED_FRAME_SAVED_PC_P()",
1166 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1169 DEPRECATED_FRAME_SAVED_PC_P ());
1171 #ifdef DEPRECATED_FRAME_SAVED_PC
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: %s # %s\n",
1174 "DEPRECATED_FRAME_SAVED_PC(fi)",
1175 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1178 (long) current_gdbarch->deprecated_frame_saved_pc
1179 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1181 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: %s # %s\n",
1184 "DEPRECATED_GET_SAVED_REGISTER_P()",
1185 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1188 DEPRECATED_GET_SAVED_REGISTER_P ());
1190 #ifdef DEPRECATED_GET_SAVED_REGISTER
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: %s # %s\n",
1193 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1194 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1197 (long) current_gdbarch->deprecated_get_saved_register
1198 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1200 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: %s # %s\n",
1203 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1204 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1207 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1209 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: %s # %s\n",
1212 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1213 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1216 (long) current_gdbarch->deprecated_init_extra_frame_info
1217 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1219 #ifdef DEPRECATED_INIT_FRAME_PC_P
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: %s # %s\n",
1222 "DEPRECATED_INIT_FRAME_PC_P()",
1223 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1226 DEPRECATED_INIT_FRAME_PC_P ());
1228 #ifdef DEPRECATED_INIT_FRAME_PC
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: %s # %s\n",
1231 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1232 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1233 fprintf_unfiltered (file,
1234 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1235 (long) current_gdbarch->deprecated_init_frame_pc
1236 /*DEPRECATED_INIT_FRAME_PC ()*/);
1238 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: %s # %s\n",
1241 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1242 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1245 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1247 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1250 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1253 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1255 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: %s # %s\n",
1258 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1259 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1262 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1264 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1267 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1270 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1272 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1276 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1279 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1281 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1285 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1288 (long) current_gdbarch->deprecated_pc_in_call_dummy
1289 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1291 #ifdef DEPRECATED_POP_FRAME_P
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: %s # %s\n",
1294 "DEPRECATED_POP_FRAME_P()",
1295 XSTRING (DEPRECATED_POP_FRAME_P ()));
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1298 DEPRECATED_POP_FRAME_P ());
1300 #ifdef DEPRECATED_POP_FRAME
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: %s # %s\n",
1303 "DEPRECATED_POP_FRAME(-)",
1304 XSTRING (DEPRECATED_POP_FRAME (-)));
1305 fprintf_unfiltered (file,
1306 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1307 (long) current_gdbarch->deprecated_pop_frame
1308 /*DEPRECATED_POP_FRAME ()*/);
1310 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: %s # %s\n",
1313 "DEPRECATED_PUSH_ARGUMENTS_P()",
1314 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1317 DEPRECATED_PUSH_ARGUMENTS_P ());
1319 #ifdef DEPRECATED_PUSH_ARGUMENTS
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: %s # %s\n",
1322 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1323 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1326 (long) current_gdbarch->deprecated_push_arguments
1327 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1329 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: %s # %s\n",
1332 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1333 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1336 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1338 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: %s # %s\n",
1341 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1342 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1345 (long) current_gdbarch->deprecated_push_dummy_frame
1346 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1348 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: %s # %s\n",
1351 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1352 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1353 fprintf_unfiltered (file,
1354 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1355 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1357 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: %s # %s\n",
1360 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1361 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1364 (long) current_gdbarch->deprecated_push_return_address
1365 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1367 #ifdef DEPRECATED_REGISTER_BYTE_P
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: %s # %s\n",
1370 "DEPRECATED_REGISTER_BYTE_P()",
1371 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1374 DEPRECATED_REGISTER_BYTE_P ());
1376 #ifdef DEPRECATED_REGISTER_BYTE
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: %s # %s\n",
1379 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1380 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1383 (long) current_gdbarch->deprecated_register_byte
1384 /*DEPRECATED_REGISTER_BYTE ()*/);
1386 #ifdef DEPRECATED_REGISTER_BYTES
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1389 XSTRING (DEPRECATED_REGISTER_BYTES));
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1392 DEPRECATED_REGISTER_BYTES);
1394 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: %s # %s\n",
1397 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1398 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1401 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1403 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: %s # %s\n",
1406 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1407 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1410 (long) current_gdbarch->deprecated_register_convertible
1411 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1413 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: %s # %s\n",
1416 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1417 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1420 (long) current_gdbarch->deprecated_register_convert_to_raw
1421 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1423 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: %s # %s\n",
1426 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1427 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1430 (long) current_gdbarch->deprecated_register_convert_to_virtual
1431 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1433 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1434 fprintf_unfiltered (file,
1435 "gdbarch_dump: %s # %s\n",
1436 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1437 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1440 DEPRECATED_REGISTER_RAW_SIZE_P ());
1442 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: %s # %s\n",
1445 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1446 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1449 (long) current_gdbarch->deprecated_register_raw_size
1450 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1452 #ifdef DEPRECATED_REGISTER_SIZE
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1455 XSTRING (DEPRECATED_REGISTER_SIZE));
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1458 DEPRECATED_REGISTER_SIZE);
1460 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: %s # %s\n",
1463 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1464 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1465 fprintf_unfiltered (file,
1466 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1467 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1469 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: %s # %s\n",
1472 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1473 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1474 fprintf_unfiltered (file,
1475 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1476 (long) current_gdbarch->deprecated_register_virtual_size
1477 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1479 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: %s # %s\n",
1482 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1483 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1484 fprintf_unfiltered (file,
1485 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1486 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1488 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: %s # %s\n",
1491 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1492 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1495 (long) current_gdbarch->deprecated_register_virtual_type
1496 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1498 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: %s # %s\n",
1501 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1502 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1505 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1507 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: %s # %s\n",
1510 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1511 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1512 fprintf_unfiltered (file,
1513 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1514 (long) current_gdbarch->deprecated_reg_struct_has_addr
1515 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1517 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: %s # %s\n",
1520 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1521 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1522 fprintf_unfiltered (file,
1523 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1524 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1526 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: %s # %s\n",
1529 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1530 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1533 (long) current_gdbarch->deprecated_saved_pc_after_call
1534 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1536 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: %s # %s\n",
1539 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1540 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1543 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1545 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: %s # %s\n",
1548 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1549 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1552 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1553 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1555 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1558 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1561 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1563 #ifdef DEPRECATED_STACK_ALIGN_P
1564 fprintf_unfiltered (file,
1565 "gdbarch_dump: %s # %s\n",
1566 "DEPRECATED_STACK_ALIGN_P()",
1567 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1570 DEPRECATED_STACK_ALIGN_P ());
1572 #ifdef DEPRECATED_STACK_ALIGN
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: %s # %s\n",
1575 "DEPRECATED_STACK_ALIGN(sp)",
1576 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1579 (long) current_gdbarch->deprecated_stack_align
1580 /*DEPRECATED_STACK_ALIGN ()*/);
1582 #ifdef DEPRECATED_STORE_RETURN_VALUE
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: %s # %s\n",
1585 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1586 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1589 (long) current_gdbarch->deprecated_store_return_value
1590 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1592 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: %s # %s\n",
1595 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1596 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1599 DEPRECATED_STORE_STRUCT_RETURN_P ());
1601 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1602 fprintf_unfiltered (file,
1603 "gdbarch_dump: %s # %s\n",
1604 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1605 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1606 fprintf_unfiltered (file,
1607 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1608 (long) current_gdbarch->deprecated_store_struct_return
1609 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1611 #ifdef DEPRECATED_TARGET_READ_FP_P
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: %s # %s\n",
1614 "DEPRECATED_TARGET_READ_FP_P()",
1615 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1616 fprintf_unfiltered (file,
1617 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1618 DEPRECATED_TARGET_READ_FP_P ());
1620 #ifdef DEPRECATED_TARGET_READ_FP
1621 fprintf_unfiltered (file,
1622 "gdbarch_dump: %s # %s\n",
1623 "DEPRECATED_TARGET_READ_FP()",
1624 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1627 (long) current_gdbarch->deprecated_target_read_fp
1628 /*DEPRECATED_TARGET_READ_FP ()*/);
1630 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1633 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1636 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1638 #ifdef DWARF2_REG_TO_REGNUM
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: %s # %s\n",
1641 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1642 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1643 fprintf_unfiltered (file,
1644 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1645 (long) current_gdbarch->dwarf2_reg_to_regnum
1646 /*DWARF2_REG_TO_REGNUM ()*/);
1648 #ifdef DWARF_REG_TO_REGNUM
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: %s # %s\n",
1651 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1652 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1655 (long) current_gdbarch->dwarf_reg_to_regnum
1656 /*DWARF_REG_TO_REGNUM ()*/);
1658 #ifdef ECOFF_REG_TO_REGNUM
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: %s # %s\n",
1661 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1662 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1665 (long) current_gdbarch->ecoff_reg_to_regnum
1666 /*ECOFF_REG_TO_REGNUM ()*/);
1668 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: %s # %s\n",
1671 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1672 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1673 fprintf_unfiltered (file,
1674 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1675 (long) current_gdbarch->elf_make_msymbol_special
1676 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1678 #ifdef EXTRACT_RETURN_VALUE
1679 fprintf_unfiltered (file,
1680 "gdbarch_dump: %s # %s\n",
1681 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1682 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1683 fprintf_unfiltered (file,
1684 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1685 (long) current_gdbarch->extract_return_value
1686 /*EXTRACT_RETURN_VALUE ()*/);
1688 #ifdef FETCH_POINTER_ARGUMENT_P
1689 fprintf_unfiltered (file,
1690 "gdbarch_dump: %s # %s\n",
1691 "FETCH_POINTER_ARGUMENT_P()",
1692 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1695 FETCH_POINTER_ARGUMENT_P ());
1697 #ifdef FETCH_POINTER_ARGUMENT
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: %s # %s\n",
1700 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1701 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1704 (long) current_gdbarch->fetch_pointer_argument
1705 /*FETCH_POINTER_ARGUMENT ()*/);
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: FP0_REGNUM # %s\n",
1710 XSTRING (FP0_REGNUM));
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: FP0_REGNUM = %d\n",
1715 #ifdef FRAME_ARGS_SKIP
1716 fprintf_unfiltered (file,
1717 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1718 XSTRING (FRAME_ARGS_SKIP));
1719 fprintf_unfiltered (file,
1720 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1721 (long) FRAME_ARGS_SKIP);
1723 #ifdef FRAME_NUM_ARGS_P
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: %s # %s\n",
1726 "FRAME_NUM_ARGS_P()",
1727 XSTRING (FRAME_NUM_ARGS_P ()));
1728 fprintf_unfiltered (file,
1729 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1730 FRAME_NUM_ARGS_P ());
1732 #ifdef FRAME_NUM_ARGS
1733 fprintf_unfiltered (file,
1734 "gdbarch_dump: %s # %s\n",
1735 "FRAME_NUM_ARGS(frame)",
1736 XSTRING (FRAME_NUM_ARGS (frame)));
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1739 (long) current_gdbarch->frame_num_args
1740 /*FRAME_NUM_ARGS ()*/);
1742 #ifdef FRAME_RED_ZONE_SIZE
1743 fprintf_unfiltered (file,
1744 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1745 XSTRING (FRAME_RED_ZONE_SIZE));
1746 fprintf_unfiltered (file,
1747 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1748 FRAME_RED_ZONE_SIZE);
1750 #ifdef FUNCTION_START_OFFSET
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1753 XSTRING (FUNCTION_START_OFFSET));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1756 (long) FUNCTION_START_OFFSET);
1758 #ifdef GET_LONGJMP_TARGET_P
1759 fprintf_unfiltered (file,
1760 "gdbarch_dump: %s # %s\n",
1761 "GET_LONGJMP_TARGET_P()",
1762 XSTRING (GET_LONGJMP_TARGET_P ()));
1763 fprintf_unfiltered (file,
1764 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1765 GET_LONGJMP_TARGET_P ());
1767 #ifdef GET_LONGJMP_TARGET
1768 fprintf_unfiltered (file,
1769 "gdbarch_dump: %s # %s\n",
1770 "GET_LONGJMP_TARGET(pc)",
1771 XSTRING (GET_LONGJMP_TARGET (pc)));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1774 (long) current_gdbarch->get_longjmp_target
1775 /*GET_LONGJMP_TARGET ()*/);
1777 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1778 fprintf_unfiltered (file,
1779 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1780 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1781 fprintf_unfiltered (file,
1782 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1783 HAVE_NONSTEPPABLE_WATCHPOINT);
1786 fprintf_unfiltered (file,
1787 "gdbarch_dump: %s # %s\n",
1788 "INNER_THAN(lhs, rhs)",
1789 XSTRING (INNER_THAN (lhs, rhs)));
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1792 (long) current_gdbarch->inner_than
1795 #ifdef INTEGER_TO_ADDRESS_P
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "INTEGER_TO_ADDRESS_P()",
1799 XSTRING (INTEGER_TO_ADDRESS_P ()));
1800 fprintf_unfiltered (file,
1801 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1802 INTEGER_TO_ADDRESS_P ());
1804 #ifdef INTEGER_TO_ADDRESS
1805 fprintf_unfiltered (file,
1806 "gdbarch_dump: %s # %s\n",
1807 "INTEGER_TO_ADDRESS(type, buf)",
1808 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1811 (long) current_gdbarch->integer_to_address
1812 /*INTEGER_TO_ADDRESS ()*/);
1814 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: %s # %s\n",
1817 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1818 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1819 fprintf_unfiltered (file,
1820 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1821 (long) current_gdbarch->in_solib_call_trampoline
1822 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1824 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1825 fprintf_unfiltered (file,
1826 "gdbarch_dump: %s # %s\n",
1827 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1828 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1831 (long) current_gdbarch->in_solib_return_trampoline
1832 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1834 #ifdef MEMORY_INSERT_BREAKPOINT
1835 fprintf_unfiltered (file,
1836 "gdbarch_dump: %s # %s\n",
1837 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1838 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1839 fprintf_unfiltered (file,
1840 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1841 (long) current_gdbarch->memory_insert_breakpoint
1842 /*MEMORY_INSERT_BREAKPOINT ()*/);
1844 #ifdef MEMORY_REMOVE_BREAKPOINT
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: %s # %s\n",
1847 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1848 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1851 (long) current_gdbarch->memory_remove_breakpoint
1852 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1854 #ifdef NAME_OF_MALLOC
1855 fprintf_unfiltered (file,
1856 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1857 XSTRING (NAME_OF_MALLOC));
1858 fprintf_unfiltered (file,
1859 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1862 #ifdef NUM_PSEUDO_REGS
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1865 XSTRING (NUM_PSEUDO_REGS));
1866 fprintf_unfiltered (file,
1867 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1871 fprintf_unfiltered (file,
1872 "gdbarch_dump: NUM_REGS # %s\n",
1873 XSTRING (NUM_REGS));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: NUM_REGS = %d\n",
1878 #ifdef PARM_BOUNDARY
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1881 XSTRING (PARM_BOUNDARY));
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: PC_REGNUM # %s\n",
1889 XSTRING (PC_REGNUM));
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: PC_REGNUM = %d\n",
1894 #ifdef POINTER_TO_ADDRESS
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: %s # %s\n",
1897 "POINTER_TO_ADDRESS(type, buf)",
1898 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1901 (long) current_gdbarch->pointer_to_address
1902 /*POINTER_TO_ADDRESS ()*/);
1904 fprintf_unfiltered (file,
1905 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1906 gdbarch_print_float_info_p (current_gdbarch));
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: print_float_info = 0x%08lx\n",
1909 (long) current_gdbarch->print_float_info);
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1912 (long) current_gdbarch->print_registers_info);
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1915 gdbarch_print_vector_info_p (current_gdbarch));
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1918 (long) current_gdbarch->print_vector_info);
1920 fprintf_unfiltered (file,
1921 "gdbarch_dump: PS_REGNUM # %s\n",
1922 XSTRING (PS_REGNUM));
1923 fprintf_unfiltered (file,
1924 "gdbarch_dump: PS_REGNUM = %d\n",
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1929 gdbarch_push_dummy_call_p (current_gdbarch));
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1932 (long) current_gdbarch->push_dummy_call);
1933 fprintf_unfiltered (file,
1934 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1935 gdbarch_push_dummy_code_p (current_gdbarch));
1936 fprintf_unfiltered (file,
1937 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1938 (long) current_gdbarch->push_dummy_code);
1939 #ifdef REGISTER_BYTES_OK_P
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: %s # %s\n",
1942 "REGISTER_BYTES_OK_P()",
1943 XSTRING (REGISTER_BYTES_OK_P ()));
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1946 REGISTER_BYTES_OK_P ());
1948 #ifdef REGISTER_BYTES_OK
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: %s # %s\n",
1951 "REGISTER_BYTES_OK(nr_bytes)",
1952 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1955 (long) current_gdbarch->register_bytes_ok
1956 /*REGISTER_BYTES_OK ()*/);
1958 #ifdef REGISTER_NAME
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: %s # %s\n",
1961 "REGISTER_NAME(regnr)",
1962 XSTRING (REGISTER_NAME (regnr)));
1963 fprintf_unfiltered (file,
1964 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1965 (long) current_gdbarch->register_name
1966 /*REGISTER_NAME ()*/);
1968 #ifdef REGISTER_SIM_REGNO
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: %s # %s\n",
1971 "REGISTER_SIM_REGNO(reg_nr)",
1972 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1975 (long) current_gdbarch->register_sim_regno
1976 /*REGISTER_SIM_REGNO ()*/);
1978 #ifdef REGISTER_TO_VALUE
1979 fprintf_unfiltered (file,
1980 "gdbarch_dump: %s # %s\n",
1981 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1982 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1985 (long) current_gdbarch->register_to_value
1986 /*REGISTER_TO_VALUE ()*/);
1988 fprintf_unfiltered (file,
1989 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1990 gdbarch_register_type_p (current_gdbarch));
1991 fprintf_unfiltered (file,
1992 "gdbarch_dump: register_type = 0x%08lx\n",
1993 (long) current_gdbarch->register_type);
1994 fprintf_unfiltered (file,
1995 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1996 (long) current_gdbarch->remote_translate_xfer_address);
1997 #ifdef RETURN_VALUE_ON_STACK
1998 fprintf_unfiltered (file,
1999 "gdbarch_dump: %s # %s\n",
2000 "RETURN_VALUE_ON_STACK(type)",
2001 XSTRING (RETURN_VALUE_ON_STACK (type)));
2002 fprintf_unfiltered (file,
2003 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2004 (long) current_gdbarch->return_value_on_stack
2005 /*RETURN_VALUE_ON_STACK ()*/);
2007 #ifdef SDB_REG_TO_REGNUM
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: %s # %s\n",
2010 "SDB_REG_TO_REGNUM(sdb_regnr)",
2011 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2014 (long) current_gdbarch->sdb_reg_to_regnum
2015 /*SDB_REG_TO_REGNUM ()*/);
2017 #ifdef SKIP_PROLOGUE
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: %s # %s\n",
2020 "SKIP_PROLOGUE(ip)",
2021 XSTRING (SKIP_PROLOGUE (ip)));
2022 fprintf_unfiltered (file,
2023 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2024 (long) current_gdbarch->skip_prologue
2025 /*SKIP_PROLOGUE ()*/);
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
2029 (long) current_gdbarch->skip_solib_resolver);
2030 #ifdef SKIP_TRAMPOLINE_CODE
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: %s # %s\n",
2033 "SKIP_TRAMPOLINE_CODE(pc)",
2034 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2037 (long) current_gdbarch->skip_trampoline_code
2038 /*SKIP_TRAMPOLINE_CODE ()*/);
2040 #ifdef SMASH_TEXT_ADDRESS
2041 fprintf_unfiltered (file,
2042 "gdbarch_dump: %s # %s\n",
2043 "SMASH_TEXT_ADDRESS(addr)",
2044 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2045 fprintf_unfiltered (file,
2046 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2047 (long) current_gdbarch->smash_text_address
2048 /*SMASH_TEXT_ADDRESS ()*/);
2050 #ifdef SOFTWARE_SINGLE_STEP_P
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: %s # %s\n",
2053 "SOFTWARE_SINGLE_STEP_P()",
2054 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2057 SOFTWARE_SINGLE_STEP_P ());
2059 #ifdef SOFTWARE_SINGLE_STEP
2060 fprintf_unfiltered (file,
2061 "gdbarch_dump: %s # %s\n",
2062 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2063 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2066 (long) current_gdbarch->software_single_step
2067 /*SOFTWARE_SINGLE_STEP ()*/);
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: SP_REGNUM # %s\n",
2072 XSTRING (SP_REGNUM));
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: SP_REGNUM = %d\n",
2077 #ifdef STAB_REG_TO_REGNUM
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: %s # %s\n",
2080 "STAB_REG_TO_REGNUM(stab_regnr)",
2081 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2084 (long) current_gdbarch->stab_reg_to_regnum
2085 /*STAB_REG_TO_REGNUM ()*/);
2087 #ifdef STORE_RETURN_VALUE
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: %s # %s\n",
2090 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2091 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2092 fprintf_unfiltered (file,
2093 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2094 (long) current_gdbarch->store_return_value
2095 /*STORE_RETURN_VALUE ()*/);
2097 #ifdef TARGET_ADDR_BIT
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2100 XSTRING (TARGET_ADDR_BIT));
2101 fprintf_unfiltered (file,
2102 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2105 #ifdef TARGET_ARCHITECTURE
2106 fprintf_unfiltered (file,
2107 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2108 XSTRING (TARGET_ARCHITECTURE));
2109 if (TARGET_ARCHITECTURE != NULL)
2110 fprintf_unfiltered (file,
2111 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2112 TARGET_ARCHITECTURE->printable_name);
2114 #ifdef TARGET_BFD_VMA_BIT
2115 fprintf_unfiltered (file,
2116 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2117 XSTRING (TARGET_BFD_VMA_BIT));
2118 fprintf_unfiltered (file,
2119 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2120 TARGET_BFD_VMA_BIT);
2122 #ifdef TARGET_BYTE_ORDER
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2125 XSTRING (TARGET_BYTE_ORDER));
2126 fprintf_unfiltered (file,
2127 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2128 (long) TARGET_BYTE_ORDER);
2130 #ifdef TARGET_CHAR_SIGNED
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2133 XSTRING (TARGET_CHAR_SIGNED));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2136 TARGET_CHAR_SIGNED);
2138 #ifdef TARGET_DOUBLE_BIT
2139 fprintf_unfiltered (file,
2140 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2141 XSTRING (TARGET_DOUBLE_BIT));
2142 fprintf_unfiltered (file,
2143 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2146 #ifdef TARGET_DOUBLE_FORMAT
2147 fprintf_unfiltered (file,
2148 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2149 XSTRING (TARGET_DOUBLE_FORMAT));
2150 fprintf_unfiltered (file,
2151 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2152 (TARGET_DOUBLE_FORMAT)->name);
2154 #ifdef TARGET_FLOAT_BIT
2155 fprintf_unfiltered (file,
2156 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2157 XSTRING (TARGET_FLOAT_BIT));
2158 fprintf_unfiltered (file,
2159 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2162 #ifdef TARGET_FLOAT_FORMAT
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2165 XSTRING (TARGET_FLOAT_FORMAT));
2166 fprintf_unfiltered (file,
2167 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2168 (TARGET_FLOAT_FORMAT)->name);
2170 #ifdef TARGET_INT_BIT
2171 fprintf_unfiltered (file,
2172 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2173 XSTRING (TARGET_INT_BIT));
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2178 #ifdef TARGET_LONG_BIT
2179 fprintf_unfiltered (file,
2180 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2181 XSTRING (TARGET_LONG_BIT));
2182 fprintf_unfiltered (file,
2183 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2186 #ifdef TARGET_LONG_DOUBLE_BIT
2187 fprintf_unfiltered (file,
2188 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2189 XSTRING (TARGET_LONG_DOUBLE_BIT));
2190 fprintf_unfiltered (file,
2191 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2192 TARGET_LONG_DOUBLE_BIT);
2194 #ifdef TARGET_LONG_DOUBLE_FORMAT
2195 fprintf_unfiltered (file,
2196 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2197 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2198 fprintf_unfiltered (file,
2199 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2200 (TARGET_LONG_DOUBLE_FORMAT)->name);
2202 #ifdef TARGET_LONG_LONG_BIT
2203 fprintf_unfiltered (file,
2204 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2205 XSTRING (TARGET_LONG_LONG_BIT));
2206 fprintf_unfiltered (file,
2207 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2208 TARGET_LONG_LONG_BIT);
2211 fprintf_unfiltered (file,
2212 "gdbarch_dump: TARGET_OSABI # %s\n",
2213 XSTRING (TARGET_OSABI));
2214 fprintf_unfiltered (file,
2215 "gdbarch_dump: TARGET_OSABI = %ld\n",
2216 (long) TARGET_OSABI);
2218 #ifdef TARGET_PRINT_INSN
2219 fprintf_unfiltered (file,
2220 "gdbarch_dump: %s # %s\n",
2221 "TARGET_PRINT_INSN(vma, info)",
2222 XSTRING (TARGET_PRINT_INSN (vma, info)));
2223 fprintf_unfiltered (file,
2224 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2225 (long) current_gdbarch->print_insn
2226 /*TARGET_PRINT_INSN ()*/);
2228 #ifdef TARGET_PTR_BIT
2229 fprintf_unfiltered (file,
2230 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2231 XSTRING (TARGET_PTR_BIT));
2232 fprintf_unfiltered (file,
2233 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2236 #ifdef TARGET_READ_PC_P
2237 fprintf_unfiltered (file,
2238 "gdbarch_dump: %s # %s\n",
2239 "TARGET_READ_PC_P()",
2240 XSTRING (TARGET_READ_PC_P ()));
2241 fprintf_unfiltered (file,
2242 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2243 TARGET_READ_PC_P ());
2245 #ifdef TARGET_READ_PC
2246 fprintf_unfiltered (file,
2247 "gdbarch_dump: %s # %s\n",
2248 "TARGET_READ_PC(ptid)",
2249 XSTRING (TARGET_READ_PC (ptid)));
2250 fprintf_unfiltered (file,
2251 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2252 (long) current_gdbarch->read_pc
2253 /*TARGET_READ_PC ()*/);
2255 #ifdef TARGET_READ_SP_P
2256 fprintf_unfiltered (file,
2257 "gdbarch_dump: %s # %s\n",
2258 "TARGET_READ_SP_P()",
2259 XSTRING (TARGET_READ_SP_P ()));
2260 fprintf_unfiltered (file,
2261 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2262 TARGET_READ_SP_P ());
2264 #ifdef TARGET_READ_SP
2265 fprintf_unfiltered (file,
2266 "gdbarch_dump: %s # %s\n",
2268 XSTRING (TARGET_READ_SP ()));
2269 fprintf_unfiltered (file,
2270 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2271 (long) current_gdbarch->read_sp
2272 /*TARGET_READ_SP ()*/);
2274 #ifdef TARGET_SHORT_BIT
2275 fprintf_unfiltered (file,
2276 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2277 XSTRING (TARGET_SHORT_BIT));
2278 fprintf_unfiltered (file,
2279 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2282 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: %s # %s\n",
2285 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2286 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2287 fprintf_unfiltered (file,
2288 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2289 (long) current_gdbarch->virtual_frame_pointer
2290 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2292 #ifdef TARGET_WRITE_PC
2293 fprintf_unfiltered (file,
2294 "gdbarch_dump: %s # %s\n",
2295 "TARGET_WRITE_PC(val, ptid)",
2296 XSTRING (TARGET_WRITE_PC (val, ptid)));
2297 fprintf_unfiltered (file,
2298 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2299 (long) current_gdbarch->write_pc
2300 /*TARGET_WRITE_PC ()*/);
2302 fprintf_unfiltered (file,
2303 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2304 gdbarch_unwind_dummy_id_p (current_gdbarch));
2305 fprintf_unfiltered (file,
2306 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2307 (long) current_gdbarch->unwind_dummy_id);
2308 fprintf_unfiltered (file,
2309 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2310 gdbarch_unwind_pc_p (current_gdbarch));
2311 fprintf_unfiltered (file,
2312 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2313 (long) current_gdbarch->unwind_pc);
2314 fprintf_unfiltered (file,
2315 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2316 gdbarch_unwind_sp_p (current_gdbarch));
2317 fprintf_unfiltered (file,
2318 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2319 (long) current_gdbarch->unwind_sp);
2320 #ifdef USE_STRUCT_CONVENTION
2321 fprintf_unfiltered (file,
2322 "gdbarch_dump: %s # %s\n",
2323 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2324 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2325 fprintf_unfiltered (file,
2326 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2327 (long) current_gdbarch->use_struct_convention
2328 /*USE_STRUCT_CONVENTION ()*/);
2330 #ifdef VALUE_TO_REGISTER
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: %s # %s\n",
2333 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2334 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2335 fprintf_unfiltered (file,
2336 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2337 (long) current_gdbarch->value_to_register
2338 /*VALUE_TO_REGISTER ()*/);
2340 if (current_gdbarch->dump_tdep != NULL)
2341 current_gdbarch->dump_tdep (current_gdbarch, file);
2344 struct gdbarch_tdep *
2345 gdbarch_tdep (struct gdbarch *gdbarch)
2347 if (gdbarch_debug >= 2)
2348 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2349 return gdbarch->tdep;
2353 const struct bfd_arch_info *
2354 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2356 gdb_assert (gdbarch != NULL);
2357 if (gdbarch_debug >= 2)
2358 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2359 return gdbarch->bfd_arch_info;
2363 gdbarch_byte_order (struct gdbarch *gdbarch)
2365 gdb_assert (gdbarch != NULL);
2366 if (gdbarch_debug >= 2)
2367 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2368 return gdbarch->byte_order;
2372 gdbarch_osabi (struct gdbarch *gdbarch)
2374 gdb_assert (gdbarch != NULL);
2375 if (gdbarch_debug >= 2)
2376 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2377 return gdbarch->osabi;
2381 gdbarch_short_bit (struct gdbarch *gdbarch)
2383 gdb_assert (gdbarch != NULL);
2384 /* Skip verify of short_bit, invalid_p == 0 */
2385 if (gdbarch_debug >= 2)
2386 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2387 return gdbarch->short_bit;
2391 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2394 gdbarch->short_bit = short_bit;
2398 gdbarch_int_bit (struct gdbarch *gdbarch)
2400 gdb_assert (gdbarch != NULL);
2401 /* Skip verify of int_bit, invalid_p == 0 */
2402 if (gdbarch_debug >= 2)
2403 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2404 return gdbarch->int_bit;
2408 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2411 gdbarch->int_bit = int_bit;
2415 gdbarch_long_bit (struct gdbarch *gdbarch)
2417 gdb_assert (gdbarch != NULL);
2418 /* Skip verify of long_bit, invalid_p == 0 */
2419 if (gdbarch_debug >= 2)
2420 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2421 return gdbarch->long_bit;
2425 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2428 gdbarch->long_bit = long_bit;
2432 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2434 gdb_assert (gdbarch != NULL);
2435 /* Skip verify of long_long_bit, invalid_p == 0 */
2436 if (gdbarch_debug >= 2)
2437 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2438 return gdbarch->long_long_bit;
2442 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2445 gdbarch->long_long_bit = long_long_bit;
2449 gdbarch_float_bit (struct gdbarch *gdbarch)
2451 gdb_assert (gdbarch != NULL);
2452 /* Skip verify of float_bit, invalid_p == 0 */
2453 if (gdbarch_debug >= 2)
2454 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2455 return gdbarch->float_bit;
2459 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2462 gdbarch->float_bit = float_bit;
2466 gdbarch_double_bit (struct gdbarch *gdbarch)
2468 gdb_assert (gdbarch != NULL);
2469 /* Skip verify of double_bit, invalid_p == 0 */
2470 if (gdbarch_debug >= 2)
2471 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2472 return gdbarch->double_bit;
2476 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2479 gdbarch->double_bit = double_bit;
2483 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2485 gdb_assert (gdbarch != NULL);
2486 /* Skip verify of long_double_bit, invalid_p == 0 */
2487 if (gdbarch_debug >= 2)
2488 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2489 return gdbarch->long_double_bit;
2493 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2494 int long_double_bit)
2496 gdbarch->long_double_bit = long_double_bit;
2500 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2502 gdb_assert (gdbarch != NULL);
2503 /* Skip verify of ptr_bit, invalid_p == 0 */
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2506 return gdbarch->ptr_bit;
2510 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2513 gdbarch->ptr_bit = ptr_bit;
2517 gdbarch_addr_bit (struct gdbarch *gdbarch)
2519 gdb_assert (gdbarch != NULL);
2520 /* Check variable changed from pre-default. */
2521 gdb_assert (gdbarch->addr_bit != 0);
2522 if (gdbarch_debug >= 2)
2523 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2524 return gdbarch->addr_bit;
2528 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2531 gdbarch->addr_bit = addr_bit;
2535 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2537 gdb_assert (gdbarch != NULL);
2538 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2539 if (gdbarch_debug >= 2)
2540 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2541 return gdbarch->bfd_vma_bit;
2545 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2548 gdbarch->bfd_vma_bit = bfd_vma_bit;
2552 gdbarch_char_signed (struct gdbarch *gdbarch)
2554 gdb_assert (gdbarch != NULL);
2555 /* Check variable changed from pre-default. */
2556 gdb_assert (gdbarch->char_signed != -1);
2557 if (gdbarch_debug >= 2)
2558 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2559 return gdbarch->char_signed;
2563 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2566 gdbarch->char_signed = char_signed;
2570 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2572 gdb_assert (gdbarch != NULL);
2573 return gdbarch->read_pc != NULL;
2577 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2579 gdb_assert (gdbarch != NULL);
2580 gdb_assert (gdbarch->read_pc != NULL);
2581 if (gdbarch_debug >= 2)
2582 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2583 return gdbarch->read_pc (ptid);
2587 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2588 gdbarch_read_pc_ftype read_pc)
2590 gdbarch->read_pc = read_pc;
2594 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2596 gdb_assert (gdbarch != NULL);
2597 gdb_assert (gdbarch->write_pc != NULL);
2598 if (gdbarch_debug >= 2)
2599 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2600 gdbarch->write_pc (val, ptid);
2604 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2605 gdbarch_write_pc_ftype write_pc)
2607 gdbarch->write_pc = write_pc;
2611 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2613 gdb_assert (gdbarch != NULL);
2614 return gdbarch->read_sp != NULL;
2618 gdbarch_read_sp (struct gdbarch *gdbarch)
2620 gdb_assert (gdbarch != NULL);
2621 gdb_assert (gdbarch->read_sp != NULL);
2622 if (gdbarch_debug >= 2)
2623 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2624 return gdbarch->read_sp ();
2628 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2629 gdbarch_read_sp_ftype read_sp)
2631 gdbarch->read_sp = read_sp;
2635 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2637 gdb_assert (gdbarch != NULL);
2638 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2639 if (gdbarch_debug >= 2)
2640 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2641 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2645 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2646 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2648 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2652 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2654 gdb_assert (gdbarch != NULL);
2655 return gdbarch->pseudo_register_read != NULL;
2659 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2661 gdb_assert (gdbarch != NULL);
2662 gdb_assert (gdbarch->pseudo_register_read != NULL);
2663 if (gdbarch_debug >= 2)
2664 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2665 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2669 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2670 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2672 gdbarch->pseudo_register_read = pseudo_register_read;
2676 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2678 gdb_assert (gdbarch != NULL);
2679 return gdbarch->pseudo_register_write != NULL;
2683 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2685 gdb_assert (gdbarch != NULL);
2686 gdb_assert (gdbarch->pseudo_register_write != NULL);
2687 if (gdbarch_debug >= 2)
2688 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2689 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2693 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2694 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2696 gdbarch->pseudo_register_write = pseudo_register_write;
2700 gdbarch_num_regs (struct gdbarch *gdbarch)
2702 gdb_assert (gdbarch != NULL);
2703 /* Check variable changed from pre-default. */
2704 gdb_assert (gdbarch->num_regs != -1);
2705 if (gdbarch_debug >= 2)
2706 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2707 return gdbarch->num_regs;
2711 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2714 gdbarch->num_regs = num_regs;
2718 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2720 gdb_assert (gdbarch != NULL);
2721 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2722 if (gdbarch_debug >= 2)
2723 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2724 return gdbarch->num_pseudo_regs;
2728 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2729 int num_pseudo_regs)
2731 gdbarch->num_pseudo_regs = num_pseudo_regs;
2735 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2737 gdb_assert (gdbarch != NULL);
2738 /* Skip verify of sp_regnum, invalid_p == 0 */
2739 if (gdbarch_debug >= 2)
2740 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2741 return gdbarch->sp_regnum;
2745 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2748 gdbarch->sp_regnum = sp_regnum;
2752 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2754 gdb_assert (gdbarch != NULL);
2755 /* Skip verify of pc_regnum, invalid_p == 0 */
2756 if (gdbarch_debug >= 2)
2757 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2758 return gdbarch->pc_regnum;
2762 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2765 gdbarch->pc_regnum = pc_regnum;
2769 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2771 gdb_assert (gdbarch != NULL);
2772 /* Skip verify of ps_regnum, invalid_p == 0 */
2773 if (gdbarch_debug >= 2)
2774 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2775 return gdbarch->ps_regnum;
2779 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2782 gdbarch->ps_regnum = ps_regnum;
2786 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2788 gdb_assert (gdbarch != NULL);
2789 /* Skip verify of fp0_regnum, invalid_p == 0 */
2790 if (gdbarch_debug >= 2)
2791 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2792 return gdbarch->fp0_regnum;
2796 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2799 gdbarch->fp0_regnum = fp0_regnum;
2803 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2805 gdb_assert (gdbarch != NULL);
2806 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2807 if (gdbarch_debug >= 2)
2808 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2809 return gdbarch->stab_reg_to_regnum (stab_regnr);
2813 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2814 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2816 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2820 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2822 gdb_assert (gdbarch != NULL);
2823 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2824 if (gdbarch_debug >= 2)
2825 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2826 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2830 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2831 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2833 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2837 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2839 gdb_assert (gdbarch != NULL);
2840 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2841 if (gdbarch_debug >= 2)
2842 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2843 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2847 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2848 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2850 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2854 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2856 gdb_assert (gdbarch != NULL);
2857 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2858 if (gdbarch_debug >= 2)
2859 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2860 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2864 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2865 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2867 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2871 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2873 gdb_assert (gdbarch != NULL);
2874 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2875 if (gdbarch_debug >= 2)
2876 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2877 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2881 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2882 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2884 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2888 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2890 gdb_assert (gdbarch != NULL);
2891 gdb_assert (gdbarch->register_name != NULL);
2892 if (gdbarch_debug >= 2)
2893 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2894 return gdbarch->register_name (regnr);
2898 set_gdbarch_register_name (struct gdbarch *gdbarch,
2899 gdbarch_register_name_ftype register_name)
2901 gdbarch->register_name = register_name;
2905 gdbarch_register_type_p (struct gdbarch *gdbarch)
2907 gdb_assert (gdbarch != NULL);
2908 return gdbarch->register_type != NULL;
2912 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2914 gdb_assert (gdbarch != NULL);
2915 gdb_assert (gdbarch->register_type != NULL);
2916 if (gdbarch_debug >= 2)
2917 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2918 return gdbarch->register_type (gdbarch, reg_nr);
2922 set_gdbarch_register_type (struct gdbarch *gdbarch,
2923 gdbarch_register_type_ftype register_type)
2925 gdbarch->register_type = register_type;
2929 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2931 gdb_assert (gdbarch != NULL);
2932 return gdbarch->deprecated_register_virtual_type != NULL;
2936 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2938 gdb_assert (gdbarch != NULL);
2939 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2940 if (gdbarch_debug >= 2)
2941 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2942 return gdbarch->deprecated_register_virtual_type (reg_nr);
2946 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2947 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2949 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2953 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2955 gdb_assert (gdbarch != NULL);
2956 if (gdbarch_debug >= 2)
2957 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2958 return gdbarch->deprecated_register_bytes;
2962 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2963 int deprecated_register_bytes)
2965 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2969 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2971 gdb_assert (gdbarch != NULL);
2972 return gdbarch->deprecated_register_byte != generic_register_byte;
2976 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2978 gdb_assert (gdbarch != NULL);
2979 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2980 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2981 if (gdbarch_debug >= 2)
2982 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2983 return gdbarch->deprecated_register_byte (reg_nr);
2987 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2988 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2990 gdbarch->deprecated_register_byte = deprecated_register_byte;
2994 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2996 gdb_assert (gdbarch != NULL);
2997 return gdbarch->deprecated_register_raw_size != generic_register_size;
3001 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3003 gdb_assert (gdbarch != NULL);
3004 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
3005 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
3006 if (gdbarch_debug >= 2)
3007 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
3008 return gdbarch->deprecated_register_raw_size (reg_nr);
3012 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
3013 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
3015 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
3019 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
3021 gdb_assert (gdbarch != NULL);
3022 return gdbarch->deprecated_register_virtual_size != generic_register_size;
3026 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3028 gdb_assert (gdbarch != NULL);
3029 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
3030 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
3031 if (gdbarch_debug >= 2)
3032 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
3033 return gdbarch->deprecated_register_virtual_size (reg_nr);
3037 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
3038 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
3040 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
3044 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3046 gdb_assert (gdbarch != NULL);
3047 return gdbarch->deprecated_max_register_raw_size != 0;
3051 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3053 gdb_assert (gdbarch != NULL);
3054 if (gdbarch_debug >= 2)
3055 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3056 return gdbarch->deprecated_max_register_raw_size;
3060 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3061 int deprecated_max_register_raw_size)
3063 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3067 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3069 gdb_assert (gdbarch != NULL);
3070 return gdbarch->deprecated_max_register_virtual_size != 0;
3074 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3076 gdb_assert (gdbarch != NULL);
3077 if (gdbarch_debug >= 2)
3078 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3079 return gdbarch->deprecated_max_register_virtual_size;
3083 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3084 int deprecated_max_register_virtual_size)
3086 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3090 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
3092 gdb_assert (gdbarch != NULL);
3093 return gdbarch->unwind_dummy_id != NULL;
3097 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
3099 gdb_assert (gdbarch != NULL);
3100 gdb_assert (gdbarch->unwind_dummy_id != NULL);
3101 if (gdbarch_debug >= 2)
3102 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
3103 return gdbarch->unwind_dummy_id (gdbarch, info);
3107 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
3108 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
3110 gdbarch->unwind_dummy_id = unwind_dummy_id;
3114 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3116 gdb_assert (gdbarch != NULL);
3117 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
3121 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3123 gdb_assert (gdbarch != NULL);
3124 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
3125 if (gdbarch_debug >= 2)
3126 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3127 gdbarch->deprecated_save_dummy_frame_tos (sp);
3131 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
3132 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
3134 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
3138 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3140 gdb_assert (gdbarch != NULL);
3141 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3142 if (gdbarch_debug >= 2)
3143 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3144 return gdbarch->deprecated_fp_regnum;
3148 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3149 int deprecated_fp_regnum)
3151 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3155 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
3157 gdb_assert (gdbarch != NULL);
3158 return gdbarch->deprecated_target_read_fp != NULL;
3162 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3164 gdb_assert (gdbarch != NULL);
3165 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
3166 if (gdbarch_debug >= 2)
3167 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3168 return gdbarch->deprecated_target_read_fp ();
3172 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3173 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3175 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3179 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3181 gdb_assert (gdbarch != NULL);
3182 return gdbarch->push_dummy_call != NULL;
3186 gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3188 gdb_assert (gdbarch != NULL);
3189 gdb_assert (gdbarch->push_dummy_call != NULL);
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3192 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3196 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3197 gdbarch_push_dummy_call_ftype push_dummy_call)
3199 gdbarch->push_dummy_call = push_dummy_call;
3203 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3205 gdb_assert (gdbarch != NULL);
3206 return gdbarch->deprecated_push_arguments != NULL;
3210 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3212 gdb_assert (gdbarch != NULL);
3213 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3214 if (gdbarch_debug >= 2)
3215 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3216 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3220 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3221 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3223 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3227 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3229 gdb_assert (gdbarch != NULL);
3230 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3231 if (gdbarch_debug >= 2)
3232 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3233 return gdbarch->deprecated_use_generic_dummy_frames;
3237 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3238 int deprecated_use_generic_dummy_frames)
3240 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3244 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3246 gdb_assert (gdbarch != NULL);
3247 return gdbarch->deprecated_push_return_address != NULL;
3251 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3253 gdb_assert (gdbarch != NULL);
3254 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3255 if (gdbarch_debug >= 2)
3256 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3257 return gdbarch->deprecated_push_return_address (pc, sp);
3261 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3262 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3264 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3268 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3270 gdb_assert (gdbarch != NULL);
3271 return gdbarch->deprecated_dummy_write_sp != NULL;
3275 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3277 gdb_assert (gdbarch != NULL);
3278 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3279 if (gdbarch_debug >= 2)
3280 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3281 gdbarch->deprecated_dummy_write_sp (val);
3285 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3286 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3288 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3292 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3294 gdb_assert (gdbarch != NULL);
3295 if (gdbarch_debug >= 2)
3296 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3297 return gdbarch->deprecated_register_size;
3301 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3302 int deprecated_register_size)
3304 gdbarch->deprecated_register_size = deprecated_register_size;
3308 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3310 gdb_assert (gdbarch != NULL);
3311 /* Skip verify of call_dummy_location, invalid_p == 0 */
3312 if (gdbarch_debug >= 2)
3313 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3314 return gdbarch->call_dummy_location;
3318 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3319 int call_dummy_location)
3321 gdbarch->call_dummy_location = call_dummy_location;
3325 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
3327 gdb_assert (gdbarch != NULL);
3328 if (gdbarch_debug >= 2)
3329 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3330 return gdbarch->deprecated_call_dummy_start_offset;
3334 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3335 CORE_ADDR deprecated_call_dummy_start_offset)
3337 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3341 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3343 gdb_assert (gdbarch != NULL);
3344 if (gdbarch_debug >= 2)
3345 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3346 return gdbarch->deprecated_call_dummy_breakpoint_offset;
3350 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3351 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3353 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3357 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3359 gdb_assert (gdbarch != NULL);
3360 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3361 if (gdbarch_debug >= 2)
3362 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3363 return gdbarch->deprecated_call_dummy_words;
3367 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3368 LONGEST * deprecated_call_dummy_words)
3370 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3374 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3376 gdb_assert (gdbarch != NULL);
3377 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3378 if (gdbarch_debug >= 2)
3379 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3380 return gdbarch->deprecated_sizeof_call_dummy_words;
3384 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3385 int deprecated_sizeof_call_dummy_words)
3387 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3391 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3393 gdb_assert (gdbarch != NULL);
3394 return gdbarch->deprecated_fix_call_dummy != NULL;
3398 gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
3400 gdb_assert (gdbarch != NULL);
3401 gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
3402 if (gdbarch_debug >= 2)
3403 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3404 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3408 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3409 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3411 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3415 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3417 gdb_assert (gdbarch != NULL);
3418 return gdbarch->push_dummy_code != NULL;
3422 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
3424 gdb_assert (gdbarch != NULL);
3425 gdb_assert (gdbarch->push_dummy_code != NULL);
3426 if (gdbarch_debug >= 2)
3427 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3428 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3432 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3433 gdbarch_push_dummy_code_ftype push_dummy_code)
3435 gdbarch->push_dummy_code = push_dummy_code;
3439 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
3441 gdb_assert (gdbarch != NULL);
3442 return gdbarch->deprecated_push_dummy_frame != NULL;
3446 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
3448 gdb_assert (gdbarch != NULL);
3449 gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
3450 if (gdbarch_debug >= 2)
3451 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
3452 gdbarch->deprecated_push_dummy_frame ();
3456 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
3457 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
3459 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
3463 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3465 gdb_assert (gdbarch != NULL);
3466 return gdbarch->deprecated_do_registers_info != NULL;
3470 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3472 gdb_assert (gdbarch != NULL);
3473 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3474 if (gdbarch_debug >= 2)
3475 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3476 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3480 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3481 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3483 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3487 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3489 gdb_assert (gdbarch != NULL);
3490 gdb_assert (gdbarch->print_registers_info != NULL);
3491 if (gdbarch_debug >= 2)
3492 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3493 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3497 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3498 gdbarch_print_registers_info_ftype print_registers_info)
3500 gdbarch->print_registers_info = print_registers_info;
3504 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3506 gdb_assert (gdbarch != NULL);
3507 return gdbarch->print_float_info != NULL;
3511 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3513 gdb_assert (gdbarch != NULL);
3514 gdb_assert (gdbarch->print_float_info != NULL);
3515 if (gdbarch_debug >= 2)
3516 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3517 gdbarch->print_float_info (gdbarch, file, frame, args);
3521 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3522 gdbarch_print_float_info_ftype print_float_info)
3524 gdbarch->print_float_info = print_float_info;
3528 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3530 gdb_assert (gdbarch != NULL);
3531 return gdbarch->print_vector_info != NULL;
3535 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3537 gdb_assert (gdbarch != NULL);
3538 gdb_assert (gdbarch->print_vector_info != NULL);
3539 if (gdbarch_debug >= 2)
3540 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3541 gdbarch->print_vector_info (gdbarch, file, frame, args);
3545 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3546 gdbarch_print_vector_info_ftype print_vector_info)
3548 gdbarch->print_vector_info = print_vector_info;
3552 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3554 gdb_assert (gdbarch != NULL);
3555 gdb_assert (gdbarch->register_sim_regno != NULL);
3556 if (gdbarch_debug >= 2)
3557 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3558 return gdbarch->register_sim_regno (reg_nr);
3562 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3563 gdbarch_register_sim_regno_ftype register_sim_regno)
3565 gdbarch->register_sim_regno = register_sim_regno;
3569 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3571 gdb_assert (gdbarch != NULL);
3572 return gdbarch->register_bytes_ok != NULL;
3576 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3578 gdb_assert (gdbarch != NULL);
3579 gdb_assert (gdbarch->register_bytes_ok != NULL);
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3582 return gdbarch->register_bytes_ok (nr_bytes);
3586 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3587 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3589 gdbarch->register_bytes_ok = register_bytes_ok;
3593 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3595 gdb_assert (gdbarch != NULL);
3596 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3597 if (gdbarch_debug >= 2)
3598 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3599 return gdbarch->cannot_fetch_register (regnum);
3603 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3604 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3606 gdbarch->cannot_fetch_register = cannot_fetch_register;
3610 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3612 gdb_assert (gdbarch != NULL);
3613 gdb_assert (gdbarch->cannot_store_register != NULL);
3614 if (gdbarch_debug >= 2)
3615 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3616 return gdbarch->cannot_store_register (regnum);
3620 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3621 gdbarch_cannot_store_register_ftype cannot_store_register)
3623 gdbarch->cannot_store_register = cannot_store_register;
3627 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3629 gdb_assert (gdbarch != NULL);
3630 return gdbarch->get_longjmp_target != NULL;
3634 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3636 gdb_assert (gdbarch != NULL);
3637 gdb_assert (gdbarch->get_longjmp_target != NULL);
3638 if (gdbarch_debug >= 2)
3639 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3640 return gdbarch->get_longjmp_target (pc);
3644 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3645 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3647 gdbarch->get_longjmp_target = get_longjmp_target;
3651 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3653 gdb_assert (gdbarch != NULL);
3654 return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
3658 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3660 gdb_assert (gdbarch != NULL);
3661 gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
3662 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3663 if (gdbarch_debug >= 2)
3664 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3665 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3669 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3670 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3672 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3676 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3678 gdb_assert (gdbarch != NULL);
3679 return gdbarch->deprecated_init_frame_pc != NULL;
3683 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3685 gdb_assert (gdbarch != NULL);
3686 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3687 if (gdbarch_debug >= 2)
3688 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3689 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3693 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3694 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3696 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3700 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3702 gdb_assert (gdbarch != NULL);
3703 if (gdbarch_debug >= 2)
3704 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3705 return gdbarch->believe_pcc_promotion;
3709 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3710 int believe_pcc_promotion)
3712 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3716 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3718 gdb_assert (gdbarch != NULL);
3719 return gdbarch->deprecated_get_saved_register != NULL;
3723 gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
3725 gdb_assert (gdbarch != NULL);
3726 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3727 if (gdbarch_debug >= 2)
3728 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3729 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3733 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3734 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3736 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3740 gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch)
3742 gdb_assert (gdbarch != NULL);
3743 return gdbarch->deprecated_register_convertible != NULL;
3747 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
3749 gdb_assert (gdbarch != NULL);
3750 gdb_assert (gdbarch->deprecated_register_convertible != NULL);
3751 if (gdbarch_debug >= 2)
3752 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
3753 return gdbarch->deprecated_register_convertible (nr);
3757 set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
3758 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
3760 gdbarch->deprecated_register_convertible = deprecated_register_convertible;
3764 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3766 gdb_assert (gdbarch != NULL);
3767 gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
3768 if (gdbarch_debug >= 2)
3769 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
3770 gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
3774 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
3775 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
3777 gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
3781 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
3783 gdb_assert (gdbarch != NULL);
3784 gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
3785 if (gdbarch_debug >= 2)
3786 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
3787 gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
3791 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
3792 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
3794 gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
3798 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3800 gdb_assert (gdbarch != NULL);
3801 gdb_assert (gdbarch->convert_register_p != NULL);
3802 if (gdbarch_debug >= 2)
3803 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3804 return gdbarch->convert_register_p (regnum, type);
3808 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3809 gdbarch_convert_register_p_ftype convert_register_p)
3811 gdbarch->convert_register_p = convert_register_p;
3815 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3817 gdb_assert (gdbarch != NULL);
3818 gdb_assert (gdbarch->register_to_value != NULL);
3819 if (gdbarch_debug >= 2)
3820 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3821 gdbarch->register_to_value (frame, regnum, type, buf);
3825 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3826 gdbarch_register_to_value_ftype register_to_value)
3828 gdbarch->register_to_value = register_to_value;
3832 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3834 gdb_assert (gdbarch != NULL);
3835 gdb_assert (gdbarch->value_to_register != NULL);
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3838 gdbarch->value_to_register (frame, regnum, type, buf);
3842 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3843 gdbarch_value_to_register_ftype value_to_register)
3845 gdbarch->value_to_register = value_to_register;
3849 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3851 gdb_assert (gdbarch != NULL);
3852 gdb_assert (gdbarch->pointer_to_address != NULL);
3853 if (gdbarch_debug >= 2)
3854 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3855 return gdbarch->pointer_to_address (type, buf);
3859 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3860 gdbarch_pointer_to_address_ftype pointer_to_address)
3862 gdbarch->pointer_to_address = pointer_to_address;
3866 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3868 gdb_assert (gdbarch != NULL);
3869 gdb_assert (gdbarch->address_to_pointer != NULL);
3870 if (gdbarch_debug >= 2)
3871 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3872 gdbarch->address_to_pointer (type, buf, addr);
3876 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3877 gdbarch_address_to_pointer_ftype address_to_pointer)
3879 gdbarch->address_to_pointer = address_to_pointer;
3883 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3885 gdb_assert (gdbarch != NULL);
3886 return gdbarch->integer_to_address != NULL;
3890 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3892 gdb_assert (gdbarch != NULL);
3893 gdb_assert (gdbarch->integer_to_address != NULL);
3894 if (gdbarch_debug >= 2)
3895 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3896 return gdbarch->integer_to_address (type, buf);
3900 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3901 gdbarch_integer_to_address_ftype integer_to_address)
3903 gdbarch->integer_to_address = integer_to_address;
3907 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3909 gdb_assert (gdbarch != NULL);
3910 return gdbarch->deprecated_pop_frame != NULL;
3914 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3916 gdb_assert (gdbarch != NULL);
3917 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3918 if (gdbarch_debug >= 2)
3919 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3920 gdbarch->deprecated_pop_frame ();
3924 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3925 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3927 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3931 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3933 gdb_assert (gdbarch != NULL);
3934 return gdbarch->deprecated_store_struct_return != NULL;
3938 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3940 gdb_assert (gdbarch != NULL);
3941 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3942 if (gdbarch_debug >= 2)
3943 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3944 gdbarch->deprecated_store_struct_return (addr, sp);
3948 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3949 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3951 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3955 gdbarch_return_value_p (struct gdbarch *gdbarch)
3957 gdb_assert (gdbarch != NULL);
3958 return gdbarch->return_value != NULL;
3961 enum return_value_convention
3962 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3964 gdb_assert (gdbarch != NULL);
3965 gdb_assert (gdbarch->return_value != NULL);
3966 if (gdbarch_debug >= 2)
3967 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3968 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3972 set_gdbarch_return_value (struct gdbarch *gdbarch,
3973 gdbarch_return_value_ftype return_value)
3975 gdbarch->return_value = return_value;
3979 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3981 gdb_assert (gdbarch != NULL);
3982 gdb_assert (gdbarch->return_value_on_stack != NULL);
3983 if (gdbarch_debug >= 2)
3984 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3985 return gdbarch->return_value_on_stack (type);
3989 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3990 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3992 gdbarch->return_value_on_stack = return_value_on_stack;
3996 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3998 gdb_assert (gdbarch != NULL);
3999 gdb_assert (gdbarch->extract_return_value != NULL);
4000 if (gdbarch_debug >= 2)
4001 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4002 gdbarch->extract_return_value (type, regcache, valbuf);
4006 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4007 gdbarch_extract_return_value_ftype extract_return_value)
4009 gdbarch->extract_return_value = extract_return_value;
4013 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4015 gdb_assert (gdbarch != NULL);
4016 gdb_assert (gdbarch->store_return_value != NULL);
4017 if (gdbarch_debug >= 2)
4018 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4019 gdbarch->store_return_value (type, regcache, valbuf);
4023 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4024 gdbarch_store_return_value_ftype store_return_value)
4026 gdbarch->store_return_value = store_return_value;
4030 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4032 gdb_assert (gdbarch != NULL);
4033 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
4034 if (gdbarch_debug >= 2)
4035 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4036 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4040 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4041 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4043 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4047 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4049 gdb_assert (gdbarch != NULL);
4050 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
4051 if (gdbarch_debug >= 2)
4052 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4053 gdbarch->deprecated_store_return_value (type, valbuf);
4057 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4058 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4060 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4064 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4066 gdb_assert (gdbarch != NULL);
4067 gdb_assert (gdbarch->use_struct_convention != NULL);
4068 if (gdbarch_debug >= 2)
4069 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4070 return gdbarch->use_struct_convention (gcc_p, value_type);
4074 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4075 gdbarch_use_struct_convention_ftype use_struct_convention)
4077 gdbarch->use_struct_convention = use_struct_convention;
4081 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4083 gdb_assert (gdbarch != NULL);
4084 return gdbarch->deprecated_extract_struct_value_address != NULL;
4088 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4090 gdb_assert (gdbarch != NULL);
4091 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
4092 if (gdbarch_debug >= 2)
4093 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4094 return gdbarch->deprecated_extract_struct_value_address (regcache);
4098 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4099 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4101 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4105 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4107 gdb_assert (gdbarch != NULL);
4108 return gdbarch->deprecated_frame_init_saved_regs != NULL;
4112 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4114 gdb_assert (gdbarch != NULL);
4115 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
4116 if (gdbarch_debug >= 2)
4117 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4118 gdbarch->deprecated_frame_init_saved_regs (frame);
4122 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4123 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4125 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4129 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4131 gdb_assert (gdbarch != NULL);
4132 return gdbarch->deprecated_init_extra_frame_info != NULL;
4136 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4138 gdb_assert (gdbarch != NULL);
4139 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
4140 if (gdbarch_debug >= 2)
4141 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4142 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4146 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4147 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4149 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4153 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4155 gdb_assert (gdbarch != NULL);
4156 gdb_assert (gdbarch->skip_prologue != NULL);
4157 if (gdbarch_debug >= 2)
4158 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4159 return gdbarch->skip_prologue (ip);
4163 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4164 gdbarch_skip_prologue_ftype skip_prologue)
4166 gdbarch->skip_prologue = skip_prologue;
4170 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4172 gdb_assert (gdbarch != NULL);
4173 gdb_assert (gdbarch->inner_than != NULL);
4174 if (gdbarch_debug >= 2)
4175 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4176 return gdbarch->inner_than (lhs, rhs);
4180 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4181 gdbarch_inner_than_ftype inner_than)
4183 gdbarch->inner_than = inner_than;
4186 const unsigned char *
4187 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4189 gdb_assert (gdbarch != NULL);
4190 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
4191 if (gdbarch_debug >= 2)
4192 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4193 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4197 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4198 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4200 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4204 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
4206 gdb_assert (gdbarch != NULL);
4207 return gdbarch->adjust_breakpoint_address != NULL;
4211 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
4213 gdb_assert (gdbarch != NULL);
4214 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
4215 if (gdbarch_debug >= 2)
4216 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
4217 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
4221 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
4222 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
4224 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
4228 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4230 gdb_assert (gdbarch != NULL);
4231 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
4232 if (gdbarch_debug >= 2)
4233 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4234 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4238 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4239 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4241 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4245 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4247 gdb_assert (gdbarch != NULL);
4248 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
4249 if (gdbarch_debug >= 2)
4250 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4251 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4255 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4256 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4258 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4262 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4264 gdb_assert (gdbarch != NULL);
4265 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4266 if (gdbarch_debug >= 2)
4267 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4268 return gdbarch->decr_pc_after_break;
4272 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4273 CORE_ADDR decr_pc_after_break)
4275 gdbarch->decr_pc_after_break = decr_pc_after_break;
4279 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4281 gdb_assert (gdbarch != NULL);
4282 /* Skip verify of function_start_offset, invalid_p == 0 */
4283 if (gdbarch_debug >= 2)
4284 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4285 return gdbarch->function_start_offset;
4289 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4290 CORE_ADDR function_start_offset)
4292 gdbarch->function_start_offset = function_start_offset;
4296 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4298 gdb_assert (gdbarch != NULL);
4299 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
4300 if (gdbarch_debug >= 2)
4301 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4302 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4306 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4307 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4309 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4313 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4315 gdb_assert (gdbarch != NULL);
4316 /* Skip verify of frame_args_skip, invalid_p == 0 */
4317 if (gdbarch_debug >= 2)
4318 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4319 return gdbarch->frame_args_skip;
4323 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4324 CORE_ADDR frame_args_skip)
4326 gdbarch->frame_args_skip = frame_args_skip;
4330 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
4332 gdb_assert (gdbarch != NULL);
4333 return gdbarch->deprecated_frameless_function_invocation != NULL;
4337 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4339 gdb_assert (gdbarch != NULL);
4340 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
4341 if (gdbarch_debug >= 2)
4342 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
4343 return gdbarch->deprecated_frameless_function_invocation (fi);
4347 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
4348 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
4350 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
4354 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4356 gdb_assert (gdbarch != NULL);
4357 return gdbarch->deprecated_frame_chain != NULL;
4361 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4363 gdb_assert (gdbarch != NULL);
4364 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
4365 if (gdbarch_debug >= 2)
4366 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4367 return gdbarch->deprecated_frame_chain (frame);
4371 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4372 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4374 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4378 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4380 gdb_assert (gdbarch != NULL);
4381 return gdbarch->deprecated_frame_chain_valid != NULL;
4385 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4387 gdb_assert (gdbarch != NULL);
4388 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
4389 if (gdbarch_debug >= 2)
4390 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4391 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4395 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4396 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4398 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4402 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4404 gdb_assert (gdbarch != NULL);
4405 return gdbarch->deprecated_frame_saved_pc != NULL;
4409 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4411 gdb_assert (gdbarch != NULL);
4412 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4413 if (gdbarch_debug >= 2)
4414 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4415 return gdbarch->deprecated_frame_saved_pc (fi);
4419 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4420 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4422 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4426 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4428 gdb_assert (gdbarch != NULL);
4429 return gdbarch->unwind_pc != NULL;
4433 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4435 gdb_assert (gdbarch != NULL);
4436 gdb_assert (gdbarch->unwind_pc != NULL);
4437 if (gdbarch_debug >= 2)
4438 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4439 return gdbarch->unwind_pc (gdbarch, next_frame);
4443 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4444 gdbarch_unwind_pc_ftype unwind_pc)
4446 gdbarch->unwind_pc = unwind_pc;
4450 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4452 gdb_assert (gdbarch != NULL);
4453 return gdbarch->unwind_sp != NULL;
4457 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4459 gdb_assert (gdbarch != NULL);
4460 gdb_assert (gdbarch->unwind_sp != NULL);
4461 if (gdbarch_debug >= 2)
4462 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4463 return gdbarch->unwind_sp (gdbarch, next_frame);
4467 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4468 gdbarch_unwind_sp_ftype unwind_sp)
4470 gdbarch->unwind_sp = unwind_sp;
4474 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4476 gdb_assert (gdbarch != NULL);
4477 return gdbarch->deprecated_frame_args_address != get_frame_base;
4481 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4483 gdb_assert (gdbarch != NULL);
4484 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4485 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4486 if (gdbarch_debug >= 2)
4487 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4488 return gdbarch->deprecated_frame_args_address (fi);
4492 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4493 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4495 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4499 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4501 gdb_assert (gdbarch != NULL);
4502 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4506 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4508 gdb_assert (gdbarch != NULL);
4509 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4510 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4511 if (gdbarch_debug >= 2)
4512 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4513 return gdbarch->deprecated_frame_locals_address (fi);
4517 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4518 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4520 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4524 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4526 gdb_assert (gdbarch != NULL);
4527 return gdbarch->deprecated_saved_pc_after_call != NULL;
4531 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4533 gdb_assert (gdbarch != NULL);
4534 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4535 if (gdbarch_debug >= 2)
4536 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4537 return gdbarch->deprecated_saved_pc_after_call (frame);
4541 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4542 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4544 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4548 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4550 gdb_assert (gdbarch != NULL);
4551 return gdbarch->frame_num_args != NULL;
4555 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4557 gdb_assert (gdbarch != NULL);
4558 gdb_assert (gdbarch->frame_num_args != NULL);
4559 if (gdbarch_debug >= 2)
4560 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4561 return gdbarch->frame_num_args (frame);
4565 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4566 gdbarch_frame_num_args_ftype frame_num_args)
4568 gdbarch->frame_num_args = frame_num_args;
4572 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4574 gdb_assert (gdbarch != NULL);
4575 return gdbarch->deprecated_stack_align != NULL;
4579 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4581 gdb_assert (gdbarch != NULL);
4582 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4583 if (gdbarch_debug >= 2)
4584 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4585 return gdbarch->deprecated_stack_align (sp);
4589 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4590 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4592 gdbarch->deprecated_stack_align = deprecated_stack_align;
4596 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4598 gdb_assert (gdbarch != NULL);
4599 return gdbarch->frame_align != NULL;
4603 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4605 gdb_assert (gdbarch != NULL);
4606 gdb_assert (gdbarch->frame_align != NULL);
4607 if (gdbarch_debug >= 2)
4608 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4609 return gdbarch->frame_align (gdbarch, address);
4613 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4614 gdbarch_frame_align_ftype frame_align)
4616 gdbarch->frame_align = frame_align;
4620 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4622 gdb_assert (gdbarch != NULL);
4623 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4627 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4629 gdb_assert (gdbarch != NULL);
4630 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4631 if (gdbarch_debug >= 2)
4632 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4633 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4637 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4638 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4640 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4644 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4646 gdb_assert (gdbarch != NULL);
4647 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4648 if (gdbarch_debug >= 2)
4649 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4650 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4654 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4655 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4657 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4661 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4663 gdb_assert (gdbarch != NULL);
4664 if (gdbarch_debug >= 2)
4665 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4666 return gdbarch->frame_red_zone_size;
4670 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4671 int frame_red_zone_size)
4673 gdbarch->frame_red_zone_size = frame_red_zone_size;
4677 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4679 gdb_assert (gdbarch != NULL);
4680 if (gdbarch_debug >= 2)
4681 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4682 return gdbarch->parm_boundary;
4686 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4689 gdbarch->parm_boundary = parm_boundary;
4692 const struct floatformat *
4693 gdbarch_float_format (struct gdbarch *gdbarch)
4695 gdb_assert (gdbarch != NULL);
4696 if (gdbarch_debug >= 2)
4697 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4698 return gdbarch->float_format;
4702 set_gdbarch_float_format (struct gdbarch *gdbarch,
4703 const struct floatformat * float_format)
4705 gdbarch->float_format = float_format;
4708 const struct floatformat *
4709 gdbarch_double_format (struct gdbarch *gdbarch)
4711 gdb_assert (gdbarch != NULL);
4712 if (gdbarch_debug >= 2)
4713 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4714 return gdbarch->double_format;
4718 set_gdbarch_double_format (struct gdbarch *gdbarch,
4719 const struct floatformat * double_format)
4721 gdbarch->double_format = double_format;
4724 const struct floatformat *
4725 gdbarch_long_double_format (struct gdbarch *gdbarch)
4727 gdb_assert (gdbarch != NULL);
4728 if (gdbarch_debug >= 2)
4729 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4730 return gdbarch->long_double_format;
4734 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4735 const struct floatformat * long_double_format)
4737 gdbarch->long_double_format = long_double_format;
4741 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4743 gdb_assert (gdbarch != NULL);
4744 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4745 if (gdbarch_debug >= 2)
4746 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4747 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4751 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4752 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4754 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4758 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4760 gdb_assert (gdbarch != NULL);
4761 gdb_assert (gdbarch->addr_bits_remove != NULL);
4762 if (gdbarch_debug >= 2)
4763 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4764 return gdbarch->addr_bits_remove (addr);
4768 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4769 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4771 gdbarch->addr_bits_remove = addr_bits_remove;
4775 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4777 gdb_assert (gdbarch != NULL);
4778 gdb_assert (gdbarch->smash_text_address != NULL);
4779 if (gdbarch_debug >= 2)
4780 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4781 return gdbarch->smash_text_address (addr);
4785 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4786 gdbarch_smash_text_address_ftype smash_text_address)
4788 gdbarch->smash_text_address = smash_text_address;
4792 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4794 gdb_assert (gdbarch != NULL);
4795 return gdbarch->software_single_step != NULL;
4799 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4801 gdb_assert (gdbarch != NULL);
4802 gdb_assert (gdbarch->software_single_step != NULL);
4803 if (gdbarch_debug >= 2)
4804 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4805 gdbarch->software_single_step (sig, insert_breakpoints_p);
4809 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4810 gdbarch_software_single_step_ftype software_single_step)
4812 gdbarch->software_single_step = software_single_step;
4816 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4818 gdb_assert (gdbarch != NULL);
4819 gdb_assert (gdbarch->print_insn != NULL);
4820 if (gdbarch_debug >= 2)
4821 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4822 return gdbarch->print_insn (vma, info);
4826 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4827 gdbarch_print_insn_ftype print_insn)
4829 gdbarch->print_insn = print_insn;
4833 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4835 gdb_assert (gdbarch != NULL);
4836 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4837 if (gdbarch_debug >= 2)
4838 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4839 return gdbarch->skip_trampoline_code (pc);
4843 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4844 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4846 gdbarch->skip_trampoline_code = skip_trampoline_code;
4850 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4852 gdb_assert (gdbarch != NULL);
4853 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4854 if (gdbarch_debug >= 2)
4855 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4856 return gdbarch->skip_solib_resolver (gdbarch, pc);
4860 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4861 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4863 gdbarch->skip_solib_resolver = skip_solib_resolver;
4867 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4869 gdb_assert (gdbarch != NULL);
4870 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4871 if (gdbarch_debug >= 2)
4872 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4873 return gdbarch->in_solib_call_trampoline (pc, name);
4877 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4878 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4880 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4884 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4886 gdb_assert (gdbarch != NULL);
4887 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4888 if (gdbarch_debug >= 2)
4889 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4890 return gdbarch->in_solib_return_trampoline (pc, name);
4894 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4895 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4897 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4901 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4903 gdb_assert (gdbarch != NULL);
4904 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4905 if (gdbarch_debug >= 2)
4906 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4907 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4911 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4912 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4914 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4918 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4920 gdb_assert (gdbarch != NULL);
4921 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4922 if (gdbarch_debug >= 2)
4923 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4924 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4928 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4929 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4931 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4935 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4937 gdb_assert (gdbarch != NULL);
4938 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4939 if (gdbarch_debug >= 2)
4940 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4941 gdbarch->elf_make_msymbol_special (sym, msym);
4945 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4946 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4948 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4952 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4954 gdb_assert (gdbarch != NULL);
4955 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4956 if (gdbarch_debug >= 2)
4957 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4958 gdbarch->coff_make_msymbol_special (val, msym);
4962 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4963 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4965 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4969 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4971 gdb_assert (gdbarch != NULL);
4972 /* Skip verify of name_of_malloc, invalid_p == 0 */
4973 if (gdbarch_debug >= 2)
4974 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4975 return gdbarch->name_of_malloc;
4979 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4980 const char * name_of_malloc)
4982 gdbarch->name_of_malloc = name_of_malloc;
4986 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4988 gdb_assert (gdbarch != NULL);
4989 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4990 if (gdbarch_debug >= 2)
4991 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4992 return gdbarch->cannot_step_breakpoint;
4996 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4997 int cannot_step_breakpoint)
4999 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5003 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5005 gdb_assert (gdbarch != NULL);
5006 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5007 if (gdbarch_debug >= 2)
5008 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5009 return gdbarch->have_nonsteppable_watchpoint;
5013 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5014 int have_nonsteppable_watchpoint)
5016 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5020 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5022 gdb_assert (gdbarch != NULL);
5023 return gdbarch->address_class_type_flags != NULL;
5027 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5029 gdb_assert (gdbarch != NULL);
5030 gdb_assert (gdbarch->address_class_type_flags != NULL);
5031 if (gdbarch_debug >= 2)
5032 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5033 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5037 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5038 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5040 gdbarch->address_class_type_flags = address_class_type_flags;
5044 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5046 gdb_assert (gdbarch != NULL);
5047 return gdbarch->address_class_type_flags_to_name != NULL;
5051 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5053 gdb_assert (gdbarch != NULL);
5054 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
5055 if (gdbarch_debug >= 2)
5056 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5057 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5061 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5062 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5064 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5068 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5070 gdb_assert (gdbarch != NULL);
5071 return gdbarch->address_class_name_to_type_flags != NULL;
5075 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5077 gdb_assert (gdbarch != NULL);
5078 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
5079 if (gdbarch_debug >= 2)
5080 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5081 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5085 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5086 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5088 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5092 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5094 gdb_assert (gdbarch != NULL);
5095 gdb_assert (gdbarch->register_reggroup_p != NULL);
5096 if (gdbarch_debug >= 2)
5097 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5098 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5102 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5103 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5105 gdbarch->register_reggroup_p = register_reggroup_p;
5109 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5111 gdb_assert (gdbarch != NULL);
5112 return gdbarch->fetch_pointer_argument != NULL;
5116 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5118 gdb_assert (gdbarch != NULL);
5119 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
5120 if (gdbarch_debug >= 2)
5121 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5122 return gdbarch->fetch_pointer_argument (frame, argi, type);
5126 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5127 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5129 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5133 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
5135 gdb_assert (gdbarch != NULL);
5136 return gdbarch->regset_from_core_section != NULL;
5139 const struct regset *
5140 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
5142 gdb_assert (gdbarch != NULL);
5143 gdb_assert (gdbarch->regset_from_core_section != NULL);
5144 if (gdbarch_debug >= 2)
5145 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
5146 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
5150 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
5151 gdbarch_regset_from_core_section_ftype regset_from_core_section)
5153 gdbarch->regset_from_core_section = regset_from_core_section;
5157 /* Keep a registry of per-architecture data-pointers required by GDB
5164 gdbarch_data_pre_init_ftype *pre_init;
5165 gdbarch_data_post_init_ftype *post_init;
5168 struct gdbarch_data_registration
5170 struct gdbarch_data *data;
5171 struct gdbarch_data_registration *next;
5174 struct gdbarch_data_registry
5177 struct gdbarch_data_registration *registrations;
5180 struct gdbarch_data_registry gdbarch_data_registry =
5185 static struct gdbarch_data *
5186 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
5187 gdbarch_data_post_init_ftype *post_init)
5189 struct gdbarch_data_registration **curr;
5190 /* Append the new registraration. */
5191 for (curr = &gdbarch_data_registry.registrations;
5193 curr = &(*curr)->next);
5194 (*curr) = XMALLOC (struct gdbarch_data_registration);
5195 (*curr)->next = NULL;
5196 (*curr)->data = XMALLOC (struct gdbarch_data);
5197 (*curr)->data->index = gdbarch_data_registry.nr++;
5198 (*curr)->data->pre_init = pre_init;
5199 (*curr)->data->post_init = post_init;
5200 (*curr)->data->init_p = 1;
5201 return (*curr)->data;
5204 struct gdbarch_data *
5205 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
5207 return gdbarch_data_register (pre_init, NULL);
5210 struct gdbarch_data *
5211 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
5213 return gdbarch_data_register (NULL, post_init);
5216 /* Create/delete the gdbarch data vector. */
5219 alloc_gdbarch_data (struct gdbarch *gdbarch)
5221 gdb_assert (gdbarch->data == NULL);
5222 gdbarch->nr_data = gdbarch_data_registry.nr;
5223 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
5226 /* Initialize the current value of the specified per-architecture
5230 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
5231 struct gdbarch_data *data,
5234 gdb_assert (data->index < gdbarch->nr_data);
5235 gdb_assert (gdbarch->data[data->index] == NULL);
5236 gdb_assert (data->pre_init == NULL);
5237 gdbarch->data[data->index] = pointer;
5240 /* Return the current value of the specified per-architecture
5244 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5246 gdb_assert (data->index < gdbarch->nr_data);
5247 if (gdbarch->data[data->index] == NULL)
5249 /* The data-pointer isn't initialized, call init() to get a
5251 if (data->pre_init != NULL)
5252 /* Mid architecture creation: pass just the obstack, and not
5253 the entire architecture, as that way it isn't possible for
5254 pre-init code to refer to undefined architecture
5256 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
5257 else if (gdbarch->initialized_p
5258 && data->post_init != NULL)
5259 /* Post architecture creation: pass the entire architecture
5260 (as all fields are valid), but be careful to also detect
5261 recursive references. */
5263 gdb_assert (data->init_p);
5265 gdbarch->data[data->index] = data->post_init (gdbarch);
5269 /* The architecture initialization hasn't completed - punt -
5270 hope that the caller knows what they are doing. Once
5271 deprecated_set_gdbarch_data has been initialized, this can be
5272 changed to an internal error. */
5274 gdb_assert (gdbarch->data[data->index] != NULL);
5276 return gdbarch->data[data->index];
5281 /* Keep a registry of swapped data required by GDB modules. */
5286 struct gdbarch_swap_registration *source;
5287 struct gdbarch_swap *next;
5290 struct gdbarch_swap_registration
5293 unsigned long sizeof_data;
5294 gdbarch_swap_ftype *init;
5295 struct gdbarch_swap_registration *next;
5298 struct gdbarch_swap_registry
5301 struct gdbarch_swap_registration *registrations;
5304 struct gdbarch_swap_registry gdbarch_swap_registry =
5310 deprecated_register_gdbarch_swap (void *data,
5311 unsigned long sizeof_data,
5312 gdbarch_swap_ftype *init)
5314 struct gdbarch_swap_registration **rego;
5315 for (rego = &gdbarch_swap_registry.registrations;
5317 rego = &(*rego)->next);
5318 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5319 (*rego)->next = NULL;
5320 (*rego)->init = init;
5321 (*rego)->data = data;
5322 (*rego)->sizeof_data = sizeof_data;
5326 current_gdbarch_swap_init_hack (void)
5328 struct gdbarch_swap_registration *rego;
5329 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
5330 for (rego = gdbarch_swap_registry.registrations;
5334 if (rego->data != NULL)
5336 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
5337 struct gdbarch_swap);
5338 (*curr)->source = rego;
5339 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
5341 (*curr)->next = NULL;
5342 curr = &(*curr)->next;
5344 if (rego->init != NULL)
5349 static struct gdbarch *
5350 current_gdbarch_swap_out_hack (void)
5352 struct gdbarch *old_gdbarch = current_gdbarch;
5353 struct gdbarch_swap *curr;
5355 gdb_assert (old_gdbarch != NULL);
5356 for (curr = old_gdbarch->swap;
5360 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5361 memset (curr->source->data, 0, curr->source->sizeof_data);
5363 current_gdbarch = NULL;
5368 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
5370 struct gdbarch_swap *curr;
5372 gdb_assert (current_gdbarch == NULL);
5373 for (curr = new_gdbarch->swap;
5376 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5377 current_gdbarch = new_gdbarch;
5381 /* Keep a registry of the architectures known by GDB. */
5383 struct gdbarch_registration
5385 enum bfd_architecture bfd_architecture;
5386 gdbarch_init_ftype *init;
5387 gdbarch_dump_tdep_ftype *dump_tdep;
5388 struct gdbarch_list *arches;
5389 struct gdbarch_registration *next;
5392 static struct gdbarch_registration *gdbarch_registry = NULL;
5395 append_name (const char ***buf, int *nr, const char *name)
5397 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5403 gdbarch_printable_names (void)
5405 /* Accumulate a list of names based on the registed list of
5407 enum bfd_architecture a;
5409 const char **arches = NULL;
5410 struct gdbarch_registration *rego;
5411 for (rego = gdbarch_registry;
5415 const struct bfd_arch_info *ap;
5416 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5418 internal_error (__FILE__, __LINE__,
5419 "gdbarch_architecture_names: multi-arch unknown");
5422 append_name (&arches, &nr_arches, ap->printable_name);
5427 append_name (&arches, &nr_arches, NULL);
5433 gdbarch_register (enum bfd_architecture bfd_architecture,
5434 gdbarch_init_ftype *init,
5435 gdbarch_dump_tdep_ftype *dump_tdep)
5437 struct gdbarch_registration **curr;
5438 const struct bfd_arch_info *bfd_arch_info;
5439 /* Check that BFD recognizes this architecture */
5440 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5441 if (bfd_arch_info == NULL)
5443 internal_error (__FILE__, __LINE__,
5444 "gdbarch: Attempt to register unknown architecture (%d)",
5447 /* Check that we haven't seen this architecture before */
5448 for (curr = &gdbarch_registry;
5450 curr = &(*curr)->next)
5452 if (bfd_architecture == (*curr)->bfd_architecture)
5453 internal_error (__FILE__, __LINE__,
5454 "gdbarch: Duplicate registraration of architecture (%s)",
5455 bfd_arch_info->printable_name);
5459 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5460 bfd_arch_info->printable_name,
5463 (*curr) = XMALLOC (struct gdbarch_registration);
5464 (*curr)->bfd_architecture = bfd_architecture;
5465 (*curr)->init = init;
5466 (*curr)->dump_tdep = dump_tdep;
5467 (*curr)->arches = NULL;
5468 (*curr)->next = NULL;
5472 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5473 gdbarch_init_ftype *init)
5475 gdbarch_register (bfd_architecture, init, NULL);
5479 /* Look for an architecture using gdbarch_info. Base search on only
5480 BFD_ARCH_INFO and BYTE_ORDER. */
5482 struct gdbarch_list *
5483 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5484 const struct gdbarch_info *info)
5486 for (; arches != NULL; arches = arches->next)
5488 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5490 if (info->byte_order != arches->gdbarch->byte_order)
5492 if (info->osabi != arches->gdbarch->osabi)
5500 /* Find an architecture that matches the specified INFO. Create a new
5501 architecture if needed. Return that new architecture. Assumes
5502 that there is no current architecture. */
5504 static struct gdbarch *
5505 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5507 struct gdbarch *new_gdbarch;
5508 struct gdbarch_registration *rego;
5510 /* The existing architecture has been swapped out - all this code
5511 works from a clean slate. */
5512 gdb_assert (current_gdbarch == NULL);
5514 /* Fill in missing parts of the INFO struct using a number of
5515 sources: "set ..."; INFOabfd supplied; and the existing
5517 gdbarch_info_fill (old_gdbarch, &info);
5519 /* Must have found some sort of architecture. */
5520 gdb_assert (info.bfd_arch_info != NULL);
5524 fprintf_unfiltered (gdb_stdlog,
5525 "find_arch_by_info: info.bfd_arch_info %s\n",
5526 (info.bfd_arch_info != NULL
5527 ? info.bfd_arch_info->printable_name
5529 fprintf_unfiltered (gdb_stdlog,
5530 "find_arch_by_info: info.byte_order %d (%s)\n",
5532 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5533 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5535 fprintf_unfiltered (gdb_stdlog,
5536 "find_arch_by_info: info.osabi %d (%s)\n",
5537 info.osabi, gdbarch_osabi_name (info.osabi));
5538 fprintf_unfiltered (gdb_stdlog,
5539 "find_arch_by_info: info.abfd 0x%lx\n",
5541 fprintf_unfiltered (gdb_stdlog,
5542 "find_arch_by_info: info.tdep_info 0x%lx\n",
5543 (long) info.tdep_info);
5546 /* Find the tdep code that knows about this architecture. */
5547 for (rego = gdbarch_registry;
5550 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5555 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5556 "No matching architecture\n");
5560 /* Ask the tdep code for an architecture that matches "info". */
5561 new_gdbarch = rego->init (info, rego->arches);
5563 /* Did the tdep code like it? No. Reject the change and revert to
5564 the old architecture. */
5565 if (new_gdbarch == NULL)
5568 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5569 "Target rejected architecture\n");
5573 /* Is this a pre-existing architecture (as determined by already
5574 being initialized)? Move it to the front of the architecture
5575 list (keeping the list sorted Most Recently Used). */
5576 if (new_gdbarch->initialized_p)
5578 struct gdbarch_list **list;
5579 struct gdbarch_list *this;
5581 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5582 "Previous architecture 0x%08lx (%s) selected\n",
5584 new_gdbarch->bfd_arch_info->printable_name);
5585 /* Find the existing arch in the list. */
5586 for (list = ®o->arches;
5587 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5588 list = &(*list)->next);
5589 /* It had better be in the list of architectures. */
5590 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5593 (*list) = this->next;
5594 /* Insert THIS at the front. */
5595 this->next = rego->arches;
5596 rego->arches = this;
5601 /* It's a new architecture. */
5603 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5604 "New architecture 0x%08lx (%s) selected\n",
5606 new_gdbarch->bfd_arch_info->printable_name);
5608 /* Insert the new architecture into the front of the architecture
5609 list (keep the list sorted Most Recently Used). */
5611 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5612 this->next = rego->arches;
5613 this->gdbarch = new_gdbarch;
5614 rego->arches = this;
5617 /* Check that the newly installed architecture is valid. Plug in
5618 any post init values. */
5619 new_gdbarch->dump_tdep = rego->dump_tdep;
5620 verify_gdbarch (new_gdbarch);
5621 new_gdbarch->initialized_p = 1;
5623 /* Initialize any per-architecture swap areas. This phase requires
5624 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5625 swap the entire architecture out. */
5626 current_gdbarch = new_gdbarch;
5627 current_gdbarch_swap_init_hack ();
5628 current_gdbarch_swap_out_hack ();
5631 gdbarch_dump (new_gdbarch, gdb_stdlog);
5637 gdbarch_find_by_info (struct gdbarch_info info)
5639 /* Save the previously selected architecture, setting the global to
5640 NULL. This stops things like gdbarch->init() trying to use the
5641 previous architecture's configuration. The previous architecture
5642 may not even be of the same architecture family. The most recent
5643 architecture of the same family is found at the head of the
5644 rego->arches list. */
5645 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5647 /* Find the specified architecture. */
5648 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5650 /* Restore the existing architecture. */
5651 gdb_assert (current_gdbarch == NULL);
5652 current_gdbarch_swap_in_hack (old_gdbarch);
5657 /* Make the specified architecture current, swapping the existing one
5661 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5663 gdb_assert (new_gdbarch != NULL);
5664 gdb_assert (current_gdbarch != NULL);
5665 gdb_assert (new_gdbarch->initialized_p);
5666 current_gdbarch_swap_out_hack ();
5667 current_gdbarch_swap_in_hack (new_gdbarch);
5668 architecture_changed_event ();
5671 extern void _initialize_gdbarch (void);
5674 _initialize_gdbarch (void)
5676 struct cmd_list_element *c;
5678 add_show_from_set (add_set_cmd ("arch",
5681 (char *)&gdbarch_debug,
5682 "Set architecture debugging.\n\
5683 When non-zero, architecture debugging is enabled.", &setdebuglist),
5685 c = add_set_cmd ("archdebug",
5688 (char *)&gdbarch_debug,
5689 "Set architecture debugging.\n\
5690 When non-zero, architecture debugging is enabled.", &setlist);
5692 deprecate_cmd (c, "set debug arch");
5693 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");