1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6 Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 /* This file was created with the aid of ``gdbarch.sh''.
27 The Bourne shell script ``gdbarch.sh'' creates the files
28 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29 against the existing ``gdbarch.[hc]''. Any differences found
32 If editing this file, please also run gdbarch.sh and merge any
33 changes into that script. Conversely, when making sweeping changes
34 to this file, modifying gdbarch.sh and using its output may prove
39 #include "arch-utils.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
45 #include "floatformat.h"
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
52 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 int gdbarch_debug = GDBARCH_DEBUG;
66 /* Maintain the struct gdbarch object */
70 /* Has this architecture been fully initialized? */
73 /* An obstack bound to the lifetime of the architecture. */
74 struct obstack *obstack;
76 /* basic architectural information */
77 const struct bfd_arch_info * bfd_arch_info;
81 /* target specific vector. */
82 struct gdbarch_tdep *tdep;
83 gdbarch_dump_tdep_ftype *dump_tdep;
85 /* per-architecture data-pointers */
89 /* per-architecture swap-regions */
90 struct gdbarch_swap *swap;
94 When extending this structure you must:
98 Declare set/get functions and define the corresponding
101 gdbarch_alloc(): If zero/NULL is not a suitable default,
102 initialize the new field.
104 verify_gdbarch(): Confirm that the target updated the field
107 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
110 ``startup_gdbarch()'': Append an initial value to the static
111 variable (base values on the host's c-type system).
113 get_gdbarch(): Implement the set/get functions (probably using
114 the macro's as shortcuts).
129 gdbarch_read_pc_ftype *read_pc;
130 gdbarch_write_pc_ftype *write_pc;
131 gdbarch_read_sp_ftype *read_sp;
132 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
133 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
134 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
141 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
142 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
143 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
144 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
145 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
146 gdbarch_register_name_ftype *register_name;
147 gdbarch_register_type_ftype *register_type;
148 gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
149 int deprecated_register_bytes;
150 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
151 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
152 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
153 int deprecated_max_register_raw_size;
154 int deprecated_max_register_virtual_size;
155 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
156 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
157 int deprecated_fp_regnum;
158 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
159 gdbarch_push_dummy_call_ftype *push_dummy_call;
160 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
161 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
162 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
163 int deprecated_register_size;
164 int call_dummy_location;
165 LONGEST * deprecated_call_dummy_words;
166 int deprecated_sizeof_call_dummy_words;
167 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
168 gdbarch_push_dummy_code_ftype *push_dummy_code;
169 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
170 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
171 gdbarch_print_registers_info_ftype *print_registers_info;
172 gdbarch_print_float_info_ftype *print_float_info;
173 gdbarch_print_vector_info_ftype *print_vector_info;
174 gdbarch_register_sim_regno_ftype *register_sim_regno;
175 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
176 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
177 gdbarch_cannot_store_register_ftype *cannot_store_register;
178 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
179 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
180 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
181 int believe_pcc_promotion;
182 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
183 gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
184 gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
185 gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
186 gdbarch_convert_register_p_ftype *convert_register_p;
187 gdbarch_register_to_value_ftype *register_to_value;
188 gdbarch_value_to_register_ftype *value_to_register;
189 gdbarch_pointer_to_address_ftype *pointer_to_address;
190 gdbarch_address_to_pointer_ftype *address_to_pointer;
191 gdbarch_integer_to_address_ftype *integer_to_address;
192 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
193 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
194 gdbarch_return_value_ftype *return_value;
195 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
196 gdbarch_extract_return_value_ftype *extract_return_value;
197 gdbarch_store_return_value_ftype *store_return_value;
198 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
199 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
200 gdbarch_use_struct_convention_ftype *use_struct_convention;
201 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
202 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
203 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
204 gdbarch_skip_prologue_ftype *skip_prologue;
205 gdbarch_inner_than_ftype *inner_than;
206 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
207 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
208 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
209 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
210 CORE_ADDR decr_pc_after_break;
211 CORE_ADDR function_start_offset;
212 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
213 CORE_ADDR frame_args_skip;
214 gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
215 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
216 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
217 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
218 gdbarch_unwind_pc_ftype *unwind_pc;
219 gdbarch_unwind_sp_ftype *unwind_sp;
220 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
221 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
222 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
223 gdbarch_frame_num_args_ftype *frame_num_args;
224 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
225 gdbarch_frame_align_ftype *frame_align;
226 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
227 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
228 int frame_red_zone_size;
229 const struct floatformat * float_format;
230 const struct floatformat * double_format;
231 const struct floatformat * long_double_format;
232 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
233 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
234 gdbarch_smash_text_address_ftype *smash_text_address;
235 gdbarch_software_single_step_ftype *software_single_step;
236 gdbarch_print_insn_ftype *print_insn;
237 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
238 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
239 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
240 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
241 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
242 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
243 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
244 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
245 const char * name_of_malloc;
246 int cannot_step_breakpoint;
247 int have_nonsteppable_watchpoint;
248 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
249 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
250 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
251 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
252 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
253 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
257 /* The default architecture uses host values (for want of a better
260 extern const struct bfd_arch_info bfd_default_arch_struct;
262 struct gdbarch startup_gdbarch =
264 1, /* Always initialized. */
265 NULL, /* The obstack. */
266 /* basic architecture information */
267 &bfd_default_arch_struct, /* bfd_arch_info */
268 BFD_ENDIAN_BIG, /* byte_order */
269 GDB_OSABI_UNKNOWN, /* osabi */
270 /* target specific vector and its dump routine */
272 /*per-architecture data-pointers and swap regions */
274 /* Multi-arch values */
275 8 * sizeof (short), /* short_bit */
276 8 * sizeof (int), /* int_bit */
277 8 * sizeof (long), /* long_bit */
278 8 * sizeof (LONGEST), /* long_long_bit */
279 8 * sizeof (float), /* float_bit */
280 8 * sizeof (double), /* double_bit */
281 8 * sizeof (long double), /* long_double_bit */
282 8 * sizeof (void*), /* ptr_bit */
283 8 * sizeof (void*), /* addr_bit */
284 8 * sizeof (void*), /* bfd_vma_bit */
289 0, /* virtual_frame_pointer */
290 0, /* pseudo_register_read */
291 0, /* pseudo_register_write */
293 0, /* num_pseudo_regs */
298 0, /* stab_reg_to_regnum */
299 0, /* ecoff_reg_to_regnum */
300 0, /* dwarf_reg_to_regnum */
301 0, /* sdb_reg_to_regnum */
302 0, /* dwarf2_reg_to_regnum */
303 0, /* register_name */
304 0, /* register_type */
305 0, /* deprecated_register_virtual_type */
306 0, /* deprecated_register_bytes */
307 generic_register_byte, /* deprecated_register_byte */
308 generic_register_size, /* deprecated_register_raw_size */
309 generic_register_size, /* deprecated_register_virtual_size */
310 0, /* deprecated_max_register_raw_size */
311 0, /* deprecated_max_register_virtual_size */
312 0, /* unwind_dummy_id */
313 0, /* deprecated_save_dummy_frame_tos */
314 -1, /* deprecated_fp_regnum */
315 0, /* deprecated_target_read_fp */
316 0, /* push_dummy_call */
317 0, /* deprecated_push_arguments */
318 0, /* deprecated_push_return_address */
319 0, /* deprecated_dummy_write_sp */
320 0, /* deprecated_register_size */
321 0, /* call_dummy_location */
322 0, /* deprecated_call_dummy_words */
323 0, /* deprecated_sizeof_call_dummy_words */
324 0, /* deprecated_fix_call_dummy */
325 0, /* push_dummy_code */
326 0, /* deprecated_push_dummy_frame */
327 0, /* deprecated_do_registers_info */
328 default_print_registers_info, /* print_registers_info */
329 0, /* print_float_info */
330 0, /* print_vector_info */
331 0, /* register_sim_regno */
332 0, /* register_bytes_ok */
333 0, /* cannot_fetch_register */
334 0, /* cannot_store_register */
335 0, /* get_longjmp_target */
336 deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
337 0, /* deprecated_init_frame_pc */
338 0, /* believe_pcc_promotion */
339 0, /* deprecated_get_saved_register */
340 0, /* deprecated_register_convertible */
341 0, /* deprecated_register_convert_to_virtual */
342 0, /* deprecated_register_convert_to_raw */
343 0, /* convert_register_p */
344 0, /* register_to_value */
345 0, /* value_to_register */
346 0, /* pointer_to_address */
347 0, /* address_to_pointer */
348 0, /* integer_to_address */
349 0, /* deprecated_pop_frame */
350 0, /* deprecated_store_struct_return */
351 0, /* return_value */
352 0, /* return_value_on_stack */
353 0, /* extract_return_value */
354 0, /* store_return_value */
355 0, /* deprecated_extract_return_value */
356 0, /* deprecated_store_return_value */
357 0, /* use_struct_convention */
358 0, /* deprecated_extract_struct_value_address */
359 0, /* deprecated_frame_init_saved_regs */
360 0, /* deprecated_init_extra_frame_info */
361 0, /* skip_prologue */
363 0, /* breakpoint_from_pc */
364 0, /* adjust_breakpoint_address */
365 0, /* memory_insert_breakpoint */
366 0, /* memory_remove_breakpoint */
367 0, /* decr_pc_after_break */
368 0, /* function_start_offset */
369 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
370 0, /* frame_args_skip */
371 0, /* deprecated_frameless_function_invocation */
372 0, /* deprecated_frame_chain */
373 0, /* deprecated_frame_chain_valid */
374 0, /* deprecated_frame_saved_pc */
377 get_frame_base, /* deprecated_frame_args_address */
378 get_frame_base, /* deprecated_frame_locals_address */
379 0, /* deprecated_saved_pc_after_call */
380 0, /* frame_num_args */
381 0, /* deprecated_stack_align */
383 0, /* deprecated_reg_struct_has_addr */
384 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
385 0, /* frame_red_zone_size */
386 0, /* float_format */
387 0, /* double_format */
388 0, /* long_double_format */
389 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
390 0, /* addr_bits_remove */
391 0, /* smash_text_address */
392 0, /* software_single_step */
394 0, /* skip_trampoline_code */
395 generic_skip_solib_resolver, /* skip_solib_resolver */
396 0, /* in_solib_call_trampoline */
397 0, /* in_solib_return_trampoline */
398 generic_in_function_epilogue_p, /* in_function_epilogue_p */
399 construct_inferior_arguments, /* construct_inferior_arguments */
400 0, /* elf_make_msymbol_special */
401 0, /* coff_make_msymbol_special */
402 "malloc", /* name_of_malloc */
403 0, /* cannot_step_breakpoint */
404 0, /* have_nonsteppable_watchpoint */
405 0, /* address_class_type_flags */
406 0, /* address_class_type_flags_to_name */
407 0, /* address_class_name_to_type_flags */
408 default_register_reggroup_p, /* register_reggroup_p */
409 0, /* fetch_pointer_argument */
410 0, /* regset_from_core_section */
411 /* startup_gdbarch() */
414 struct gdbarch *current_gdbarch = &startup_gdbarch;
416 /* Create a new ``struct gdbarch'' based on information provided by
417 ``struct gdbarch_info''. */
420 gdbarch_alloc (const struct gdbarch_info *info,
421 struct gdbarch_tdep *tdep)
423 /* NOTE: The new architecture variable is named ``current_gdbarch''
424 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
425 the current local architecture and not the previous global
426 architecture. This ensures that the new architectures initial
427 values are not influenced by the previous architecture. Once
428 everything is parameterised with gdbarch, this will go away. */
429 struct gdbarch *current_gdbarch;
431 /* Create an obstack for allocating all the per-architecture memory,
432 then use that to allocate the architecture vector. */
433 struct obstack *obstack = XMALLOC (struct obstack);
434 obstack_init (obstack);
435 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
436 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
437 current_gdbarch->obstack = obstack;
439 alloc_gdbarch_data (current_gdbarch);
441 current_gdbarch->tdep = tdep;
443 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
444 current_gdbarch->byte_order = info->byte_order;
445 current_gdbarch->osabi = info->osabi;
447 /* Force the explicit initialization of these. */
448 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
449 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
450 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
451 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
452 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
453 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
454 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
455 current_gdbarch->ptr_bit = TARGET_INT_BIT;
456 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
457 current_gdbarch->char_signed = -1;
458 current_gdbarch->write_pc = generic_target_write_pc;
459 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
460 current_gdbarch->num_regs = -1;
461 current_gdbarch->sp_regnum = -1;
462 current_gdbarch->pc_regnum = -1;
463 current_gdbarch->ps_regnum = -1;
464 current_gdbarch->fp0_regnum = -1;
465 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
466 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
467 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
468 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
469 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
470 current_gdbarch->deprecated_register_byte = generic_register_byte;
471 current_gdbarch->deprecated_register_raw_size = generic_register_size;
472 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
473 current_gdbarch->deprecated_fp_regnum = -1;
474 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
475 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
476 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
477 current_gdbarch->print_registers_info = default_print_registers_info;
478 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
479 current_gdbarch->cannot_fetch_register = cannot_register_not;
480 current_gdbarch->cannot_store_register = cannot_register_not;
481 current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
482 current_gdbarch->convert_register_p = legacy_convert_register_p;
483 current_gdbarch->register_to_value = legacy_register_to_value;
484 current_gdbarch->value_to_register = legacy_value_to_register;
485 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
486 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
487 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
488 current_gdbarch->extract_return_value = legacy_extract_return_value;
489 current_gdbarch->store_return_value = legacy_store_return_value;
490 current_gdbarch->use_struct_convention = generic_use_struct_convention;
491 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
492 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
493 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
494 current_gdbarch->deprecated_frame_args_address = get_frame_base;
495 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
496 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
497 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
498 current_gdbarch->addr_bits_remove = core_addr_identity;
499 current_gdbarch->smash_text_address = core_addr_identity;
500 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
501 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
502 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
503 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
504 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
505 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
506 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
507 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
508 current_gdbarch->name_of_malloc = "malloc";
509 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
510 /* gdbarch_alloc() */
512 return current_gdbarch;
516 /* Allocate extra space using the per-architecture obstack. */
519 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
521 void *data = obstack_alloc (arch->obstack, size);
522 memset (data, 0, size);
527 /* Free a gdbarch struct. This should never happen in normal
528 operation --- once you've created a gdbarch, you keep it around.
529 However, if an architecture's init function encounters an error
530 building the structure, it may need to clean up a partially
531 constructed gdbarch. */
534 gdbarch_free (struct gdbarch *arch)
536 struct obstack *obstack;
537 gdb_assert (arch != NULL);
538 gdb_assert (!arch->initialized_p);
539 obstack = arch->obstack;
540 obstack_free (obstack, 0); /* Includes the ARCH. */
545 /* Ensure that all values in a GDBARCH are reasonable. */
547 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
548 just happens to match the global variable ``current_gdbarch''. That
549 way macros refering to that variable get the local and not the global
550 version - ulgh. Once everything is parameterised with gdbarch, this
554 verify_gdbarch (struct gdbarch *current_gdbarch)
557 struct cleanup *cleanups;
560 log = mem_fileopen ();
561 cleanups = make_cleanup_ui_file_delete (log);
563 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
564 fprintf_unfiltered (log, "\n\tbyte-order");
565 if (current_gdbarch->bfd_arch_info == NULL)
566 fprintf_unfiltered (log, "\n\tbfd_arch_info");
567 /* Check those that need to be defined for the given multi-arch level. */
568 /* Skip verify of short_bit, invalid_p == 0 */
569 /* Skip verify of int_bit, invalid_p == 0 */
570 /* Skip verify of long_bit, invalid_p == 0 */
571 /* Skip verify of long_long_bit, invalid_p == 0 */
572 /* Skip verify of float_bit, invalid_p == 0 */
573 /* Skip verify of double_bit, invalid_p == 0 */
574 /* Skip verify of long_double_bit, invalid_p == 0 */
575 /* Skip verify of ptr_bit, invalid_p == 0 */
576 if (current_gdbarch->addr_bit == 0)
577 current_gdbarch->addr_bit = TARGET_PTR_BIT;
578 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
579 if (current_gdbarch->char_signed == -1)
580 current_gdbarch->char_signed = 1;
581 /* Skip verify of read_pc, has predicate */
582 /* Skip verify of write_pc, invalid_p == 0 */
583 /* Skip verify of read_sp, has predicate */
584 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
585 /* Skip verify of pseudo_register_read, has predicate */
586 /* Skip verify of pseudo_register_write, has predicate */
587 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
588 && (current_gdbarch->num_regs == -1))
589 fprintf_unfiltered (log, "\n\tnum_regs");
590 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
591 /* Skip verify of sp_regnum, invalid_p == 0 */
592 /* Skip verify of pc_regnum, invalid_p == 0 */
593 /* Skip verify of ps_regnum, invalid_p == 0 */
594 /* Skip verify of fp0_regnum, invalid_p == 0 */
595 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
596 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
597 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
598 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
599 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
600 /* Skip verify of register_type, has predicate */
601 /* Skip verify of deprecated_register_virtual_type, has predicate */
602 /* Skip verify of deprecated_register_byte, has predicate */
603 /* Skip verify of deprecated_register_raw_size, has predicate */
604 /* Skip verify of deprecated_register_virtual_size, has predicate */
605 /* Skip verify of deprecated_max_register_raw_size, has predicate */
606 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
607 /* Skip verify of unwind_dummy_id, has predicate */
608 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
609 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
610 /* Skip verify of deprecated_target_read_fp, has predicate */
611 /* Skip verify of push_dummy_call, has predicate */
612 /* Skip verify of deprecated_push_arguments, has predicate */
613 /* Skip verify of deprecated_push_return_address, has predicate */
614 /* Skip verify of deprecated_dummy_write_sp, has predicate */
615 /* Skip verify of call_dummy_location, invalid_p == 0 */
616 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
617 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
618 /* Skip verify of deprecated_fix_call_dummy, has predicate */
619 /* Skip verify of push_dummy_code, has predicate */
620 /* Skip verify of deprecated_push_dummy_frame, has predicate */
621 /* Skip verify of deprecated_do_registers_info, has predicate */
622 /* Skip verify of print_registers_info, invalid_p == 0 */
623 /* Skip verify of print_float_info, has predicate */
624 /* Skip verify of print_vector_info, has predicate */
625 /* Skip verify of register_sim_regno, invalid_p == 0 */
626 /* Skip verify of register_bytes_ok, has predicate */
627 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
628 /* Skip verify of cannot_store_register, invalid_p == 0 */
629 /* Skip verify of get_longjmp_target, has predicate */
630 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
631 /* Skip verify of deprecated_init_frame_pc, has predicate */
632 /* Skip verify of deprecated_get_saved_register, has predicate */
633 /* Skip verify of deprecated_register_convertible, has predicate */
634 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
635 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
636 /* Skip verify of convert_register_p, invalid_p == 0 */
637 /* Skip verify of register_to_value, invalid_p == 0 */
638 /* Skip verify of value_to_register, invalid_p == 0 */
639 /* Skip verify of pointer_to_address, invalid_p == 0 */
640 /* Skip verify of address_to_pointer, invalid_p == 0 */
641 /* Skip verify of integer_to_address, has predicate */
642 /* Skip verify of deprecated_pop_frame, has predicate */
643 /* Skip verify of deprecated_store_struct_return, has predicate */
644 /* Skip verify of return_value, has predicate */
645 /* Skip verify of return_value_on_stack, invalid_p == 0 */
646 /* Skip verify of extract_return_value, invalid_p == 0 */
647 /* Skip verify of store_return_value, invalid_p == 0 */
648 /* Skip verify of use_struct_convention, invalid_p == 0 */
649 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
650 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
651 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
652 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
653 && (current_gdbarch->skip_prologue == 0))
654 fprintf_unfiltered (log, "\n\tskip_prologue");
655 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
656 && (current_gdbarch->inner_than == 0))
657 fprintf_unfiltered (log, "\n\tinner_than");
658 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
659 && (current_gdbarch->breakpoint_from_pc == 0))
660 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
661 /* Skip verify of adjust_breakpoint_address, has predicate */
662 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
663 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
664 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
665 /* Skip verify of function_start_offset, invalid_p == 0 */
666 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
667 /* Skip verify of frame_args_skip, invalid_p == 0 */
668 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
669 /* Skip verify of deprecated_frame_chain, has predicate */
670 /* Skip verify of deprecated_frame_chain_valid, has predicate */
671 /* Skip verify of deprecated_frame_saved_pc, has predicate */
672 /* Skip verify of unwind_pc, has predicate */
673 /* Skip verify of unwind_sp, has predicate */
674 /* Skip verify of deprecated_frame_args_address, has predicate */
675 /* Skip verify of deprecated_frame_locals_address, has predicate */
676 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
677 /* Skip verify of frame_num_args, has predicate */
678 /* Skip verify of deprecated_stack_align, has predicate */
679 /* Skip verify of frame_align, has predicate */
680 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
681 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
682 if (current_gdbarch->float_format == 0)
683 current_gdbarch->float_format = default_float_format (current_gdbarch);
684 if (current_gdbarch->double_format == 0)
685 current_gdbarch->double_format = default_double_format (current_gdbarch);
686 if (current_gdbarch->long_double_format == 0)
687 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
688 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
689 /* Skip verify of addr_bits_remove, invalid_p == 0 */
690 /* Skip verify of smash_text_address, invalid_p == 0 */
691 /* Skip verify of software_single_step, has predicate */
692 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
693 && (current_gdbarch->print_insn == 0))
694 fprintf_unfiltered (log, "\n\tprint_insn");
695 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
696 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
697 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
698 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
699 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
700 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
701 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
702 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
703 /* Skip verify of name_of_malloc, invalid_p == 0 */
704 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
705 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
706 /* Skip verify of address_class_type_flags, has predicate */
707 /* Skip verify of address_class_type_flags_to_name, has predicate */
708 /* Skip verify of address_class_name_to_type_flags, has predicate */
709 /* Skip verify of register_reggroup_p, invalid_p == 0 */
710 /* Skip verify of fetch_pointer_argument, has predicate */
711 /* Skip verify of regset_from_core_section, has predicate */
712 buf = ui_file_xstrdup (log, &dummy);
713 make_cleanup (xfree, buf);
714 if (strlen (buf) > 0)
715 internal_error (__FILE__, __LINE__,
716 "verify_gdbarch: the following are invalid ...%s",
718 do_cleanups (cleanups);
722 /* Print out the details of the current architecture. */
724 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
725 just happens to match the global variable ``current_gdbarch''. That
726 way macros refering to that variable get the local and not the global
727 version - ulgh. Once everything is parameterised with gdbarch, this
731 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
733 fprintf_unfiltered (file,
734 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
736 fprintf_unfiltered (file,
737 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
738 (long) current_gdbarch->convert_from_func_ptr_addr);
739 fprintf_unfiltered (file,
740 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
741 gdbarch_frame_align_p (current_gdbarch));
742 fprintf_unfiltered (file,
743 "gdbarch_dump: frame_align = 0x%08lx\n",
744 (long) current_gdbarch->frame_align);
745 fprintf_unfiltered (file,
746 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
747 gdbarch_regset_from_core_section_p (current_gdbarch));
748 fprintf_unfiltered (file,
749 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
750 (long) current_gdbarch->regset_from_core_section);
751 fprintf_unfiltered (file,
752 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
753 gdbarch_return_value_p (current_gdbarch));
754 fprintf_unfiltered (file,
755 "gdbarch_dump: return_value = 0x%08lx\n",
756 (long) current_gdbarch->return_value);
757 fprintf_unfiltered (file,
758 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
759 (long) current_gdbarch->in_function_epilogue_p);
760 fprintf_unfiltered (file,
761 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
762 (long) current_gdbarch->register_reggroup_p);
763 fprintf_unfiltered (file,
764 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
765 (long) current_gdbarch->stabs_argument_has_addr);
766 fprintf_unfiltered (file,
767 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
768 gdbarch_pseudo_register_read_p (current_gdbarch));
769 fprintf_unfiltered (file,
770 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
771 (long) current_gdbarch->pseudo_register_read);
772 fprintf_unfiltered (file,
773 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
774 gdbarch_pseudo_register_write_p (current_gdbarch));
775 fprintf_unfiltered (file,
776 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
777 (long) current_gdbarch->pseudo_register_write);
778 fprintf_unfiltered (file,
779 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
780 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
781 fprintf_unfiltered (file,
782 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
783 (long) current_gdbarch->address_class_name_to_type_flags);
784 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
785 fprintf_unfiltered (file,
786 "gdbarch_dump: %s # %s\n",
787 "ADDRESS_CLASS_TYPE_FLAGS_P()",
788 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
789 fprintf_unfiltered (file,
790 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
791 ADDRESS_CLASS_TYPE_FLAGS_P ());
793 #ifdef ADDRESS_CLASS_TYPE_FLAGS
794 fprintf_unfiltered (file,
795 "gdbarch_dump: %s # %s\n",
796 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
797 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
800 (long) current_gdbarch->address_class_type_flags
801 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
803 fprintf_unfiltered (file,
804 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
805 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
808 (long) current_gdbarch->address_class_type_flags_to_name);
809 #ifdef ADDRESS_TO_POINTER
810 fprintf_unfiltered (file,
811 "gdbarch_dump: %s # %s\n",
812 "ADDRESS_TO_POINTER(type, buf, addr)",
813 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
816 (long) current_gdbarch->address_to_pointer
817 /*ADDRESS_TO_POINTER ()*/);
819 #ifdef ADDR_BITS_REMOVE
820 fprintf_unfiltered (file,
821 "gdbarch_dump: %s # %s\n",
822 "ADDR_BITS_REMOVE(addr)",
823 XSTRING (ADDR_BITS_REMOVE (addr)));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
826 (long) current_gdbarch->addr_bits_remove
827 /*ADDR_BITS_REMOVE ()*/);
829 fprintf_unfiltered (file,
830 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
831 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
834 (long) current_gdbarch->adjust_breakpoint_address);
835 #ifdef BELIEVE_PCC_PROMOTION
836 fprintf_unfiltered (file,
837 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
838 XSTRING (BELIEVE_PCC_PROMOTION));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
841 BELIEVE_PCC_PROMOTION);
843 #ifdef BREAKPOINT_FROM_PC
844 fprintf_unfiltered (file,
845 "gdbarch_dump: %s # %s\n",
846 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
847 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
850 (long) current_gdbarch->breakpoint_from_pc
851 /*BREAKPOINT_FROM_PC ()*/);
853 #ifdef CALL_DUMMY_LOCATION
854 fprintf_unfiltered (file,
855 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
856 XSTRING (CALL_DUMMY_LOCATION));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
859 CALL_DUMMY_LOCATION);
861 #ifdef CANNOT_FETCH_REGISTER
862 fprintf_unfiltered (file,
863 "gdbarch_dump: %s # %s\n",
864 "CANNOT_FETCH_REGISTER(regnum)",
865 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
868 (long) current_gdbarch->cannot_fetch_register
869 /*CANNOT_FETCH_REGISTER ()*/);
871 #ifdef CANNOT_STEP_BREAKPOINT
872 fprintf_unfiltered (file,
873 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
874 XSTRING (CANNOT_STEP_BREAKPOINT));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
877 CANNOT_STEP_BREAKPOINT);
879 #ifdef CANNOT_STORE_REGISTER
880 fprintf_unfiltered (file,
881 "gdbarch_dump: %s # %s\n",
882 "CANNOT_STORE_REGISTER(regnum)",
883 XSTRING (CANNOT_STORE_REGISTER (regnum)));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
886 (long) current_gdbarch->cannot_store_register
887 /*CANNOT_STORE_REGISTER ()*/);
889 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
890 fprintf_unfiltered (file,
891 "gdbarch_dump: %s # %s\n",
892 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
893 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
894 fprintf_unfiltered (file,
895 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
896 (long) current_gdbarch->coff_make_msymbol_special
897 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
899 fprintf_unfiltered (file,
900 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
901 (long) current_gdbarch->construct_inferior_arguments);
902 #ifdef CONVERT_REGISTER_P
903 fprintf_unfiltered (file,
904 "gdbarch_dump: %s # %s\n",
905 "CONVERT_REGISTER_P(regnum, type)",
906 XSTRING (CONVERT_REGISTER_P (regnum, type)));
907 fprintf_unfiltered (file,
908 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
909 (long) current_gdbarch->convert_register_p
910 /*CONVERT_REGISTER_P ()*/);
912 #ifdef DECR_PC_AFTER_BREAK
913 fprintf_unfiltered (file,
914 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
915 XSTRING (DECR_PC_AFTER_BREAK));
916 fprintf_unfiltered (file,
917 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
918 (long) DECR_PC_AFTER_BREAK);
920 #ifdef DEPRECATED_CALL_DUMMY_WORDS
921 fprintf_unfiltered (file,
922 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
923 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
924 fprintf_unfiltered (file,
925 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
926 (long) DEPRECATED_CALL_DUMMY_WORDS);
928 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
929 fprintf_unfiltered (file,
930 "gdbarch_dump: %s # %s\n",
931 "DEPRECATED_DO_REGISTERS_INFO_P()",
932 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
935 DEPRECATED_DO_REGISTERS_INFO_P ());
937 #ifdef DEPRECATED_DO_REGISTERS_INFO
938 fprintf_unfiltered (file,
939 "gdbarch_dump: %s # %s\n",
940 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
941 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
944 (long) current_gdbarch->deprecated_do_registers_info
945 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
947 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
948 fprintf_unfiltered (file,
949 "gdbarch_dump: %s # %s\n",
950 "DEPRECATED_DUMMY_WRITE_SP_P()",
951 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
952 fprintf_unfiltered (file,
953 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
954 DEPRECATED_DUMMY_WRITE_SP_P ());
956 #ifdef DEPRECATED_DUMMY_WRITE_SP
957 fprintf_unfiltered (file,
958 "gdbarch_dump: %s # %s\n",
959 "DEPRECATED_DUMMY_WRITE_SP(val)",
960 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
961 fprintf_unfiltered (file,
962 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
963 (long) current_gdbarch->deprecated_dummy_write_sp
964 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
966 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
967 fprintf_unfiltered (file,
968 "gdbarch_dump: %s # %s\n",
969 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
970 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
973 (long) current_gdbarch->deprecated_extract_return_value
974 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
976 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
977 fprintf_unfiltered (file,
978 "gdbarch_dump: %s # %s\n",
979 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
980 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
981 fprintf_unfiltered (file,
982 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
983 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
985 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
986 fprintf_unfiltered (file,
987 "gdbarch_dump: %s # %s\n",
988 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
989 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
990 fprintf_unfiltered (file,
991 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
992 (long) current_gdbarch->deprecated_extract_struct_value_address
993 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
995 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
996 fprintf_unfiltered (file,
997 "gdbarch_dump: %s # %s\n",
998 "DEPRECATED_FIX_CALL_DUMMY_P()",
999 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1000 fprintf_unfiltered (file,
1001 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1002 DEPRECATED_FIX_CALL_DUMMY_P ());
1004 #ifdef DEPRECATED_FIX_CALL_DUMMY
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: %s # %s\n",
1007 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1008 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1011 (long) current_gdbarch->deprecated_fix_call_dummy
1012 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1014 #ifdef DEPRECATED_FP_REGNUM
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1017 XSTRING (DEPRECATED_FP_REGNUM));
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1020 DEPRECATED_FP_REGNUM);
1022 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
1023 fprintf_unfiltered (file,
1024 "gdbarch_dump: %s # %s\n",
1025 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
1026 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
1029 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
1031 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: %s # %s\n",
1034 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
1035 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1038 (long) current_gdbarch->deprecated_frameless_function_invocation
1039 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
1041 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: %s # %s\n",
1044 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1045 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1048 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1050 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: %s # %s\n",
1053 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1054 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1057 (long) current_gdbarch->deprecated_frame_args_address
1058 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1060 #ifdef DEPRECATED_FRAME_CHAIN_P
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: %s # %s\n",
1063 "DEPRECATED_FRAME_CHAIN_P()",
1064 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1067 DEPRECATED_FRAME_CHAIN_P ());
1069 #ifdef DEPRECATED_FRAME_CHAIN
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: %s # %s\n",
1072 "DEPRECATED_FRAME_CHAIN(frame)",
1073 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1076 (long) current_gdbarch->deprecated_frame_chain
1077 /*DEPRECATED_FRAME_CHAIN ()*/);
1079 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: %s # %s\n",
1082 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1083 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1086 DEPRECATED_FRAME_CHAIN_VALID_P ());
1088 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: %s # %s\n",
1091 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1092 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1095 (long) current_gdbarch->deprecated_frame_chain_valid
1096 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1098 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: %s # %s\n",
1101 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1102 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1105 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1107 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1108 fprintf_unfiltered (file,
1109 "gdbarch_dump: %s # %s\n",
1110 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1111 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1114 (long) current_gdbarch->deprecated_frame_init_saved_regs
1115 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1117 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: %s # %s\n",
1120 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1121 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1124 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1126 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: %s # %s\n",
1129 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1130 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1131 fprintf_unfiltered (file,
1132 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1133 (long) current_gdbarch->deprecated_frame_locals_address
1134 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1136 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: %s # %s\n",
1139 "DEPRECATED_FRAME_SAVED_PC_P()",
1140 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1143 DEPRECATED_FRAME_SAVED_PC_P ());
1145 #ifdef DEPRECATED_FRAME_SAVED_PC
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: %s # %s\n",
1148 "DEPRECATED_FRAME_SAVED_PC(fi)",
1149 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1152 (long) current_gdbarch->deprecated_frame_saved_pc
1153 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1155 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: %s # %s\n",
1158 "DEPRECATED_GET_SAVED_REGISTER_P()",
1159 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1162 DEPRECATED_GET_SAVED_REGISTER_P ());
1164 #ifdef DEPRECATED_GET_SAVED_REGISTER
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: %s # %s\n",
1167 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1168 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1171 (long) current_gdbarch->deprecated_get_saved_register
1172 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1174 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: %s # %s\n",
1177 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1178 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1181 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1183 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: %s # %s\n",
1186 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1187 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1190 (long) current_gdbarch->deprecated_init_extra_frame_info
1191 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1193 #ifdef DEPRECATED_INIT_FRAME_PC_P
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: %s # %s\n",
1196 "DEPRECATED_INIT_FRAME_PC_P()",
1197 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1200 DEPRECATED_INIT_FRAME_PC_P ());
1202 #ifdef DEPRECATED_INIT_FRAME_PC
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: %s # %s\n",
1205 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1206 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1207 fprintf_unfiltered (file,
1208 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1209 (long) current_gdbarch->deprecated_init_frame_pc
1210 /*DEPRECATED_INIT_FRAME_PC ()*/);
1212 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: %s # %s\n",
1215 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1216 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1219 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1221 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1224 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1227 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1229 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: %s # %s\n",
1232 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1233 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1236 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1238 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1241 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1244 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1246 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: %s # %s\n",
1249 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1250 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1253 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1255 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: %s # %s\n",
1258 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1259 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1262 (long) current_gdbarch->deprecated_pc_in_call_dummy
1263 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1265 #ifdef DEPRECATED_POP_FRAME_P
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: %s # %s\n",
1268 "DEPRECATED_POP_FRAME_P()",
1269 XSTRING (DEPRECATED_POP_FRAME_P ()));
1270 fprintf_unfiltered (file,
1271 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1272 DEPRECATED_POP_FRAME_P ());
1274 #ifdef DEPRECATED_POP_FRAME
1275 fprintf_unfiltered (file,
1276 "gdbarch_dump: %s # %s\n",
1277 "DEPRECATED_POP_FRAME(-)",
1278 XSTRING (DEPRECATED_POP_FRAME (-)));
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1281 (long) current_gdbarch->deprecated_pop_frame
1282 /*DEPRECATED_POP_FRAME ()*/);
1284 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: %s # %s\n",
1287 "DEPRECATED_PUSH_ARGUMENTS_P()",
1288 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1291 DEPRECATED_PUSH_ARGUMENTS_P ());
1293 #ifdef DEPRECATED_PUSH_ARGUMENTS
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: %s # %s\n",
1296 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1297 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1300 (long) current_gdbarch->deprecated_push_arguments
1301 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1303 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: %s # %s\n",
1306 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1307 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1310 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1312 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: %s # %s\n",
1315 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1316 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1319 (long) current_gdbarch->deprecated_push_dummy_frame
1320 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1322 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: %s # %s\n",
1325 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1326 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1329 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1331 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: %s # %s\n",
1334 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1335 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1338 (long) current_gdbarch->deprecated_push_return_address
1339 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1341 #ifdef DEPRECATED_REGISTER_BYTE_P
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: %s # %s\n",
1344 "DEPRECATED_REGISTER_BYTE_P()",
1345 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1348 DEPRECATED_REGISTER_BYTE_P ());
1350 #ifdef DEPRECATED_REGISTER_BYTE
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: %s # %s\n",
1353 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1354 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1357 (long) current_gdbarch->deprecated_register_byte
1358 /*DEPRECATED_REGISTER_BYTE ()*/);
1360 #ifdef DEPRECATED_REGISTER_BYTES
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1363 XSTRING (DEPRECATED_REGISTER_BYTES));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1366 DEPRECATED_REGISTER_BYTES);
1368 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: %s # %s\n",
1371 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1372 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1375 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1377 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: %s # %s\n",
1380 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1381 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1384 (long) current_gdbarch->deprecated_register_convertible
1385 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1387 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: %s # %s\n",
1390 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1391 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1394 (long) current_gdbarch->deprecated_register_convert_to_raw
1395 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1397 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1398 fprintf_unfiltered (file,
1399 "gdbarch_dump: %s # %s\n",
1400 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1401 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1404 (long) current_gdbarch->deprecated_register_convert_to_virtual
1405 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1407 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: %s # %s\n",
1410 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1411 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1414 DEPRECATED_REGISTER_RAW_SIZE_P ());
1416 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: %s # %s\n",
1419 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1420 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1423 (long) current_gdbarch->deprecated_register_raw_size
1424 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1426 #ifdef DEPRECATED_REGISTER_SIZE
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1429 XSTRING (DEPRECATED_REGISTER_SIZE));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1432 DEPRECATED_REGISTER_SIZE);
1434 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: %s # %s\n",
1437 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1438 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1441 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1443 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: %s # %s\n",
1446 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1447 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1450 (long) current_gdbarch->deprecated_register_virtual_size
1451 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1453 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: %s # %s\n",
1456 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1457 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1460 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1462 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: %s # %s\n",
1465 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1466 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1469 (long) current_gdbarch->deprecated_register_virtual_type
1470 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1472 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1473 fprintf_unfiltered (file,
1474 "gdbarch_dump: %s # %s\n",
1475 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1476 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1479 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1481 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: %s # %s\n",
1484 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1485 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1488 (long) current_gdbarch->deprecated_reg_struct_has_addr
1489 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1491 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1495 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1498 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1500 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
1503 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1504 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1507 (long) current_gdbarch->deprecated_saved_pc_after_call
1508 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1510 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: %s # %s\n",
1513 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1514 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1517 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1519 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: %s # %s\n",
1522 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1523 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1524 fprintf_unfiltered (file,
1525 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1526 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1527 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1529 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1530 fprintf_unfiltered (file,
1531 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1532 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1535 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1537 #ifdef DEPRECATED_STACK_ALIGN_P
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: %s # %s\n",
1540 "DEPRECATED_STACK_ALIGN_P()",
1541 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1544 DEPRECATED_STACK_ALIGN_P ());
1546 #ifdef DEPRECATED_STACK_ALIGN
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: %s # %s\n",
1549 "DEPRECATED_STACK_ALIGN(sp)",
1550 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1553 (long) current_gdbarch->deprecated_stack_align
1554 /*DEPRECATED_STACK_ALIGN ()*/);
1556 #ifdef DEPRECATED_STORE_RETURN_VALUE
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1560 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1563 (long) current_gdbarch->deprecated_store_return_value
1564 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1566 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1567 fprintf_unfiltered (file,
1568 "gdbarch_dump: %s # %s\n",
1569 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1570 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1573 DEPRECATED_STORE_STRUCT_RETURN_P ());
1575 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1576 fprintf_unfiltered (file,
1577 "gdbarch_dump: %s # %s\n",
1578 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1579 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1582 (long) current_gdbarch->deprecated_store_struct_return
1583 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1585 #ifdef DEPRECATED_TARGET_READ_FP_P
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: %s # %s\n",
1588 "DEPRECATED_TARGET_READ_FP_P()",
1589 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1592 DEPRECATED_TARGET_READ_FP_P ());
1594 #ifdef DEPRECATED_TARGET_READ_FP
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: %s # %s\n",
1597 "DEPRECATED_TARGET_READ_FP()",
1598 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1599 fprintf_unfiltered (file,
1600 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1601 (long) current_gdbarch->deprecated_target_read_fp
1602 /*DEPRECATED_TARGET_READ_FP ()*/);
1604 #ifdef DWARF2_REG_TO_REGNUM
1605 fprintf_unfiltered (file,
1606 "gdbarch_dump: %s # %s\n",
1607 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1608 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1611 (long) current_gdbarch->dwarf2_reg_to_regnum
1612 /*DWARF2_REG_TO_REGNUM ()*/);
1614 #ifdef DWARF_REG_TO_REGNUM
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: %s # %s\n",
1617 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1618 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1621 (long) current_gdbarch->dwarf_reg_to_regnum
1622 /*DWARF_REG_TO_REGNUM ()*/);
1624 #ifdef ECOFF_REG_TO_REGNUM
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: %s # %s\n",
1627 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1628 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1631 (long) current_gdbarch->ecoff_reg_to_regnum
1632 /*ECOFF_REG_TO_REGNUM ()*/);
1634 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1635 fprintf_unfiltered (file,
1636 "gdbarch_dump: %s # %s\n",
1637 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1638 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1641 (long) current_gdbarch->elf_make_msymbol_special
1642 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1644 #ifdef EXTRACT_RETURN_VALUE
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: %s # %s\n",
1647 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1648 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1651 (long) current_gdbarch->extract_return_value
1652 /*EXTRACT_RETURN_VALUE ()*/);
1654 #ifdef FETCH_POINTER_ARGUMENT_P
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: %s # %s\n",
1657 "FETCH_POINTER_ARGUMENT_P()",
1658 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1661 FETCH_POINTER_ARGUMENT_P ());
1663 #ifdef FETCH_POINTER_ARGUMENT
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: %s # %s\n",
1666 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1667 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1670 (long) current_gdbarch->fetch_pointer_argument
1671 /*FETCH_POINTER_ARGUMENT ()*/);
1674 fprintf_unfiltered (file,
1675 "gdbarch_dump: FP0_REGNUM # %s\n",
1676 XSTRING (FP0_REGNUM));
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: FP0_REGNUM = %d\n",
1681 #ifdef FRAME_ARGS_SKIP
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1684 XSTRING (FRAME_ARGS_SKIP));
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1687 (long) FRAME_ARGS_SKIP);
1689 #ifdef FRAME_NUM_ARGS_P
1690 fprintf_unfiltered (file,
1691 "gdbarch_dump: %s # %s\n",
1692 "FRAME_NUM_ARGS_P()",
1693 XSTRING (FRAME_NUM_ARGS_P ()));
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1696 FRAME_NUM_ARGS_P ());
1698 #ifdef FRAME_NUM_ARGS
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: %s # %s\n",
1701 "FRAME_NUM_ARGS(frame)",
1702 XSTRING (FRAME_NUM_ARGS (frame)));
1703 fprintf_unfiltered (file,
1704 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1705 (long) current_gdbarch->frame_num_args
1706 /*FRAME_NUM_ARGS ()*/);
1708 #ifdef FRAME_RED_ZONE_SIZE
1709 fprintf_unfiltered (file,
1710 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1711 XSTRING (FRAME_RED_ZONE_SIZE));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1714 FRAME_RED_ZONE_SIZE);
1716 #ifdef FUNCTION_START_OFFSET
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1719 XSTRING (FUNCTION_START_OFFSET));
1720 fprintf_unfiltered (file,
1721 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1722 (long) FUNCTION_START_OFFSET);
1724 #ifdef GET_LONGJMP_TARGET_P
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: %s # %s\n",
1727 "GET_LONGJMP_TARGET_P()",
1728 XSTRING (GET_LONGJMP_TARGET_P ()));
1729 fprintf_unfiltered (file,
1730 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1731 GET_LONGJMP_TARGET_P ());
1733 #ifdef GET_LONGJMP_TARGET
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: %s # %s\n",
1736 "GET_LONGJMP_TARGET(pc)",
1737 XSTRING (GET_LONGJMP_TARGET (pc)));
1738 fprintf_unfiltered (file,
1739 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1740 (long) current_gdbarch->get_longjmp_target
1741 /*GET_LONGJMP_TARGET ()*/);
1743 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1744 fprintf_unfiltered (file,
1745 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1746 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1747 fprintf_unfiltered (file,
1748 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1749 HAVE_NONSTEPPABLE_WATCHPOINT);
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: %s # %s\n",
1754 "INNER_THAN(lhs, rhs)",
1755 XSTRING (INNER_THAN (lhs, rhs)));
1756 fprintf_unfiltered (file,
1757 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1758 (long) current_gdbarch->inner_than
1761 #ifdef INTEGER_TO_ADDRESS_P
1762 fprintf_unfiltered (file,
1763 "gdbarch_dump: %s # %s\n",
1764 "INTEGER_TO_ADDRESS_P()",
1765 XSTRING (INTEGER_TO_ADDRESS_P ()));
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1768 INTEGER_TO_ADDRESS_P ());
1770 #ifdef INTEGER_TO_ADDRESS
1771 fprintf_unfiltered (file,
1772 "gdbarch_dump: %s # %s\n",
1773 "INTEGER_TO_ADDRESS(type, buf)",
1774 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1777 (long) current_gdbarch->integer_to_address
1778 /*INTEGER_TO_ADDRESS ()*/);
1780 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1781 fprintf_unfiltered (file,
1782 "gdbarch_dump: %s # %s\n",
1783 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1784 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1787 (long) current_gdbarch->in_solib_call_trampoline
1788 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1790 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1791 fprintf_unfiltered (file,
1792 "gdbarch_dump: %s # %s\n",
1793 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1794 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1795 fprintf_unfiltered (file,
1796 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1797 (long) current_gdbarch->in_solib_return_trampoline
1798 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1800 #ifdef MEMORY_INSERT_BREAKPOINT
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: %s # %s\n",
1803 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1804 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1805 fprintf_unfiltered (file,
1806 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1807 (long) current_gdbarch->memory_insert_breakpoint
1808 /*MEMORY_INSERT_BREAKPOINT ()*/);
1810 #ifdef MEMORY_REMOVE_BREAKPOINT
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: %s # %s\n",
1813 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1814 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1817 (long) current_gdbarch->memory_remove_breakpoint
1818 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1820 #ifdef NAME_OF_MALLOC
1821 fprintf_unfiltered (file,
1822 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1823 XSTRING (NAME_OF_MALLOC));
1824 fprintf_unfiltered (file,
1825 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1828 #ifdef NUM_PSEUDO_REGS
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1831 XSTRING (NUM_PSEUDO_REGS));
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: NUM_REGS # %s\n",
1839 XSTRING (NUM_REGS));
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: NUM_REGS = %d\n",
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: PC_REGNUM # %s\n",
1847 XSTRING (PC_REGNUM));
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: PC_REGNUM = %d\n",
1852 #ifdef POINTER_TO_ADDRESS
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: %s # %s\n",
1855 "POINTER_TO_ADDRESS(type, buf)",
1856 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1857 fprintf_unfiltered (file,
1858 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1859 (long) current_gdbarch->pointer_to_address
1860 /*POINTER_TO_ADDRESS ()*/);
1862 fprintf_unfiltered (file,
1863 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1864 gdbarch_print_float_info_p (current_gdbarch));
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: print_float_info = 0x%08lx\n",
1867 (long) current_gdbarch->print_float_info);
1868 fprintf_unfiltered (file,
1869 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1870 (long) current_gdbarch->print_registers_info);
1871 fprintf_unfiltered (file,
1872 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1873 gdbarch_print_vector_info_p (current_gdbarch));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1876 (long) current_gdbarch->print_vector_info);
1878 fprintf_unfiltered (file,
1879 "gdbarch_dump: PS_REGNUM # %s\n",
1880 XSTRING (PS_REGNUM));
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: PS_REGNUM = %d\n",
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1887 gdbarch_push_dummy_call_p (current_gdbarch));
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1890 (long) current_gdbarch->push_dummy_call);
1891 fprintf_unfiltered (file,
1892 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1893 gdbarch_push_dummy_code_p (current_gdbarch));
1894 fprintf_unfiltered (file,
1895 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1896 (long) current_gdbarch->push_dummy_code);
1897 #ifdef REGISTER_BYTES_OK_P
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: %s # %s\n",
1900 "REGISTER_BYTES_OK_P()",
1901 XSTRING (REGISTER_BYTES_OK_P ()));
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1904 REGISTER_BYTES_OK_P ());
1906 #ifdef REGISTER_BYTES_OK
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: %s # %s\n",
1909 "REGISTER_BYTES_OK(nr_bytes)",
1910 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1913 (long) current_gdbarch->register_bytes_ok
1914 /*REGISTER_BYTES_OK ()*/);
1916 #ifdef REGISTER_NAME
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: %s # %s\n",
1919 "REGISTER_NAME(regnr)",
1920 XSTRING (REGISTER_NAME (regnr)));
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1923 (long) current_gdbarch->register_name
1924 /*REGISTER_NAME ()*/);
1926 #ifdef REGISTER_SIM_REGNO
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: %s # %s\n",
1929 "REGISTER_SIM_REGNO(reg_nr)",
1930 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1931 fprintf_unfiltered (file,
1932 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1933 (long) current_gdbarch->register_sim_regno
1934 /*REGISTER_SIM_REGNO ()*/);
1936 #ifdef REGISTER_TO_VALUE
1937 fprintf_unfiltered (file,
1938 "gdbarch_dump: %s # %s\n",
1939 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1940 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1943 (long) current_gdbarch->register_to_value
1944 /*REGISTER_TO_VALUE ()*/);
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1948 gdbarch_register_type_p (current_gdbarch));
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: register_type = 0x%08lx\n",
1951 (long) current_gdbarch->register_type);
1952 fprintf_unfiltered (file,
1953 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1954 (long) current_gdbarch->remote_translate_xfer_address);
1955 #ifdef RETURN_VALUE_ON_STACK
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: %s # %s\n",
1958 "RETURN_VALUE_ON_STACK(type)",
1959 XSTRING (RETURN_VALUE_ON_STACK (type)));
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1962 (long) current_gdbarch->return_value_on_stack
1963 /*RETURN_VALUE_ON_STACK ()*/);
1965 #ifdef SDB_REG_TO_REGNUM
1966 fprintf_unfiltered (file,
1967 "gdbarch_dump: %s # %s\n",
1968 "SDB_REG_TO_REGNUM(sdb_regnr)",
1969 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1970 fprintf_unfiltered (file,
1971 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1972 (long) current_gdbarch->sdb_reg_to_regnum
1973 /*SDB_REG_TO_REGNUM ()*/);
1975 #ifdef SKIP_PROLOGUE
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: %s # %s\n",
1978 "SKIP_PROLOGUE(ip)",
1979 XSTRING (SKIP_PROLOGUE (ip)));
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1982 (long) current_gdbarch->skip_prologue
1983 /*SKIP_PROLOGUE ()*/);
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1987 (long) current_gdbarch->skip_solib_resolver);
1988 #ifdef SKIP_TRAMPOLINE_CODE
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: %s # %s\n",
1991 "SKIP_TRAMPOLINE_CODE(pc)",
1992 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1993 fprintf_unfiltered (file,
1994 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1995 (long) current_gdbarch->skip_trampoline_code
1996 /*SKIP_TRAMPOLINE_CODE ()*/);
1998 #ifdef SMASH_TEXT_ADDRESS
1999 fprintf_unfiltered (file,
2000 "gdbarch_dump: %s # %s\n",
2001 "SMASH_TEXT_ADDRESS(addr)",
2002 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2003 fprintf_unfiltered (file,
2004 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2005 (long) current_gdbarch->smash_text_address
2006 /*SMASH_TEXT_ADDRESS ()*/);
2008 #ifdef SOFTWARE_SINGLE_STEP_P
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: %s # %s\n",
2011 "SOFTWARE_SINGLE_STEP_P()",
2012 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2013 fprintf_unfiltered (file,
2014 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2015 SOFTWARE_SINGLE_STEP_P ());
2017 #ifdef SOFTWARE_SINGLE_STEP
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: %s # %s\n",
2020 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2021 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2022 fprintf_unfiltered (file,
2023 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2024 (long) current_gdbarch->software_single_step
2025 /*SOFTWARE_SINGLE_STEP ()*/);
2028 fprintf_unfiltered (file,
2029 "gdbarch_dump: SP_REGNUM # %s\n",
2030 XSTRING (SP_REGNUM));
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: SP_REGNUM = %d\n",
2035 #ifdef STAB_REG_TO_REGNUM
2036 fprintf_unfiltered (file,
2037 "gdbarch_dump: %s # %s\n",
2038 "STAB_REG_TO_REGNUM(stab_regnr)",
2039 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2042 (long) current_gdbarch->stab_reg_to_regnum
2043 /*STAB_REG_TO_REGNUM ()*/);
2045 #ifdef STORE_RETURN_VALUE
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: %s # %s\n",
2048 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2049 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2050 fprintf_unfiltered (file,
2051 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2052 (long) current_gdbarch->store_return_value
2053 /*STORE_RETURN_VALUE ()*/);
2055 #ifdef TARGET_ADDR_BIT
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2058 XSTRING (TARGET_ADDR_BIT));
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2063 #ifdef TARGET_ARCHITECTURE
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2066 XSTRING (TARGET_ARCHITECTURE));
2067 if (TARGET_ARCHITECTURE != NULL)
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2070 TARGET_ARCHITECTURE->printable_name);
2072 #ifdef TARGET_BFD_VMA_BIT
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2075 XSTRING (TARGET_BFD_VMA_BIT));
2076 fprintf_unfiltered (file,
2077 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2078 TARGET_BFD_VMA_BIT);
2080 #ifdef TARGET_BYTE_ORDER
2081 fprintf_unfiltered (file,
2082 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2083 XSTRING (TARGET_BYTE_ORDER));
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2086 (long) TARGET_BYTE_ORDER);
2088 #ifdef TARGET_CHAR_SIGNED
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2091 XSTRING (TARGET_CHAR_SIGNED));
2092 fprintf_unfiltered (file,
2093 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2094 TARGET_CHAR_SIGNED);
2096 #ifdef TARGET_DOUBLE_BIT
2097 fprintf_unfiltered (file,
2098 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2099 XSTRING (TARGET_DOUBLE_BIT));
2100 fprintf_unfiltered (file,
2101 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2104 #ifdef TARGET_DOUBLE_FORMAT
2105 fprintf_unfiltered (file,
2106 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2107 XSTRING (TARGET_DOUBLE_FORMAT));
2108 fprintf_unfiltered (file,
2109 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2110 (TARGET_DOUBLE_FORMAT)->name);
2112 #ifdef TARGET_FLOAT_BIT
2113 fprintf_unfiltered (file,
2114 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2115 XSTRING (TARGET_FLOAT_BIT));
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2120 #ifdef TARGET_FLOAT_FORMAT
2121 fprintf_unfiltered (file,
2122 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2123 XSTRING (TARGET_FLOAT_FORMAT));
2124 fprintf_unfiltered (file,
2125 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2126 (TARGET_FLOAT_FORMAT)->name);
2128 #ifdef TARGET_INT_BIT
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2131 XSTRING (TARGET_INT_BIT));
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2136 #ifdef TARGET_LONG_BIT
2137 fprintf_unfiltered (file,
2138 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2139 XSTRING (TARGET_LONG_BIT));
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2144 #ifdef TARGET_LONG_DOUBLE_BIT
2145 fprintf_unfiltered (file,
2146 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2147 XSTRING (TARGET_LONG_DOUBLE_BIT));
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2150 TARGET_LONG_DOUBLE_BIT);
2152 #ifdef TARGET_LONG_DOUBLE_FORMAT
2153 fprintf_unfiltered (file,
2154 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2155 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2156 fprintf_unfiltered (file,
2157 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2158 (TARGET_LONG_DOUBLE_FORMAT)->name);
2160 #ifdef TARGET_LONG_LONG_BIT
2161 fprintf_unfiltered (file,
2162 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2163 XSTRING (TARGET_LONG_LONG_BIT));
2164 fprintf_unfiltered (file,
2165 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2166 TARGET_LONG_LONG_BIT);
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: TARGET_OSABI # %s\n",
2171 XSTRING (TARGET_OSABI));
2172 fprintf_unfiltered (file,
2173 "gdbarch_dump: TARGET_OSABI = %ld\n",
2174 (long) TARGET_OSABI);
2176 #ifdef TARGET_PRINT_INSN
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: %s # %s\n",
2179 "TARGET_PRINT_INSN(vma, info)",
2180 XSTRING (TARGET_PRINT_INSN (vma, info)));
2181 fprintf_unfiltered (file,
2182 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2183 (long) current_gdbarch->print_insn
2184 /*TARGET_PRINT_INSN ()*/);
2186 #ifdef TARGET_PTR_BIT
2187 fprintf_unfiltered (file,
2188 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2189 XSTRING (TARGET_PTR_BIT));
2190 fprintf_unfiltered (file,
2191 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2194 #ifdef TARGET_READ_PC_P
2195 fprintf_unfiltered (file,
2196 "gdbarch_dump: %s # %s\n",
2197 "TARGET_READ_PC_P()",
2198 XSTRING (TARGET_READ_PC_P ()));
2199 fprintf_unfiltered (file,
2200 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2201 TARGET_READ_PC_P ());
2203 #ifdef TARGET_READ_PC
2204 fprintf_unfiltered (file,
2205 "gdbarch_dump: %s # %s\n",
2206 "TARGET_READ_PC(ptid)",
2207 XSTRING (TARGET_READ_PC (ptid)));
2208 fprintf_unfiltered (file,
2209 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2210 (long) current_gdbarch->read_pc
2211 /*TARGET_READ_PC ()*/);
2213 #ifdef TARGET_READ_SP_P
2214 fprintf_unfiltered (file,
2215 "gdbarch_dump: %s # %s\n",
2216 "TARGET_READ_SP_P()",
2217 XSTRING (TARGET_READ_SP_P ()));
2218 fprintf_unfiltered (file,
2219 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2220 TARGET_READ_SP_P ());
2222 #ifdef TARGET_READ_SP
2223 fprintf_unfiltered (file,
2224 "gdbarch_dump: %s # %s\n",
2226 XSTRING (TARGET_READ_SP ()));
2227 fprintf_unfiltered (file,
2228 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2229 (long) current_gdbarch->read_sp
2230 /*TARGET_READ_SP ()*/);
2232 #ifdef TARGET_SHORT_BIT
2233 fprintf_unfiltered (file,
2234 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2235 XSTRING (TARGET_SHORT_BIT));
2236 fprintf_unfiltered (file,
2237 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2240 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2241 fprintf_unfiltered (file,
2242 "gdbarch_dump: %s # %s\n",
2243 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2244 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2245 fprintf_unfiltered (file,
2246 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2247 (long) current_gdbarch->virtual_frame_pointer
2248 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2250 #ifdef TARGET_WRITE_PC
2251 fprintf_unfiltered (file,
2252 "gdbarch_dump: %s # %s\n",
2253 "TARGET_WRITE_PC(val, ptid)",
2254 XSTRING (TARGET_WRITE_PC (val, ptid)));
2255 fprintf_unfiltered (file,
2256 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2257 (long) current_gdbarch->write_pc
2258 /*TARGET_WRITE_PC ()*/);
2260 fprintf_unfiltered (file,
2261 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2262 gdbarch_unwind_dummy_id_p (current_gdbarch));
2263 fprintf_unfiltered (file,
2264 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2265 (long) current_gdbarch->unwind_dummy_id);
2266 fprintf_unfiltered (file,
2267 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2268 gdbarch_unwind_pc_p (current_gdbarch));
2269 fprintf_unfiltered (file,
2270 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2271 (long) current_gdbarch->unwind_pc);
2272 fprintf_unfiltered (file,
2273 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2274 gdbarch_unwind_sp_p (current_gdbarch));
2275 fprintf_unfiltered (file,
2276 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2277 (long) current_gdbarch->unwind_sp);
2278 #ifdef USE_STRUCT_CONVENTION
2279 fprintf_unfiltered (file,
2280 "gdbarch_dump: %s # %s\n",
2281 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2282 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2285 (long) current_gdbarch->use_struct_convention
2286 /*USE_STRUCT_CONVENTION ()*/);
2288 #ifdef VALUE_TO_REGISTER
2289 fprintf_unfiltered (file,
2290 "gdbarch_dump: %s # %s\n",
2291 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2292 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2293 fprintf_unfiltered (file,
2294 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2295 (long) current_gdbarch->value_to_register
2296 /*VALUE_TO_REGISTER ()*/);
2298 if (current_gdbarch->dump_tdep != NULL)
2299 current_gdbarch->dump_tdep (current_gdbarch, file);
2302 struct gdbarch_tdep *
2303 gdbarch_tdep (struct gdbarch *gdbarch)
2305 if (gdbarch_debug >= 2)
2306 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2307 return gdbarch->tdep;
2311 const struct bfd_arch_info *
2312 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2314 gdb_assert (gdbarch != NULL);
2315 if (gdbarch_debug >= 2)
2316 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2317 return gdbarch->bfd_arch_info;
2321 gdbarch_byte_order (struct gdbarch *gdbarch)
2323 gdb_assert (gdbarch != NULL);
2324 if (gdbarch_debug >= 2)
2325 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2326 return gdbarch->byte_order;
2330 gdbarch_osabi (struct gdbarch *gdbarch)
2332 gdb_assert (gdbarch != NULL);
2333 if (gdbarch_debug >= 2)
2334 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2335 return gdbarch->osabi;
2339 gdbarch_short_bit (struct gdbarch *gdbarch)
2341 gdb_assert (gdbarch != NULL);
2342 /* Skip verify of short_bit, invalid_p == 0 */
2343 if (gdbarch_debug >= 2)
2344 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2345 return gdbarch->short_bit;
2349 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2352 gdbarch->short_bit = short_bit;
2356 gdbarch_int_bit (struct gdbarch *gdbarch)
2358 gdb_assert (gdbarch != NULL);
2359 /* Skip verify of int_bit, invalid_p == 0 */
2360 if (gdbarch_debug >= 2)
2361 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2362 return gdbarch->int_bit;
2366 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2369 gdbarch->int_bit = int_bit;
2373 gdbarch_long_bit (struct gdbarch *gdbarch)
2375 gdb_assert (gdbarch != NULL);
2376 /* Skip verify of long_bit, invalid_p == 0 */
2377 if (gdbarch_debug >= 2)
2378 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2379 return gdbarch->long_bit;
2383 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2386 gdbarch->long_bit = long_bit;
2390 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2392 gdb_assert (gdbarch != NULL);
2393 /* Skip verify of long_long_bit, invalid_p == 0 */
2394 if (gdbarch_debug >= 2)
2395 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2396 return gdbarch->long_long_bit;
2400 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2403 gdbarch->long_long_bit = long_long_bit;
2407 gdbarch_float_bit (struct gdbarch *gdbarch)
2409 gdb_assert (gdbarch != NULL);
2410 /* Skip verify of float_bit, invalid_p == 0 */
2411 if (gdbarch_debug >= 2)
2412 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2413 return gdbarch->float_bit;
2417 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2420 gdbarch->float_bit = float_bit;
2424 gdbarch_double_bit (struct gdbarch *gdbarch)
2426 gdb_assert (gdbarch != NULL);
2427 /* Skip verify of double_bit, invalid_p == 0 */
2428 if (gdbarch_debug >= 2)
2429 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2430 return gdbarch->double_bit;
2434 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2437 gdbarch->double_bit = double_bit;
2441 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2443 gdb_assert (gdbarch != NULL);
2444 /* Skip verify of long_double_bit, invalid_p == 0 */
2445 if (gdbarch_debug >= 2)
2446 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2447 return gdbarch->long_double_bit;
2451 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2452 int long_double_bit)
2454 gdbarch->long_double_bit = long_double_bit;
2458 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2460 gdb_assert (gdbarch != NULL);
2461 /* Skip verify of ptr_bit, invalid_p == 0 */
2462 if (gdbarch_debug >= 2)
2463 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2464 return gdbarch->ptr_bit;
2468 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2471 gdbarch->ptr_bit = ptr_bit;
2475 gdbarch_addr_bit (struct gdbarch *gdbarch)
2477 gdb_assert (gdbarch != NULL);
2478 /* Check variable changed from pre-default. */
2479 gdb_assert (gdbarch->addr_bit != 0);
2480 if (gdbarch_debug >= 2)
2481 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2482 return gdbarch->addr_bit;
2486 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2489 gdbarch->addr_bit = addr_bit;
2493 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2495 gdb_assert (gdbarch != NULL);
2496 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2497 if (gdbarch_debug >= 2)
2498 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2499 return gdbarch->bfd_vma_bit;
2503 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2506 gdbarch->bfd_vma_bit = bfd_vma_bit;
2510 gdbarch_char_signed (struct gdbarch *gdbarch)
2512 gdb_assert (gdbarch != NULL);
2513 /* Check variable changed from pre-default. */
2514 gdb_assert (gdbarch->char_signed != -1);
2515 if (gdbarch_debug >= 2)
2516 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2517 return gdbarch->char_signed;
2521 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2524 gdbarch->char_signed = char_signed;
2528 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2530 gdb_assert (gdbarch != NULL);
2531 return gdbarch->read_pc != NULL;
2535 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2537 gdb_assert (gdbarch != NULL);
2538 gdb_assert (gdbarch->read_pc != NULL);
2539 if (gdbarch_debug >= 2)
2540 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2541 return gdbarch->read_pc (ptid);
2545 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2546 gdbarch_read_pc_ftype read_pc)
2548 gdbarch->read_pc = read_pc;
2552 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2554 gdb_assert (gdbarch != NULL);
2555 gdb_assert (gdbarch->write_pc != NULL);
2556 if (gdbarch_debug >= 2)
2557 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2558 gdbarch->write_pc (val, ptid);
2562 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2563 gdbarch_write_pc_ftype write_pc)
2565 gdbarch->write_pc = write_pc;
2569 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2571 gdb_assert (gdbarch != NULL);
2572 return gdbarch->read_sp != NULL;
2576 gdbarch_read_sp (struct gdbarch *gdbarch)
2578 gdb_assert (gdbarch != NULL);
2579 gdb_assert (gdbarch->read_sp != NULL);
2580 if (gdbarch_debug >= 2)
2581 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2582 return gdbarch->read_sp ();
2586 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2587 gdbarch_read_sp_ftype read_sp)
2589 gdbarch->read_sp = read_sp;
2593 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2595 gdb_assert (gdbarch != NULL);
2596 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2597 if (gdbarch_debug >= 2)
2598 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2599 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2603 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2604 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2606 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2610 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2612 gdb_assert (gdbarch != NULL);
2613 return gdbarch->pseudo_register_read != NULL;
2617 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2619 gdb_assert (gdbarch != NULL);
2620 gdb_assert (gdbarch->pseudo_register_read != NULL);
2621 if (gdbarch_debug >= 2)
2622 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2623 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2627 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2628 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2630 gdbarch->pseudo_register_read = pseudo_register_read;
2634 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2636 gdb_assert (gdbarch != NULL);
2637 return gdbarch->pseudo_register_write != NULL;
2641 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2643 gdb_assert (gdbarch != NULL);
2644 gdb_assert (gdbarch->pseudo_register_write != NULL);
2645 if (gdbarch_debug >= 2)
2646 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2647 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2651 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2652 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2654 gdbarch->pseudo_register_write = pseudo_register_write;
2658 gdbarch_num_regs (struct gdbarch *gdbarch)
2660 gdb_assert (gdbarch != NULL);
2661 /* Check variable changed from pre-default. */
2662 gdb_assert (gdbarch->num_regs != -1);
2663 if (gdbarch_debug >= 2)
2664 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2665 return gdbarch->num_regs;
2669 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2672 gdbarch->num_regs = num_regs;
2676 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2678 gdb_assert (gdbarch != NULL);
2679 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2680 if (gdbarch_debug >= 2)
2681 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2682 return gdbarch->num_pseudo_regs;
2686 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2687 int num_pseudo_regs)
2689 gdbarch->num_pseudo_regs = num_pseudo_regs;
2693 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2695 gdb_assert (gdbarch != NULL);
2696 /* Skip verify of sp_regnum, invalid_p == 0 */
2697 if (gdbarch_debug >= 2)
2698 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2699 return gdbarch->sp_regnum;
2703 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2706 gdbarch->sp_regnum = sp_regnum;
2710 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2712 gdb_assert (gdbarch != NULL);
2713 /* Skip verify of pc_regnum, invalid_p == 0 */
2714 if (gdbarch_debug >= 2)
2715 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2716 return gdbarch->pc_regnum;
2720 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2723 gdbarch->pc_regnum = pc_regnum;
2727 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2729 gdb_assert (gdbarch != NULL);
2730 /* Skip verify of ps_regnum, invalid_p == 0 */
2731 if (gdbarch_debug >= 2)
2732 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2733 return gdbarch->ps_regnum;
2737 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2740 gdbarch->ps_regnum = ps_regnum;
2744 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2746 gdb_assert (gdbarch != NULL);
2747 /* Skip verify of fp0_regnum, invalid_p == 0 */
2748 if (gdbarch_debug >= 2)
2749 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2750 return gdbarch->fp0_regnum;
2754 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2757 gdbarch->fp0_regnum = fp0_regnum;
2761 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2763 gdb_assert (gdbarch != NULL);
2764 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2765 if (gdbarch_debug >= 2)
2766 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2767 return gdbarch->stab_reg_to_regnum (stab_regnr);
2771 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2772 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2774 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2778 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2780 gdb_assert (gdbarch != NULL);
2781 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2782 if (gdbarch_debug >= 2)
2783 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2784 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2788 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2789 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2791 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2795 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2797 gdb_assert (gdbarch != NULL);
2798 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2799 if (gdbarch_debug >= 2)
2800 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2801 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2805 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2806 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2808 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2812 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2814 gdb_assert (gdbarch != NULL);
2815 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2816 if (gdbarch_debug >= 2)
2817 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2818 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2822 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2823 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2825 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2829 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2831 gdb_assert (gdbarch != NULL);
2832 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2833 if (gdbarch_debug >= 2)
2834 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2835 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2839 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2840 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2842 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2846 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2848 gdb_assert (gdbarch != NULL);
2849 gdb_assert (gdbarch->register_name != NULL);
2850 if (gdbarch_debug >= 2)
2851 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2852 return gdbarch->register_name (regnr);
2856 set_gdbarch_register_name (struct gdbarch *gdbarch,
2857 gdbarch_register_name_ftype register_name)
2859 gdbarch->register_name = register_name;
2863 gdbarch_register_type_p (struct gdbarch *gdbarch)
2865 gdb_assert (gdbarch != NULL);
2866 return gdbarch->register_type != NULL;
2870 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2872 gdb_assert (gdbarch != NULL);
2873 gdb_assert (gdbarch->register_type != NULL);
2874 if (gdbarch_debug >= 2)
2875 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2876 return gdbarch->register_type (gdbarch, reg_nr);
2880 set_gdbarch_register_type (struct gdbarch *gdbarch,
2881 gdbarch_register_type_ftype register_type)
2883 gdbarch->register_type = register_type;
2887 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2889 gdb_assert (gdbarch != NULL);
2890 return gdbarch->deprecated_register_virtual_type != NULL;
2894 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2896 gdb_assert (gdbarch != NULL);
2897 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2898 if (gdbarch_debug >= 2)
2899 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2900 return gdbarch->deprecated_register_virtual_type (reg_nr);
2904 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2905 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2907 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2911 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2913 gdb_assert (gdbarch != NULL);
2914 if (gdbarch_debug >= 2)
2915 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2916 return gdbarch->deprecated_register_bytes;
2920 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2921 int deprecated_register_bytes)
2923 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2927 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2929 gdb_assert (gdbarch != NULL);
2930 return gdbarch->deprecated_register_byte != generic_register_byte;
2934 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2936 gdb_assert (gdbarch != NULL);
2937 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2938 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2939 if (gdbarch_debug >= 2)
2940 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2941 return gdbarch->deprecated_register_byte (reg_nr);
2945 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2946 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2948 gdbarch->deprecated_register_byte = deprecated_register_byte;
2952 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2954 gdb_assert (gdbarch != NULL);
2955 return gdbarch->deprecated_register_raw_size != generic_register_size;
2959 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2961 gdb_assert (gdbarch != NULL);
2962 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2963 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2964 if (gdbarch_debug >= 2)
2965 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2966 return gdbarch->deprecated_register_raw_size (reg_nr);
2970 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2971 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2973 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2977 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2979 gdb_assert (gdbarch != NULL);
2980 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2984 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2986 gdb_assert (gdbarch != NULL);
2987 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2988 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2989 if (gdbarch_debug >= 2)
2990 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2991 return gdbarch->deprecated_register_virtual_size (reg_nr);
2995 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2996 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2998 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
3002 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3004 gdb_assert (gdbarch != NULL);
3005 return gdbarch->deprecated_max_register_raw_size != 0;
3009 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3011 gdb_assert (gdbarch != NULL);
3012 if (gdbarch_debug >= 2)
3013 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3014 return gdbarch->deprecated_max_register_raw_size;
3018 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3019 int deprecated_max_register_raw_size)
3021 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3025 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3027 gdb_assert (gdbarch != NULL);
3028 return gdbarch->deprecated_max_register_virtual_size != 0;
3032 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3034 gdb_assert (gdbarch != NULL);
3035 if (gdbarch_debug >= 2)
3036 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3037 return gdbarch->deprecated_max_register_virtual_size;
3041 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3042 int deprecated_max_register_virtual_size)
3044 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3048 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
3050 gdb_assert (gdbarch != NULL);
3051 return gdbarch->unwind_dummy_id != NULL;
3055 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
3057 gdb_assert (gdbarch != NULL);
3058 gdb_assert (gdbarch->unwind_dummy_id != NULL);
3059 if (gdbarch_debug >= 2)
3060 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
3061 return gdbarch->unwind_dummy_id (gdbarch, info);
3065 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
3066 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
3068 gdbarch->unwind_dummy_id = unwind_dummy_id;
3072 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3074 gdb_assert (gdbarch != NULL);
3075 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
3079 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3081 gdb_assert (gdbarch != NULL);
3082 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
3083 if (gdbarch_debug >= 2)
3084 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3085 gdbarch->deprecated_save_dummy_frame_tos (sp);
3089 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
3090 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
3092 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
3096 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3098 gdb_assert (gdbarch != NULL);
3099 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3102 return gdbarch->deprecated_fp_regnum;
3106 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3107 int deprecated_fp_regnum)
3109 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3113 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
3115 gdb_assert (gdbarch != NULL);
3116 return gdbarch->deprecated_target_read_fp != NULL;
3120 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3122 gdb_assert (gdbarch != NULL);
3123 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
3124 if (gdbarch_debug >= 2)
3125 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3126 return gdbarch->deprecated_target_read_fp ();
3130 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3131 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3133 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3137 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3139 gdb_assert (gdbarch != NULL);
3140 return gdbarch->push_dummy_call != NULL;
3144 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)
3146 gdb_assert (gdbarch != NULL);
3147 gdb_assert (gdbarch->push_dummy_call != NULL);
3148 if (gdbarch_debug >= 2)
3149 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3150 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3154 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3155 gdbarch_push_dummy_call_ftype push_dummy_call)
3157 gdbarch->push_dummy_call = push_dummy_call;
3161 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3163 gdb_assert (gdbarch != NULL);
3164 return gdbarch->deprecated_push_arguments != NULL;
3168 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3170 gdb_assert (gdbarch != NULL);
3171 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3172 if (gdbarch_debug >= 2)
3173 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3174 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3178 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3179 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3181 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3185 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3187 gdb_assert (gdbarch != NULL);
3188 return gdbarch->deprecated_push_return_address != NULL;
3192 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3194 gdb_assert (gdbarch != NULL);
3195 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3196 if (gdbarch_debug >= 2)
3197 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3198 return gdbarch->deprecated_push_return_address (pc, sp);
3202 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3203 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3205 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3209 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3211 gdb_assert (gdbarch != NULL);
3212 return gdbarch->deprecated_dummy_write_sp != NULL;
3216 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3218 gdb_assert (gdbarch != NULL);
3219 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3220 if (gdbarch_debug >= 2)
3221 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3222 gdbarch->deprecated_dummy_write_sp (val);
3226 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3227 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3229 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3233 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3235 gdb_assert (gdbarch != NULL);
3236 if (gdbarch_debug >= 2)
3237 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3238 return gdbarch->deprecated_register_size;
3242 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3243 int deprecated_register_size)
3245 gdbarch->deprecated_register_size = deprecated_register_size;
3249 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3251 gdb_assert (gdbarch != NULL);
3252 /* Skip verify of call_dummy_location, invalid_p == 0 */
3253 if (gdbarch_debug >= 2)
3254 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3255 return gdbarch->call_dummy_location;
3259 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3260 int call_dummy_location)
3262 gdbarch->call_dummy_location = call_dummy_location;
3266 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3268 gdb_assert (gdbarch != NULL);
3269 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3270 if (gdbarch_debug >= 2)
3271 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3272 return gdbarch->deprecated_call_dummy_words;
3276 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3277 LONGEST * deprecated_call_dummy_words)
3279 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3283 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3285 gdb_assert (gdbarch != NULL);
3286 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3287 if (gdbarch_debug >= 2)
3288 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3289 return gdbarch->deprecated_sizeof_call_dummy_words;
3293 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3294 int deprecated_sizeof_call_dummy_words)
3296 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3300 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3302 gdb_assert (gdbarch != NULL);
3303 return gdbarch->deprecated_fix_call_dummy != NULL;
3307 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)
3309 gdb_assert (gdbarch != NULL);
3310 gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
3311 if (gdbarch_debug >= 2)
3312 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3313 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3317 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3318 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3320 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3324 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3326 gdb_assert (gdbarch != NULL);
3327 return gdbarch->push_dummy_code != NULL;
3331 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)
3333 gdb_assert (gdbarch != NULL);
3334 gdb_assert (gdbarch->push_dummy_code != NULL);
3335 if (gdbarch_debug >= 2)
3336 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3337 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3341 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3342 gdbarch_push_dummy_code_ftype push_dummy_code)
3344 gdbarch->push_dummy_code = push_dummy_code;
3348 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
3350 gdb_assert (gdbarch != NULL);
3351 return gdbarch->deprecated_push_dummy_frame != NULL;
3355 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
3357 gdb_assert (gdbarch != NULL);
3358 gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
3359 if (gdbarch_debug >= 2)
3360 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
3361 gdbarch->deprecated_push_dummy_frame ();
3365 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
3366 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
3368 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
3372 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3374 gdb_assert (gdbarch != NULL);
3375 return gdbarch->deprecated_do_registers_info != NULL;
3379 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3381 gdb_assert (gdbarch != NULL);
3382 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3383 if (gdbarch_debug >= 2)
3384 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3385 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3389 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3390 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3392 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3396 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3398 gdb_assert (gdbarch != NULL);
3399 gdb_assert (gdbarch->print_registers_info != NULL);
3400 if (gdbarch_debug >= 2)
3401 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3402 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3406 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3407 gdbarch_print_registers_info_ftype print_registers_info)
3409 gdbarch->print_registers_info = print_registers_info;
3413 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3415 gdb_assert (gdbarch != NULL);
3416 return gdbarch->print_float_info != NULL;
3420 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3422 gdb_assert (gdbarch != NULL);
3423 gdb_assert (gdbarch->print_float_info != NULL);
3424 if (gdbarch_debug >= 2)
3425 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3426 gdbarch->print_float_info (gdbarch, file, frame, args);
3430 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3431 gdbarch_print_float_info_ftype print_float_info)
3433 gdbarch->print_float_info = print_float_info;
3437 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3439 gdb_assert (gdbarch != NULL);
3440 return gdbarch->print_vector_info != NULL;
3444 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3446 gdb_assert (gdbarch != NULL);
3447 gdb_assert (gdbarch->print_vector_info != NULL);
3448 if (gdbarch_debug >= 2)
3449 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3450 gdbarch->print_vector_info (gdbarch, file, frame, args);
3454 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3455 gdbarch_print_vector_info_ftype print_vector_info)
3457 gdbarch->print_vector_info = print_vector_info;
3461 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3463 gdb_assert (gdbarch != NULL);
3464 gdb_assert (gdbarch->register_sim_regno != NULL);
3465 if (gdbarch_debug >= 2)
3466 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3467 return gdbarch->register_sim_regno (reg_nr);
3471 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3472 gdbarch_register_sim_regno_ftype register_sim_regno)
3474 gdbarch->register_sim_regno = register_sim_regno;
3478 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3480 gdb_assert (gdbarch != NULL);
3481 return gdbarch->register_bytes_ok != NULL;
3485 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3487 gdb_assert (gdbarch != NULL);
3488 gdb_assert (gdbarch->register_bytes_ok != NULL);
3489 if (gdbarch_debug >= 2)
3490 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3491 return gdbarch->register_bytes_ok (nr_bytes);
3495 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3496 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3498 gdbarch->register_bytes_ok = register_bytes_ok;
3502 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3504 gdb_assert (gdbarch != NULL);
3505 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3506 if (gdbarch_debug >= 2)
3507 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3508 return gdbarch->cannot_fetch_register (regnum);
3512 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3513 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3515 gdbarch->cannot_fetch_register = cannot_fetch_register;
3519 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3521 gdb_assert (gdbarch != NULL);
3522 gdb_assert (gdbarch->cannot_store_register != NULL);
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3525 return gdbarch->cannot_store_register (regnum);
3529 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3530 gdbarch_cannot_store_register_ftype cannot_store_register)
3532 gdbarch->cannot_store_register = cannot_store_register;
3536 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3538 gdb_assert (gdbarch != NULL);
3539 return gdbarch->get_longjmp_target != NULL;
3543 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3545 gdb_assert (gdbarch != NULL);
3546 gdb_assert (gdbarch->get_longjmp_target != NULL);
3547 if (gdbarch_debug >= 2)
3548 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3549 return gdbarch->get_longjmp_target (pc);
3553 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3554 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3556 gdbarch->get_longjmp_target = get_longjmp_target;
3560 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3562 gdb_assert (gdbarch != NULL);
3563 return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
3567 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3569 gdb_assert (gdbarch != NULL);
3570 gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
3571 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3572 if (gdbarch_debug >= 2)
3573 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3574 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3578 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3579 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3581 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3585 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3587 gdb_assert (gdbarch != NULL);
3588 return gdbarch->deprecated_init_frame_pc != NULL;
3592 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3594 gdb_assert (gdbarch != NULL);
3595 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3596 if (gdbarch_debug >= 2)
3597 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3598 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3602 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3603 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3605 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3609 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3611 gdb_assert (gdbarch != NULL);
3612 if (gdbarch_debug >= 2)
3613 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3614 return gdbarch->believe_pcc_promotion;
3618 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3619 int believe_pcc_promotion)
3621 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3625 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3627 gdb_assert (gdbarch != NULL);
3628 return gdbarch->deprecated_get_saved_register != NULL;
3632 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)
3634 gdb_assert (gdbarch != NULL);
3635 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3636 if (gdbarch_debug >= 2)
3637 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3638 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3642 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3643 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3645 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3649 gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch)
3651 gdb_assert (gdbarch != NULL);
3652 return gdbarch->deprecated_register_convertible != NULL;
3656 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
3658 gdb_assert (gdbarch != NULL);
3659 gdb_assert (gdbarch->deprecated_register_convertible != NULL);
3660 if (gdbarch_debug >= 2)
3661 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
3662 return gdbarch->deprecated_register_convertible (nr);
3666 set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
3667 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
3669 gdbarch->deprecated_register_convertible = deprecated_register_convertible;
3673 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3675 gdb_assert (gdbarch != NULL);
3676 gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
3677 if (gdbarch_debug >= 2)
3678 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
3679 gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
3683 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
3684 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
3686 gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
3690 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
3692 gdb_assert (gdbarch != NULL);
3693 gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
3694 if (gdbarch_debug >= 2)
3695 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
3696 gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
3700 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
3701 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
3703 gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
3707 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3709 gdb_assert (gdbarch != NULL);
3710 gdb_assert (gdbarch->convert_register_p != NULL);
3711 if (gdbarch_debug >= 2)
3712 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3713 return gdbarch->convert_register_p (regnum, type);
3717 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3718 gdbarch_convert_register_p_ftype convert_register_p)
3720 gdbarch->convert_register_p = convert_register_p;
3724 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3726 gdb_assert (gdbarch != NULL);
3727 gdb_assert (gdbarch->register_to_value != NULL);
3728 if (gdbarch_debug >= 2)
3729 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3730 gdbarch->register_to_value (frame, regnum, type, buf);
3734 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3735 gdbarch_register_to_value_ftype register_to_value)
3737 gdbarch->register_to_value = register_to_value;
3741 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3743 gdb_assert (gdbarch != NULL);
3744 gdb_assert (gdbarch->value_to_register != NULL);
3745 if (gdbarch_debug >= 2)
3746 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3747 gdbarch->value_to_register (frame, regnum, type, buf);
3751 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3752 gdbarch_value_to_register_ftype value_to_register)
3754 gdbarch->value_to_register = value_to_register;
3758 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3760 gdb_assert (gdbarch != NULL);
3761 gdb_assert (gdbarch->pointer_to_address != NULL);
3762 if (gdbarch_debug >= 2)
3763 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3764 return gdbarch->pointer_to_address (type, buf);
3768 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3769 gdbarch_pointer_to_address_ftype pointer_to_address)
3771 gdbarch->pointer_to_address = pointer_to_address;
3775 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3777 gdb_assert (gdbarch != NULL);
3778 gdb_assert (gdbarch->address_to_pointer != NULL);
3779 if (gdbarch_debug >= 2)
3780 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3781 gdbarch->address_to_pointer (type, buf, addr);
3785 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3786 gdbarch_address_to_pointer_ftype address_to_pointer)
3788 gdbarch->address_to_pointer = address_to_pointer;
3792 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3794 gdb_assert (gdbarch != NULL);
3795 return gdbarch->integer_to_address != NULL;
3799 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3801 gdb_assert (gdbarch != NULL);
3802 gdb_assert (gdbarch->integer_to_address != NULL);
3803 if (gdbarch_debug >= 2)
3804 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3805 return gdbarch->integer_to_address (type, buf);
3809 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3810 gdbarch_integer_to_address_ftype integer_to_address)
3812 gdbarch->integer_to_address = integer_to_address;
3816 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3818 gdb_assert (gdbarch != NULL);
3819 return gdbarch->deprecated_pop_frame != NULL;
3823 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3825 gdb_assert (gdbarch != NULL);
3826 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3827 if (gdbarch_debug >= 2)
3828 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3829 gdbarch->deprecated_pop_frame ();
3833 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3834 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3836 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3840 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3842 gdb_assert (gdbarch != NULL);
3843 return gdbarch->deprecated_store_struct_return != NULL;
3847 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3849 gdb_assert (gdbarch != NULL);
3850 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3851 if (gdbarch_debug >= 2)
3852 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3853 gdbarch->deprecated_store_struct_return (addr, sp);
3857 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3858 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3860 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3864 gdbarch_return_value_p (struct gdbarch *gdbarch)
3866 gdb_assert (gdbarch != NULL);
3867 return gdbarch->return_value != NULL;
3870 enum return_value_convention
3871 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3873 gdb_assert (gdbarch != NULL);
3874 gdb_assert (gdbarch->return_value != NULL);
3875 if (gdbarch_debug >= 2)
3876 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3877 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3881 set_gdbarch_return_value (struct gdbarch *gdbarch,
3882 gdbarch_return_value_ftype return_value)
3884 gdbarch->return_value = return_value;
3888 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3890 gdb_assert (gdbarch != NULL);
3891 gdb_assert (gdbarch->return_value_on_stack != NULL);
3892 if (gdbarch_debug >= 2)
3893 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3894 return gdbarch->return_value_on_stack (type);
3898 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3899 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3901 gdbarch->return_value_on_stack = return_value_on_stack;
3905 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3907 gdb_assert (gdbarch != NULL);
3908 gdb_assert (gdbarch->extract_return_value != NULL);
3909 if (gdbarch_debug >= 2)
3910 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3911 gdbarch->extract_return_value (type, regcache, valbuf);
3915 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3916 gdbarch_extract_return_value_ftype extract_return_value)
3918 gdbarch->extract_return_value = extract_return_value;
3922 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3924 gdb_assert (gdbarch != NULL);
3925 gdb_assert (gdbarch->store_return_value != NULL);
3926 if (gdbarch_debug >= 2)
3927 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3928 gdbarch->store_return_value (type, regcache, valbuf);
3932 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3933 gdbarch_store_return_value_ftype store_return_value)
3935 gdbarch->store_return_value = store_return_value;
3939 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3941 gdb_assert (gdbarch != NULL);
3942 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3943 if (gdbarch_debug >= 2)
3944 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3945 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3949 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3950 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3952 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3956 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3958 gdb_assert (gdbarch != NULL);
3959 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3960 if (gdbarch_debug >= 2)
3961 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3962 gdbarch->deprecated_store_return_value (type, valbuf);
3966 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3967 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3969 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3973 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3975 gdb_assert (gdbarch != NULL);
3976 gdb_assert (gdbarch->use_struct_convention != NULL);
3977 if (gdbarch_debug >= 2)
3978 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3979 return gdbarch->use_struct_convention (gcc_p, value_type);
3983 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3984 gdbarch_use_struct_convention_ftype use_struct_convention)
3986 gdbarch->use_struct_convention = use_struct_convention;
3990 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3992 gdb_assert (gdbarch != NULL);
3993 return gdbarch->deprecated_extract_struct_value_address != NULL;
3997 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3999 gdb_assert (gdbarch != NULL);
4000 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
4001 if (gdbarch_debug >= 2)
4002 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4003 return gdbarch->deprecated_extract_struct_value_address (regcache);
4007 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4008 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4010 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4014 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4016 gdb_assert (gdbarch != NULL);
4017 return gdbarch->deprecated_frame_init_saved_regs != NULL;
4021 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4023 gdb_assert (gdbarch != NULL);
4024 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
4025 if (gdbarch_debug >= 2)
4026 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4027 gdbarch->deprecated_frame_init_saved_regs (frame);
4031 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4032 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4034 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4038 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4040 gdb_assert (gdbarch != NULL);
4041 return gdbarch->deprecated_init_extra_frame_info != NULL;
4045 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4047 gdb_assert (gdbarch != NULL);
4048 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
4049 if (gdbarch_debug >= 2)
4050 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4051 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4055 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4056 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4058 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4062 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4064 gdb_assert (gdbarch != NULL);
4065 gdb_assert (gdbarch->skip_prologue != NULL);
4066 if (gdbarch_debug >= 2)
4067 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4068 return gdbarch->skip_prologue (ip);
4072 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4073 gdbarch_skip_prologue_ftype skip_prologue)
4075 gdbarch->skip_prologue = skip_prologue;
4079 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4081 gdb_assert (gdbarch != NULL);
4082 gdb_assert (gdbarch->inner_than != NULL);
4083 if (gdbarch_debug >= 2)
4084 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4085 return gdbarch->inner_than (lhs, rhs);
4089 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4090 gdbarch_inner_than_ftype inner_than)
4092 gdbarch->inner_than = inner_than;
4095 const unsigned char *
4096 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4098 gdb_assert (gdbarch != NULL);
4099 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
4100 if (gdbarch_debug >= 2)
4101 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4102 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4106 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4107 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4109 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4113 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
4115 gdb_assert (gdbarch != NULL);
4116 return gdbarch->adjust_breakpoint_address != NULL;
4120 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
4122 gdb_assert (gdbarch != NULL);
4123 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
4124 if (gdbarch_debug >= 2)
4125 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
4126 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
4130 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
4131 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
4133 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
4137 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4139 gdb_assert (gdbarch != NULL);
4140 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
4141 if (gdbarch_debug >= 2)
4142 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4143 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4147 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4148 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4150 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4154 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4156 gdb_assert (gdbarch != NULL);
4157 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
4158 if (gdbarch_debug >= 2)
4159 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4160 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4164 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4165 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4167 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4171 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4173 gdb_assert (gdbarch != NULL);
4174 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4175 if (gdbarch_debug >= 2)
4176 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4177 return gdbarch->decr_pc_after_break;
4181 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4182 CORE_ADDR decr_pc_after_break)
4184 gdbarch->decr_pc_after_break = decr_pc_after_break;
4188 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4190 gdb_assert (gdbarch != NULL);
4191 /* Skip verify of function_start_offset, invalid_p == 0 */
4192 if (gdbarch_debug >= 2)
4193 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4194 return gdbarch->function_start_offset;
4198 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4199 CORE_ADDR function_start_offset)
4201 gdbarch->function_start_offset = function_start_offset;
4205 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)
4207 gdb_assert (gdbarch != NULL);
4208 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
4209 if (gdbarch_debug >= 2)
4210 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4211 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4215 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4216 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4218 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4222 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4224 gdb_assert (gdbarch != NULL);
4225 /* Skip verify of frame_args_skip, invalid_p == 0 */
4226 if (gdbarch_debug >= 2)
4227 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4228 return gdbarch->frame_args_skip;
4232 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4233 CORE_ADDR frame_args_skip)
4235 gdbarch->frame_args_skip = frame_args_skip;
4239 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
4241 gdb_assert (gdbarch != NULL);
4242 return gdbarch->deprecated_frameless_function_invocation != NULL;
4246 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4248 gdb_assert (gdbarch != NULL);
4249 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
4250 if (gdbarch_debug >= 2)
4251 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
4252 return gdbarch->deprecated_frameless_function_invocation (fi);
4256 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
4257 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
4259 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
4263 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4265 gdb_assert (gdbarch != NULL);
4266 return gdbarch->deprecated_frame_chain != NULL;
4270 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4272 gdb_assert (gdbarch != NULL);
4273 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
4274 if (gdbarch_debug >= 2)
4275 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4276 return gdbarch->deprecated_frame_chain (frame);
4280 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4281 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4283 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4287 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4289 gdb_assert (gdbarch != NULL);
4290 return gdbarch->deprecated_frame_chain_valid != NULL;
4294 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4296 gdb_assert (gdbarch != NULL);
4297 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
4298 if (gdbarch_debug >= 2)
4299 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4300 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4304 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4305 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4307 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4311 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4313 gdb_assert (gdbarch != NULL);
4314 return gdbarch->deprecated_frame_saved_pc != NULL;
4318 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4320 gdb_assert (gdbarch != NULL);
4321 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4322 if (gdbarch_debug >= 2)
4323 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4324 return gdbarch->deprecated_frame_saved_pc (fi);
4328 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4329 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4331 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4335 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4337 gdb_assert (gdbarch != NULL);
4338 return gdbarch->unwind_pc != NULL;
4342 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4344 gdb_assert (gdbarch != NULL);
4345 gdb_assert (gdbarch->unwind_pc != NULL);
4346 if (gdbarch_debug >= 2)
4347 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4348 return gdbarch->unwind_pc (gdbarch, next_frame);
4352 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4353 gdbarch_unwind_pc_ftype unwind_pc)
4355 gdbarch->unwind_pc = unwind_pc;
4359 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4361 gdb_assert (gdbarch != NULL);
4362 return gdbarch->unwind_sp != NULL;
4366 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4368 gdb_assert (gdbarch != NULL);
4369 gdb_assert (gdbarch->unwind_sp != NULL);
4370 if (gdbarch_debug >= 2)
4371 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4372 return gdbarch->unwind_sp (gdbarch, next_frame);
4376 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4377 gdbarch_unwind_sp_ftype unwind_sp)
4379 gdbarch->unwind_sp = unwind_sp;
4383 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4385 gdb_assert (gdbarch != NULL);
4386 return gdbarch->deprecated_frame_args_address != get_frame_base;
4390 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4392 gdb_assert (gdbarch != NULL);
4393 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4394 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4395 if (gdbarch_debug >= 2)
4396 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4397 return gdbarch->deprecated_frame_args_address (fi);
4401 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4402 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4404 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4408 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4410 gdb_assert (gdbarch != NULL);
4411 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4415 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4417 gdb_assert (gdbarch != NULL);
4418 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4419 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4420 if (gdbarch_debug >= 2)
4421 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4422 return gdbarch->deprecated_frame_locals_address (fi);
4426 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4427 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4429 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4433 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4435 gdb_assert (gdbarch != NULL);
4436 return gdbarch->deprecated_saved_pc_after_call != NULL;
4440 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4442 gdb_assert (gdbarch != NULL);
4443 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4444 if (gdbarch_debug >= 2)
4445 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4446 return gdbarch->deprecated_saved_pc_after_call (frame);
4450 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4451 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4453 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4457 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4459 gdb_assert (gdbarch != NULL);
4460 return gdbarch->frame_num_args != NULL;
4464 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4466 gdb_assert (gdbarch != NULL);
4467 gdb_assert (gdbarch->frame_num_args != NULL);
4468 if (gdbarch_debug >= 2)
4469 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4470 return gdbarch->frame_num_args (frame);
4474 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4475 gdbarch_frame_num_args_ftype frame_num_args)
4477 gdbarch->frame_num_args = frame_num_args;
4481 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4483 gdb_assert (gdbarch != NULL);
4484 return gdbarch->deprecated_stack_align != NULL;
4488 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4490 gdb_assert (gdbarch != NULL);
4491 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4492 if (gdbarch_debug >= 2)
4493 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4494 return gdbarch->deprecated_stack_align (sp);
4498 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4499 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4501 gdbarch->deprecated_stack_align = deprecated_stack_align;
4505 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4507 gdb_assert (gdbarch != NULL);
4508 return gdbarch->frame_align != NULL;
4512 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4514 gdb_assert (gdbarch != NULL);
4515 gdb_assert (gdbarch->frame_align != NULL);
4516 if (gdbarch_debug >= 2)
4517 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4518 return gdbarch->frame_align (gdbarch, address);
4522 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4523 gdbarch_frame_align_ftype frame_align)
4525 gdbarch->frame_align = frame_align;
4529 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4531 gdb_assert (gdbarch != NULL);
4532 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4536 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4538 gdb_assert (gdbarch != NULL);
4539 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4540 if (gdbarch_debug >= 2)
4541 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4542 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4546 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4547 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4549 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4553 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4555 gdb_assert (gdbarch != NULL);
4556 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4557 if (gdbarch_debug >= 2)
4558 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4559 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4563 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4564 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4566 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4570 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4572 gdb_assert (gdbarch != NULL);
4573 if (gdbarch_debug >= 2)
4574 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4575 return gdbarch->frame_red_zone_size;
4579 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4580 int frame_red_zone_size)
4582 gdbarch->frame_red_zone_size = frame_red_zone_size;
4585 const struct floatformat *
4586 gdbarch_float_format (struct gdbarch *gdbarch)
4588 gdb_assert (gdbarch != NULL);
4589 if (gdbarch_debug >= 2)
4590 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4591 return gdbarch->float_format;
4595 set_gdbarch_float_format (struct gdbarch *gdbarch,
4596 const struct floatformat * float_format)
4598 gdbarch->float_format = float_format;
4601 const struct floatformat *
4602 gdbarch_double_format (struct gdbarch *gdbarch)
4604 gdb_assert (gdbarch != NULL);
4605 if (gdbarch_debug >= 2)
4606 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4607 return gdbarch->double_format;
4611 set_gdbarch_double_format (struct gdbarch *gdbarch,
4612 const struct floatformat * double_format)
4614 gdbarch->double_format = double_format;
4617 const struct floatformat *
4618 gdbarch_long_double_format (struct gdbarch *gdbarch)
4620 gdb_assert (gdbarch != NULL);
4621 if (gdbarch_debug >= 2)
4622 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4623 return gdbarch->long_double_format;
4627 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4628 const struct floatformat * long_double_format)
4630 gdbarch->long_double_format = long_double_format;
4634 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4636 gdb_assert (gdbarch != NULL);
4637 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4638 if (gdbarch_debug >= 2)
4639 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4640 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4644 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4645 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4647 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4651 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4653 gdb_assert (gdbarch != NULL);
4654 gdb_assert (gdbarch->addr_bits_remove != NULL);
4655 if (gdbarch_debug >= 2)
4656 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4657 return gdbarch->addr_bits_remove (addr);
4661 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4662 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4664 gdbarch->addr_bits_remove = addr_bits_remove;
4668 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4670 gdb_assert (gdbarch != NULL);
4671 gdb_assert (gdbarch->smash_text_address != NULL);
4672 if (gdbarch_debug >= 2)
4673 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4674 return gdbarch->smash_text_address (addr);
4678 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4679 gdbarch_smash_text_address_ftype smash_text_address)
4681 gdbarch->smash_text_address = smash_text_address;
4685 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4687 gdb_assert (gdbarch != NULL);
4688 return gdbarch->software_single_step != NULL;
4692 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4694 gdb_assert (gdbarch != NULL);
4695 gdb_assert (gdbarch->software_single_step != NULL);
4696 if (gdbarch_debug >= 2)
4697 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4698 gdbarch->software_single_step (sig, insert_breakpoints_p);
4702 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4703 gdbarch_software_single_step_ftype software_single_step)
4705 gdbarch->software_single_step = software_single_step;
4709 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4711 gdb_assert (gdbarch != NULL);
4712 gdb_assert (gdbarch->print_insn != NULL);
4713 if (gdbarch_debug >= 2)
4714 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4715 return gdbarch->print_insn (vma, info);
4719 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4720 gdbarch_print_insn_ftype print_insn)
4722 gdbarch->print_insn = print_insn;
4726 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4728 gdb_assert (gdbarch != NULL);
4729 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4730 if (gdbarch_debug >= 2)
4731 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4732 return gdbarch->skip_trampoline_code (pc);
4736 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4737 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4739 gdbarch->skip_trampoline_code = skip_trampoline_code;
4743 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4745 gdb_assert (gdbarch != NULL);
4746 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4747 if (gdbarch_debug >= 2)
4748 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4749 return gdbarch->skip_solib_resolver (gdbarch, pc);
4753 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4754 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4756 gdbarch->skip_solib_resolver = skip_solib_resolver;
4760 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4762 gdb_assert (gdbarch != NULL);
4763 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4764 if (gdbarch_debug >= 2)
4765 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4766 return gdbarch->in_solib_call_trampoline (pc, name);
4770 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4771 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4773 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4777 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4779 gdb_assert (gdbarch != NULL);
4780 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4781 if (gdbarch_debug >= 2)
4782 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4783 return gdbarch->in_solib_return_trampoline (pc, name);
4787 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4788 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4790 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4794 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4796 gdb_assert (gdbarch != NULL);
4797 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4798 if (gdbarch_debug >= 2)
4799 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4800 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4804 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4805 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4807 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4811 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4813 gdb_assert (gdbarch != NULL);
4814 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4815 if (gdbarch_debug >= 2)
4816 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4817 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4821 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4822 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4824 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4828 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4830 gdb_assert (gdbarch != NULL);
4831 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4832 if (gdbarch_debug >= 2)
4833 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4834 gdbarch->elf_make_msymbol_special (sym, msym);
4838 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4839 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4841 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4845 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4847 gdb_assert (gdbarch != NULL);
4848 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4849 if (gdbarch_debug >= 2)
4850 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4851 gdbarch->coff_make_msymbol_special (val, msym);
4855 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4856 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4858 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4862 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4864 gdb_assert (gdbarch != NULL);
4865 /* Skip verify of name_of_malloc, invalid_p == 0 */
4866 if (gdbarch_debug >= 2)
4867 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4868 return gdbarch->name_of_malloc;
4872 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4873 const char * name_of_malloc)
4875 gdbarch->name_of_malloc = name_of_malloc;
4879 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4881 gdb_assert (gdbarch != NULL);
4882 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4883 if (gdbarch_debug >= 2)
4884 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4885 return gdbarch->cannot_step_breakpoint;
4889 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4890 int cannot_step_breakpoint)
4892 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4896 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4898 gdb_assert (gdbarch != NULL);
4899 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4900 if (gdbarch_debug >= 2)
4901 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4902 return gdbarch->have_nonsteppable_watchpoint;
4906 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4907 int have_nonsteppable_watchpoint)
4909 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4913 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4915 gdb_assert (gdbarch != NULL);
4916 return gdbarch->address_class_type_flags != NULL;
4920 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4922 gdb_assert (gdbarch != NULL);
4923 gdb_assert (gdbarch->address_class_type_flags != NULL);
4924 if (gdbarch_debug >= 2)
4925 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4926 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4930 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4931 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4933 gdbarch->address_class_type_flags = address_class_type_flags;
4937 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4939 gdb_assert (gdbarch != NULL);
4940 return gdbarch->address_class_type_flags_to_name != NULL;
4944 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4946 gdb_assert (gdbarch != NULL);
4947 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4948 if (gdbarch_debug >= 2)
4949 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4950 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4954 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4955 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4957 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4961 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4963 gdb_assert (gdbarch != NULL);
4964 return gdbarch->address_class_name_to_type_flags != NULL;
4968 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4970 gdb_assert (gdbarch != NULL);
4971 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4972 if (gdbarch_debug >= 2)
4973 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4974 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4978 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4979 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4981 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4985 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4987 gdb_assert (gdbarch != NULL);
4988 gdb_assert (gdbarch->register_reggroup_p != NULL);
4989 if (gdbarch_debug >= 2)
4990 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4991 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4995 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4996 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4998 gdbarch->register_reggroup_p = register_reggroup_p;
5002 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5004 gdb_assert (gdbarch != NULL);
5005 return gdbarch->fetch_pointer_argument != NULL;
5009 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5011 gdb_assert (gdbarch != NULL);
5012 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
5013 if (gdbarch_debug >= 2)
5014 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5015 return gdbarch->fetch_pointer_argument (frame, argi, type);
5019 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5020 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5022 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5026 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
5028 gdb_assert (gdbarch != NULL);
5029 return gdbarch->regset_from_core_section != NULL;
5032 const struct regset *
5033 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
5035 gdb_assert (gdbarch != NULL);
5036 gdb_assert (gdbarch->regset_from_core_section != NULL);
5037 if (gdbarch_debug >= 2)
5038 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
5039 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
5043 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
5044 gdbarch_regset_from_core_section_ftype regset_from_core_section)
5046 gdbarch->regset_from_core_section = regset_from_core_section;
5050 /* Keep a registry of per-architecture data-pointers required by GDB
5057 gdbarch_data_pre_init_ftype *pre_init;
5058 gdbarch_data_post_init_ftype *post_init;
5061 struct gdbarch_data_registration
5063 struct gdbarch_data *data;
5064 struct gdbarch_data_registration *next;
5067 struct gdbarch_data_registry
5070 struct gdbarch_data_registration *registrations;
5073 struct gdbarch_data_registry gdbarch_data_registry =
5078 static struct gdbarch_data *
5079 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
5080 gdbarch_data_post_init_ftype *post_init)
5082 struct gdbarch_data_registration **curr;
5083 /* Append the new registraration. */
5084 for (curr = &gdbarch_data_registry.registrations;
5086 curr = &(*curr)->next);
5087 (*curr) = XMALLOC (struct gdbarch_data_registration);
5088 (*curr)->next = NULL;
5089 (*curr)->data = XMALLOC (struct gdbarch_data);
5090 (*curr)->data->index = gdbarch_data_registry.nr++;
5091 (*curr)->data->pre_init = pre_init;
5092 (*curr)->data->post_init = post_init;
5093 (*curr)->data->init_p = 1;
5094 return (*curr)->data;
5097 struct gdbarch_data *
5098 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
5100 return gdbarch_data_register (pre_init, NULL);
5103 struct gdbarch_data *
5104 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
5106 return gdbarch_data_register (NULL, post_init);
5109 /* Create/delete the gdbarch data vector. */
5112 alloc_gdbarch_data (struct gdbarch *gdbarch)
5114 gdb_assert (gdbarch->data == NULL);
5115 gdbarch->nr_data = gdbarch_data_registry.nr;
5116 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
5119 /* Initialize the current value of the specified per-architecture
5123 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
5124 struct gdbarch_data *data,
5127 gdb_assert (data->index < gdbarch->nr_data);
5128 gdb_assert (gdbarch->data[data->index] == NULL);
5129 gdb_assert (data->pre_init == NULL);
5130 gdbarch->data[data->index] = pointer;
5133 /* Return the current value of the specified per-architecture
5137 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5139 gdb_assert (data->index < gdbarch->nr_data);
5140 if (gdbarch->data[data->index] == NULL)
5142 /* The data-pointer isn't initialized, call init() to get a
5144 if (data->pre_init != NULL)
5145 /* Mid architecture creation: pass just the obstack, and not
5146 the entire architecture, as that way it isn't possible for
5147 pre-init code to refer to undefined architecture
5149 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
5150 else if (gdbarch->initialized_p
5151 && data->post_init != NULL)
5152 /* Post architecture creation: pass the entire architecture
5153 (as all fields are valid), but be careful to also detect
5154 recursive references. */
5156 gdb_assert (data->init_p);
5158 gdbarch->data[data->index] = data->post_init (gdbarch);
5162 /* The architecture initialization hasn't completed - punt -
5163 hope that the caller knows what they are doing. Once
5164 deprecated_set_gdbarch_data has been initialized, this can be
5165 changed to an internal error. */
5167 gdb_assert (gdbarch->data[data->index] != NULL);
5169 return gdbarch->data[data->index];
5174 /* Keep a registry of swapped data required by GDB modules. */
5179 struct gdbarch_swap_registration *source;
5180 struct gdbarch_swap *next;
5183 struct gdbarch_swap_registration
5186 unsigned long sizeof_data;
5187 gdbarch_swap_ftype *init;
5188 struct gdbarch_swap_registration *next;
5191 struct gdbarch_swap_registry
5194 struct gdbarch_swap_registration *registrations;
5197 struct gdbarch_swap_registry gdbarch_swap_registry =
5203 deprecated_register_gdbarch_swap (void *data,
5204 unsigned long sizeof_data,
5205 gdbarch_swap_ftype *init)
5207 struct gdbarch_swap_registration **rego;
5208 for (rego = &gdbarch_swap_registry.registrations;
5210 rego = &(*rego)->next);
5211 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5212 (*rego)->next = NULL;
5213 (*rego)->init = init;
5214 (*rego)->data = data;
5215 (*rego)->sizeof_data = sizeof_data;
5219 current_gdbarch_swap_init_hack (void)
5221 struct gdbarch_swap_registration *rego;
5222 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
5223 for (rego = gdbarch_swap_registry.registrations;
5227 if (rego->data != NULL)
5229 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
5230 struct gdbarch_swap);
5231 (*curr)->source = rego;
5232 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
5234 (*curr)->next = NULL;
5235 curr = &(*curr)->next;
5237 if (rego->init != NULL)
5242 static struct gdbarch *
5243 current_gdbarch_swap_out_hack (void)
5245 struct gdbarch *old_gdbarch = current_gdbarch;
5246 struct gdbarch_swap *curr;
5248 gdb_assert (old_gdbarch != NULL);
5249 for (curr = old_gdbarch->swap;
5253 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5254 memset (curr->source->data, 0, curr->source->sizeof_data);
5256 current_gdbarch = NULL;
5261 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
5263 struct gdbarch_swap *curr;
5265 gdb_assert (current_gdbarch == NULL);
5266 for (curr = new_gdbarch->swap;
5269 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5270 current_gdbarch = new_gdbarch;
5274 /* Keep a registry of the architectures known by GDB. */
5276 struct gdbarch_registration
5278 enum bfd_architecture bfd_architecture;
5279 gdbarch_init_ftype *init;
5280 gdbarch_dump_tdep_ftype *dump_tdep;
5281 struct gdbarch_list *arches;
5282 struct gdbarch_registration *next;
5285 static struct gdbarch_registration *gdbarch_registry = NULL;
5288 append_name (const char ***buf, int *nr, const char *name)
5290 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5296 gdbarch_printable_names (void)
5298 /* Accumulate a list of names based on the registed list of
5300 enum bfd_architecture a;
5302 const char **arches = NULL;
5303 struct gdbarch_registration *rego;
5304 for (rego = gdbarch_registry;
5308 const struct bfd_arch_info *ap;
5309 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5311 internal_error (__FILE__, __LINE__,
5312 "gdbarch_architecture_names: multi-arch unknown");
5315 append_name (&arches, &nr_arches, ap->printable_name);
5320 append_name (&arches, &nr_arches, NULL);
5326 gdbarch_register (enum bfd_architecture bfd_architecture,
5327 gdbarch_init_ftype *init,
5328 gdbarch_dump_tdep_ftype *dump_tdep)
5330 struct gdbarch_registration **curr;
5331 const struct bfd_arch_info *bfd_arch_info;
5332 /* Check that BFD recognizes this architecture */
5333 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5334 if (bfd_arch_info == NULL)
5336 internal_error (__FILE__, __LINE__,
5337 "gdbarch: Attempt to register unknown architecture (%d)",
5340 /* Check that we haven't seen this architecture before */
5341 for (curr = &gdbarch_registry;
5343 curr = &(*curr)->next)
5345 if (bfd_architecture == (*curr)->bfd_architecture)
5346 internal_error (__FILE__, __LINE__,
5347 "gdbarch: Duplicate registraration of architecture (%s)",
5348 bfd_arch_info->printable_name);
5352 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5353 bfd_arch_info->printable_name,
5356 (*curr) = XMALLOC (struct gdbarch_registration);
5357 (*curr)->bfd_architecture = bfd_architecture;
5358 (*curr)->init = init;
5359 (*curr)->dump_tdep = dump_tdep;
5360 (*curr)->arches = NULL;
5361 (*curr)->next = NULL;
5365 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5366 gdbarch_init_ftype *init)
5368 gdbarch_register (bfd_architecture, init, NULL);
5372 /* Look for an architecture using gdbarch_info. Base search on only
5373 BFD_ARCH_INFO and BYTE_ORDER. */
5375 struct gdbarch_list *
5376 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5377 const struct gdbarch_info *info)
5379 for (; arches != NULL; arches = arches->next)
5381 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5383 if (info->byte_order != arches->gdbarch->byte_order)
5385 if (info->osabi != arches->gdbarch->osabi)
5393 /* Find an architecture that matches the specified INFO. Create a new
5394 architecture if needed. Return that new architecture. Assumes
5395 that there is no current architecture. */
5397 static struct gdbarch *
5398 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5400 struct gdbarch *new_gdbarch;
5401 struct gdbarch_registration *rego;
5403 /* The existing architecture has been swapped out - all this code
5404 works from a clean slate. */
5405 gdb_assert (current_gdbarch == NULL);
5407 /* Fill in missing parts of the INFO struct using a number of
5408 sources: "set ..."; INFOabfd supplied; and the existing
5410 gdbarch_info_fill (old_gdbarch, &info);
5412 /* Must have found some sort of architecture. */
5413 gdb_assert (info.bfd_arch_info != NULL);
5417 fprintf_unfiltered (gdb_stdlog,
5418 "find_arch_by_info: info.bfd_arch_info %s\n",
5419 (info.bfd_arch_info != NULL
5420 ? info.bfd_arch_info->printable_name
5422 fprintf_unfiltered (gdb_stdlog,
5423 "find_arch_by_info: info.byte_order %d (%s)\n",
5425 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5426 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5428 fprintf_unfiltered (gdb_stdlog,
5429 "find_arch_by_info: info.osabi %d (%s)\n",
5430 info.osabi, gdbarch_osabi_name (info.osabi));
5431 fprintf_unfiltered (gdb_stdlog,
5432 "find_arch_by_info: info.abfd 0x%lx\n",
5434 fprintf_unfiltered (gdb_stdlog,
5435 "find_arch_by_info: info.tdep_info 0x%lx\n",
5436 (long) info.tdep_info);
5439 /* Find the tdep code that knows about this architecture. */
5440 for (rego = gdbarch_registry;
5443 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5448 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5449 "No matching architecture\n");
5453 /* Ask the tdep code for an architecture that matches "info". */
5454 new_gdbarch = rego->init (info, rego->arches);
5456 /* Did the tdep code like it? No. Reject the change and revert to
5457 the old architecture. */
5458 if (new_gdbarch == NULL)
5461 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5462 "Target rejected architecture\n");
5466 /* Is this a pre-existing architecture (as determined by already
5467 being initialized)? Move it to the front of the architecture
5468 list (keeping the list sorted Most Recently Used). */
5469 if (new_gdbarch->initialized_p)
5471 struct gdbarch_list **list;
5472 struct gdbarch_list *this;
5474 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5475 "Previous architecture 0x%08lx (%s) selected\n",
5477 new_gdbarch->bfd_arch_info->printable_name);
5478 /* Find the existing arch in the list. */
5479 for (list = ®o->arches;
5480 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5481 list = &(*list)->next);
5482 /* It had better be in the list of architectures. */
5483 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5486 (*list) = this->next;
5487 /* Insert THIS at the front. */
5488 this->next = rego->arches;
5489 rego->arches = this;
5494 /* It's a new architecture. */
5496 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5497 "New architecture 0x%08lx (%s) selected\n",
5499 new_gdbarch->bfd_arch_info->printable_name);
5501 /* Insert the new architecture into the front of the architecture
5502 list (keep the list sorted Most Recently Used). */
5504 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5505 this->next = rego->arches;
5506 this->gdbarch = new_gdbarch;
5507 rego->arches = this;
5510 /* Check that the newly installed architecture is valid. Plug in
5511 any post init values. */
5512 new_gdbarch->dump_tdep = rego->dump_tdep;
5513 verify_gdbarch (new_gdbarch);
5514 new_gdbarch->initialized_p = 1;
5516 /* Initialize any per-architecture swap areas. This phase requires
5517 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5518 swap the entire architecture out. */
5519 current_gdbarch = new_gdbarch;
5520 current_gdbarch_swap_init_hack ();
5521 current_gdbarch_swap_out_hack ();
5524 gdbarch_dump (new_gdbarch, gdb_stdlog);
5530 gdbarch_find_by_info (struct gdbarch_info info)
5532 /* Save the previously selected architecture, setting the global to
5533 NULL. This stops things like gdbarch->init() trying to use the
5534 previous architecture's configuration. The previous architecture
5535 may not even be of the same architecture family. The most recent
5536 architecture of the same family is found at the head of the
5537 rego->arches list. */
5538 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5540 /* Find the specified architecture. */
5541 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5543 /* Restore the existing architecture. */
5544 gdb_assert (current_gdbarch == NULL);
5545 current_gdbarch_swap_in_hack (old_gdbarch);
5550 /* Make the specified architecture current, swapping the existing one
5554 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5556 gdb_assert (new_gdbarch != NULL);
5557 gdb_assert (current_gdbarch != NULL);
5558 gdb_assert (new_gdbarch->initialized_p);
5559 current_gdbarch_swap_out_hack ();
5560 current_gdbarch_swap_in_hack (new_gdbarch);
5561 architecture_changed_event ();
5564 extern void _initialize_gdbarch (void);
5567 _initialize_gdbarch (void)
5569 struct cmd_list_element *c;
5571 add_show_from_set (add_set_cmd ("arch",
5574 (char *)&gdbarch_debug,
5575 "Set architecture debugging.\n\
5576 When non-zero, architecture debugging is enabled.", &setdebuglist),
5578 c = add_set_cmd ("archdebug",
5581 (char *)&gdbarch_debug,
5582 "Set architecture debugging.\n\
5583 When non-zero, architecture debugging is enabled.", &setlist);
5585 deprecate_cmd (c, "set debug arch");
5586 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");