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;
232 const struct floatformat * float_format;
233 const struct floatformat * double_format;
234 const struct floatformat * long_double_format;
235 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
236 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
237 gdbarch_smash_text_address_ftype *smash_text_address;
238 gdbarch_software_single_step_ftype *software_single_step;
239 gdbarch_print_insn_ftype *print_insn;
240 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
241 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
242 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
243 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
244 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
245 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
246 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
247 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
248 const char * name_of_malloc;
249 int cannot_step_breakpoint;
250 int have_nonsteppable_watchpoint;
251 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
252 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
253 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
254 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
255 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
256 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
260 /* The default architecture uses host values (for want of a better
263 extern const struct bfd_arch_info bfd_default_arch_struct;
265 struct gdbarch startup_gdbarch =
267 1, /* Always initialized. */
268 NULL, /* The obstack. */
269 /* basic architecture information */
270 &bfd_default_arch_struct, /* bfd_arch_info */
271 BFD_ENDIAN_BIG, /* byte_order */
272 GDB_OSABI_UNKNOWN, /* osabi */
273 /* target specific vector and its dump routine */
275 /*per-architecture data-pointers and swap regions */
277 /* Multi-arch values */
278 8 * sizeof (short), /* short_bit */
279 8 * sizeof (int), /* int_bit */
280 8 * sizeof (long), /* long_bit */
281 8 * sizeof (LONGEST), /* long_long_bit */
282 8 * sizeof (float), /* float_bit */
283 8 * sizeof (double), /* double_bit */
284 8 * sizeof (long double), /* long_double_bit */
285 8 * sizeof (void*), /* ptr_bit */
286 8 * sizeof (void*), /* addr_bit */
287 8 * sizeof (void*), /* bfd_vma_bit */
292 0, /* virtual_frame_pointer */
293 0, /* pseudo_register_read */
294 0, /* pseudo_register_write */
296 0, /* num_pseudo_regs */
301 0, /* stab_reg_to_regnum */
302 0, /* ecoff_reg_to_regnum */
303 0, /* dwarf_reg_to_regnum */
304 0, /* sdb_reg_to_regnum */
305 0, /* dwarf2_reg_to_regnum */
306 0, /* register_name */
307 0, /* register_type */
308 0, /* deprecated_register_virtual_type */
309 0, /* deprecated_register_bytes */
310 generic_register_byte, /* deprecated_register_byte */
311 generic_register_size, /* deprecated_register_raw_size */
312 generic_register_size, /* deprecated_register_virtual_size */
313 0, /* deprecated_max_register_raw_size */
314 0, /* deprecated_max_register_virtual_size */
315 0, /* unwind_dummy_id */
316 0, /* deprecated_save_dummy_frame_tos */
317 -1, /* deprecated_fp_regnum */
318 0, /* deprecated_target_read_fp */
319 0, /* push_dummy_call */
320 0, /* deprecated_push_arguments */
321 0, /* deprecated_use_generic_dummy_frames */
322 0, /* deprecated_push_return_address */
323 0, /* deprecated_dummy_write_sp */
324 0, /* deprecated_register_size */
325 0, /* call_dummy_location */
326 0, /* deprecated_call_dummy_start_offset */
327 0, /* deprecated_call_dummy_breakpoint_offset */
328 0, /* deprecated_call_dummy_words */
329 0, /* deprecated_sizeof_call_dummy_words */
330 0, /* deprecated_fix_call_dummy */
331 0, /* push_dummy_code */
332 0, /* deprecated_push_dummy_frame */
333 0, /* deprecated_do_registers_info */
334 default_print_registers_info, /* print_registers_info */
335 0, /* print_float_info */
336 0, /* print_vector_info */
337 0, /* register_sim_regno */
338 0, /* register_bytes_ok */
339 0, /* cannot_fetch_register */
340 0, /* cannot_store_register */
341 0, /* get_longjmp_target */
342 deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
343 0, /* deprecated_init_frame_pc */
344 0, /* believe_pcc_promotion */
345 0, /* deprecated_get_saved_register */
346 0, /* deprecated_register_convertible */
347 0, /* deprecated_register_convert_to_virtual */
348 0, /* deprecated_register_convert_to_raw */
349 0, /* convert_register_p */
350 0, /* register_to_value */
351 0, /* value_to_register */
352 0, /* pointer_to_address */
353 0, /* address_to_pointer */
354 0, /* integer_to_address */
355 0, /* deprecated_pop_frame */
356 0, /* deprecated_store_struct_return */
357 0, /* return_value */
358 0, /* return_value_on_stack */
359 0, /* extract_return_value */
360 0, /* store_return_value */
361 0, /* deprecated_extract_return_value */
362 0, /* deprecated_store_return_value */
363 0, /* use_struct_convention */
364 0, /* deprecated_extract_struct_value_address */
365 0, /* deprecated_frame_init_saved_regs */
366 0, /* deprecated_init_extra_frame_info */
367 0, /* skip_prologue */
369 0, /* breakpoint_from_pc */
370 0, /* adjust_breakpoint_address */
371 0, /* memory_insert_breakpoint */
372 0, /* memory_remove_breakpoint */
373 0, /* decr_pc_after_break */
374 0, /* function_start_offset */
375 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
376 0, /* frame_args_skip */
377 0, /* deprecated_frameless_function_invocation */
378 0, /* deprecated_frame_chain */
379 0, /* deprecated_frame_chain_valid */
380 0, /* deprecated_frame_saved_pc */
383 get_frame_base, /* deprecated_frame_args_address */
384 get_frame_base, /* deprecated_frame_locals_address */
385 0, /* deprecated_saved_pc_after_call */
386 0, /* frame_num_args */
387 0, /* deprecated_stack_align */
389 0, /* deprecated_reg_struct_has_addr */
390 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
391 0, /* frame_red_zone_size */
392 0, /* float_format */
393 0, /* double_format */
394 0, /* long_double_format */
395 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
396 0, /* addr_bits_remove */
397 0, /* smash_text_address */
398 0, /* software_single_step */
400 0, /* skip_trampoline_code */
401 generic_skip_solib_resolver, /* skip_solib_resolver */
402 0, /* in_solib_call_trampoline */
403 0, /* in_solib_return_trampoline */
404 generic_in_function_epilogue_p, /* in_function_epilogue_p */
405 construct_inferior_arguments, /* construct_inferior_arguments */
406 0, /* elf_make_msymbol_special */
407 0, /* coff_make_msymbol_special */
408 "malloc", /* name_of_malloc */
409 0, /* cannot_step_breakpoint */
410 0, /* have_nonsteppable_watchpoint */
411 0, /* address_class_type_flags */
412 0, /* address_class_type_flags_to_name */
413 0, /* address_class_name_to_type_flags */
414 default_register_reggroup_p, /* register_reggroup_p */
415 0, /* fetch_pointer_argument */
416 0, /* regset_from_core_section */
417 /* startup_gdbarch() */
420 struct gdbarch *current_gdbarch = &startup_gdbarch;
422 /* Create a new ``struct gdbarch'' based on information provided by
423 ``struct gdbarch_info''. */
426 gdbarch_alloc (const struct gdbarch_info *info,
427 struct gdbarch_tdep *tdep)
429 /* NOTE: The new architecture variable is named ``current_gdbarch''
430 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
431 the current local architecture and not the previous global
432 architecture. This ensures that the new architectures initial
433 values are not influenced by the previous architecture. Once
434 everything is parameterised with gdbarch, this will go away. */
435 struct gdbarch *current_gdbarch;
437 /* Create an obstack for allocating all the per-architecture memory,
438 then use that to allocate the architecture vector. */
439 struct obstack *obstack = XMALLOC (struct obstack);
440 obstack_init (obstack);
441 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
442 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
443 current_gdbarch->obstack = obstack;
445 alloc_gdbarch_data (current_gdbarch);
447 current_gdbarch->tdep = tdep;
449 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
450 current_gdbarch->byte_order = info->byte_order;
451 current_gdbarch->osabi = info->osabi;
453 /* Force the explicit initialization of these. */
454 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
455 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
456 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
457 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
458 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
459 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
460 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
461 current_gdbarch->ptr_bit = TARGET_INT_BIT;
462 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
463 current_gdbarch->char_signed = -1;
464 current_gdbarch->write_pc = generic_target_write_pc;
465 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
466 current_gdbarch->num_regs = -1;
467 current_gdbarch->sp_regnum = -1;
468 current_gdbarch->pc_regnum = -1;
469 current_gdbarch->ps_regnum = -1;
470 current_gdbarch->fp0_regnum = -1;
471 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
472 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
473 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
474 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
475 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
476 current_gdbarch->deprecated_register_byte = generic_register_byte;
477 current_gdbarch->deprecated_register_raw_size = generic_register_size;
478 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
479 current_gdbarch->deprecated_fp_regnum = -1;
480 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
481 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
482 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
483 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
484 current_gdbarch->print_registers_info = default_print_registers_info;
485 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
486 current_gdbarch->cannot_fetch_register = cannot_register_not;
487 current_gdbarch->cannot_store_register = cannot_register_not;
488 current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
489 current_gdbarch->convert_register_p = legacy_convert_register_p;
490 current_gdbarch->register_to_value = legacy_register_to_value;
491 current_gdbarch->value_to_register = legacy_value_to_register;
492 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
493 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
494 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
495 current_gdbarch->extract_return_value = legacy_extract_return_value;
496 current_gdbarch->store_return_value = legacy_store_return_value;
497 current_gdbarch->use_struct_convention = generic_use_struct_convention;
498 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
499 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
500 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
501 current_gdbarch->deprecated_frame_args_address = get_frame_base;
502 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
503 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
504 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
505 current_gdbarch->addr_bits_remove = core_addr_identity;
506 current_gdbarch->smash_text_address = core_addr_identity;
507 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
508 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
509 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
510 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
511 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
512 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
513 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
514 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
515 current_gdbarch->name_of_malloc = "malloc";
516 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
517 /* gdbarch_alloc() */
519 return current_gdbarch;
523 /* Allocate extra space using the per-architecture obstack. */
526 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
528 void *data = obstack_alloc (arch->obstack, size);
529 memset (data, 0, size);
534 /* Free a gdbarch struct. This should never happen in normal
535 operation --- once you've created a gdbarch, you keep it around.
536 However, if an architecture's init function encounters an error
537 building the structure, it may need to clean up a partially
538 constructed gdbarch. */
541 gdbarch_free (struct gdbarch *arch)
543 struct obstack *obstack;
544 gdb_assert (arch != NULL);
545 gdb_assert (!arch->initialized_p);
546 obstack = arch->obstack;
547 obstack_free (obstack, 0); /* Includes the ARCH. */
552 /* Ensure that all values in a GDBARCH are reasonable. */
554 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
555 just happens to match the global variable ``current_gdbarch''. That
556 way macros refering to that variable get the local and not the global
557 version - ulgh. Once everything is parameterised with gdbarch, this
561 verify_gdbarch (struct gdbarch *current_gdbarch)
564 struct cleanup *cleanups;
567 log = mem_fileopen ();
568 cleanups = make_cleanup_ui_file_delete (log);
570 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
571 fprintf_unfiltered (log, "\n\tbyte-order");
572 if (current_gdbarch->bfd_arch_info == NULL)
573 fprintf_unfiltered (log, "\n\tbfd_arch_info");
574 /* Check those that need to be defined for the given multi-arch level. */
575 /* Skip verify of short_bit, invalid_p == 0 */
576 /* Skip verify of int_bit, invalid_p == 0 */
577 /* Skip verify of long_bit, invalid_p == 0 */
578 /* Skip verify of long_long_bit, invalid_p == 0 */
579 /* Skip verify of float_bit, invalid_p == 0 */
580 /* Skip verify of double_bit, invalid_p == 0 */
581 /* Skip verify of long_double_bit, invalid_p == 0 */
582 /* Skip verify of ptr_bit, invalid_p == 0 */
583 if (current_gdbarch->addr_bit == 0)
584 current_gdbarch->addr_bit = TARGET_PTR_BIT;
585 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
586 if (current_gdbarch->char_signed == -1)
587 current_gdbarch->char_signed = 1;
588 /* Skip verify of read_pc, has predicate */
589 /* Skip verify of write_pc, invalid_p == 0 */
590 /* Skip verify of read_sp, has predicate */
591 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
592 /* Skip verify of pseudo_register_read, has predicate */
593 /* Skip verify of pseudo_register_write, has predicate */
594 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
595 && (current_gdbarch->num_regs == -1))
596 fprintf_unfiltered (log, "\n\tnum_regs");
597 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
598 /* Skip verify of sp_regnum, invalid_p == 0 */
599 /* Skip verify of pc_regnum, invalid_p == 0 */
600 /* Skip verify of ps_regnum, invalid_p == 0 */
601 /* Skip verify of fp0_regnum, invalid_p == 0 */
602 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
603 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
604 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
605 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
606 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
607 /* Skip verify of register_type, has predicate */
608 /* Skip verify of deprecated_register_virtual_type, has predicate */
609 /* Skip verify of deprecated_register_byte, has predicate */
610 /* Skip verify of deprecated_register_raw_size, has predicate */
611 /* Skip verify of deprecated_register_virtual_size, has predicate */
612 /* Skip verify of deprecated_max_register_raw_size, has predicate */
613 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
614 /* Skip verify of unwind_dummy_id, has predicate */
615 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
616 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
617 /* Skip verify of deprecated_target_read_fp, has predicate */
618 /* Skip verify of push_dummy_call, has predicate */
619 /* Skip verify of deprecated_push_arguments, has predicate */
620 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
621 /* Skip verify of deprecated_push_return_address, has predicate */
622 /* Skip verify of deprecated_dummy_write_sp, has predicate */
623 /* Skip verify of call_dummy_location, invalid_p == 0 */
624 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
625 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
626 /* Skip verify of deprecated_fix_call_dummy, has predicate */
627 /* Skip verify of push_dummy_code, has predicate */
628 /* Skip verify of deprecated_push_dummy_frame, has predicate */
629 /* Skip verify of deprecated_do_registers_info, has predicate */
630 /* Skip verify of print_registers_info, invalid_p == 0 */
631 /* Skip verify of print_float_info, has predicate */
632 /* Skip verify of print_vector_info, has predicate */
633 /* Skip verify of register_sim_regno, invalid_p == 0 */
634 /* Skip verify of register_bytes_ok, has predicate */
635 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
636 /* Skip verify of cannot_store_register, invalid_p == 0 */
637 /* Skip verify of get_longjmp_target, has predicate */
638 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
639 /* Skip verify of deprecated_init_frame_pc, has predicate */
640 /* Skip verify of deprecated_get_saved_register, has predicate */
641 /* Skip verify of deprecated_register_convertible, has predicate */
642 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
643 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
644 /* Skip verify of convert_register_p, invalid_p == 0 */
645 /* Skip verify of register_to_value, invalid_p == 0 */
646 /* Skip verify of value_to_register, invalid_p == 0 */
647 /* Skip verify of pointer_to_address, invalid_p == 0 */
648 /* Skip verify of address_to_pointer, invalid_p == 0 */
649 /* Skip verify of integer_to_address, has predicate */
650 /* Skip verify of deprecated_pop_frame, has predicate */
651 /* Skip verify of deprecated_store_struct_return, has predicate */
652 /* Skip verify of return_value, has predicate */
653 /* Skip verify of return_value_on_stack, invalid_p == 0 */
654 /* Skip verify of extract_return_value, invalid_p == 0 */
655 /* Skip verify of store_return_value, invalid_p == 0 */
656 /* Skip verify of use_struct_convention, invalid_p == 0 */
657 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
658 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
659 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
660 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
661 && (current_gdbarch->skip_prologue == 0))
662 fprintf_unfiltered (log, "\n\tskip_prologue");
663 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
664 && (current_gdbarch->inner_than == 0))
665 fprintf_unfiltered (log, "\n\tinner_than");
666 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
667 && (current_gdbarch->breakpoint_from_pc == 0))
668 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
669 /* Skip verify of adjust_breakpoint_address, has predicate */
670 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
671 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
672 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
673 /* Skip verify of function_start_offset, invalid_p == 0 */
674 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
675 /* Skip verify of frame_args_skip, invalid_p == 0 */
676 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
677 /* Skip verify of deprecated_frame_chain, has predicate */
678 /* Skip verify of deprecated_frame_chain_valid, has predicate */
679 /* Skip verify of deprecated_frame_saved_pc, has predicate */
680 /* Skip verify of unwind_pc, has predicate */
681 /* Skip verify of unwind_sp, has predicate */
682 /* Skip verify of deprecated_frame_args_address, has predicate */
683 /* Skip verify of deprecated_frame_locals_address, has predicate */
684 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
685 /* Skip verify of frame_num_args, has predicate */
686 /* Skip verify of deprecated_stack_align, has predicate */
687 /* Skip verify of frame_align, has predicate */
688 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
689 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
690 if (current_gdbarch->float_format == 0)
691 current_gdbarch->float_format = default_float_format (current_gdbarch);
692 if (current_gdbarch->double_format == 0)
693 current_gdbarch->double_format = default_double_format (current_gdbarch);
694 if (current_gdbarch->long_double_format == 0)
695 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
696 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
697 /* Skip verify of addr_bits_remove, invalid_p == 0 */
698 /* Skip verify of smash_text_address, invalid_p == 0 */
699 /* Skip verify of software_single_step, has predicate */
700 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
701 && (current_gdbarch->print_insn == 0))
702 fprintf_unfiltered (log, "\n\tprint_insn");
703 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
704 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
705 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
706 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
707 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
708 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
709 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
710 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
711 /* Skip verify of name_of_malloc, invalid_p == 0 */
712 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
713 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
714 /* Skip verify of address_class_type_flags, has predicate */
715 /* Skip verify of address_class_type_flags_to_name, has predicate */
716 /* Skip verify of address_class_name_to_type_flags, has predicate */
717 /* Skip verify of register_reggroup_p, invalid_p == 0 */
718 /* Skip verify of fetch_pointer_argument, has predicate */
719 /* Skip verify of regset_from_core_section, has predicate */
720 buf = ui_file_xstrdup (log, &dummy);
721 make_cleanup (xfree, buf);
722 if (strlen (buf) > 0)
723 internal_error (__FILE__, __LINE__,
724 "verify_gdbarch: the following are invalid ...%s",
726 do_cleanups (cleanups);
730 /* Print out the details of the current architecture. */
732 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
733 just happens to match the global variable ``current_gdbarch''. That
734 way macros refering to that variable get the local and not the global
735 version - ulgh. Once everything is parameterised with gdbarch, this
739 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
741 fprintf_unfiltered (file,
742 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
744 fprintf_unfiltered (file,
745 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
746 (long) current_gdbarch->convert_from_func_ptr_addr);
747 fprintf_unfiltered (file,
748 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
749 gdbarch_frame_align_p (current_gdbarch));
750 fprintf_unfiltered (file,
751 "gdbarch_dump: frame_align = 0x%08lx\n",
752 (long) current_gdbarch->frame_align);
753 fprintf_unfiltered (file,
754 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
755 gdbarch_regset_from_core_section_p (current_gdbarch));
756 fprintf_unfiltered (file,
757 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
758 (long) current_gdbarch->regset_from_core_section);
759 fprintf_unfiltered (file,
760 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
761 gdbarch_return_value_p (current_gdbarch));
762 fprintf_unfiltered (file,
763 "gdbarch_dump: return_value = 0x%08lx\n",
764 (long) current_gdbarch->return_value);
765 fprintf_unfiltered (file,
766 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
767 (long) current_gdbarch->in_function_epilogue_p);
768 fprintf_unfiltered (file,
769 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
770 (long) current_gdbarch->register_reggroup_p);
771 fprintf_unfiltered (file,
772 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
773 (long) current_gdbarch->stabs_argument_has_addr);
774 fprintf_unfiltered (file,
775 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
776 gdbarch_pseudo_register_read_p (current_gdbarch));
777 fprintf_unfiltered (file,
778 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
779 (long) current_gdbarch->pseudo_register_read);
780 fprintf_unfiltered (file,
781 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
782 gdbarch_pseudo_register_write_p (current_gdbarch));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
785 (long) current_gdbarch->pseudo_register_write);
786 fprintf_unfiltered (file,
787 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
788 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
789 fprintf_unfiltered (file,
790 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
791 (long) current_gdbarch->address_class_name_to_type_flags);
792 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
793 fprintf_unfiltered (file,
794 "gdbarch_dump: %s # %s\n",
795 "ADDRESS_CLASS_TYPE_FLAGS_P()",
796 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
799 ADDRESS_CLASS_TYPE_FLAGS_P ());
801 #ifdef ADDRESS_CLASS_TYPE_FLAGS
802 fprintf_unfiltered (file,
803 "gdbarch_dump: %s # %s\n",
804 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
805 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
808 (long) current_gdbarch->address_class_type_flags
809 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
811 fprintf_unfiltered (file,
812 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
813 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
816 (long) current_gdbarch->address_class_type_flags_to_name);
817 #ifdef ADDRESS_TO_POINTER
818 fprintf_unfiltered (file,
819 "gdbarch_dump: %s # %s\n",
820 "ADDRESS_TO_POINTER(type, buf, addr)",
821 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
822 fprintf_unfiltered (file,
823 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
824 (long) current_gdbarch->address_to_pointer
825 /*ADDRESS_TO_POINTER ()*/);
827 #ifdef ADDR_BITS_REMOVE
828 fprintf_unfiltered (file,
829 "gdbarch_dump: %s # %s\n",
830 "ADDR_BITS_REMOVE(addr)",
831 XSTRING (ADDR_BITS_REMOVE (addr)));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
834 (long) current_gdbarch->addr_bits_remove
835 /*ADDR_BITS_REMOVE ()*/);
837 fprintf_unfiltered (file,
838 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
839 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
840 fprintf_unfiltered (file,
841 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
842 (long) current_gdbarch->adjust_breakpoint_address);
843 #ifdef BELIEVE_PCC_PROMOTION
844 fprintf_unfiltered (file,
845 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
846 XSTRING (BELIEVE_PCC_PROMOTION));
847 fprintf_unfiltered (file,
848 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
849 BELIEVE_PCC_PROMOTION);
851 #ifdef BREAKPOINT_FROM_PC
852 fprintf_unfiltered (file,
853 "gdbarch_dump: %s # %s\n",
854 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
855 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
856 fprintf_unfiltered (file,
857 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
858 (long) current_gdbarch->breakpoint_from_pc
859 /*BREAKPOINT_FROM_PC ()*/);
861 #ifdef CALL_DUMMY_LOCATION
862 fprintf_unfiltered (file,
863 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
864 XSTRING (CALL_DUMMY_LOCATION));
865 fprintf_unfiltered (file,
866 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
867 CALL_DUMMY_LOCATION);
869 #ifdef CANNOT_FETCH_REGISTER
870 fprintf_unfiltered (file,
871 "gdbarch_dump: %s # %s\n",
872 "CANNOT_FETCH_REGISTER(regnum)",
873 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
874 fprintf_unfiltered (file,
875 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
876 (long) current_gdbarch->cannot_fetch_register
877 /*CANNOT_FETCH_REGISTER ()*/);
879 #ifdef CANNOT_STEP_BREAKPOINT
880 fprintf_unfiltered (file,
881 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
882 XSTRING (CANNOT_STEP_BREAKPOINT));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
885 CANNOT_STEP_BREAKPOINT);
887 #ifdef CANNOT_STORE_REGISTER
888 fprintf_unfiltered (file,
889 "gdbarch_dump: %s # %s\n",
890 "CANNOT_STORE_REGISTER(regnum)",
891 XSTRING (CANNOT_STORE_REGISTER (regnum)));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
894 (long) current_gdbarch->cannot_store_register
895 /*CANNOT_STORE_REGISTER ()*/);
897 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
898 fprintf_unfiltered (file,
899 "gdbarch_dump: %s # %s\n",
900 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
901 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
904 (long) current_gdbarch->coff_make_msymbol_special
905 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
907 fprintf_unfiltered (file,
908 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
909 (long) current_gdbarch->construct_inferior_arguments);
910 #ifdef CONVERT_REGISTER_P
911 fprintf_unfiltered (file,
912 "gdbarch_dump: %s # %s\n",
913 "CONVERT_REGISTER_P(regnum, type)",
914 XSTRING (CONVERT_REGISTER_P (regnum, type)));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
917 (long) current_gdbarch->convert_register_p
918 /*CONVERT_REGISTER_P ()*/);
920 #ifdef DECR_PC_AFTER_BREAK
921 fprintf_unfiltered (file,
922 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
923 XSTRING (DECR_PC_AFTER_BREAK));
924 fprintf_unfiltered (file,
925 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
926 (long) DECR_PC_AFTER_BREAK);
928 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
929 fprintf_unfiltered (file,
930 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
931 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
934 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
936 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
937 fprintf_unfiltered (file,
938 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
939 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
942 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
944 #ifdef DEPRECATED_CALL_DUMMY_WORDS
945 fprintf_unfiltered (file,
946 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
947 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
950 (long) DEPRECATED_CALL_DUMMY_WORDS);
952 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
953 fprintf_unfiltered (file,
954 "gdbarch_dump: %s # %s\n",
955 "DEPRECATED_DO_REGISTERS_INFO_P()",
956 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
957 fprintf_unfiltered (file,
958 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
959 DEPRECATED_DO_REGISTERS_INFO_P ());
961 #ifdef DEPRECATED_DO_REGISTERS_INFO
962 fprintf_unfiltered (file,
963 "gdbarch_dump: %s # %s\n",
964 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
965 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
966 fprintf_unfiltered (file,
967 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
968 (long) current_gdbarch->deprecated_do_registers_info
969 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
971 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
972 fprintf_unfiltered (file,
973 "gdbarch_dump: %s # %s\n",
974 "DEPRECATED_DUMMY_WRITE_SP_P()",
975 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
976 fprintf_unfiltered (file,
977 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
978 DEPRECATED_DUMMY_WRITE_SP_P ());
980 #ifdef DEPRECATED_DUMMY_WRITE_SP
981 fprintf_unfiltered (file,
982 "gdbarch_dump: %s # %s\n",
983 "DEPRECATED_DUMMY_WRITE_SP(val)",
984 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
985 fprintf_unfiltered (file,
986 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
987 (long) current_gdbarch->deprecated_dummy_write_sp
988 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
990 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
991 fprintf_unfiltered (file,
992 "gdbarch_dump: %s # %s\n",
993 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
994 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
997 (long) current_gdbarch->deprecated_extract_return_value
998 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1000 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: %s # %s\n",
1003 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1004 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1007 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1009 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: %s # %s\n",
1012 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1013 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1016 (long) current_gdbarch->deprecated_extract_struct_value_address
1017 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1019 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: %s # %s\n",
1022 "DEPRECATED_FIX_CALL_DUMMY_P()",
1023 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1026 DEPRECATED_FIX_CALL_DUMMY_P ());
1028 #ifdef DEPRECATED_FIX_CALL_DUMMY
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: %s # %s\n",
1031 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1032 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1035 (long) current_gdbarch->deprecated_fix_call_dummy
1036 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1038 #ifdef DEPRECATED_FP_REGNUM
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1041 XSTRING (DEPRECATED_FP_REGNUM));
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1044 DEPRECATED_FP_REGNUM);
1046 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: %s # %s\n",
1049 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
1050 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
1053 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
1055 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: %s # %s\n",
1058 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
1059 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1062 (long) current_gdbarch->deprecated_frameless_function_invocation
1063 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
1065 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: %s # %s\n",
1068 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1069 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1072 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1074 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: %s # %s\n",
1077 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1078 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1081 (long) current_gdbarch->deprecated_frame_args_address
1082 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1084 #ifdef DEPRECATED_FRAME_CHAIN_P
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: %s # %s\n",
1087 "DEPRECATED_FRAME_CHAIN_P()",
1088 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1091 DEPRECATED_FRAME_CHAIN_P ());
1093 #ifdef DEPRECATED_FRAME_CHAIN
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: %s # %s\n",
1096 "DEPRECATED_FRAME_CHAIN(frame)",
1097 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1100 (long) current_gdbarch->deprecated_frame_chain
1101 /*DEPRECATED_FRAME_CHAIN ()*/);
1103 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: %s # %s\n",
1106 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1107 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1108 fprintf_unfiltered (file,
1109 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1110 DEPRECATED_FRAME_CHAIN_VALID_P ());
1112 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1113 fprintf_unfiltered (file,
1114 "gdbarch_dump: %s # %s\n",
1115 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1116 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1119 (long) current_gdbarch->deprecated_frame_chain_valid
1120 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1122 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: %s # %s\n",
1125 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1126 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1129 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1131 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: %s # %s\n",
1134 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1135 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1138 (long) current_gdbarch->deprecated_frame_init_saved_regs
1139 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1141 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: %s # %s\n",
1144 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1145 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1148 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1150 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: %s # %s\n",
1153 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1154 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1157 (long) current_gdbarch->deprecated_frame_locals_address
1158 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1160 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1161 fprintf_unfiltered (file,
1162 "gdbarch_dump: %s # %s\n",
1163 "DEPRECATED_FRAME_SAVED_PC_P()",
1164 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1167 DEPRECATED_FRAME_SAVED_PC_P ());
1169 #ifdef DEPRECATED_FRAME_SAVED_PC
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: %s # %s\n",
1172 "DEPRECATED_FRAME_SAVED_PC(fi)",
1173 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1176 (long) current_gdbarch->deprecated_frame_saved_pc
1177 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1179 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: %s # %s\n",
1182 "DEPRECATED_GET_SAVED_REGISTER_P()",
1183 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1186 DEPRECATED_GET_SAVED_REGISTER_P ());
1188 #ifdef DEPRECATED_GET_SAVED_REGISTER
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: %s # %s\n",
1191 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1192 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1195 (long) current_gdbarch->deprecated_get_saved_register
1196 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1198 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: %s # %s\n",
1201 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1202 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1205 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1207 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: %s # %s\n",
1210 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1211 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1214 (long) current_gdbarch->deprecated_init_extra_frame_info
1215 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1217 #ifdef DEPRECATED_INIT_FRAME_PC_P
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: %s # %s\n",
1220 "DEPRECATED_INIT_FRAME_PC_P()",
1221 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1224 DEPRECATED_INIT_FRAME_PC_P ());
1226 #ifdef DEPRECATED_INIT_FRAME_PC
1227 fprintf_unfiltered (file,
1228 "gdbarch_dump: %s # %s\n",
1229 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1230 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1233 (long) current_gdbarch->deprecated_init_frame_pc
1234 /*DEPRECATED_INIT_FRAME_PC ()*/);
1236 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1240 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1243 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1245 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1248 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1251 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1253 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1257 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1260 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1262 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1263 fprintf_unfiltered (file,
1264 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1265 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1268 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1270 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: %s # %s\n",
1273 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1274 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1275 fprintf_unfiltered (file,
1276 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1277 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1279 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: %s # %s\n",
1282 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1283 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1286 (long) current_gdbarch->deprecated_pc_in_call_dummy
1287 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1289 #ifdef DEPRECATED_POP_FRAME_P
1290 fprintf_unfiltered (file,
1291 "gdbarch_dump: %s # %s\n",
1292 "DEPRECATED_POP_FRAME_P()",
1293 XSTRING (DEPRECATED_POP_FRAME_P ()));
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1296 DEPRECATED_POP_FRAME_P ());
1298 #ifdef DEPRECATED_POP_FRAME
1299 fprintf_unfiltered (file,
1300 "gdbarch_dump: %s # %s\n",
1301 "DEPRECATED_POP_FRAME(-)",
1302 XSTRING (DEPRECATED_POP_FRAME (-)));
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1305 (long) current_gdbarch->deprecated_pop_frame
1306 /*DEPRECATED_POP_FRAME ()*/);
1308 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: %s # %s\n",
1311 "DEPRECATED_PUSH_ARGUMENTS_P()",
1312 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1315 DEPRECATED_PUSH_ARGUMENTS_P ());
1317 #ifdef DEPRECATED_PUSH_ARGUMENTS
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: %s # %s\n",
1320 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1321 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1324 (long) current_gdbarch->deprecated_push_arguments
1325 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1327 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: %s # %s\n",
1330 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1331 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1334 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1336 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: %s # %s\n",
1339 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1340 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1343 (long) current_gdbarch->deprecated_push_dummy_frame
1344 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1346 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: %s # %s\n",
1349 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1350 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1353 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1355 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: %s # %s\n",
1358 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1359 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1362 (long) current_gdbarch->deprecated_push_return_address
1363 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1365 #ifdef DEPRECATED_REGISTER_BYTE_P
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: %s # %s\n",
1368 "DEPRECATED_REGISTER_BYTE_P()",
1369 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1372 DEPRECATED_REGISTER_BYTE_P ());
1374 #ifdef DEPRECATED_REGISTER_BYTE
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: %s # %s\n",
1377 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1378 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1381 (long) current_gdbarch->deprecated_register_byte
1382 /*DEPRECATED_REGISTER_BYTE ()*/);
1384 #ifdef DEPRECATED_REGISTER_BYTES
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1387 XSTRING (DEPRECATED_REGISTER_BYTES));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1390 DEPRECATED_REGISTER_BYTES);
1392 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: %s # %s\n",
1395 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1396 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1399 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1401 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: %s # %s\n",
1404 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1405 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1408 (long) current_gdbarch->deprecated_register_convertible
1409 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1411 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: %s # %s\n",
1414 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1415 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1418 (long) current_gdbarch->deprecated_register_convert_to_raw
1419 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1421 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: %s # %s\n",
1424 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1425 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1428 (long) current_gdbarch->deprecated_register_convert_to_virtual
1429 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1431 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: %s # %s\n",
1434 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1435 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1438 DEPRECATED_REGISTER_RAW_SIZE_P ());
1440 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: %s # %s\n",
1443 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1444 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1447 (long) current_gdbarch->deprecated_register_raw_size
1448 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1450 #ifdef DEPRECATED_REGISTER_SIZE
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1453 XSTRING (DEPRECATED_REGISTER_SIZE));
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1456 DEPRECATED_REGISTER_SIZE);
1458 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1459 fprintf_unfiltered (file,
1460 "gdbarch_dump: %s # %s\n",
1461 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1462 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1465 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1467 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1468 fprintf_unfiltered (file,
1469 "gdbarch_dump: %s # %s\n",
1470 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1471 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1474 (long) current_gdbarch->deprecated_register_virtual_size
1475 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1477 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1478 fprintf_unfiltered (file,
1479 "gdbarch_dump: %s # %s\n",
1480 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1481 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1484 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1486 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: %s # %s\n",
1489 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1490 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1493 (long) current_gdbarch->deprecated_register_virtual_type
1494 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1496 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: %s # %s\n",
1499 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1500 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1503 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1505 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: %s # %s\n",
1508 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1509 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1512 (long) current_gdbarch->deprecated_reg_struct_has_addr
1513 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1515 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1516 fprintf_unfiltered (file,
1517 "gdbarch_dump: %s # %s\n",
1518 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1519 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1522 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1524 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: %s # %s\n",
1527 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1528 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1531 (long) current_gdbarch->deprecated_saved_pc_after_call
1532 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1534 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: %s # %s\n",
1537 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1538 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1541 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1543 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: %s # %s\n",
1546 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1547 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1550 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1551 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1553 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1554 fprintf_unfiltered (file,
1555 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1556 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1559 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1561 #ifdef DEPRECATED_STACK_ALIGN_P
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: %s # %s\n",
1564 "DEPRECATED_STACK_ALIGN_P()",
1565 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1568 DEPRECATED_STACK_ALIGN_P ());
1570 #ifdef DEPRECATED_STACK_ALIGN
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: %s # %s\n",
1573 "DEPRECATED_STACK_ALIGN(sp)",
1574 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1575 fprintf_unfiltered (file,
1576 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1577 (long) current_gdbarch->deprecated_stack_align
1578 /*DEPRECATED_STACK_ALIGN ()*/);
1580 #ifdef DEPRECATED_STORE_RETURN_VALUE
1581 fprintf_unfiltered (file,
1582 "gdbarch_dump: %s # %s\n",
1583 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1584 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1587 (long) current_gdbarch->deprecated_store_return_value
1588 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1590 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: %s # %s\n",
1593 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1594 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1597 DEPRECATED_STORE_STRUCT_RETURN_P ());
1599 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1600 fprintf_unfiltered (file,
1601 "gdbarch_dump: %s # %s\n",
1602 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1603 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1606 (long) current_gdbarch->deprecated_store_struct_return
1607 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1609 #ifdef DEPRECATED_TARGET_READ_FP_P
1610 fprintf_unfiltered (file,
1611 "gdbarch_dump: %s # %s\n",
1612 "DEPRECATED_TARGET_READ_FP_P()",
1613 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1616 DEPRECATED_TARGET_READ_FP_P ());
1618 #ifdef DEPRECATED_TARGET_READ_FP
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: %s # %s\n",
1621 "DEPRECATED_TARGET_READ_FP()",
1622 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1623 fprintf_unfiltered (file,
1624 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1625 (long) current_gdbarch->deprecated_target_read_fp
1626 /*DEPRECATED_TARGET_READ_FP ()*/);
1628 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1631 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1632 fprintf_unfiltered (file,
1633 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1634 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1636 #ifdef DWARF2_REG_TO_REGNUM
1637 fprintf_unfiltered (file,
1638 "gdbarch_dump: %s # %s\n",
1639 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1640 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1643 (long) current_gdbarch->dwarf2_reg_to_regnum
1644 /*DWARF2_REG_TO_REGNUM ()*/);
1646 #ifdef DWARF_REG_TO_REGNUM
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: %s # %s\n",
1649 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1650 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1651 fprintf_unfiltered (file,
1652 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1653 (long) current_gdbarch->dwarf_reg_to_regnum
1654 /*DWARF_REG_TO_REGNUM ()*/);
1656 #ifdef ECOFF_REG_TO_REGNUM
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: %s # %s\n",
1659 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1660 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1663 (long) current_gdbarch->ecoff_reg_to_regnum
1664 /*ECOFF_REG_TO_REGNUM ()*/);
1666 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1667 fprintf_unfiltered (file,
1668 "gdbarch_dump: %s # %s\n",
1669 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1670 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1671 fprintf_unfiltered (file,
1672 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1673 (long) current_gdbarch->elf_make_msymbol_special
1674 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1676 #ifdef EXTRACT_RETURN_VALUE
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: %s # %s\n",
1679 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1680 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1683 (long) current_gdbarch->extract_return_value
1684 /*EXTRACT_RETURN_VALUE ()*/);
1686 #ifdef FETCH_POINTER_ARGUMENT_P
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: %s # %s\n",
1689 "FETCH_POINTER_ARGUMENT_P()",
1690 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1693 FETCH_POINTER_ARGUMENT_P ());
1695 #ifdef FETCH_POINTER_ARGUMENT
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: %s # %s\n",
1698 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1699 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1700 fprintf_unfiltered (file,
1701 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1702 (long) current_gdbarch->fetch_pointer_argument
1703 /*FETCH_POINTER_ARGUMENT ()*/);
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: FP0_REGNUM # %s\n",
1708 XSTRING (FP0_REGNUM));
1709 fprintf_unfiltered (file,
1710 "gdbarch_dump: FP0_REGNUM = %d\n",
1713 #ifdef FRAME_ARGS_SKIP
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1716 XSTRING (FRAME_ARGS_SKIP));
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1719 (long) FRAME_ARGS_SKIP);
1721 #ifdef FRAME_NUM_ARGS_P
1722 fprintf_unfiltered (file,
1723 "gdbarch_dump: %s # %s\n",
1724 "FRAME_NUM_ARGS_P()",
1725 XSTRING (FRAME_NUM_ARGS_P ()));
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1728 FRAME_NUM_ARGS_P ());
1730 #ifdef FRAME_NUM_ARGS
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: %s # %s\n",
1733 "FRAME_NUM_ARGS(frame)",
1734 XSTRING (FRAME_NUM_ARGS (frame)));
1735 fprintf_unfiltered (file,
1736 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1737 (long) current_gdbarch->frame_num_args
1738 /*FRAME_NUM_ARGS ()*/);
1740 #ifdef FRAME_RED_ZONE_SIZE
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1743 XSTRING (FRAME_RED_ZONE_SIZE));
1744 fprintf_unfiltered (file,
1745 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1746 FRAME_RED_ZONE_SIZE);
1748 #ifdef FUNCTION_START_OFFSET
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1751 XSTRING (FUNCTION_START_OFFSET));
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1754 (long) FUNCTION_START_OFFSET);
1756 #ifdef GET_LONGJMP_TARGET_P
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: %s # %s\n",
1759 "GET_LONGJMP_TARGET_P()",
1760 XSTRING (GET_LONGJMP_TARGET_P ()));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1763 GET_LONGJMP_TARGET_P ());
1765 #ifdef GET_LONGJMP_TARGET
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: %s # %s\n",
1768 "GET_LONGJMP_TARGET(pc)",
1769 XSTRING (GET_LONGJMP_TARGET (pc)));
1770 fprintf_unfiltered (file,
1771 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1772 (long) current_gdbarch->get_longjmp_target
1773 /*GET_LONGJMP_TARGET ()*/);
1775 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1778 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1781 HAVE_NONSTEPPABLE_WATCHPOINT);
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: %s # %s\n",
1786 "INNER_THAN(lhs, rhs)",
1787 XSTRING (INNER_THAN (lhs, rhs)));
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1790 (long) current_gdbarch->inner_than
1793 #ifdef INTEGER_TO_ADDRESS_P
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: %s # %s\n",
1796 "INTEGER_TO_ADDRESS_P()",
1797 XSTRING (INTEGER_TO_ADDRESS_P ()));
1798 fprintf_unfiltered (file,
1799 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1800 INTEGER_TO_ADDRESS_P ());
1802 #ifdef INTEGER_TO_ADDRESS
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: %s # %s\n",
1805 "INTEGER_TO_ADDRESS(type, buf)",
1806 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1809 (long) current_gdbarch->integer_to_address
1810 /*INTEGER_TO_ADDRESS ()*/);
1812 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1813 fprintf_unfiltered (file,
1814 "gdbarch_dump: %s # %s\n",
1815 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1816 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1819 (long) current_gdbarch->in_solib_call_trampoline
1820 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1822 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: %s # %s\n",
1825 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1826 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1829 (long) current_gdbarch->in_solib_return_trampoline
1830 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1832 #ifdef MEMORY_INSERT_BREAKPOINT
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: %s # %s\n",
1835 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1836 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1839 (long) current_gdbarch->memory_insert_breakpoint
1840 /*MEMORY_INSERT_BREAKPOINT ()*/);
1842 #ifdef MEMORY_REMOVE_BREAKPOINT
1843 fprintf_unfiltered (file,
1844 "gdbarch_dump: %s # %s\n",
1845 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1846 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1847 fprintf_unfiltered (file,
1848 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1849 (long) current_gdbarch->memory_remove_breakpoint
1850 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1852 #ifdef NAME_OF_MALLOC
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1855 XSTRING (NAME_OF_MALLOC));
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1860 #ifdef NUM_PSEUDO_REGS
1861 fprintf_unfiltered (file,
1862 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1863 XSTRING (NUM_PSEUDO_REGS));
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: NUM_REGS # %s\n",
1871 XSTRING (NUM_REGS));
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: NUM_REGS = %d\n",
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: PC_REGNUM # %s\n",
1879 XSTRING (PC_REGNUM));
1880 fprintf_unfiltered (file,
1881 "gdbarch_dump: PC_REGNUM = %d\n",
1884 #ifdef POINTER_TO_ADDRESS
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: %s # %s\n",
1887 "POINTER_TO_ADDRESS(type, buf)",
1888 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1891 (long) current_gdbarch->pointer_to_address
1892 /*POINTER_TO_ADDRESS ()*/);
1894 fprintf_unfiltered (file,
1895 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1896 gdbarch_print_float_info_p (current_gdbarch));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: print_float_info = 0x%08lx\n",
1899 (long) current_gdbarch->print_float_info);
1900 fprintf_unfiltered (file,
1901 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1902 (long) current_gdbarch->print_registers_info);
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1905 gdbarch_print_vector_info_p (current_gdbarch));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1908 (long) current_gdbarch->print_vector_info);
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: PS_REGNUM # %s\n",
1912 XSTRING (PS_REGNUM));
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: PS_REGNUM = %d\n",
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1919 gdbarch_push_dummy_call_p (current_gdbarch));
1920 fprintf_unfiltered (file,
1921 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1922 (long) current_gdbarch->push_dummy_call);
1923 fprintf_unfiltered (file,
1924 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1925 gdbarch_push_dummy_code_p (current_gdbarch));
1926 fprintf_unfiltered (file,
1927 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1928 (long) current_gdbarch->push_dummy_code);
1929 #ifdef REGISTER_BYTES_OK_P
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: %s # %s\n",
1932 "REGISTER_BYTES_OK_P()",
1933 XSTRING (REGISTER_BYTES_OK_P ()));
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1936 REGISTER_BYTES_OK_P ());
1938 #ifdef REGISTER_BYTES_OK
1939 fprintf_unfiltered (file,
1940 "gdbarch_dump: %s # %s\n",
1941 "REGISTER_BYTES_OK(nr_bytes)",
1942 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1945 (long) current_gdbarch->register_bytes_ok
1946 /*REGISTER_BYTES_OK ()*/);
1948 #ifdef REGISTER_NAME
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: %s # %s\n",
1951 "REGISTER_NAME(regnr)",
1952 XSTRING (REGISTER_NAME (regnr)));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1955 (long) current_gdbarch->register_name
1956 /*REGISTER_NAME ()*/);
1958 #ifdef REGISTER_SIM_REGNO
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: %s # %s\n",
1961 "REGISTER_SIM_REGNO(reg_nr)",
1962 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1963 fprintf_unfiltered (file,
1964 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1965 (long) current_gdbarch->register_sim_regno
1966 /*REGISTER_SIM_REGNO ()*/);
1968 #ifdef REGISTER_TO_VALUE
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: %s # %s\n",
1971 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1972 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1975 (long) current_gdbarch->register_to_value
1976 /*REGISTER_TO_VALUE ()*/);
1978 fprintf_unfiltered (file,
1979 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1980 gdbarch_register_type_p (current_gdbarch));
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: register_type = 0x%08lx\n",
1983 (long) current_gdbarch->register_type);
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1986 (long) current_gdbarch->remote_translate_xfer_address);
1987 #ifdef RETURN_VALUE_ON_STACK
1988 fprintf_unfiltered (file,
1989 "gdbarch_dump: %s # %s\n",
1990 "RETURN_VALUE_ON_STACK(type)",
1991 XSTRING (RETURN_VALUE_ON_STACK (type)));
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1994 (long) current_gdbarch->return_value_on_stack
1995 /*RETURN_VALUE_ON_STACK ()*/);
1997 #ifdef SDB_REG_TO_REGNUM
1998 fprintf_unfiltered (file,
1999 "gdbarch_dump: %s # %s\n",
2000 "SDB_REG_TO_REGNUM(sdb_regnr)",
2001 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2002 fprintf_unfiltered (file,
2003 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2004 (long) current_gdbarch->sdb_reg_to_regnum
2005 /*SDB_REG_TO_REGNUM ()*/);
2007 #ifdef SKIP_PROLOGUE
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: %s # %s\n",
2010 "SKIP_PROLOGUE(ip)",
2011 XSTRING (SKIP_PROLOGUE (ip)));
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2014 (long) current_gdbarch->skip_prologue
2015 /*SKIP_PROLOGUE ()*/);
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
2019 (long) current_gdbarch->skip_solib_resolver);
2020 #ifdef SKIP_TRAMPOLINE_CODE
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: %s # %s\n",
2023 "SKIP_TRAMPOLINE_CODE(pc)",
2024 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2025 fprintf_unfiltered (file,
2026 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2027 (long) current_gdbarch->skip_trampoline_code
2028 /*SKIP_TRAMPOLINE_CODE ()*/);
2030 #ifdef SMASH_TEXT_ADDRESS
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: %s # %s\n",
2033 "SMASH_TEXT_ADDRESS(addr)",
2034 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2037 (long) current_gdbarch->smash_text_address
2038 /*SMASH_TEXT_ADDRESS ()*/);
2040 #ifdef SOFTWARE_SINGLE_STEP_P
2041 fprintf_unfiltered (file,
2042 "gdbarch_dump: %s # %s\n",
2043 "SOFTWARE_SINGLE_STEP_P()",
2044 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2045 fprintf_unfiltered (file,
2046 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2047 SOFTWARE_SINGLE_STEP_P ());
2049 #ifdef SOFTWARE_SINGLE_STEP
2050 fprintf_unfiltered (file,
2051 "gdbarch_dump: %s # %s\n",
2052 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2053 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2054 fprintf_unfiltered (file,
2055 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2056 (long) current_gdbarch->software_single_step
2057 /*SOFTWARE_SINGLE_STEP ()*/);
2060 fprintf_unfiltered (file,
2061 "gdbarch_dump: SP_REGNUM # %s\n",
2062 XSTRING (SP_REGNUM));
2063 fprintf_unfiltered (file,
2064 "gdbarch_dump: SP_REGNUM = %d\n",
2067 #ifdef STAB_REG_TO_REGNUM
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: %s # %s\n",
2070 "STAB_REG_TO_REGNUM(stab_regnr)",
2071 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2072 fprintf_unfiltered (file,
2073 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2074 (long) current_gdbarch->stab_reg_to_regnum
2075 /*STAB_REG_TO_REGNUM ()*/);
2077 #ifdef STORE_RETURN_VALUE
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: %s # %s\n",
2080 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2081 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2084 (long) current_gdbarch->store_return_value
2085 /*STORE_RETURN_VALUE ()*/);
2087 #ifdef TARGET_ADDR_BIT
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2090 XSTRING (TARGET_ADDR_BIT));
2091 fprintf_unfiltered (file,
2092 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2095 #ifdef TARGET_ARCHITECTURE
2096 fprintf_unfiltered (file,
2097 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2098 XSTRING (TARGET_ARCHITECTURE));
2099 if (TARGET_ARCHITECTURE != NULL)
2100 fprintf_unfiltered (file,
2101 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2102 TARGET_ARCHITECTURE->printable_name);
2104 #ifdef TARGET_BFD_VMA_BIT
2105 fprintf_unfiltered (file,
2106 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2107 XSTRING (TARGET_BFD_VMA_BIT));
2108 fprintf_unfiltered (file,
2109 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2110 TARGET_BFD_VMA_BIT);
2112 #ifdef TARGET_BYTE_ORDER
2113 fprintf_unfiltered (file,
2114 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2115 XSTRING (TARGET_BYTE_ORDER));
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2118 (long) TARGET_BYTE_ORDER);
2120 #ifdef TARGET_CHAR_SIGNED
2121 fprintf_unfiltered (file,
2122 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2123 XSTRING (TARGET_CHAR_SIGNED));
2124 fprintf_unfiltered (file,
2125 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2126 TARGET_CHAR_SIGNED);
2128 #ifdef TARGET_DOUBLE_BIT
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2131 XSTRING (TARGET_DOUBLE_BIT));
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2136 #ifdef TARGET_DOUBLE_FORMAT
2137 fprintf_unfiltered (file,
2138 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2139 XSTRING (TARGET_DOUBLE_FORMAT));
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2142 (TARGET_DOUBLE_FORMAT)->name);
2144 #ifdef TARGET_FLOAT_BIT
2145 fprintf_unfiltered (file,
2146 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2147 XSTRING (TARGET_FLOAT_BIT));
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2152 #ifdef TARGET_FLOAT_FORMAT
2153 fprintf_unfiltered (file,
2154 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2155 XSTRING (TARGET_FLOAT_FORMAT));
2156 fprintf_unfiltered (file,
2157 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2158 (TARGET_FLOAT_FORMAT)->name);
2160 #ifdef TARGET_INT_BIT
2161 fprintf_unfiltered (file,
2162 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2163 XSTRING (TARGET_INT_BIT));
2164 fprintf_unfiltered (file,
2165 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2168 #ifdef TARGET_LONG_BIT
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2171 XSTRING (TARGET_LONG_BIT));
2172 fprintf_unfiltered (file,
2173 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2176 #ifdef TARGET_LONG_DOUBLE_BIT
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2179 XSTRING (TARGET_LONG_DOUBLE_BIT));
2180 fprintf_unfiltered (file,
2181 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2182 TARGET_LONG_DOUBLE_BIT);
2184 #ifdef TARGET_LONG_DOUBLE_FORMAT
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2187 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2188 fprintf_unfiltered (file,
2189 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2190 (TARGET_LONG_DOUBLE_FORMAT)->name);
2192 #ifdef TARGET_LONG_LONG_BIT
2193 fprintf_unfiltered (file,
2194 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2195 XSTRING (TARGET_LONG_LONG_BIT));
2196 fprintf_unfiltered (file,
2197 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2198 TARGET_LONG_LONG_BIT);
2201 fprintf_unfiltered (file,
2202 "gdbarch_dump: TARGET_OSABI # %s\n",
2203 XSTRING (TARGET_OSABI));
2204 fprintf_unfiltered (file,
2205 "gdbarch_dump: TARGET_OSABI = %ld\n",
2206 (long) TARGET_OSABI);
2208 #ifdef TARGET_PRINT_INSN
2209 fprintf_unfiltered (file,
2210 "gdbarch_dump: %s # %s\n",
2211 "TARGET_PRINT_INSN(vma, info)",
2212 XSTRING (TARGET_PRINT_INSN (vma, info)));
2213 fprintf_unfiltered (file,
2214 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2215 (long) current_gdbarch->print_insn
2216 /*TARGET_PRINT_INSN ()*/);
2218 #ifdef TARGET_PTR_BIT
2219 fprintf_unfiltered (file,
2220 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2221 XSTRING (TARGET_PTR_BIT));
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2226 #ifdef TARGET_READ_PC_P
2227 fprintf_unfiltered (file,
2228 "gdbarch_dump: %s # %s\n",
2229 "TARGET_READ_PC_P()",
2230 XSTRING (TARGET_READ_PC_P ()));
2231 fprintf_unfiltered (file,
2232 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2233 TARGET_READ_PC_P ());
2235 #ifdef TARGET_READ_PC
2236 fprintf_unfiltered (file,
2237 "gdbarch_dump: %s # %s\n",
2238 "TARGET_READ_PC(ptid)",
2239 XSTRING (TARGET_READ_PC (ptid)));
2240 fprintf_unfiltered (file,
2241 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2242 (long) current_gdbarch->read_pc
2243 /*TARGET_READ_PC ()*/);
2245 #ifdef TARGET_READ_SP_P
2246 fprintf_unfiltered (file,
2247 "gdbarch_dump: %s # %s\n",
2248 "TARGET_READ_SP_P()",
2249 XSTRING (TARGET_READ_SP_P ()));
2250 fprintf_unfiltered (file,
2251 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2252 TARGET_READ_SP_P ());
2254 #ifdef TARGET_READ_SP
2255 fprintf_unfiltered (file,
2256 "gdbarch_dump: %s # %s\n",
2258 XSTRING (TARGET_READ_SP ()));
2259 fprintf_unfiltered (file,
2260 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2261 (long) current_gdbarch->read_sp
2262 /*TARGET_READ_SP ()*/);
2264 #ifdef TARGET_SHORT_BIT
2265 fprintf_unfiltered (file,
2266 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2267 XSTRING (TARGET_SHORT_BIT));
2268 fprintf_unfiltered (file,
2269 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2272 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2273 fprintf_unfiltered (file,
2274 "gdbarch_dump: %s # %s\n",
2275 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2276 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2277 fprintf_unfiltered (file,
2278 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2279 (long) current_gdbarch->virtual_frame_pointer
2280 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2282 #ifdef TARGET_WRITE_PC
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: %s # %s\n",
2285 "TARGET_WRITE_PC(val, ptid)",
2286 XSTRING (TARGET_WRITE_PC (val, ptid)));
2287 fprintf_unfiltered (file,
2288 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2289 (long) current_gdbarch->write_pc
2290 /*TARGET_WRITE_PC ()*/);
2292 fprintf_unfiltered (file,
2293 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2294 gdbarch_unwind_dummy_id_p (current_gdbarch));
2295 fprintf_unfiltered (file,
2296 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2297 (long) current_gdbarch->unwind_dummy_id);
2298 fprintf_unfiltered (file,
2299 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2300 gdbarch_unwind_pc_p (current_gdbarch));
2301 fprintf_unfiltered (file,
2302 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2303 (long) current_gdbarch->unwind_pc);
2304 fprintf_unfiltered (file,
2305 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2306 gdbarch_unwind_sp_p (current_gdbarch));
2307 fprintf_unfiltered (file,
2308 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2309 (long) current_gdbarch->unwind_sp);
2310 #ifdef USE_STRUCT_CONVENTION
2311 fprintf_unfiltered (file,
2312 "gdbarch_dump: %s # %s\n",
2313 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2314 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2315 fprintf_unfiltered (file,
2316 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2317 (long) current_gdbarch->use_struct_convention
2318 /*USE_STRUCT_CONVENTION ()*/);
2320 #ifdef VALUE_TO_REGISTER
2321 fprintf_unfiltered (file,
2322 "gdbarch_dump: %s # %s\n",
2323 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2324 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2325 fprintf_unfiltered (file,
2326 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2327 (long) current_gdbarch->value_to_register
2328 /*VALUE_TO_REGISTER ()*/);
2330 if (current_gdbarch->dump_tdep != NULL)
2331 current_gdbarch->dump_tdep (current_gdbarch, file);
2334 struct gdbarch_tdep *
2335 gdbarch_tdep (struct gdbarch *gdbarch)
2337 if (gdbarch_debug >= 2)
2338 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2339 return gdbarch->tdep;
2343 const struct bfd_arch_info *
2344 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2346 gdb_assert (gdbarch != NULL);
2347 if (gdbarch_debug >= 2)
2348 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2349 return gdbarch->bfd_arch_info;
2353 gdbarch_byte_order (struct gdbarch *gdbarch)
2355 gdb_assert (gdbarch != NULL);
2356 if (gdbarch_debug >= 2)
2357 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2358 return gdbarch->byte_order;
2362 gdbarch_osabi (struct gdbarch *gdbarch)
2364 gdb_assert (gdbarch != NULL);
2365 if (gdbarch_debug >= 2)
2366 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2367 return gdbarch->osabi;
2371 gdbarch_short_bit (struct gdbarch *gdbarch)
2373 gdb_assert (gdbarch != NULL);
2374 /* Skip verify of short_bit, invalid_p == 0 */
2375 if (gdbarch_debug >= 2)
2376 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2377 return gdbarch->short_bit;
2381 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2384 gdbarch->short_bit = short_bit;
2388 gdbarch_int_bit (struct gdbarch *gdbarch)
2390 gdb_assert (gdbarch != NULL);
2391 /* Skip verify of int_bit, invalid_p == 0 */
2392 if (gdbarch_debug >= 2)
2393 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2394 return gdbarch->int_bit;
2398 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2401 gdbarch->int_bit = int_bit;
2405 gdbarch_long_bit (struct gdbarch *gdbarch)
2407 gdb_assert (gdbarch != NULL);
2408 /* Skip verify of long_bit, invalid_p == 0 */
2409 if (gdbarch_debug >= 2)
2410 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2411 return gdbarch->long_bit;
2415 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2418 gdbarch->long_bit = long_bit;
2422 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2424 gdb_assert (gdbarch != NULL);
2425 /* Skip verify of long_long_bit, invalid_p == 0 */
2426 if (gdbarch_debug >= 2)
2427 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2428 return gdbarch->long_long_bit;
2432 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2435 gdbarch->long_long_bit = long_long_bit;
2439 gdbarch_float_bit (struct gdbarch *gdbarch)
2441 gdb_assert (gdbarch != NULL);
2442 /* Skip verify of float_bit, invalid_p == 0 */
2443 if (gdbarch_debug >= 2)
2444 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2445 return gdbarch->float_bit;
2449 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2452 gdbarch->float_bit = float_bit;
2456 gdbarch_double_bit (struct gdbarch *gdbarch)
2458 gdb_assert (gdbarch != NULL);
2459 /* Skip verify of double_bit, invalid_p == 0 */
2460 if (gdbarch_debug >= 2)
2461 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2462 return gdbarch->double_bit;
2466 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2469 gdbarch->double_bit = double_bit;
2473 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2475 gdb_assert (gdbarch != NULL);
2476 /* Skip verify of long_double_bit, invalid_p == 0 */
2477 if (gdbarch_debug >= 2)
2478 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2479 return gdbarch->long_double_bit;
2483 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2484 int long_double_bit)
2486 gdbarch->long_double_bit = long_double_bit;
2490 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2492 gdb_assert (gdbarch != NULL);
2493 /* Skip verify of ptr_bit, invalid_p == 0 */
2494 if (gdbarch_debug >= 2)
2495 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2496 return gdbarch->ptr_bit;
2500 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2503 gdbarch->ptr_bit = ptr_bit;
2507 gdbarch_addr_bit (struct gdbarch *gdbarch)
2509 gdb_assert (gdbarch != NULL);
2510 /* Check variable changed from pre-default. */
2511 gdb_assert (gdbarch->addr_bit != 0);
2512 if (gdbarch_debug >= 2)
2513 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2514 return gdbarch->addr_bit;
2518 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2521 gdbarch->addr_bit = addr_bit;
2525 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2527 gdb_assert (gdbarch != NULL);
2528 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2529 if (gdbarch_debug >= 2)
2530 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2531 return gdbarch->bfd_vma_bit;
2535 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2538 gdbarch->bfd_vma_bit = bfd_vma_bit;
2542 gdbarch_char_signed (struct gdbarch *gdbarch)
2544 gdb_assert (gdbarch != NULL);
2545 /* Check variable changed from pre-default. */
2546 gdb_assert (gdbarch->char_signed != -1);
2547 if (gdbarch_debug >= 2)
2548 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2549 return gdbarch->char_signed;
2553 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2556 gdbarch->char_signed = char_signed;
2560 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2562 gdb_assert (gdbarch != NULL);
2563 return gdbarch->read_pc != NULL;
2567 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2569 gdb_assert (gdbarch != NULL);
2570 gdb_assert (gdbarch->read_pc != NULL);
2571 if (gdbarch_debug >= 2)
2572 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2573 return gdbarch->read_pc (ptid);
2577 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2578 gdbarch_read_pc_ftype read_pc)
2580 gdbarch->read_pc = read_pc;
2584 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2586 gdb_assert (gdbarch != NULL);
2587 gdb_assert (gdbarch->write_pc != NULL);
2588 if (gdbarch_debug >= 2)
2589 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2590 gdbarch->write_pc (val, ptid);
2594 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2595 gdbarch_write_pc_ftype write_pc)
2597 gdbarch->write_pc = write_pc;
2601 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2603 gdb_assert (gdbarch != NULL);
2604 return gdbarch->read_sp != NULL;
2608 gdbarch_read_sp (struct gdbarch *gdbarch)
2610 gdb_assert (gdbarch != NULL);
2611 gdb_assert (gdbarch->read_sp != NULL);
2612 if (gdbarch_debug >= 2)
2613 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2614 return gdbarch->read_sp ();
2618 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2619 gdbarch_read_sp_ftype read_sp)
2621 gdbarch->read_sp = read_sp;
2625 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2627 gdb_assert (gdbarch != NULL);
2628 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2629 if (gdbarch_debug >= 2)
2630 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2631 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2635 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2636 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2638 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2642 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2644 gdb_assert (gdbarch != NULL);
2645 return gdbarch->pseudo_register_read != NULL;
2649 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2651 gdb_assert (gdbarch != NULL);
2652 gdb_assert (gdbarch->pseudo_register_read != NULL);
2653 if (gdbarch_debug >= 2)
2654 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2655 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2659 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2660 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2662 gdbarch->pseudo_register_read = pseudo_register_read;
2666 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2668 gdb_assert (gdbarch != NULL);
2669 return gdbarch->pseudo_register_write != NULL;
2673 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2675 gdb_assert (gdbarch != NULL);
2676 gdb_assert (gdbarch->pseudo_register_write != NULL);
2677 if (gdbarch_debug >= 2)
2678 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2679 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2683 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2684 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2686 gdbarch->pseudo_register_write = pseudo_register_write;
2690 gdbarch_num_regs (struct gdbarch *gdbarch)
2692 gdb_assert (gdbarch != NULL);
2693 /* Check variable changed from pre-default. */
2694 gdb_assert (gdbarch->num_regs != -1);
2695 if (gdbarch_debug >= 2)
2696 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2697 return gdbarch->num_regs;
2701 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2704 gdbarch->num_regs = num_regs;
2708 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2710 gdb_assert (gdbarch != NULL);
2711 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2712 if (gdbarch_debug >= 2)
2713 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2714 return gdbarch->num_pseudo_regs;
2718 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2719 int num_pseudo_regs)
2721 gdbarch->num_pseudo_regs = num_pseudo_regs;
2725 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2727 gdb_assert (gdbarch != NULL);
2728 /* Skip verify of sp_regnum, invalid_p == 0 */
2729 if (gdbarch_debug >= 2)
2730 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2731 return gdbarch->sp_regnum;
2735 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2738 gdbarch->sp_regnum = sp_regnum;
2742 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2744 gdb_assert (gdbarch != NULL);
2745 /* Skip verify of pc_regnum, invalid_p == 0 */
2746 if (gdbarch_debug >= 2)
2747 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2748 return gdbarch->pc_regnum;
2752 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2755 gdbarch->pc_regnum = pc_regnum;
2759 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2761 gdb_assert (gdbarch != NULL);
2762 /* Skip verify of ps_regnum, invalid_p == 0 */
2763 if (gdbarch_debug >= 2)
2764 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2765 return gdbarch->ps_regnum;
2769 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2772 gdbarch->ps_regnum = ps_regnum;
2776 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2778 gdb_assert (gdbarch != NULL);
2779 /* Skip verify of fp0_regnum, invalid_p == 0 */
2780 if (gdbarch_debug >= 2)
2781 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2782 return gdbarch->fp0_regnum;
2786 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2789 gdbarch->fp0_regnum = fp0_regnum;
2793 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2795 gdb_assert (gdbarch != NULL);
2796 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2799 return gdbarch->stab_reg_to_regnum (stab_regnr);
2803 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2804 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2806 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2810 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2812 gdb_assert (gdbarch != NULL);
2813 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2814 if (gdbarch_debug >= 2)
2815 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2816 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2820 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2821 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2823 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2827 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2829 gdb_assert (gdbarch != NULL);
2830 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2831 if (gdbarch_debug >= 2)
2832 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2833 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2837 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2838 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2840 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2844 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2846 gdb_assert (gdbarch != NULL);
2847 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2848 if (gdbarch_debug >= 2)
2849 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2850 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2854 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2855 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2857 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2861 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2863 gdb_assert (gdbarch != NULL);
2864 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2865 if (gdbarch_debug >= 2)
2866 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2867 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2871 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2872 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2874 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2878 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2880 gdb_assert (gdbarch != NULL);
2881 gdb_assert (gdbarch->register_name != NULL);
2882 if (gdbarch_debug >= 2)
2883 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2884 return gdbarch->register_name (regnr);
2888 set_gdbarch_register_name (struct gdbarch *gdbarch,
2889 gdbarch_register_name_ftype register_name)
2891 gdbarch->register_name = register_name;
2895 gdbarch_register_type_p (struct gdbarch *gdbarch)
2897 gdb_assert (gdbarch != NULL);
2898 return gdbarch->register_type != NULL;
2902 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2904 gdb_assert (gdbarch != NULL);
2905 gdb_assert (gdbarch->register_type != NULL);
2906 if (gdbarch_debug >= 2)
2907 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2908 return gdbarch->register_type (gdbarch, reg_nr);
2912 set_gdbarch_register_type (struct gdbarch *gdbarch,
2913 gdbarch_register_type_ftype register_type)
2915 gdbarch->register_type = register_type;
2919 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2921 gdb_assert (gdbarch != NULL);
2922 return gdbarch->deprecated_register_virtual_type != NULL;
2926 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2928 gdb_assert (gdbarch != NULL);
2929 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2930 if (gdbarch_debug >= 2)
2931 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2932 return gdbarch->deprecated_register_virtual_type (reg_nr);
2936 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2937 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2939 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2943 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2945 gdb_assert (gdbarch != NULL);
2946 if (gdbarch_debug >= 2)
2947 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2948 return gdbarch->deprecated_register_bytes;
2952 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2953 int deprecated_register_bytes)
2955 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2959 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2961 gdb_assert (gdbarch != NULL);
2962 return gdbarch->deprecated_register_byte != generic_register_byte;
2966 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2968 gdb_assert (gdbarch != NULL);
2969 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2970 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2971 if (gdbarch_debug >= 2)
2972 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2973 return gdbarch->deprecated_register_byte (reg_nr);
2977 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2978 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2980 gdbarch->deprecated_register_byte = deprecated_register_byte;
2984 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2986 gdb_assert (gdbarch != NULL);
2987 return gdbarch->deprecated_register_raw_size != generic_register_size;
2991 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2993 gdb_assert (gdbarch != NULL);
2994 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2995 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2996 if (gdbarch_debug >= 2)
2997 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2998 return gdbarch->deprecated_register_raw_size (reg_nr);
3002 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
3003 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
3005 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
3009 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
3011 gdb_assert (gdbarch != NULL);
3012 return gdbarch->deprecated_register_virtual_size != generic_register_size;
3016 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3018 gdb_assert (gdbarch != NULL);
3019 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
3020 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
3021 if (gdbarch_debug >= 2)
3022 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
3023 return gdbarch->deprecated_register_virtual_size (reg_nr);
3027 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
3028 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
3030 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
3034 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3036 gdb_assert (gdbarch != NULL);
3037 return gdbarch->deprecated_max_register_raw_size != 0;
3041 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3043 gdb_assert (gdbarch != NULL);
3044 if (gdbarch_debug >= 2)
3045 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3046 return gdbarch->deprecated_max_register_raw_size;
3050 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3051 int deprecated_max_register_raw_size)
3053 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3057 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3059 gdb_assert (gdbarch != NULL);
3060 return gdbarch->deprecated_max_register_virtual_size != 0;
3064 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3066 gdb_assert (gdbarch != NULL);
3067 if (gdbarch_debug >= 2)
3068 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3069 return gdbarch->deprecated_max_register_virtual_size;
3073 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3074 int deprecated_max_register_virtual_size)
3076 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3080 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
3082 gdb_assert (gdbarch != NULL);
3083 return gdbarch->unwind_dummy_id != NULL;
3087 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
3089 gdb_assert (gdbarch != NULL);
3090 gdb_assert (gdbarch->unwind_dummy_id != NULL);
3091 if (gdbarch_debug >= 2)
3092 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
3093 return gdbarch->unwind_dummy_id (gdbarch, info);
3097 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
3098 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
3100 gdbarch->unwind_dummy_id = unwind_dummy_id;
3104 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3106 gdb_assert (gdbarch != NULL);
3107 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
3111 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3113 gdb_assert (gdbarch != NULL);
3114 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
3115 if (gdbarch_debug >= 2)
3116 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3117 gdbarch->deprecated_save_dummy_frame_tos (sp);
3121 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
3122 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
3124 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
3128 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3130 gdb_assert (gdbarch != NULL);
3131 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3132 if (gdbarch_debug >= 2)
3133 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3134 return gdbarch->deprecated_fp_regnum;
3138 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3139 int deprecated_fp_regnum)
3141 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3145 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
3147 gdb_assert (gdbarch != NULL);
3148 return gdbarch->deprecated_target_read_fp != NULL;
3152 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3154 gdb_assert (gdbarch != NULL);
3155 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
3156 if (gdbarch_debug >= 2)
3157 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3158 return gdbarch->deprecated_target_read_fp ();
3162 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3163 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3165 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3169 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3171 gdb_assert (gdbarch != NULL);
3172 return gdbarch->push_dummy_call != NULL;
3176 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)
3178 gdb_assert (gdbarch != NULL);
3179 gdb_assert (gdbarch->push_dummy_call != NULL);
3180 if (gdbarch_debug >= 2)
3181 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3182 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3186 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3187 gdbarch_push_dummy_call_ftype push_dummy_call)
3189 gdbarch->push_dummy_call = push_dummy_call;
3193 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3195 gdb_assert (gdbarch != NULL);
3196 return gdbarch->deprecated_push_arguments != NULL;
3200 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3202 gdb_assert (gdbarch != NULL);
3203 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3204 if (gdbarch_debug >= 2)
3205 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3206 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3210 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3211 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3213 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3217 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3219 gdb_assert (gdbarch != NULL);
3220 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3221 if (gdbarch_debug >= 2)
3222 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3223 return gdbarch->deprecated_use_generic_dummy_frames;
3227 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3228 int deprecated_use_generic_dummy_frames)
3230 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3234 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3236 gdb_assert (gdbarch != NULL);
3237 return gdbarch->deprecated_push_return_address != NULL;
3241 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3243 gdb_assert (gdbarch != NULL);
3244 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3245 if (gdbarch_debug >= 2)
3246 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3247 return gdbarch->deprecated_push_return_address (pc, sp);
3251 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3252 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3254 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3258 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3260 gdb_assert (gdbarch != NULL);
3261 return gdbarch->deprecated_dummy_write_sp != NULL;
3265 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3267 gdb_assert (gdbarch != NULL);
3268 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3269 if (gdbarch_debug >= 2)
3270 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3271 gdbarch->deprecated_dummy_write_sp (val);
3275 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3276 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3278 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3282 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3284 gdb_assert (gdbarch != NULL);
3285 if (gdbarch_debug >= 2)
3286 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3287 return gdbarch->deprecated_register_size;
3291 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3292 int deprecated_register_size)
3294 gdbarch->deprecated_register_size = deprecated_register_size;
3298 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3300 gdb_assert (gdbarch != NULL);
3301 /* Skip verify of call_dummy_location, invalid_p == 0 */
3302 if (gdbarch_debug >= 2)
3303 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3304 return gdbarch->call_dummy_location;
3308 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3309 int call_dummy_location)
3311 gdbarch->call_dummy_location = call_dummy_location;
3315 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
3317 gdb_assert (gdbarch != NULL);
3318 if (gdbarch_debug >= 2)
3319 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3320 return gdbarch->deprecated_call_dummy_start_offset;
3324 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3325 CORE_ADDR deprecated_call_dummy_start_offset)
3327 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3331 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3333 gdb_assert (gdbarch != NULL);
3334 if (gdbarch_debug >= 2)
3335 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3336 return gdbarch->deprecated_call_dummy_breakpoint_offset;
3340 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3341 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3343 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3347 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3349 gdb_assert (gdbarch != NULL);
3350 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3351 if (gdbarch_debug >= 2)
3352 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3353 return gdbarch->deprecated_call_dummy_words;
3357 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3358 LONGEST * deprecated_call_dummy_words)
3360 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3364 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3366 gdb_assert (gdbarch != NULL);
3367 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3368 if (gdbarch_debug >= 2)
3369 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3370 return gdbarch->deprecated_sizeof_call_dummy_words;
3374 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3375 int deprecated_sizeof_call_dummy_words)
3377 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3381 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3383 gdb_assert (gdbarch != NULL);
3384 return gdbarch->deprecated_fix_call_dummy != NULL;
3388 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)
3390 gdb_assert (gdbarch != NULL);
3391 gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
3392 if (gdbarch_debug >= 2)
3393 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3394 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3398 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3399 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3401 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3405 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3407 gdb_assert (gdbarch != NULL);
3408 return gdbarch->push_dummy_code != NULL;
3412 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)
3414 gdb_assert (gdbarch != NULL);
3415 gdb_assert (gdbarch->push_dummy_code != NULL);
3416 if (gdbarch_debug >= 2)
3417 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3418 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3422 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3423 gdbarch_push_dummy_code_ftype push_dummy_code)
3425 gdbarch->push_dummy_code = push_dummy_code;
3429 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
3431 gdb_assert (gdbarch != NULL);
3432 return gdbarch->deprecated_push_dummy_frame != NULL;
3436 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
3438 gdb_assert (gdbarch != NULL);
3439 gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
3440 if (gdbarch_debug >= 2)
3441 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
3442 gdbarch->deprecated_push_dummy_frame ();
3446 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
3447 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
3449 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
3453 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3455 gdb_assert (gdbarch != NULL);
3456 return gdbarch->deprecated_do_registers_info != NULL;
3460 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3462 gdb_assert (gdbarch != NULL);
3463 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3464 if (gdbarch_debug >= 2)
3465 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3466 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3470 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3471 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3473 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3477 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3479 gdb_assert (gdbarch != NULL);
3480 gdb_assert (gdbarch->print_registers_info != NULL);
3481 if (gdbarch_debug >= 2)
3482 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3483 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3487 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3488 gdbarch_print_registers_info_ftype print_registers_info)
3490 gdbarch->print_registers_info = print_registers_info;
3494 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3496 gdb_assert (gdbarch != NULL);
3497 return gdbarch->print_float_info != NULL;
3501 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3503 gdb_assert (gdbarch != NULL);
3504 gdb_assert (gdbarch->print_float_info != NULL);
3505 if (gdbarch_debug >= 2)
3506 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3507 gdbarch->print_float_info (gdbarch, file, frame, args);
3511 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3512 gdbarch_print_float_info_ftype print_float_info)
3514 gdbarch->print_float_info = print_float_info;
3518 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3520 gdb_assert (gdbarch != NULL);
3521 return gdbarch->print_vector_info != NULL;
3525 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3527 gdb_assert (gdbarch != NULL);
3528 gdb_assert (gdbarch->print_vector_info != NULL);
3529 if (gdbarch_debug >= 2)
3530 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3531 gdbarch->print_vector_info (gdbarch, file, frame, args);
3535 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3536 gdbarch_print_vector_info_ftype print_vector_info)
3538 gdbarch->print_vector_info = print_vector_info;
3542 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3544 gdb_assert (gdbarch != NULL);
3545 gdb_assert (gdbarch->register_sim_regno != NULL);
3546 if (gdbarch_debug >= 2)
3547 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3548 return gdbarch->register_sim_regno (reg_nr);
3552 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3553 gdbarch_register_sim_regno_ftype register_sim_regno)
3555 gdbarch->register_sim_regno = register_sim_regno;
3559 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3561 gdb_assert (gdbarch != NULL);
3562 return gdbarch->register_bytes_ok != NULL;
3566 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3568 gdb_assert (gdbarch != NULL);
3569 gdb_assert (gdbarch->register_bytes_ok != NULL);
3570 if (gdbarch_debug >= 2)
3571 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3572 return gdbarch->register_bytes_ok (nr_bytes);
3576 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3577 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3579 gdbarch->register_bytes_ok = register_bytes_ok;
3583 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3585 gdb_assert (gdbarch != NULL);
3586 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3587 if (gdbarch_debug >= 2)
3588 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3589 return gdbarch->cannot_fetch_register (regnum);
3593 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3594 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3596 gdbarch->cannot_fetch_register = cannot_fetch_register;
3600 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3602 gdb_assert (gdbarch != NULL);
3603 gdb_assert (gdbarch->cannot_store_register != NULL);
3604 if (gdbarch_debug >= 2)
3605 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3606 return gdbarch->cannot_store_register (regnum);
3610 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3611 gdbarch_cannot_store_register_ftype cannot_store_register)
3613 gdbarch->cannot_store_register = cannot_store_register;
3617 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3619 gdb_assert (gdbarch != NULL);
3620 return gdbarch->get_longjmp_target != NULL;
3624 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3626 gdb_assert (gdbarch != NULL);
3627 gdb_assert (gdbarch->get_longjmp_target != NULL);
3628 if (gdbarch_debug >= 2)
3629 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3630 return gdbarch->get_longjmp_target (pc);
3634 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3635 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3637 gdbarch->get_longjmp_target = get_longjmp_target;
3641 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3643 gdb_assert (gdbarch != NULL);
3644 return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
3648 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3650 gdb_assert (gdbarch != NULL);
3651 gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
3652 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3653 if (gdbarch_debug >= 2)
3654 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3655 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3659 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3660 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3662 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3666 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3668 gdb_assert (gdbarch != NULL);
3669 return gdbarch->deprecated_init_frame_pc != NULL;
3673 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3675 gdb_assert (gdbarch != NULL);
3676 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3677 if (gdbarch_debug >= 2)
3678 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3679 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3683 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3684 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3686 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3690 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3692 gdb_assert (gdbarch != NULL);
3693 if (gdbarch_debug >= 2)
3694 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3695 return gdbarch->believe_pcc_promotion;
3699 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3700 int believe_pcc_promotion)
3702 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3706 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3708 gdb_assert (gdbarch != NULL);
3709 return gdbarch->deprecated_get_saved_register != NULL;
3713 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)
3715 gdb_assert (gdbarch != NULL);
3716 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3717 if (gdbarch_debug >= 2)
3718 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3719 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3723 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3724 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3726 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3730 gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch)
3732 gdb_assert (gdbarch != NULL);
3733 return gdbarch->deprecated_register_convertible != NULL;
3737 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
3739 gdb_assert (gdbarch != NULL);
3740 gdb_assert (gdbarch->deprecated_register_convertible != NULL);
3741 if (gdbarch_debug >= 2)
3742 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
3743 return gdbarch->deprecated_register_convertible (nr);
3747 set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
3748 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
3750 gdbarch->deprecated_register_convertible = deprecated_register_convertible;
3754 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3756 gdb_assert (gdbarch != NULL);
3757 gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
3758 if (gdbarch_debug >= 2)
3759 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
3760 gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
3764 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
3765 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
3767 gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
3771 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
3773 gdb_assert (gdbarch != NULL);
3774 gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
3775 if (gdbarch_debug >= 2)
3776 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
3777 gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
3781 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
3782 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
3784 gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
3788 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3790 gdb_assert (gdbarch != NULL);
3791 gdb_assert (gdbarch->convert_register_p != NULL);
3792 if (gdbarch_debug >= 2)
3793 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3794 return gdbarch->convert_register_p (regnum, type);
3798 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3799 gdbarch_convert_register_p_ftype convert_register_p)
3801 gdbarch->convert_register_p = convert_register_p;
3805 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3807 gdb_assert (gdbarch != NULL);
3808 gdb_assert (gdbarch->register_to_value != NULL);
3809 if (gdbarch_debug >= 2)
3810 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3811 gdbarch->register_to_value (frame, regnum, type, buf);
3815 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3816 gdbarch_register_to_value_ftype register_to_value)
3818 gdbarch->register_to_value = register_to_value;
3822 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3824 gdb_assert (gdbarch != NULL);
3825 gdb_assert (gdbarch->value_to_register != NULL);
3826 if (gdbarch_debug >= 2)
3827 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3828 gdbarch->value_to_register (frame, regnum, type, buf);
3832 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3833 gdbarch_value_to_register_ftype value_to_register)
3835 gdbarch->value_to_register = value_to_register;
3839 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3841 gdb_assert (gdbarch != NULL);
3842 gdb_assert (gdbarch->pointer_to_address != NULL);
3843 if (gdbarch_debug >= 2)
3844 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3845 return gdbarch->pointer_to_address (type, buf);
3849 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3850 gdbarch_pointer_to_address_ftype pointer_to_address)
3852 gdbarch->pointer_to_address = pointer_to_address;
3856 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3858 gdb_assert (gdbarch != NULL);
3859 gdb_assert (gdbarch->address_to_pointer != NULL);
3860 if (gdbarch_debug >= 2)
3861 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3862 gdbarch->address_to_pointer (type, buf, addr);
3866 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3867 gdbarch_address_to_pointer_ftype address_to_pointer)
3869 gdbarch->address_to_pointer = address_to_pointer;
3873 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3875 gdb_assert (gdbarch != NULL);
3876 return gdbarch->integer_to_address != NULL;
3880 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3882 gdb_assert (gdbarch != NULL);
3883 gdb_assert (gdbarch->integer_to_address != NULL);
3884 if (gdbarch_debug >= 2)
3885 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3886 return gdbarch->integer_to_address (type, buf);
3890 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3891 gdbarch_integer_to_address_ftype integer_to_address)
3893 gdbarch->integer_to_address = integer_to_address;
3897 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3899 gdb_assert (gdbarch != NULL);
3900 return gdbarch->deprecated_pop_frame != NULL;
3904 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3906 gdb_assert (gdbarch != NULL);
3907 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3908 if (gdbarch_debug >= 2)
3909 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3910 gdbarch->deprecated_pop_frame ();
3914 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3915 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3917 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3921 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3923 gdb_assert (gdbarch != NULL);
3924 return gdbarch->deprecated_store_struct_return != NULL;
3928 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3930 gdb_assert (gdbarch != NULL);
3931 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3932 if (gdbarch_debug >= 2)
3933 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3934 gdbarch->deprecated_store_struct_return (addr, sp);
3938 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3939 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3941 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3945 gdbarch_return_value_p (struct gdbarch *gdbarch)
3947 gdb_assert (gdbarch != NULL);
3948 return gdbarch->return_value != NULL;
3951 enum return_value_convention
3952 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3954 gdb_assert (gdbarch != NULL);
3955 gdb_assert (gdbarch->return_value != NULL);
3956 if (gdbarch_debug >= 2)
3957 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3958 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3962 set_gdbarch_return_value (struct gdbarch *gdbarch,
3963 gdbarch_return_value_ftype return_value)
3965 gdbarch->return_value = return_value;
3969 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3971 gdb_assert (gdbarch != NULL);
3972 gdb_assert (gdbarch->return_value_on_stack != NULL);
3973 if (gdbarch_debug >= 2)
3974 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3975 return gdbarch->return_value_on_stack (type);
3979 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3980 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3982 gdbarch->return_value_on_stack = return_value_on_stack;
3986 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3988 gdb_assert (gdbarch != NULL);
3989 gdb_assert (gdbarch->extract_return_value != NULL);
3990 if (gdbarch_debug >= 2)
3991 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3992 gdbarch->extract_return_value (type, regcache, valbuf);
3996 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3997 gdbarch_extract_return_value_ftype extract_return_value)
3999 gdbarch->extract_return_value = extract_return_value;
4003 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4005 gdb_assert (gdbarch != NULL);
4006 gdb_assert (gdbarch->store_return_value != NULL);
4007 if (gdbarch_debug >= 2)
4008 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4009 gdbarch->store_return_value (type, regcache, valbuf);
4013 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4014 gdbarch_store_return_value_ftype store_return_value)
4016 gdbarch->store_return_value = store_return_value;
4020 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4022 gdb_assert (gdbarch != NULL);
4023 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4026 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4030 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4031 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4033 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4037 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4039 gdb_assert (gdbarch != NULL);
4040 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
4041 if (gdbarch_debug >= 2)
4042 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4043 gdbarch->deprecated_store_return_value (type, valbuf);
4047 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4048 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4050 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4054 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4056 gdb_assert (gdbarch != NULL);
4057 gdb_assert (gdbarch->use_struct_convention != NULL);
4058 if (gdbarch_debug >= 2)
4059 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4060 return gdbarch->use_struct_convention (gcc_p, value_type);
4064 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4065 gdbarch_use_struct_convention_ftype use_struct_convention)
4067 gdbarch->use_struct_convention = use_struct_convention;
4071 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4073 gdb_assert (gdbarch != NULL);
4074 return gdbarch->deprecated_extract_struct_value_address != NULL;
4078 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4080 gdb_assert (gdbarch != NULL);
4081 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
4082 if (gdbarch_debug >= 2)
4083 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4084 return gdbarch->deprecated_extract_struct_value_address (regcache);
4088 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4089 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4091 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4095 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4097 gdb_assert (gdbarch != NULL);
4098 return gdbarch->deprecated_frame_init_saved_regs != NULL;
4102 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4104 gdb_assert (gdbarch != NULL);
4105 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
4106 if (gdbarch_debug >= 2)
4107 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4108 gdbarch->deprecated_frame_init_saved_regs (frame);
4112 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4113 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4115 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4119 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4121 gdb_assert (gdbarch != NULL);
4122 return gdbarch->deprecated_init_extra_frame_info != NULL;
4126 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4128 gdb_assert (gdbarch != NULL);
4129 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
4130 if (gdbarch_debug >= 2)
4131 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4132 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4136 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4137 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4139 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4143 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4145 gdb_assert (gdbarch != NULL);
4146 gdb_assert (gdbarch->skip_prologue != NULL);
4147 if (gdbarch_debug >= 2)
4148 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4149 return gdbarch->skip_prologue (ip);
4153 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4154 gdbarch_skip_prologue_ftype skip_prologue)
4156 gdbarch->skip_prologue = skip_prologue;
4160 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4162 gdb_assert (gdbarch != NULL);
4163 gdb_assert (gdbarch->inner_than != NULL);
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4166 return gdbarch->inner_than (lhs, rhs);
4170 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4171 gdbarch_inner_than_ftype inner_than)
4173 gdbarch->inner_than = inner_than;
4176 const unsigned char *
4177 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4179 gdb_assert (gdbarch != NULL);
4180 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
4181 if (gdbarch_debug >= 2)
4182 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4183 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4187 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4188 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4190 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4194 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
4196 gdb_assert (gdbarch != NULL);
4197 return gdbarch->adjust_breakpoint_address != NULL;
4201 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
4203 gdb_assert (gdbarch != NULL);
4204 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
4205 if (gdbarch_debug >= 2)
4206 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
4207 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
4211 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
4212 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
4214 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
4218 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4220 gdb_assert (gdbarch != NULL);
4221 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
4222 if (gdbarch_debug >= 2)
4223 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4224 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4228 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4229 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4231 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4235 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4237 gdb_assert (gdbarch != NULL);
4238 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
4239 if (gdbarch_debug >= 2)
4240 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4241 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4245 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4246 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4248 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4252 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4254 gdb_assert (gdbarch != NULL);
4255 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4256 if (gdbarch_debug >= 2)
4257 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4258 return gdbarch->decr_pc_after_break;
4262 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4263 CORE_ADDR decr_pc_after_break)
4265 gdbarch->decr_pc_after_break = decr_pc_after_break;
4269 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4271 gdb_assert (gdbarch != NULL);
4272 /* Skip verify of function_start_offset, invalid_p == 0 */
4273 if (gdbarch_debug >= 2)
4274 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4275 return gdbarch->function_start_offset;
4279 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4280 CORE_ADDR function_start_offset)
4282 gdbarch->function_start_offset = function_start_offset;
4286 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)
4288 gdb_assert (gdbarch != NULL);
4289 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
4290 if (gdbarch_debug >= 2)
4291 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4292 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4296 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4297 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4299 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4303 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4305 gdb_assert (gdbarch != NULL);
4306 /* Skip verify of frame_args_skip, invalid_p == 0 */
4307 if (gdbarch_debug >= 2)
4308 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4309 return gdbarch->frame_args_skip;
4313 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4314 CORE_ADDR frame_args_skip)
4316 gdbarch->frame_args_skip = frame_args_skip;
4320 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
4322 gdb_assert (gdbarch != NULL);
4323 return gdbarch->deprecated_frameless_function_invocation != NULL;
4327 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4329 gdb_assert (gdbarch != NULL);
4330 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
4331 if (gdbarch_debug >= 2)
4332 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
4333 return gdbarch->deprecated_frameless_function_invocation (fi);
4337 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
4338 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
4340 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
4344 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4346 gdb_assert (gdbarch != NULL);
4347 return gdbarch->deprecated_frame_chain != NULL;
4351 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4353 gdb_assert (gdbarch != NULL);
4354 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
4355 if (gdbarch_debug >= 2)
4356 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4357 return gdbarch->deprecated_frame_chain (frame);
4361 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4362 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4364 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4368 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4370 gdb_assert (gdbarch != NULL);
4371 return gdbarch->deprecated_frame_chain_valid != NULL;
4375 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4377 gdb_assert (gdbarch != NULL);
4378 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
4379 if (gdbarch_debug >= 2)
4380 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4381 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4385 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4386 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4388 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4392 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4394 gdb_assert (gdbarch != NULL);
4395 return gdbarch->deprecated_frame_saved_pc != NULL;
4399 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4401 gdb_assert (gdbarch != NULL);
4402 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4403 if (gdbarch_debug >= 2)
4404 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4405 return gdbarch->deprecated_frame_saved_pc (fi);
4409 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4410 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4412 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4416 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4418 gdb_assert (gdbarch != NULL);
4419 return gdbarch->unwind_pc != NULL;
4423 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4425 gdb_assert (gdbarch != NULL);
4426 gdb_assert (gdbarch->unwind_pc != NULL);
4427 if (gdbarch_debug >= 2)
4428 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4429 return gdbarch->unwind_pc (gdbarch, next_frame);
4433 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4434 gdbarch_unwind_pc_ftype unwind_pc)
4436 gdbarch->unwind_pc = unwind_pc;
4440 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4442 gdb_assert (gdbarch != NULL);
4443 return gdbarch->unwind_sp != NULL;
4447 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4449 gdb_assert (gdbarch != NULL);
4450 gdb_assert (gdbarch->unwind_sp != NULL);
4451 if (gdbarch_debug >= 2)
4452 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4453 return gdbarch->unwind_sp (gdbarch, next_frame);
4457 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4458 gdbarch_unwind_sp_ftype unwind_sp)
4460 gdbarch->unwind_sp = unwind_sp;
4464 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4466 gdb_assert (gdbarch != NULL);
4467 return gdbarch->deprecated_frame_args_address != get_frame_base;
4471 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4473 gdb_assert (gdbarch != NULL);
4474 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4475 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4476 if (gdbarch_debug >= 2)
4477 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4478 return gdbarch->deprecated_frame_args_address (fi);
4482 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4483 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4485 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4489 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4491 gdb_assert (gdbarch != NULL);
4492 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4496 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4498 gdb_assert (gdbarch != NULL);
4499 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4500 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4501 if (gdbarch_debug >= 2)
4502 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4503 return gdbarch->deprecated_frame_locals_address (fi);
4507 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4508 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4510 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4514 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4516 gdb_assert (gdbarch != NULL);
4517 return gdbarch->deprecated_saved_pc_after_call != NULL;
4521 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4523 gdb_assert (gdbarch != NULL);
4524 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4525 if (gdbarch_debug >= 2)
4526 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4527 return gdbarch->deprecated_saved_pc_after_call (frame);
4531 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4532 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4534 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4538 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4540 gdb_assert (gdbarch != NULL);
4541 return gdbarch->frame_num_args != NULL;
4545 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4547 gdb_assert (gdbarch != NULL);
4548 gdb_assert (gdbarch->frame_num_args != NULL);
4549 if (gdbarch_debug >= 2)
4550 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4551 return gdbarch->frame_num_args (frame);
4555 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4556 gdbarch_frame_num_args_ftype frame_num_args)
4558 gdbarch->frame_num_args = frame_num_args;
4562 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4564 gdb_assert (gdbarch != NULL);
4565 return gdbarch->deprecated_stack_align != NULL;
4569 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4571 gdb_assert (gdbarch != NULL);
4572 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4573 if (gdbarch_debug >= 2)
4574 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4575 return gdbarch->deprecated_stack_align (sp);
4579 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4580 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4582 gdbarch->deprecated_stack_align = deprecated_stack_align;
4586 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4588 gdb_assert (gdbarch != NULL);
4589 return gdbarch->frame_align != NULL;
4593 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4595 gdb_assert (gdbarch != NULL);
4596 gdb_assert (gdbarch->frame_align != NULL);
4597 if (gdbarch_debug >= 2)
4598 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4599 return gdbarch->frame_align (gdbarch, address);
4603 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4604 gdbarch_frame_align_ftype frame_align)
4606 gdbarch->frame_align = frame_align;
4610 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4612 gdb_assert (gdbarch != NULL);
4613 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4617 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4619 gdb_assert (gdbarch != NULL);
4620 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4621 if (gdbarch_debug >= 2)
4622 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4623 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4627 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4628 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4630 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4634 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4636 gdb_assert (gdbarch != NULL);
4637 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4638 if (gdbarch_debug >= 2)
4639 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4640 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4644 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4645 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4647 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4651 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4653 gdb_assert (gdbarch != NULL);
4654 if (gdbarch_debug >= 2)
4655 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4656 return gdbarch->frame_red_zone_size;
4660 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4661 int frame_red_zone_size)
4663 gdbarch->frame_red_zone_size = frame_red_zone_size;
4666 const struct floatformat *
4667 gdbarch_float_format (struct gdbarch *gdbarch)
4669 gdb_assert (gdbarch != NULL);
4670 if (gdbarch_debug >= 2)
4671 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4672 return gdbarch->float_format;
4676 set_gdbarch_float_format (struct gdbarch *gdbarch,
4677 const struct floatformat * float_format)
4679 gdbarch->float_format = float_format;
4682 const struct floatformat *
4683 gdbarch_double_format (struct gdbarch *gdbarch)
4685 gdb_assert (gdbarch != NULL);
4686 if (gdbarch_debug >= 2)
4687 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4688 return gdbarch->double_format;
4692 set_gdbarch_double_format (struct gdbarch *gdbarch,
4693 const struct floatformat * double_format)
4695 gdbarch->double_format = double_format;
4698 const struct floatformat *
4699 gdbarch_long_double_format (struct gdbarch *gdbarch)
4701 gdb_assert (gdbarch != NULL);
4702 if (gdbarch_debug >= 2)
4703 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4704 return gdbarch->long_double_format;
4708 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4709 const struct floatformat * long_double_format)
4711 gdbarch->long_double_format = long_double_format;
4715 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4717 gdb_assert (gdbarch != NULL);
4718 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4719 if (gdbarch_debug >= 2)
4720 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4721 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4725 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4726 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4728 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4732 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4734 gdb_assert (gdbarch != NULL);
4735 gdb_assert (gdbarch->addr_bits_remove != NULL);
4736 if (gdbarch_debug >= 2)
4737 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4738 return gdbarch->addr_bits_remove (addr);
4742 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4743 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4745 gdbarch->addr_bits_remove = addr_bits_remove;
4749 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4751 gdb_assert (gdbarch != NULL);
4752 gdb_assert (gdbarch->smash_text_address != NULL);
4753 if (gdbarch_debug >= 2)
4754 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4755 return gdbarch->smash_text_address (addr);
4759 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4760 gdbarch_smash_text_address_ftype smash_text_address)
4762 gdbarch->smash_text_address = smash_text_address;
4766 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4768 gdb_assert (gdbarch != NULL);
4769 return gdbarch->software_single_step != NULL;
4773 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4775 gdb_assert (gdbarch != NULL);
4776 gdb_assert (gdbarch->software_single_step != NULL);
4777 if (gdbarch_debug >= 2)
4778 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4779 gdbarch->software_single_step (sig, insert_breakpoints_p);
4783 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4784 gdbarch_software_single_step_ftype software_single_step)
4786 gdbarch->software_single_step = software_single_step;
4790 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4792 gdb_assert (gdbarch != NULL);
4793 gdb_assert (gdbarch->print_insn != NULL);
4794 if (gdbarch_debug >= 2)
4795 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4796 return gdbarch->print_insn (vma, info);
4800 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4801 gdbarch_print_insn_ftype print_insn)
4803 gdbarch->print_insn = print_insn;
4807 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4809 gdb_assert (gdbarch != NULL);
4810 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4811 if (gdbarch_debug >= 2)
4812 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4813 return gdbarch->skip_trampoline_code (pc);
4817 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4818 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4820 gdbarch->skip_trampoline_code = skip_trampoline_code;
4824 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4826 gdb_assert (gdbarch != NULL);
4827 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4828 if (gdbarch_debug >= 2)
4829 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4830 return gdbarch->skip_solib_resolver (gdbarch, pc);
4834 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4835 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4837 gdbarch->skip_solib_resolver = skip_solib_resolver;
4841 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4843 gdb_assert (gdbarch != NULL);
4844 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4845 if (gdbarch_debug >= 2)
4846 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4847 return gdbarch->in_solib_call_trampoline (pc, name);
4851 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4852 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4854 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4858 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4860 gdb_assert (gdbarch != NULL);
4861 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4862 if (gdbarch_debug >= 2)
4863 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4864 return gdbarch->in_solib_return_trampoline (pc, name);
4868 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4869 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4871 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4875 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4877 gdb_assert (gdbarch != NULL);
4878 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4879 if (gdbarch_debug >= 2)
4880 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4881 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4885 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4886 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4888 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4892 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4894 gdb_assert (gdbarch != NULL);
4895 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4896 if (gdbarch_debug >= 2)
4897 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4898 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4902 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4903 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4905 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4909 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4911 gdb_assert (gdbarch != NULL);
4912 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4913 if (gdbarch_debug >= 2)
4914 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4915 gdbarch->elf_make_msymbol_special (sym, msym);
4919 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4920 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4922 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4926 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4928 gdb_assert (gdbarch != NULL);
4929 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4930 if (gdbarch_debug >= 2)
4931 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4932 gdbarch->coff_make_msymbol_special (val, msym);
4936 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4937 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4939 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4943 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4945 gdb_assert (gdbarch != NULL);
4946 /* Skip verify of name_of_malloc, invalid_p == 0 */
4947 if (gdbarch_debug >= 2)
4948 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4949 return gdbarch->name_of_malloc;
4953 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4954 const char * name_of_malloc)
4956 gdbarch->name_of_malloc = name_of_malloc;
4960 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4962 gdb_assert (gdbarch != NULL);
4963 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4964 if (gdbarch_debug >= 2)
4965 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4966 return gdbarch->cannot_step_breakpoint;
4970 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4971 int cannot_step_breakpoint)
4973 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4977 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4979 gdb_assert (gdbarch != NULL);
4980 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4981 if (gdbarch_debug >= 2)
4982 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4983 return gdbarch->have_nonsteppable_watchpoint;
4987 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4988 int have_nonsteppable_watchpoint)
4990 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4994 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4996 gdb_assert (gdbarch != NULL);
4997 return gdbarch->address_class_type_flags != NULL;
5001 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5003 gdb_assert (gdbarch != NULL);
5004 gdb_assert (gdbarch->address_class_type_flags != NULL);
5005 if (gdbarch_debug >= 2)
5006 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5007 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5011 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5012 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5014 gdbarch->address_class_type_flags = address_class_type_flags;
5018 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5020 gdb_assert (gdbarch != NULL);
5021 return gdbarch->address_class_type_flags_to_name != NULL;
5025 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5027 gdb_assert (gdbarch != NULL);
5028 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
5029 if (gdbarch_debug >= 2)
5030 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5031 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5035 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5036 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5038 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5042 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5044 gdb_assert (gdbarch != NULL);
5045 return gdbarch->address_class_name_to_type_flags != NULL;
5049 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5051 gdb_assert (gdbarch != NULL);
5052 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
5053 if (gdbarch_debug >= 2)
5054 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5055 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5059 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5060 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5062 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5066 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5068 gdb_assert (gdbarch != NULL);
5069 gdb_assert (gdbarch->register_reggroup_p != NULL);
5070 if (gdbarch_debug >= 2)
5071 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5072 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5076 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5077 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5079 gdbarch->register_reggroup_p = register_reggroup_p;
5083 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5085 gdb_assert (gdbarch != NULL);
5086 return gdbarch->fetch_pointer_argument != NULL;
5090 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5092 gdb_assert (gdbarch != NULL);
5093 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
5094 if (gdbarch_debug >= 2)
5095 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5096 return gdbarch->fetch_pointer_argument (frame, argi, type);
5100 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5101 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5103 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5107 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
5109 gdb_assert (gdbarch != NULL);
5110 return gdbarch->regset_from_core_section != NULL;
5113 const struct regset *
5114 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
5116 gdb_assert (gdbarch != NULL);
5117 gdb_assert (gdbarch->regset_from_core_section != NULL);
5118 if (gdbarch_debug >= 2)
5119 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
5120 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
5124 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
5125 gdbarch_regset_from_core_section_ftype regset_from_core_section)
5127 gdbarch->regset_from_core_section = regset_from_core_section;
5131 /* Keep a registry of per-architecture data-pointers required by GDB
5138 gdbarch_data_pre_init_ftype *pre_init;
5139 gdbarch_data_post_init_ftype *post_init;
5142 struct gdbarch_data_registration
5144 struct gdbarch_data *data;
5145 struct gdbarch_data_registration *next;
5148 struct gdbarch_data_registry
5151 struct gdbarch_data_registration *registrations;
5154 struct gdbarch_data_registry gdbarch_data_registry =
5159 static struct gdbarch_data *
5160 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
5161 gdbarch_data_post_init_ftype *post_init)
5163 struct gdbarch_data_registration **curr;
5164 /* Append the new registraration. */
5165 for (curr = &gdbarch_data_registry.registrations;
5167 curr = &(*curr)->next);
5168 (*curr) = XMALLOC (struct gdbarch_data_registration);
5169 (*curr)->next = NULL;
5170 (*curr)->data = XMALLOC (struct gdbarch_data);
5171 (*curr)->data->index = gdbarch_data_registry.nr++;
5172 (*curr)->data->pre_init = pre_init;
5173 (*curr)->data->post_init = post_init;
5174 (*curr)->data->init_p = 1;
5175 return (*curr)->data;
5178 struct gdbarch_data *
5179 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
5181 return gdbarch_data_register (pre_init, NULL);
5184 struct gdbarch_data *
5185 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
5187 return gdbarch_data_register (NULL, post_init);
5190 /* Create/delete the gdbarch data vector. */
5193 alloc_gdbarch_data (struct gdbarch *gdbarch)
5195 gdb_assert (gdbarch->data == NULL);
5196 gdbarch->nr_data = gdbarch_data_registry.nr;
5197 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
5200 /* Initialize the current value of the specified per-architecture
5204 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
5205 struct gdbarch_data *data,
5208 gdb_assert (data->index < gdbarch->nr_data);
5209 gdb_assert (gdbarch->data[data->index] == NULL);
5210 gdb_assert (data->pre_init == NULL);
5211 gdbarch->data[data->index] = pointer;
5214 /* Return the current value of the specified per-architecture
5218 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5220 gdb_assert (data->index < gdbarch->nr_data);
5221 if (gdbarch->data[data->index] == NULL)
5223 /* The data-pointer isn't initialized, call init() to get a
5225 if (data->pre_init != NULL)
5226 /* Mid architecture creation: pass just the obstack, and not
5227 the entire architecture, as that way it isn't possible for
5228 pre-init code to refer to undefined architecture
5230 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
5231 else if (gdbarch->initialized_p
5232 && data->post_init != NULL)
5233 /* Post architecture creation: pass the entire architecture
5234 (as all fields are valid), but be careful to also detect
5235 recursive references. */
5237 gdb_assert (data->init_p);
5239 gdbarch->data[data->index] = data->post_init (gdbarch);
5243 /* The architecture initialization hasn't completed - punt -
5244 hope that the caller knows what they are doing. Once
5245 deprecated_set_gdbarch_data has been initialized, this can be
5246 changed to an internal error. */
5248 gdb_assert (gdbarch->data[data->index] != NULL);
5250 return gdbarch->data[data->index];
5255 /* Keep a registry of swapped data required by GDB modules. */
5260 struct gdbarch_swap_registration *source;
5261 struct gdbarch_swap *next;
5264 struct gdbarch_swap_registration
5267 unsigned long sizeof_data;
5268 gdbarch_swap_ftype *init;
5269 struct gdbarch_swap_registration *next;
5272 struct gdbarch_swap_registry
5275 struct gdbarch_swap_registration *registrations;
5278 struct gdbarch_swap_registry gdbarch_swap_registry =
5284 deprecated_register_gdbarch_swap (void *data,
5285 unsigned long sizeof_data,
5286 gdbarch_swap_ftype *init)
5288 struct gdbarch_swap_registration **rego;
5289 for (rego = &gdbarch_swap_registry.registrations;
5291 rego = &(*rego)->next);
5292 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5293 (*rego)->next = NULL;
5294 (*rego)->init = init;
5295 (*rego)->data = data;
5296 (*rego)->sizeof_data = sizeof_data;
5300 current_gdbarch_swap_init_hack (void)
5302 struct gdbarch_swap_registration *rego;
5303 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
5304 for (rego = gdbarch_swap_registry.registrations;
5308 if (rego->data != NULL)
5310 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
5311 struct gdbarch_swap);
5312 (*curr)->source = rego;
5313 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
5315 (*curr)->next = NULL;
5316 curr = &(*curr)->next;
5318 if (rego->init != NULL)
5323 static struct gdbarch *
5324 current_gdbarch_swap_out_hack (void)
5326 struct gdbarch *old_gdbarch = current_gdbarch;
5327 struct gdbarch_swap *curr;
5329 gdb_assert (old_gdbarch != NULL);
5330 for (curr = old_gdbarch->swap;
5334 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5335 memset (curr->source->data, 0, curr->source->sizeof_data);
5337 current_gdbarch = NULL;
5342 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
5344 struct gdbarch_swap *curr;
5346 gdb_assert (current_gdbarch == NULL);
5347 for (curr = new_gdbarch->swap;
5350 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5351 current_gdbarch = new_gdbarch;
5355 /* Keep a registry of the architectures known by GDB. */
5357 struct gdbarch_registration
5359 enum bfd_architecture bfd_architecture;
5360 gdbarch_init_ftype *init;
5361 gdbarch_dump_tdep_ftype *dump_tdep;
5362 struct gdbarch_list *arches;
5363 struct gdbarch_registration *next;
5366 static struct gdbarch_registration *gdbarch_registry = NULL;
5369 append_name (const char ***buf, int *nr, const char *name)
5371 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5377 gdbarch_printable_names (void)
5379 /* Accumulate a list of names based on the registed list of
5381 enum bfd_architecture a;
5383 const char **arches = NULL;
5384 struct gdbarch_registration *rego;
5385 for (rego = gdbarch_registry;
5389 const struct bfd_arch_info *ap;
5390 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5392 internal_error (__FILE__, __LINE__,
5393 "gdbarch_architecture_names: multi-arch unknown");
5396 append_name (&arches, &nr_arches, ap->printable_name);
5401 append_name (&arches, &nr_arches, NULL);
5407 gdbarch_register (enum bfd_architecture bfd_architecture,
5408 gdbarch_init_ftype *init,
5409 gdbarch_dump_tdep_ftype *dump_tdep)
5411 struct gdbarch_registration **curr;
5412 const struct bfd_arch_info *bfd_arch_info;
5413 /* Check that BFD recognizes this architecture */
5414 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5415 if (bfd_arch_info == NULL)
5417 internal_error (__FILE__, __LINE__,
5418 "gdbarch: Attempt to register unknown architecture (%d)",
5421 /* Check that we haven't seen this architecture before */
5422 for (curr = &gdbarch_registry;
5424 curr = &(*curr)->next)
5426 if (bfd_architecture == (*curr)->bfd_architecture)
5427 internal_error (__FILE__, __LINE__,
5428 "gdbarch: Duplicate registraration of architecture (%s)",
5429 bfd_arch_info->printable_name);
5433 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5434 bfd_arch_info->printable_name,
5437 (*curr) = XMALLOC (struct gdbarch_registration);
5438 (*curr)->bfd_architecture = bfd_architecture;
5439 (*curr)->init = init;
5440 (*curr)->dump_tdep = dump_tdep;
5441 (*curr)->arches = NULL;
5442 (*curr)->next = NULL;
5446 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5447 gdbarch_init_ftype *init)
5449 gdbarch_register (bfd_architecture, init, NULL);
5453 /* Look for an architecture using gdbarch_info. Base search on only
5454 BFD_ARCH_INFO and BYTE_ORDER. */
5456 struct gdbarch_list *
5457 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5458 const struct gdbarch_info *info)
5460 for (; arches != NULL; arches = arches->next)
5462 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5464 if (info->byte_order != arches->gdbarch->byte_order)
5466 if (info->osabi != arches->gdbarch->osabi)
5474 /* Find an architecture that matches the specified INFO. Create a new
5475 architecture if needed. Return that new architecture. Assumes
5476 that there is no current architecture. */
5478 static struct gdbarch *
5479 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5481 struct gdbarch *new_gdbarch;
5482 struct gdbarch_registration *rego;
5484 /* The existing architecture has been swapped out - all this code
5485 works from a clean slate. */
5486 gdb_assert (current_gdbarch == NULL);
5488 /* Fill in missing parts of the INFO struct using a number of
5489 sources: "set ..."; INFOabfd supplied; and the existing
5491 gdbarch_info_fill (old_gdbarch, &info);
5493 /* Must have found some sort of architecture. */
5494 gdb_assert (info.bfd_arch_info != NULL);
5498 fprintf_unfiltered (gdb_stdlog,
5499 "find_arch_by_info: info.bfd_arch_info %s\n",
5500 (info.bfd_arch_info != NULL
5501 ? info.bfd_arch_info->printable_name
5503 fprintf_unfiltered (gdb_stdlog,
5504 "find_arch_by_info: info.byte_order %d (%s)\n",
5506 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5507 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5509 fprintf_unfiltered (gdb_stdlog,
5510 "find_arch_by_info: info.osabi %d (%s)\n",
5511 info.osabi, gdbarch_osabi_name (info.osabi));
5512 fprintf_unfiltered (gdb_stdlog,
5513 "find_arch_by_info: info.abfd 0x%lx\n",
5515 fprintf_unfiltered (gdb_stdlog,
5516 "find_arch_by_info: info.tdep_info 0x%lx\n",
5517 (long) info.tdep_info);
5520 /* Find the tdep code that knows about this architecture. */
5521 for (rego = gdbarch_registry;
5524 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5529 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5530 "No matching architecture\n");
5534 /* Ask the tdep code for an architecture that matches "info". */
5535 new_gdbarch = rego->init (info, rego->arches);
5537 /* Did the tdep code like it? No. Reject the change and revert to
5538 the old architecture. */
5539 if (new_gdbarch == NULL)
5542 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5543 "Target rejected architecture\n");
5547 /* Is this a pre-existing architecture (as determined by already
5548 being initialized)? Move it to the front of the architecture
5549 list (keeping the list sorted Most Recently Used). */
5550 if (new_gdbarch->initialized_p)
5552 struct gdbarch_list **list;
5553 struct gdbarch_list *this;
5555 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5556 "Previous architecture 0x%08lx (%s) selected\n",
5558 new_gdbarch->bfd_arch_info->printable_name);
5559 /* Find the existing arch in the list. */
5560 for (list = ®o->arches;
5561 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5562 list = &(*list)->next);
5563 /* It had better be in the list of architectures. */
5564 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5567 (*list) = this->next;
5568 /* Insert THIS at the front. */
5569 this->next = rego->arches;
5570 rego->arches = this;
5575 /* It's a new architecture. */
5577 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5578 "New architecture 0x%08lx (%s) selected\n",
5580 new_gdbarch->bfd_arch_info->printable_name);
5582 /* Insert the new architecture into the front of the architecture
5583 list (keep the list sorted Most Recently Used). */
5585 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5586 this->next = rego->arches;
5587 this->gdbarch = new_gdbarch;
5588 rego->arches = this;
5591 /* Check that the newly installed architecture is valid. Plug in
5592 any post init values. */
5593 new_gdbarch->dump_tdep = rego->dump_tdep;
5594 verify_gdbarch (new_gdbarch);
5595 new_gdbarch->initialized_p = 1;
5597 /* Initialize any per-architecture swap areas. This phase requires
5598 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5599 swap the entire architecture out. */
5600 current_gdbarch = new_gdbarch;
5601 current_gdbarch_swap_init_hack ();
5602 current_gdbarch_swap_out_hack ();
5605 gdbarch_dump (new_gdbarch, gdb_stdlog);
5611 gdbarch_find_by_info (struct gdbarch_info info)
5613 /* Save the previously selected architecture, setting the global to
5614 NULL. This stops things like gdbarch->init() trying to use the
5615 previous architecture's configuration. The previous architecture
5616 may not even be of the same architecture family. The most recent
5617 architecture of the same family is found at the head of the
5618 rego->arches list. */
5619 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5621 /* Find the specified architecture. */
5622 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5624 /* Restore the existing architecture. */
5625 gdb_assert (current_gdbarch == NULL);
5626 current_gdbarch_swap_in_hack (old_gdbarch);
5631 /* Make the specified architecture current, swapping the existing one
5635 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5637 gdb_assert (new_gdbarch != NULL);
5638 gdb_assert (current_gdbarch != NULL);
5639 gdb_assert (new_gdbarch->initialized_p);
5640 current_gdbarch_swap_out_hack ();
5641 current_gdbarch_swap_in_hack (new_gdbarch);
5642 architecture_changed_event ();
5645 extern void _initialize_gdbarch (void);
5648 _initialize_gdbarch (void)
5650 struct cmd_list_element *c;
5652 add_show_from_set (add_set_cmd ("arch",
5655 (char *)&gdbarch_debug,
5656 "Set architecture debugging.\n\
5657 When non-zero, architecture debugging is enabled.", &setdebuglist),
5659 c = add_set_cmd ("archdebug",
5662 (char *)&gdbarch_debug,
5663 "Set architecture debugging.\n\
5664 When non-zero, architecture debugging is enabled.", &setlist);
5666 deprecate_cmd (c, "set debug arch");
5667 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");