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 gdbarch_push_dummy_code_ftype *push_dummy_code;
166 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
167 gdbarch_print_registers_info_ftype *print_registers_info;
168 gdbarch_print_float_info_ftype *print_float_info;
169 gdbarch_print_vector_info_ftype *print_vector_info;
170 gdbarch_register_sim_regno_ftype *register_sim_regno;
171 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
172 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
173 gdbarch_cannot_store_register_ftype *cannot_store_register;
174 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
175 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
176 int believe_pcc_promotion;
177 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
178 gdbarch_convert_register_p_ftype *convert_register_p;
179 gdbarch_register_to_value_ftype *register_to_value;
180 gdbarch_value_to_register_ftype *value_to_register;
181 gdbarch_pointer_to_address_ftype *pointer_to_address;
182 gdbarch_address_to_pointer_ftype *address_to_pointer;
183 gdbarch_integer_to_address_ftype *integer_to_address;
184 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
185 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
186 gdbarch_return_value_ftype *return_value;
187 gdbarch_extract_return_value_ftype *extract_return_value;
188 gdbarch_store_return_value_ftype *store_return_value;
189 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
190 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
191 gdbarch_use_struct_convention_ftype *use_struct_convention;
192 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
193 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
194 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
195 gdbarch_skip_prologue_ftype *skip_prologue;
196 gdbarch_inner_than_ftype *inner_than;
197 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
198 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
199 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
200 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
201 CORE_ADDR decr_pc_after_break;
202 CORE_ADDR function_start_offset;
203 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
204 CORE_ADDR frame_args_skip;
205 gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
206 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
207 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
208 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
209 gdbarch_unwind_pc_ftype *unwind_pc;
210 gdbarch_unwind_sp_ftype *unwind_sp;
211 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
212 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
213 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
214 gdbarch_frame_num_args_ftype *frame_num_args;
215 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
216 gdbarch_frame_align_ftype *frame_align;
217 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
218 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
219 int frame_red_zone_size;
220 const struct floatformat * float_format;
221 const struct floatformat * double_format;
222 const struct floatformat * long_double_format;
223 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
224 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
225 gdbarch_smash_text_address_ftype *smash_text_address;
226 gdbarch_software_single_step_ftype *software_single_step;
227 gdbarch_print_insn_ftype *print_insn;
228 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
229 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
230 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
231 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
232 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
233 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
234 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
235 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
236 const char * name_of_malloc;
237 int cannot_step_breakpoint;
238 int have_nonsteppable_watchpoint;
239 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
240 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
241 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
242 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
243 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
244 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
248 /* The default architecture uses host values (for want of a better
251 extern const struct bfd_arch_info bfd_default_arch_struct;
253 struct gdbarch startup_gdbarch =
255 1, /* Always initialized. */
256 NULL, /* The obstack. */
257 /* basic architecture information */
258 &bfd_default_arch_struct, /* bfd_arch_info */
259 BFD_ENDIAN_BIG, /* byte_order */
260 GDB_OSABI_UNKNOWN, /* osabi */
261 /* target specific vector and its dump routine */
263 /*per-architecture data-pointers and swap regions */
265 /* Multi-arch values */
266 8 * sizeof (short), /* short_bit */
267 8 * sizeof (int), /* int_bit */
268 8 * sizeof (long), /* long_bit */
269 8 * sizeof (LONGEST), /* long_long_bit */
270 8 * sizeof (float), /* float_bit */
271 8 * sizeof (double), /* double_bit */
272 8 * sizeof (long double), /* long_double_bit */
273 8 * sizeof (void*), /* ptr_bit */
274 8 * sizeof (void*), /* addr_bit */
275 8 * sizeof (void*), /* bfd_vma_bit */
280 0, /* virtual_frame_pointer */
281 0, /* pseudo_register_read */
282 0, /* pseudo_register_write */
284 0, /* num_pseudo_regs */
289 0, /* stab_reg_to_regnum */
290 0, /* ecoff_reg_to_regnum */
291 0, /* dwarf_reg_to_regnum */
292 0, /* sdb_reg_to_regnum */
293 0, /* dwarf2_reg_to_regnum */
294 0, /* register_name */
295 0, /* register_type */
296 0, /* deprecated_register_virtual_type */
297 0, /* deprecated_register_bytes */
298 generic_register_byte, /* deprecated_register_byte */
299 generic_register_size, /* deprecated_register_raw_size */
300 generic_register_size, /* deprecated_register_virtual_size */
301 0, /* deprecated_max_register_raw_size */
302 0, /* deprecated_max_register_virtual_size */
303 0, /* unwind_dummy_id */
304 0, /* deprecated_save_dummy_frame_tos */
305 -1, /* deprecated_fp_regnum */
306 0, /* deprecated_target_read_fp */
307 0, /* push_dummy_call */
308 0, /* deprecated_push_arguments */
309 0, /* deprecated_push_return_address */
310 0, /* deprecated_dummy_write_sp */
311 0, /* deprecated_register_size */
312 0, /* call_dummy_location */
313 0, /* push_dummy_code */
314 0, /* deprecated_do_registers_info */
315 default_print_registers_info, /* print_registers_info */
316 0, /* print_float_info */
317 0, /* print_vector_info */
318 0, /* register_sim_regno */
319 0, /* register_bytes_ok */
320 0, /* cannot_fetch_register */
321 0, /* cannot_store_register */
322 0, /* get_longjmp_target */
323 0, /* deprecated_init_frame_pc */
324 0, /* believe_pcc_promotion */
325 0, /* deprecated_get_saved_register */
326 0, /* convert_register_p */
327 0, /* register_to_value */
328 0, /* value_to_register */
329 0, /* pointer_to_address */
330 0, /* address_to_pointer */
331 0, /* integer_to_address */
332 0, /* deprecated_pop_frame */
333 0, /* deprecated_store_struct_return */
334 0, /* return_value */
335 0, /* extract_return_value */
336 0, /* store_return_value */
337 0, /* deprecated_extract_return_value */
338 0, /* deprecated_store_return_value */
339 0, /* use_struct_convention */
340 0, /* deprecated_extract_struct_value_address */
341 0, /* deprecated_frame_init_saved_regs */
342 0, /* deprecated_init_extra_frame_info */
343 0, /* skip_prologue */
345 0, /* breakpoint_from_pc */
346 0, /* adjust_breakpoint_address */
347 0, /* memory_insert_breakpoint */
348 0, /* memory_remove_breakpoint */
349 0, /* decr_pc_after_break */
350 0, /* function_start_offset */
351 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
352 0, /* frame_args_skip */
353 0, /* deprecated_frameless_function_invocation */
354 0, /* deprecated_frame_chain */
355 0, /* deprecated_frame_chain_valid */
356 0, /* deprecated_frame_saved_pc */
359 get_frame_base, /* deprecated_frame_args_address */
360 get_frame_base, /* deprecated_frame_locals_address */
361 0, /* deprecated_saved_pc_after_call */
362 0, /* frame_num_args */
363 0, /* deprecated_stack_align */
365 0, /* deprecated_reg_struct_has_addr */
366 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
367 0, /* frame_red_zone_size */
368 0, /* float_format */
369 0, /* double_format */
370 0, /* long_double_format */
371 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
372 0, /* addr_bits_remove */
373 0, /* smash_text_address */
374 0, /* software_single_step */
376 0, /* skip_trampoline_code */
377 generic_skip_solib_resolver, /* skip_solib_resolver */
378 0, /* in_solib_call_trampoline */
379 0, /* in_solib_return_trampoline */
380 generic_in_function_epilogue_p, /* in_function_epilogue_p */
381 construct_inferior_arguments, /* construct_inferior_arguments */
382 0, /* elf_make_msymbol_special */
383 0, /* coff_make_msymbol_special */
384 "malloc", /* name_of_malloc */
385 0, /* cannot_step_breakpoint */
386 0, /* have_nonsteppable_watchpoint */
387 0, /* address_class_type_flags */
388 0, /* address_class_type_flags_to_name */
389 0, /* address_class_name_to_type_flags */
390 default_register_reggroup_p, /* register_reggroup_p */
391 0, /* fetch_pointer_argument */
392 0, /* regset_from_core_section */
393 /* startup_gdbarch() */
396 struct gdbarch *current_gdbarch = &startup_gdbarch;
398 /* Create a new ``struct gdbarch'' based on information provided by
399 ``struct gdbarch_info''. */
402 gdbarch_alloc (const struct gdbarch_info *info,
403 struct gdbarch_tdep *tdep)
405 /* NOTE: The new architecture variable is named ``current_gdbarch''
406 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
407 the current local architecture and not the previous global
408 architecture. This ensures that the new architectures initial
409 values are not influenced by the previous architecture. Once
410 everything is parameterised with gdbarch, this will go away. */
411 struct gdbarch *current_gdbarch;
413 /* Create an obstack for allocating all the per-architecture memory,
414 then use that to allocate the architecture vector. */
415 struct obstack *obstack = XMALLOC (struct obstack);
416 obstack_init (obstack);
417 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
418 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
419 current_gdbarch->obstack = obstack;
421 alloc_gdbarch_data (current_gdbarch);
423 current_gdbarch->tdep = tdep;
425 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
426 current_gdbarch->byte_order = info->byte_order;
427 current_gdbarch->osabi = info->osabi;
429 /* Force the explicit initialization of these. */
430 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
431 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
432 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
433 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
434 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
435 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
436 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
437 current_gdbarch->ptr_bit = TARGET_INT_BIT;
438 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
439 current_gdbarch->char_signed = -1;
440 current_gdbarch->write_pc = generic_target_write_pc;
441 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
442 current_gdbarch->num_regs = -1;
443 current_gdbarch->sp_regnum = -1;
444 current_gdbarch->pc_regnum = -1;
445 current_gdbarch->ps_regnum = -1;
446 current_gdbarch->fp0_regnum = -1;
447 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
448 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
449 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
450 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
451 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
452 current_gdbarch->deprecated_register_byte = generic_register_byte;
453 current_gdbarch->deprecated_register_raw_size = generic_register_size;
454 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
455 current_gdbarch->deprecated_fp_regnum = -1;
456 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
457 current_gdbarch->print_registers_info = default_print_registers_info;
458 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
459 current_gdbarch->cannot_fetch_register = cannot_register_not;
460 current_gdbarch->cannot_store_register = cannot_register_not;
461 current_gdbarch->convert_register_p = generic_convert_register_p;
462 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
463 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
464 current_gdbarch->extract_return_value = legacy_extract_return_value;
465 current_gdbarch->store_return_value = legacy_store_return_value;
466 current_gdbarch->use_struct_convention = generic_use_struct_convention;
467 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
468 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
469 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
470 current_gdbarch->deprecated_frame_args_address = get_frame_base;
471 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
472 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
473 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
474 current_gdbarch->addr_bits_remove = core_addr_identity;
475 current_gdbarch->smash_text_address = core_addr_identity;
476 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
477 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
478 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
479 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
480 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
481 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
482 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
483 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
484 current_gdbarch->name_of_malloc = "malloc";
485 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
486 /* gdbarch_alloc() */
488 return current_gdbarch;
492 /* Allocate extra space using the per-architecture obstack. */
495 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
497 void *data = obstack_alloc (arch->obstack, size);
498 memset (data, 0, size);
503 /* Free a gdbarch struct. This should never happen in normal
504 operation --- once you've created a gdbarch, you keep it around.
505 However, if an architecture's init function encounters an error
506 building the structure, it may need to clean up a partially
507 constructed gdbarch. */
510 gdbarch_free (struct gdbarch *arch)
512 struct obstack *obstack;
513 gdb_assert (arch != NULL);
514 gdb_assert (!arch->initialized_p);
515 obstack = arch->obstack;
516 obstack_free (obstack, 0); /* Includes the ARCH. */
521 /* Ensure that all values in a GDBARCH are reasonable. */
523 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
524 just happens to match the global variable ``current_gdbarch''. That
525 way macros refering to that variable get the local and not the global
526 version - ulgh. Once everything is parameterised with gdbarch, this
530 verify_gdbarch (struct gdbarch *current_gdbarch)
533 struct cleanup *cleanups;
536 log = mem_fileopen ();
537 cleanups = make_cleanup_ui_file_delete (log);
539 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
540 fprintf_unfiltered (log, "\n\tbyte-order");
541 if (current_gdbarch->bfd_arch_info == NULL)
542 fprintf_unfiltered (log, "\n\tbfd_arch_info");
543 /* Check those that need to be defined for the given multi-arch level. */
544 /* Skip verify of short_bit, invalid_p == 0 */
545 /* Skip verify of int_bit, invalid_p == 0 */
546 /* Skip verify of long_bit, invalid_p == 0 */
547 /* Skip verify of long_long_bit, invalid_p == 0 */
548 /* Skip verify of float_bit, invalid_p == 0 */
549 /* Skip verify of double_bit, invalid_p == 0 */
550 /* Skip verify of long_double_bit, invalid_p == 0 */
551 /* Skip verify of ptr_bit, invalid_p == 0 */
552 if (current_gdbarch->addr_bit == 0)
553 current_gdbarch->addr_bit = TARGET_PTR_BIT;
554 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
555 if (current_gdbarch->char_signed == -1)
556 current_gdbarch->char_signed = 1;
557 /* Skip verify of read_pc, has predicate */
558 /* Skip verify of write_pc, invalid_p == 0 */
559 /* Skip verify of read_sp, has predicate */
560 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
561 /* Skip verify of pseudo_register_read, has predicate */
562 /* Skip verify of pseudo_register_write, has predicate */
563 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
564 && (current_gdbarch->num_regs == -1))
565 fprintf_unfiltered (log, "\n\tnum_regs");
566 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
567 /* Skip verify of sp_regnum, invalid_p == 0 */
568 /* Skip verify of pc_regnum, invalid_p == 0 */
569 /* Skip verify of ps_regnum, invalid_p == 0 */
570 /* Skip verify of fp0_regnum, invalid_p == 0 */
571 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
573 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
574 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
575 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
576 /* Skip verify of register_type, has predicate */
577 /* Skip verify of deprecated_register_virtual_type, has predicate */
578 /* Skip verify of deprecated_register_byte, has predicate */
579 /* Skip verify of deprecated_register_raw_size, has predicate */
580 /* Skip verify of deprecated_register_virtual_size, has predicate */
581 /* Skip verify of deprecated_max_register_raw_size, has predicate */
582 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
583 /* Skip verify of unwind_dummy_id, has predicate */
584 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
585 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
586 /* Skip verify of deprecated_target_read_fp, has predicate */
587 /* Skip verify of push_dummy_call, has predicate */
588 /* Skip verify of deprecated_push_arguments, has predicate */
589 /* Skip verify of deprecated_push_return_address, has predicate */
590 /* Skip verify of deprecated_dummy_write_sp, has predicate */
591 /* Skip verify of call_dummy_location, invalid_p == 0 */
592 /* Skip verify of push_dummy_code, has predicate */
593 /* Skip verify of deprecated_do_registers_info, has predicate */
594 /* Skip verify of print_registers_info, invalid_p == 0 */
595 /* Skip verify of print_float_info, has predicate */
596 /* Skip verify of print_vector_info, has predicate */
597 /* Skip verify of register_sim_regno, invalid_p == 0 */
598 /* Skip verify of register_bytes_ok, has predicate */
599 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
600 /* Skip verify of cannot_store_register, invalid_p == 0 */
601 /* Skip verify of get_longjmp_target, has predicate */
602 /* Skip verify of deprecated_init_frame_pc, has predicate */
603 /* Skip verify of deprecated_get_saved_register, has predicate */
604 /* Skip verify of convert_register_p, invalid_p == 0 */
605 /* Skip verify of pointer_to_address, invalid_p == 0 */
606 /* Skip verify of address_to_pointer, invalid_p == 0 */
607 /* Skip verify of integer_to_address, has predicate */
608 /* Skip verify of deprecated_pop_frame, has predicate */
609 /* Skip verify of deprecated_store_struct_return, has predicate */
610 /* Skip verify of return_value, has predicate */
611 /* Skip verify of extract_return_value, invalid_p == 0 */
612 /* Skip verify of store_return_value, invalid_p == 0 */
613 /* Skip verify of use_struct_convention, invalid_p == 0 */
614 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
615 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
616 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
617 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
618 && (current_gdbarch->skip_prologue == 0))
619 fprintf_unfiltered (log, "\n\tskip_prologue");
620 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
621 && (current_gdbarch->inner_than == 0))
622 fprintf_unfiltered (log, "\n\tinner_than");
623 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
624 && (current_gdbarch->breakpoint_from_pc == 0))
625 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
626 /* Skip verify of adjust_breakpoint_address, has predicate */
627 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
628 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
629 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
630 /* Skip verify of function_start_offset, invalid_p == 0 */
631 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
632 /* Skip verify of frame_args_skip, invalid_p == 0 */
633 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
634 /* Skip verify of deprecated_frame_chain, has predicate */
635 /* Skip verify of deprecated_frame_chain_valid, has predicate */
636 /* Skip verify of deprecated_frame_saved_pc, has predicate */
637 /* Skip verify of unwind_pc, has predicate */
638 /* Skip verify of unwind_sp, has predicate */
639 /* Skip verify of deprecated_frame_args_address, has predicate */
640 /* Skip verify of deprecated_frame_locals_address, has predicate */
641 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
642 /* Skip verify of frame_num_args, has predicate */
643 /* Skip verify of deprecated_stack_align, has predicate */
644 /* Skip verify of frame_align, has predicate */
645 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
646 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
647 if (current_gdbarch->float_format == 0)
648 current_gdbarch->float_format = default_float_format (current_gdbarch);
649 if (current_gdbarch->double_format == 0)
650 current_gdbarch->double_format = default_double_format (current_gdbarch);
651 if (current_gdbarch->long_double_format == 0)
652 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
653 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
654 /* Skip verify of addr_bits_remove, invalid_p == 0 */
655 /* Skip verify of smash_text_address, invalid_p == 0 */
656 /* Skip verify of software_single_step, has predicate */
657 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
658 && (current_gdbarch->print_insn == 0))
659 fprintf_unfiltered (log, "\n\tprint_insn");
660 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
661 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
662 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
663 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
664 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
665 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
666 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
667 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
668 /* Skip verify of name_of_malloc, invalid_p == 0 */
669 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
670 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
671 /* Skip verify of address_class_type_flags, has predicate */
672 /* Skip verify of address_class_type_flags_to_name, has predicate */
673 /* Skip verify of address_class_name_to_type_flags, has predicate */
674 /* Skip verify of register_reggroup_p, invalid_p == 0 */
675 /* Skip verify of fetch_pointer_argument, has predicate */
676 /* Skip verify of regset_from_core_section, has predicate */
677 buf = ui_file_xstrdup (log, &dummy);
678 make_cleanup (xfree, buf);
679 if (strlen (buf) > 0)
680 internal_error (__FILE__, __LINE__,
681 "verify_gdbarch: the following are invalid ...%s",
683 do_cleanups (cleanups);
687 /* Print out the details of the current architecture. */
689 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
690 just happens to match the global variable ``current_gdbarch''. That
691 way macros refering to that variable get the local and not the global
692 version - ulgh. Once everything is parameterised with gdbarch, this
696 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
698 fprintf_unfiltered (file,
699 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
701 fprintf_unfiltered (file,
702 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
703 (long) current_gdbarch->convert_from_func_ptr_addr);
704 fprintf_unfiltered (file,
705 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
706 gdbarch_frame_align_p (current_gdbarch));
707 fprintf_unfiltered (file,
708 "gdbarch_dump: frame_align = 0x%08lx\n",
709 (long) current_gdbarch->frame_align);
710 fprintf_unfiltered (file,
711 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
712 gdbarch_regset_from_core_section_p (current_gdbarch));
713 fprintf_unfiltered (file,
714 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
715 (long) current_gdbarch->regset_from_core_section);
716 fprintf_unfiltered (file,
717 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
718 gdbarch_return_value_p (current_gdbarch));
719 fprintf_unfiltered (file,
720 "gdbarch_dump: return_value = 0x%08lx\n",
721 (long) current_gdbarch->return_value);
722 fprintf_unfiltered (file,
723 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
724 (long) current_gdbarch->in_function_epilogue_p);
725 fprintf_unfiltered (file,
726 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
727 (long) current_gdbarch->register_reggroup_p);
728 fprintf_unfiltered (file,
729 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
730 (long) current_gdbarch->stabs_argument_has_addr);
731 fprintf_unfiltered (file,
732 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
733 gdbarch_pseudo_register_read_p (current_gdbarch));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
736 (long) current_gdbarch->pseudo_register_read);
737 fprintf_unfiltered (file,
738 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
739 gdbarch_pseudo_register_write_p (current_gdbarch));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
742 (long) current_gdbarch->pseudo_register_write);
743 fprintf_unfiltered (file,
744 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
745 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
748 (long) current_gdbarch->address_class_name_to_type_flags);
749 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
750 fprintf_unfiltered (file,
751 "gdbarch_dump: %s # %s\n",
752 "ADDRESS_CLASS_TYPE_FLAGS_P()",
753 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
754 fprintf_unfiltered (file,
755 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
756 ADDRESS_CLASS_TYPE_FLAGS_P ());
758 #ifdef ADDRESS_CLASS_TYPE_FLAGS
759 fprintf_unfiltered (file,
760 "gdbarch_dump: %s # %s\n",
761 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
762 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
763 fprintf_unfiltered (file,
764 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
765 (long) current_gdbarch->address_class_type_flags
766 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
768 fprintf_unfiltered (file,
769 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
770 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
771 fprintf_unfiltered (file,
772 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
773 (long) current_gdbarch->address_class_type_flags_to_name);
774 #ifdef ADDRESS_TO_POINTER
775 fprintf_unfiltered (file,
776 "gdbarch_dump: %s # %s\n",
777 "ADDRESS_TO_POINTER(type, buf, addr)",
778 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
781 (long) current_gdbarch->address_to_pointer
782 /*ADDRESS_TO_POINTER ()*/);
784 #ifdef ADDR_BITS_REMOVE
785 fprintf_unfiltered (file,
786 "gdbarch_dump: %s # %s\n",
787 "ADDR_BITS_REMOVE(addr)",
788 XSTRING (ADDR_BITS_REMOVE (addr)));
789 fprintf_unfiltered (file,
790 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
791 (long) current_gdbarch->addr_bits_remove
792 /*ADDR_BITS_REMOVE ()*/);
794 fprintf_unfiltered (file,
795 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
796 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
799 (long) current_gdbarch->adjust_breakpoint_address);
800 #ifdef BELIEVE_PCC_PROMOTION
801 fprintf_unfiltered (file,
802 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
803 XSTRING (BELIEVE_PCC_PROMOTION));
804 fprintf_unfiltered (file,
805 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
806 BELIEVE_PCC_PROMOTION);
808 #ifdef BREAKPOINT_FROM_PC
809 fprintf_unfiltered (file,
810 "gdbarch_dump: %s # %s\n",
811 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
812 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
813 fprintf_unfiltered (file,
814 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
815 (long) current_gdbarch->breakpoint_from_pc
816 /*BREAKPOINT_FROM_PC ()*/);
818 #ifdef CALL_DUMMY_LOCATION
819 fprintf_unfiltered (file,
820 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
821 XSTRING (CALL_DUMMY_LOCATION));
822 fprintf_unfiltered (file,
823 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
824 CALL_DUMMY_LOCATION);
826 #ifdef CANNOT_FETCH_REGISTER
827 fprintf_unfiltered (file,
828 "gdbarch_dump: %s # %s\n",
829 "CANNOT_FETCH_REGISTER(regnum)",
830 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
831 fprintf_unfiltered (file,
832 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
833 (long) current_gdbarch->cannot_fetch_register
834 /*CANNOT_FETCH_REGISTER ()*/);
836 #ifdef CANNOT_STEP_BREAKPOINT
837 fprintf_unfiltered (file,
838 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
839 XSTRING (CANNOT_STEP_BREAKPOINT));
840 fprintf_unfiltered (file,
841 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
842 CANNOT_STEP_BREAKPOINT);
844 #ifdef CANNOT_STORE_REGISTER
845 fprintf_unfiltered (file,
846 "gdbarch_dump: %s # %s\n",
847 "CANNOT_STORE_REGISTER(regnum)",
848 XSTRING (CANNOT_STORE_REGISTER (regnum)));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
851 (long) current_gdbarch->cannot_store_register
852 /*CANNOT_STORE_REGISTER ()*/);
854 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
855 fprintf_unfiltered (file,
856 "gdbarch_dump: %s # %s\n",
857 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
858 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
861 (long) current_gdbarch->coff_make_msymbol_special
862 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
864 fprintf_unfiltered (file,
865 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
866 (long) current_gdbarch->construct_inferior_arguments);
867 #ifdef CONVERT_REGISTER_P
868 fprintf_unfiltered (file,
869 "gdbarch_dump: %s # %s\n",
870 "CONVERT_REGISTER_P(regnum, type)",
871 XSTRING (CONVERT_REGISTER_P (regnum, type)));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
874 (long) current_gdbarch->convert_register_p
875 /*CONVERT_REGISTER_P ()*/);
877 #ifdef DECR_PC_AFTER_BREAK
878 fprintf_unfiltered (file,
879 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
880 XSTRING (DECR_PC_AFTER_BREAK));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
883 (long) DECR_PC_AFTER_BREAK);
885 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
886 fprintf_unfiltered (file,
887 "gdbarch_dump: %s # %s\n",
888 "DEPRECATED_DO_REGISTERS_INFO_P()",
889 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
892 DEPRECATED_DO_REGISTERS_INFO_P ());
894 #ifdef DEPRECATED_DO_REGISTERS_INFO
895 fprintf_unfiltered (file,
896 "gdbarch_dump: %s # %s\n",
897 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
898 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
901 (long) current_gdbarch->deprecated_do_registers_info
902 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
904 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
905 fprintf_unfiltered (file,
906 "gdbarch_dump: %s # %s\n",
907 "DEPRECATED_DUMMY_WRITE_SP_P()",
908 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
909 fprintf_unfiltered (file,
910 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
911 DEPRECATED_DUMMY_WRITE_SP_P ());
913 #ifdef DEPRECATED_DUMMY_WRITE_SP
914 fprintf_unfiltered (file,
915 "gdbarch_dump: %s # %s\n",
916 "DEPRECATED_DUMMY_WRITE_SP(val)",
917 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
918 fprintf_unfiltered (file,
919 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
920 (long) current_gdbarch->deprecated_dummy_write_sp
921 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
923 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
924 fprintf_unfiltered (file,
925 "gdbarch_dump: %s # %s\n",
926 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
927 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
930 (long) current_gdbarch->deprecated_extract_return_value
931 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
933 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
934 fprintf_unfiltered (file,
935 "gdbarch_dump: %s # %s\n",
936 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
937 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
940 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
942 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
943 fprintf_unfiltered (file,
944 "gdbarch_dump: %s # %s\n",
945 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
946 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
949 (long) current_gdbarch->deprecated_extract_struct_value_address
950 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
952 #ifdef DEPRECATED_FP_REGNUM
953 fprintf_unfiltered (file,
954 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
955 XSTRING (DEPRECATED_FP_REGNUM));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
958 DEPRECATED_FP_REGNUM);
960 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
961 fprintf_unfiltered (file,
962 "gdbarch_dump: %s # %s\n",
963 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
964 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
967 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
969 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
970 fprintf_unfiltered (file,
971 "gdbarch_dump: %s # %s\n",
972 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
973 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
976 (long) current_gdbarch->deprecated_frameless_function_invocation
977 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
979 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
980 fprintf_unfiltered (file,
981 "gdbarch_dump: %s # %s\n",
982 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
983 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
984 fprintf_unfiltered (file,
985 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
986 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
988 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
989 fprintf_unfiltered (file,
990 "gdbarch_dump: %s # %s\n",
991 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
992 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
993 fprintf_unfiltered (file,
994 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
995 (long) current_gdbarch->deprecated_frame_args_address
996 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
998 #ifdef DEPRECATED_FRAME_CHAIN_P
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: %s # %s\n",
1001 "DEPRECATED_FRAME_CHAIN_P()",
1002 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1005 DEPRECATED_FRAME_CHAIN_P ());
1007 #ifdef DEPRECATED_FRAME_CHAIN
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: %s # %s\n",
1010 "DEPRECATED_FRAME_CHAIN(frame)",
1011 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1014 (long) current_gdbarch->deprecated_frame_chain
1015 /*DEPRECATED_FRAME_CHAIN ()*/);
1017 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: %s # %s\n",
1020 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1021 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1024 DEPRECATED_FRAME_CHAIN_VALID_P ());
1026 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: %s # %s\n",
1029 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1030 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1033 (long) current_gdbarch->deprecated_frame_chain_valid
1034 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1036 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: %s # %s\n",
1039 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1040 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1043 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1045 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: %s # %s\n",
1048 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1049 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1052 (long) current_gdbarch->deprecated_frame_init_saved_regs
1053 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1055 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: %s # %s\n",
1058 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1059 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1062 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1064 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: %s # %s\n",
1067 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1068 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1071 (long) current_gdbarch->deprecated_frame_locals_address
1072 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1074 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: %s # %s\n",
1077 "DEPRECATED_FRAME_SAVED_PC_P()",
1078 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1081 DEPRECATED_FRAME_SAVED_PC_P ());
1083 #ifdef DEPRECATED_FRAME_SAVED_PC
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: %s # %s\n",
1086 "DEPRECATED_FRAME_SAVED_PC(fi)",
1087 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1090 (long) current_gdbarch->deprecated_frame_saved_pc
1091 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1093 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: %s # %s\n",
1096 "DEPRECATED_GET_SAVED_REGISTER_P()",
1097 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1100 DEPRECATED_GET_SAVED_REGISTER_P ());
1102 #ifdef DEPRECATED_GET_SAVED_REGISTER
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: %s # %s\n",
1105 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1106 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1109 (long) current_gdbarch->deprecated_get_saved_register
1110 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1112 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1113 fprintf_unfiltered (file,
1114 "gdbarch_dump: %s # %s\n",
1115 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1116 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1119 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1121 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: %s # %s\n",
1124 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1125 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1128 (long) current_gdbarch->deprecated_init_extra_frame_info
1129 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1131 #ifdef DEPRECATED_INIT_FRAME_PC_P
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: %s # %s\n",
1134 "DEPRECATED_INIT_FRAME_PC_P()",
1135 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1138 DEPRECATED_INIT_FRAME_PC_P ());
1140 #ifdef DEPRECATED_INIT_FRAME_PC
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: %s # %s\n",
1143 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1144 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1147 (long) current_gdbarch->deprecated_init_frame_pc
1148 /*DEPRECATED_INIT_FRAME_PC ()*/);
1150 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: %s # %s\n",
1153 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1154 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1157 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1159 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1162 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1165 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1167 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: %s # %s\n",
1170 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1171 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1174 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1176 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1179 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1182 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1184 #ifdef DEPRECATED_POP_FRAME_P
1185 fprintf_unfiltered (file,
1186 "gdbarch_dump: %s # %s\n",
1187 "DEPRECATED_POP_FRAME_P()",
1188 XSTRING (DEPRECATED_POP_FRAME_P ()));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1191 DEPRECATED_POP_FRAME_P ());
1193 #ifdef DEPRECATED_POP_FRAME
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: %s # %s\n",
1196 "DEPRECATED_POP_FRAME(-)",
1197 XSTRING (DEPRECATED_POP_FRAME (-)));
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1200 (long) current_gdbarch->deprecated_pop_frame
1201 /*DEPRECATED_POP_FRAME ()*/);
1203 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: %s # %s\n",
1206 "DEPRECATED_PUSH_ARGUMENTS_P()",
1207 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1210 DEPRECATED_PUSH_ARGUMENTS_P ());
1212 #ifdef DEPRECATED_PUSH_ARGUMENTS
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: %s # %s\n",
1215 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1216 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1219 (long) current_gdbarch->deprecated_push_arguments
1220 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1222 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: %s # %s\n",
1225 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1226 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1227 fprintf_unfiltered (file,
1228 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1229 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1231 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: %s # %s\n",
1234 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1235 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1238 (long) current_gdbarch->deprecated_push_return_address
1239 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1241 #ifdef DEPRECATED_REGISTER_BYTE_P
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: %s # %s\n",
1244 "DEPRECATED_REGISTER_BYTE_P()",
1245 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1248 DEPRECATED_REGISTER_BYTE_P ());
1250 #ifdef DEPRECATED_REGISTER_BYTE
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: %s # %s\n",
1253 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1254 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1257 (long) current_gdbarch->deprecated_register_byte
1258 /*DEPRECATED_REGISTER_BYTE ()*/);
1260 #ifdef DEPRECATED_REGISTER_BYTES
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1263 XSTRING (DEPRECATED_REGISTER_BYTES));
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1266 DEPRECATED_REGISTER_BYTES);
1268 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: %s # %s\n",
1271 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1272 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1275 DEPRECATED_REGISTER_RAW_SIZE_P ());
1277 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: %s # %s\n",
1280 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1281 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1284 (long) current_gdbarch->deprecated_register_raw_size
1285 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1287 #ifdef DEPRECATED_REGISTER_SIZE
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1290 XSTRING (DEPRECATED_REGISTER_SIZE));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1293 DEPRECATED_REGISTER_SIZE);
1295 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: %s # %s\n",
1298 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1299 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1302 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1304 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1305 fprintf_unfiltered (file,
1306 "gdbarch_dump: %s # %s\n",
1307 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1308 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1311 (long) current_gdbarch->deprecated_register_virtual_size
1312 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1314 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: %s # %s\n",
1317 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1318 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1321 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1323 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: %s # %s\n",
1326 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1327 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1330 (long) current_gdbarch->deprecated_register_virtual_type
1331 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1333 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: %s # %s\n",
1336 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1337 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1338 fprintf_unfiltered (file,
1339 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1340 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1342 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: %s # %s\n",
1345 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1346 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1349 (long) current_gdbarch->deprecated_reg_struct_has_addr
1350 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1352 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1353 fprintf_unfiltered (file,
1354 "gdbarch_dump: %s # %s\n",
1355 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1356 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1359 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1361 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: %s # %s\n",
1364 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1365 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1368 (long) current_gdbarch->deprecated_saved_pc_after_call
1369 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1371 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: %s # %s\n",
1374 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1375 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1378 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1380 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: %s # %s\n",
1383 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1384 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1387 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1388 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1390 #ifdef DEPRECATED_STACK_ALIGN_P
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: %s # %s\n",
1393 "DEPRECATED_STACK_ALIGN_P()",
1394 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1397 DEPRECATED_STACK_ALIGN_P ());
1399 #ifdef DEPRECATED_STACK_ALIGN
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: %s # %s\n",
1402 "DEPRECATED_STACK_ALIGN(sp)",
1403 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1406 (long) current_gdbarch->deprecated_stack_align
1407 /*DEPRECATED_STACK_ALIGN ()*/);
1409 #ifdef DEPRECATED_STORE_RETURN_VALUE
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: %s # %s\n",
1412 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1413 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1416 (long) current_gdbarch->deprecated_store_return_value
1417 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1419 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: %s # %s\n",
1422 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1423 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1426 DEPRECATED_STORE_STRUCT_RETURN_P ());
1428 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: %s # %s\n",
1431 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1432 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1435 (long) current_gdbarch->deprecated_store_struct_return
1436 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1438 #ifdef DEPRECATED_TARGET_READ_FP_P
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: %s # %s\n",
1441 "DEPRECATED_TARGET_READ_FP_P()",
1442 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1445 DEPRECATED_TARGET_READ_FP_P ());
1447 #ifdef DEPRECATED_TARGET_READ_FP
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: %s # %s\n",
1450 "DEPRECATED_TARGET_READ_FP()",
1451 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1454 (long) current_gdbarch->deprecated_target_read_fp
1455 /*DEPRECATED_TARGET_READ_FP ()*/);
1457 #ifdef DWARF2_REG_TO_REGNUM
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1461 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1464 (long) current_gdbarch->dwarf2_reg_to_regnum
1465 /*DWARF2_REG_TO_REGNUM ()*/);
1467 #ifdef DWARF_REG_TO_REGNUM
1468 fprintf_unfiltered (file,
1469 "gdbarch_dump: %s # %s\n",
1470 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1471 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1474 (long) current_gdbarch->dwarf_reg_to_regnum
1475 /*DWARF_REG_TO_REGNUM ()*/);
1477 #ifdef ECOFF_REG_TO_REGNUM
1478 fprintf_unfiltered (file,
1479 "gdbarch_dump: %s # %s\n",
1480 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1481 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1484 (long) current_gdbarch->ecoff_reg_to_regnum
1485 /*ECOFF_REG_TO_REGNUM ()*/);
1487 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: %s # %s\n",
1490 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1491 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1494 (long) current_gdbarch->elf_make_msymbol_special
1495 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1497 #ifdef EXTRACT_RETURN_VALUE
1498 fprintf_unfiltered (file,
1499 "gdbarch_dump: %s # %s\n",
1500 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1501 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1504 (long) current_gdbarch->extract_return_value
1505 /*EXTRACT_RETURN_VALUE ()*/);
1507 #ifdef FETCH_POINTER_ARGUMENT_P
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: %s # %s\n",
1510 "FETCH_POINTER_ARGUMENT_P()",
1511 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1512 fprintf_unfiltered (file,
1513 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1514 FETCH_POINTER_ARGUMENT_P ());
1516 #ifdef FETCH_POINTER_ARGUMENT
1517 fprintf_unfiltered (file,
1518 "gdbarch_dump: %s # %s\n",
1519 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1520 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1523 (long) current_gdbarch->fetch_pointer_argument
1524 /*FETCH_POINTER_ARGUMENT ()*/);
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: FP0_REGNUM # %s\n",
1529 XSTRING (FP0_REGNUM));
1530 fprintf_unfiltered (file,
1531 "gdbarch_dump: FP0_REGNUM = %d\n",
1534 #ifdef FRAME_ARGS_SKIP
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1537 XSTRING (FRAME_ARGS_SKIP));
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1540 (long) FRAME_ARGS_SKIP);
1542 #ifdef FRAME_NUM_ARGS_P
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: %s # %s\n",
1545 "FRAME_NUM_ARGS_P()",
1546 XSTRING (FRAME_NUM_ARGS_P ()));
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1549 FRAME_NUM_ARGS_P ());
1551 #ifdef FRAME_NUM_ARGS
1552 fprintf_unfiltered (file,
1553 "gdbarch_dump: %s # %s\n",
1554 "FRAME_NUM_ARGS(frame)",
1555 XSTRING (FRAME_NUM_ARGS (frame)));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1558 (long) current_gdbarch->frame_num_args
1559 /*FRAME_NUM_ARGS ()*/);
1561 #ifdef FRAME_RED_ZONE_SIZE
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1564 XSTRING (FRAME_RED_ZONE_SIZE));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1567 FRAME_RED_ZONE_SIZE);
1569 #ifdef FUNCTION_START_OFFSET
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1572 XSTRING (FUNCTION_START_OFFSET));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1575 (long) FUNCTION_START_OFFSET);
1577 #ifdef GET_LONGJMP_TARGET_P
1578 fprintf_unfiltered (file,
1579 "gdbarch_dump: %s # %s\n",
1580 "GET_LONGJMP_TARGET_P()",
1581 XSTRING (GET_LONGJMP_TARGET_P ()));
1582 fprintf_unfiltered (file,
1583 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1584 GET_LONGJMP_TARGET_P ());
1586 #ifdef GET_LONGJMP_TARGET
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: %s # %s\n",
1589 "GET_LONGJMP_TARGET(pc)",
1590 XSTRING (GET_LONGJMP_TARGET (pc)));
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1593 (long) current_gdbarch->get_longjmp_target
1594 /*GET_LONGJMP_TARGET ()*/);
1596 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1599 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1600 fprintf_unfiltered (file,
1601 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1602 HAVE_NONSTEPPABLE_WATCHPOINT);
1605 fprintf_unfiltered (file,
1606 "gdbarch_dump: %s # %s\n",
1607 "INNER_THAN(lhs, rhs)",
1608 XSTRING (INNER_THAN (lhs, rhs)));
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1611 (long) current_gdbarch->inner_than
1614 #ifdef INTEGER_TO_ADDRESS_P
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: %s # %s\n",
1617 "INTEGER_TO_ADDRESS_P()",
1618 XSTRING (INTEGER_TO_ADDRESS_P ()));
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1621 INTEGER_TO_ADDRESS_P ());
1623 #ifdef INTEGER_TO_ADDRESS
1624 fprintf_unfiltered (file,
1625 "gdbarch_dump: %s # %s\n",
1626 "INTEGER_TO_ADDRESS(type, buf)",
1627 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1628 fprintf_unfiltered (file,
1629 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1630 (long) current_gdbarch->integer_to_address
1631 /*INTEGER_TO_ADDRESS ()*/);
1633 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: %s # %s\n",
1636 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1637 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1640 (long) current_gdbarch->in_solib_call_trampoline
1641 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1643 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: %s # %s\n",
1646 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1647 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1648 fprintf_unfiltered (file,
1649 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1650 (long) current_gdbarch->in_solib_return_trampoline
1651 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1653 #ifdef MEMORY_INSERT_BREAKPOINT
1654 fprintf_unfiltered (file,
1655 "gdbarch_dump: %s # %s\n",
1656 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1657 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1660 (long) current_gdbarch->memory_insert_breakpoint
1661 /*MEMORY_INSERT_BREAKPOINT ()*/);
1663 #ifdef MEMORY_REMOVE_BREAKPOINT
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: %s # %s\n",
1666 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1667 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1670 (long) current_gdbarch->memory_remove_breakpoint
1671 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1673 #ifdef NAME_OF_MALLOC
1674 fprintf_unfiltered (file,
1675 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1676 XSTRING (NAME_OF_MALLOC));
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1681 #ifdef NUM_PSEUDO_REGS
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1684 XSTRING (NUM_PSEUDO_REGS));
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1690 fprintf_unfiltered (file,
1691 "gdbarch_dump: NUM_REGS # %s\n",
1692 XSTRING (NUM_REGS));
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: NUM_REGS = %d\n",
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: PC_REGNUM # %s\n",
1700 XSTRING (PC_REGNUM));
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: PC_REGNUM = %d\n",
1705 #ifdef POINTER_TO_ADDRESS
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: %s # %s\n",
1708 "POINTER_TO_ADDRESS(type, buf)",
1709 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1712 (long) current_gdbarch->pointer_to_address
1713 /*POINTER_TO_ADDRESS ()*/);
1715 fprintf_unfiltered (file,
1716 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1717 gdbarch_print_float_info_p (current_gdbarch));
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: print_float_info = 0x%08lx\n",
1720 (long) current_gdbarch->print_float_info);
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1723 (long) current_gdbarch->print_registers_info);
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1726 gdbarch_print_vector_info_p (current_gdbarch));
1727 fprintf_unfiltered (file,
1728 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1729 (long) current_gdbarch->print_vector_info);
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: PS_REGNUM # %s\n",
1733 XSTRING (PS_REGNUM));
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: PS_REGNUM = %d\n",
1738 fprintf_unfiltered (file,
1739 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1740 gdbarch_push_dummy_call_p (current_gdbarch));
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1743 (long) current_gdbarch->push_dummy_call);
1744 fprintf_unfiltered (file,
1745 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1746 gdbarch_push_dummy_code_p (current_gdbarch));
1747 fprintf_unfiltered (file,
1748 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1749 (long) current_gdbarch->push_dummy_code);
1750 #ifdef REGISTER_BYTES_OK_P
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: %s # %s\n",
1753 "REGISTER_BYTES_OK_P()",
1754 XSTRING (REGISTER_BYTES_OK_P ()));
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1757 REGISTER_BYTES_OK_P ());
1759 #ifdef REGISTER_BYTES_OK
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: %s # %s\n",
1762 "REGISTER_BYTES_OK(nr_bytes)",
1763 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1764 fprintf_unfiltered (file,
1765 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1766 (long) current_gdbarch->register_bytes_ok
1767 /*REGISTER_BYTES_OK ()*/);
1769 #ifdef REGISTER_NAME
1770 fprintf_unfiltered (file,
1771 "gdbarch_dump: %s # %s\n",
1772 "REGISTER_NAME(regnr)",
1773 XSTRING (REGISTER_NAME (regnr)));
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1776 (long) current_gdbarch->register_name
1777 /*REGISTER_NAME ()*/);
1779 #ifdef REGISTER_SIM_REGNO
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: %s # %s\n",
1782 "REGISTER_SIM_REGNO(reg_nr)",
1783 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1786 (long) current_gdbarch->register_sim_regno
1787 /*REGISTER_SIM_REGNO ()*/);
1789 #ifdef REGISTER_TO_VALUE
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: %s # %s\n",
1792 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1793 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1796 (long) current_gdbarch->register_to_value
1797 /*REGISTER_TO_VALUE ()*/);
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1801 gdbarch_register_type_p (current_gdbarch));
1802 fprintf_unfiltered (file,
1803 "gdbarch_dump: register_type = 0x%08lx\n",
1804 (long) current_gdbarch->register_type);
1805 fprintf_unfiltered (file,
1806 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1807 (long) current_gdbarch->remote_translate_xfer_address);
1808 #ifdef SDB_REG_TO_REGNUM
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: %s # %s\n",
1811 "SDB_REG_TO_REGNUM(sdb_regnr)",
1812 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1813 fprintf_unfiltered (file,
1814 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1815 (long) current_gdbarch->sdb_reg_to_regnum
1816 /*SDB_REG_TO_REGNUM ()*/);
1818 #ifdef SKIP_PROLOGUE
1819 fprintf_unfiltered (file,
1820 "gdbarch_dump: %s # %s\n",
1821 "SKIP_PROLOGUE(ip)",
1822 XSTRING (SKIP_PROLOGUE (ip)));
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1825 (long) current_gdbarch->skip_prologue
1826 /*SKIP_PROLOGUE ()*/);
1828 fprintf_unfiltered (file,
1829 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1830 (long) current_gdbarch->skip_solib_resolver);
1831 #ifdef SKIP_TRAMPOLINE_CODE
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: %s # %s\n",
1834 "SKIP_TRAMPOLINE_CODE(pc)",
1835 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1838 (long) current_gdbarch->skip_trampoline_code
1839 /*SKIP_TRAMPOLINE_CODE ()*/);
1841 #ifdef SMASH_TEXT_ADDRESS
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: %s # %s\n",
1844 "SMASH_TEXT_ADDRESS(addr)",
1845 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1848 (long) current_gdbarch->smash_text_address
1849 /*SMASH_TEXT_ADDRESS ()*/);
1851 #ifdef SOFTWARE_SINGLE_STEP_P
1852 fprintf_unfiltered (file,
1853 "gdbarch_dump: %s # %s\n",
1854 "SOFTWARE_SINGLE_STEP_P()",
1855 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1858 SOFTWARE_SINGLE_STEP_P ());
1860 #ifdef SOFTWARE_SINGLE_STEP
1861 fprintf_unfiltered (file,
1862 "gdbarch_dump: %s # %s\n",
1863 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1864 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1867 (long) current_gdbarch->software_single_step
1868 /*SOFTWARE_SINGLE_STEP ()*/);
1871 fprintf_unfiltered (file,
1872 "gdbarch_dump: SP_REGNUM # %s\n",
1873 XSTRING (SP_REGNUM));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: SP_REGNUM = %d\n",
1878 #ifdef STAB_REG_TO_REGNUM
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: %s # %s\n",
1881 "STAB_REG_TO_REGNUM(stab_regnr)",
1882 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1885 (long) current_gdbarch->stab_reg_to_regnum
1886 /*STAB_REG_TO_REGNUM ()*/);
1888 #ifdef STORE_RETURN_VALUE
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: %s # %s\n",
1891 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1892 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1895 (long) current_gdbarch->store_return_value
1896 /*STORE_RETURN_VALUE ()*/);
1898 #ifdef TARGET_ADDR_BIT
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1901 XSTRING (TARGET_ADDR_BIT));
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1906 #ifdef TARGET_ARCHITECTURE
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1909 XSTRING (TARGET_ARCHITECTURE));
1910 if (TARGET_ARCHITECTURE != NULL)
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1913 TARGET_ARCHITECTURE->printable_name);
1915 #ifdef TARGET_BFD_VMA_BIT
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1918 XSTRING (TARGET_BFD_VMA_BIT));
1919 fprintf_unfiltered (file,
1920 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1921 TARGET_BFD_VMA_BIT);
1923 #ifdef TARGET_BYTE_ORDER
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1926 XSTRING (TARGET_BYTE_ORDER));
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1929 (long) TARGET_BYTE_ORDER);
1931 #ifdef TARGET_CHAR_SIGNED
1932 fprintf_unfiltered (file,
1933 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1934 XSTRING (TARGET_CHAR_SIGNED));
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1937 TARGET_CHAR_SIGNED);
1939 #ifdef TARGET_DOUBLE_BIT
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1942 XSTRING (TARGET_DOUBLE_BIT));
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1947 #ifdef TARGET_DOUBLE_FORMAT
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1950 XSTRING (TARGET_DOUBLE_FORMAT));
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
1953 (TARGET_DOUBLE_FORMAT)->name);
1955 #ifdef TARGET_FLOAT_BIT
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1958 XSTRING (TARGET_FLOAT_BIT));
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1963 #ifdef TARGET_FLOAT_FORMAT
1964 fprintf_unfiltered (file,
1965 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1966 XSTRING (TARGET_FLOAT_FORMAT));
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
1969 (TARGET_FLOAT_FORMAT)->name);
1971 #ifdef TARGET_INT_BIT
1972 fprintf_unfiltered (file,
1973 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1974 XSTRING (TARGET_INT_BIT));
1975 fprintf_unfiltered (file,
1976 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1979 #ifdef TARGET_LONG_BIT
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1982 XSTRING (TARGET_LONG_BIT));
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1987 #ifdef TARGET_LONG_DOUBLE_BIT
1988 fprintf_unfiltered (file,
1989 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1990 XSTRING (TARGET_LONG_DOUBLE_BIT));
1991 fprintf_unfiltered (file,
1992 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1993 TARGET_LONG_DOUBLE_BIT);
1995 #ifdef TARGET_LONG_DOUBLE_FORMAT
1996 fprintf_unfiltered (file,
1997 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1998 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1999 fprintf_unfiltered (file,
2000 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2001 (TARGET_LONG_DOUBLE_FORMAT)->name);
2003 #ifdef TARGET_LONG_LONG_BIT
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2006 XSTRING (TARGET_LONG_LONG_BIT));
2007 fprintf_unfiltered (file,
2008 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2009 TARGET_LONG_LONG_BIT);
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: TARGET_OSABI # %s\n",
2014 XSTRING (TARGET_OSABI));
2015 fprintf_unfiltered (file,
2016 "gdbarch_dump: TARGET_OSABI = %ld\n",
2017 (long) TARGET_OSABI);
2019 #ifdef TARGET_PRINT_INSN
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: %s # %s\n",
2022 "TARGET_PRINT_INSN(vma, info)",
2023 XSTRING (TARGET_PRINT_INSN (vma, info)));
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2026 (long) current_gdbarch->print_insn
2027 /*TARGET_PRINT_INSN ()*/);
2029 #ifdef TARGET_PTR_BIT
2030 fprintf_unfiltered (file,
2031 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2032 XSTRING (TARGET_PTR_BIT));
2033 fprintf_unfiltered (file,
2034 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2037 #ifdef TARGET_READ_PC_P
2038 fprintf_unfiltered (file,
2039 "gdbarch_dump: %s # %s\n",
2040 "TARGET_READ_PC_P()",
2041 XSTRING (TARGET_READ_PC_P ()));
2042 fprintf_unfiltered (file,
2043 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2044 TARGET_READ_PC_P ());
2046 #ifdef TARGET_READ_PC
2047 fprintf_unfiltered (file,
2048 "gdbarch_dump: %s # %s\n",
2049 "TARGET_READ_PC(ptid)",
2050 XSTRING (TARGET_READ_PC (ptid)));
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2053 (long) current_gdbarch->read_pc
2054 /*TARGET_READ_PC ()*/);
2056 #ifdef TARGET_READ_SP_P
2057 fprintf_unfiltered (file,
2058 "gdbarch_dump: %s # %s\n",
2059 "TARGET_READ_SP_P()",
2060 XSTRING (TARGET_READ_SP_P ()));
2061 fprintf_unfiltered (file,
2062 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2063 TARGET_READ_SP_P ());
2065 #ifdef TARGET_READ_SP
2066 fprintf_unfiltered (file,
2067 "gdbarch_dump: %s # %s\n",
2069 XSTRING (TARGET_READ_SP ()));
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2072 (long) current_gdbarch->read_sp
2073 /*TARGET_READ_SP ()*/);
2075 #ifdef TARGET_SHORT_BIT
2076 fprintf_unfiltered (file,
2077 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2078 XSTRING (TARGET_SHORT_BIT));
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2083 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: %s # %s\n",
2086 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2087 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2090 (long) current_gdbarch->virtual_frame_pointer
2091 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2093 #ifdef TARGET_WRITE_PC
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: %s # %s\n",
2096 "TARGET_WRITE_PC(val, ptid)",
2097 XSTRING (TARGET_WRITE_PC (val, ptid)));
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2100 (long) current_gdbarch->write_pc
2101 /*TARGET_WRITE_PC ()*/);
2103 fprintf_unfiltered (file,
2104 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2105 gdbarch_unwind_dummy_id_p (current_gdbarch));
2106 fprintf_unfiltered (file,
2107 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2108 (long) current_gdbarch->unwind_dummy_id);
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2111 gdbarch_unwind_pc_p (current_gdbarch));
2112 fprintf_unfiltered (file,
2113 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2114 (long) current_gdbarch->unwind_pc);
2115 fprintf_unfiltered (file,
2116 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2117 gdbarch_unwind_sp_p (current_gdbarch));
2118 fprintf_unfiltered (file,
2119 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2120 (long) current_gdbarch->unwind_sp);
2121 #ifdef USE_STRUCT_CONVENTION
2122 fprintf_unfiltered (file,
2123 "gdbarch_dump: %s # %s\n",
2124 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2125 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2126 fprintf_unfiltered (file,
2127 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2128 (long) current_gdbarch->use_struct_convention
2129 /*USE_STRUCT_CONVENTION ()*/);
2131 #ifdef VALUE_TO_REGISTER
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: %s # %s\n",
2134 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2135 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2136 fprintf_unfiltered (file,
2137 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2138 (long) current_gdbarch->value_to_register
2139 /*VALUE_TO_REGISTER ()*/);
2141 if (current_gdbarch->dump_tdep != NULL)
2142 current_gdbarch->dump_tdep (current_gdbarch, file);
2145 struct gdbarch_tdep *
2146 gdbarch_tdep (struct gdbarch *gdbarch)
2148 if (gdbarch_debug >= 2)
2149 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2150 return gdbarch->tdep;
2154 const struct bfd_arch_info *
2155 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2157 gdb_assert (gdbarch != NULL);
2158 if (gdbarch_debug >= 2)
2159 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2160 return gdbarch->bfd_arch_info;
2164 gdbarch_byte_order (struct gdbarch *gdbarch)
2166 gdb_assert (gdbarch != NULL);
2167 if (gdbarch_debug >= 2)
2168 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2169 return gdbarch->byte_order;
2173 gdbarch_osabi (struct gdbarch *gdbarch)
2175 gdb_assert (gdbarch != NULL);
2176 if (gdbarch_debug >= 2)
2177 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2178 return gdbarch->osabi;
2182 gdbarch_short_bit (struct gdbarch *gdbarch)
2184 gdb_assert (gdbarch != NULL);
2185 /* Skip verify of short_bit, invalid_p == 0 */
2186 if (gdbarch_debug >= 2)
2187 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2188 return gdbarch->short_bit;
2192 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2195 gdbarch->short_bit = short_bit;
2199 gdbarch_int_bit (struct gdbarch *gdbarch)
2201 gdb_assert (gdbarch != NULL);
2202 /* Skip verify of int_bit, invalid_p == 0 */
2203 if (gdbarch_debug >= 2)
2204 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2205 return gdbarch->int_bit;
2209 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2212 gdbarch->int_bit = int_bit;
2216 gdbarch_long_bit (struct gdbarch *gdbarch)
2218 gdb_assert (gdbarch != NULL);
2219 /* Skip verify of long_bit, invalid_p == 0 */
2220 if (gdbarch_debug >= 2)
2221 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2222 return gdbarch->long_bit;
2226 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2229 gdbarch->long_bit = long_bit;
2233 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2235 gdb_assert (gdbarch != NULL);
2236 /* Skip verify of long_long_bit, invalid_p == 0 */
2237 if (gdbarch_debug >= 2)
2238 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2239 return gdbarch->long_long_bit;
2243 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2246 gdbarch->long_long_bit = long_long_bit;
2250 gdbarch_float_bit (struct gdbarch *gdbarch)
2252 gdb_assert (gdbarch != NULL);
2253 /* Skip verify of float_bit, invalid_p == 0 */
2254 if (gdbarch_debug >= 2)
2255 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2256 return gdbarch->float_bit;
2260 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2263 gdbarch->float_bit = float_bit;
2267 gdbarch_double_bit (struct gdbarch *gdbarch)
2269 gdb_assert (gdbarch != NULL);
2270 /* Skip verify of double_bit, invalid_p == 0 */
2271 if (gdbarch_debug >= 2)
2272 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2273 return gdbarch->double_bit;
2277 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2280 gdbarch->double_bit = double_bit;
2284 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2286 gdb_assert (gdbarch != NULL);
2287 /* Skip verify of long_double_bit, invalid_p == 0 */
2288 if (gdbarch_debug >= 2)
2289 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2290 return gdbarch->long_double_bit;
2294 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2295 int long_double_bit)
2297 gdbarch->long_double_bit = long_double_bit;
2301 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2303 gdb_assert (gdbarch != NULL);
2304 /* Skip verify of ptr_bit, invalid_p == 0 */
2305 if (gdbarch_debug >= 2)
2306 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2307 return gdbarch->ptr_bit;
2311 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2314 gdbarch->ptr_bit = ptr_bit;
2318 gdbarch_addr_bit (struct gdbarch *gdbarch)
2320 gdb_assert (gdbarch != NULL);
2321 /* Check variable changed from pre-default. */
2322 gdb_assert (gdbarch->addr_bit != 0);
2323 if (gdbarch_debug >= 2)
2324 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2325 return gdbarch->addr_bit;
2329 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2332 gdbarch->addr_bit = addr_bit;
2336 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2338 gdb_assert (gdbarch != NULL);
2339 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2340 if (gdbarch_debug >= 2)
2341 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2342 return gdbarch->bfd_vma_bit;
2346 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2349 gdbarch->bfd_vma_bit = bfd_vma_bit;
2353 gdbarch_char_signed (struct gdbarch *gdbarch)
2355 gdb_assert (gdbarch != NULL);
2356 /* Check variable changed from pre-default. */
2357 gdb_assert (gdbarch->char_signed != -1);
2358 if (gdbarch_debug >= 2)
2359 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2360 return gdbarch->char_signed;
2364 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2367 gdbarch->char_signed = char_signed;
2371 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2373 gdb_assert (gdbarch != NULL);
2374 return gdbarch->read_pc != NULL;
2378 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2380 gdb_assert (gdbarch != NULL);
2381 gdb_assert (gdbarch->read_pc != NULL);
2382 if (gdbarch_debug >= 2)
2383 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2384 return gdbarch->read_pc (ptid);
2388 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2389 gdbarch_read_pc_ftype read_pc)
2391 gdbarch->read_pc = read_pc;
2395 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2397 gdb_assert (gdbarch != NULL);
2398 gdb_assert (gdbarch->write_pc != NULL);
2399 if (gdbarch_debug >= 2)
2400 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2401 gdbarch->write_pc (val, ptid);
2405 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2406 gdbarch_write_pc_ftype write_pc)
2408 gdbarch->write_pc = write_pc;
2412 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2414 gdb_assert (gdbarch != NULL);
2415 return gdbarch->read_sp != NULL;
2419 gdbarch_read_sp (struct gdbarch *gdbarch)
2421 gdb_assert (gdbarch != NULL);
2422 gdb_assert (gdbarch->read_sp != NULL);
2423 if (gdbarch_debug >= 2)
2424 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2425 return gdbarch->read_sp ();
2429 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2430 gdbarch_read_sp_ftype read_sp)
2432 gdbarch->read_sp = read_sp;
2436 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2438 gdb_assert (gdbarch != NULL);
2439 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2440 if (gdbarch_debug >= 2)
2441 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2442 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2446 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2447 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2449 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2453 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2455 gdb_assert (gdbarch != NULL);
2456 return gdbarch->pseudo_register_read != NULL;
2460 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2462 gdb_assert (gdbarch != NULL);
2463 gdb_assert (gdbarch->pseudo_register_read != NULL);
2464 if (gdbarch_debug >= 2)
2465 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2466 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2470 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2471 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2473 gdbarch->pseudo_register_read = pseudo_register_read;
2477 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2479 gdb_assert (gdbarch != NULL);
2480 return gdbarch->pseudo_register_write != NULL;
2484 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2486 gdb_assert (gdbarch != NULL);
2487 gdb_assert (gdbarch->pseudo_register_write != NULL);
2488 if (gdbarch_debug >= 2)
2489 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2490 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2494 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2495 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2497 gdbarch->pseudo_register_write = pseudo_register_write;
2501 gdbarch_num_regs (struct gdbarch *gdbarch)
2503 gdb_assert (gdbarch != NULL);
2504 /* Check variable changed from pre-default. */
2505 gdb_assert (gdbarch->num_regs != -1);
2506 if (gdbarch_debug >= 2)
2507 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2508 return gdbarch->num_regs;
2512 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2515 gdbarch->num_regs = num_regs;
2519 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2521 gdb_assert (gdbarch != NULL);
2522 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2523 if (gdbarch_debug >= 2)
2524 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2525 return gdbarch->num_pseudo_regs;
2529 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2530 int num_pseudo_regs)
2532 gdbarch->num_pseudo_regs = num_pseudo_regs;
2536 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2538 gdb_assert (gdbarch != NULL);
2539 /* Skip verify of sp_regnum, invalid_p == 0 */
2540 if (gdbarch_debug >= 2)
2541 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2542 return gdbarch->sp_regnum;
2546 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2549 gdbarch->sp_regnum = sp_regnum;
2553 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2555 gdb_assert (gdbarch != NULL);
2556 /* Skip verify of pc_regnum, invalid_p == 0 */
2557 if (gdbarch_debug >= 2)
2558 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2559 return gdbarch->pc_regnum;
2563 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2566 gdbarch->pc_regnum = pc_regnum;
2570 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2572 gdb_assert (gdbarch != NULL);
2573 /* Skip verify of ps_regnum, invalid_p == 0 */
2574 if (gdbarch_debug >= 2)
2575 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2576 return gdbarch->ps_regnum;
2580 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2583 gdbarch->ps_regnum = ps_regnum;
2587 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2589 gdb_assert (gdbarch != NULL);
2590 /* Skip verify of fp0_regnum, invalid_p == 0 */
2591 if (gdbarch_debug >= 2)
2592 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2593 return gdbarch->fp0_regnum;
2597 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2600 gdbarch->fp0_regnum = fp0_regnum;
2604 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2606 gdb_assert (gdbarch != NULL);
2607 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2608 if (gdbarch_debug >= 2)
2609 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2610 return gdbarch->stab_reg_to_regnum (stab_regnr);
2614 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2615 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2617 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2621 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2623 gdb_assert (gdbarch != NULL);
2624 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2625 if (gdbarch_debug >= 2)
2626 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2627 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2631 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2632 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2634 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2638 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2640 gdb_assert (gdbarch != NULL);
2641 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2642 if (gdbarch_debug >= 2)
2643 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2644 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2648 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2649 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2651 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2655 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2657 gdb_assert (gdbarch != NULL);
2658 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2659 if (gdbarch_debug >= 2)
2660 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2661 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2665 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2666 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2668 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2672 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2674 gdb_assert (gdbarch != NULL);
2675 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2676 if (gdbarch_debug >= 2)
2677 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2678 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2682 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2683 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2685 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2689 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2691 gdb_assert (gdbarch != NULL);
2692 gdb_assert (gdbarch->register_name != NULL);
2693 if (gdbarch_debug >= 2)
2694 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2695 return gdbarch->register_name (regnr);
2699 set_gdbarch_register_name (struct gdbarch *gdbarch,
2700 gdbarch_register_name_ftype register_name)
2702 gdbarch->register_name = register_name;
2706 gdbarch_register_type_p (struct gdbarch *gdbarch)
2708 gdb_assert (gdbarch != NULL);
2709 return gdbarch->register_type != NULL;
2713 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2715 gdb_assert (gdbarch != NULL);
2716 gdb_assert (gdbarch->register_type != NULL);
2717 if (gdbarch_debug >= 2)
2718 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2719 return gdbarch->register_type (gdbarch, reg_nr);
2723 set_gdbarch_register_type (struct gdbarch *gdbarch,
2724 gdbarch_register_type_ftype register_type)
2726 gdbarch->register_type = register_type;
2730 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2732 gdb_assert (gdbarch != NULL);
2733 return gdbarch->deprecated_register_virtual_type != NULL;
2737 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2739 gdb_assert (gdbarch != NULL);
2740 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2741 if (gdbarch_debug >= 2)
2742 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2743 return gdbarch->deprecated_register_virtual_type (reg_nr);
2747 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2748 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2750 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2754 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2756 gdb_assert (gdbarch != NULL);
2757 if (gdbarch_debug >= 2)
2758 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2759 return gdbarch->deprecated_register_bytes;
2763 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2764 int deprecated_register_bytes)
2766 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2770 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2772 gdb_assert (gdbarch != NULL);
2773 return gdbarch->deprecated_register_byte != generic_register_byte;
2777 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2779 gdb_assert (gdbarch != NULL);
2780 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2781 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2782 if (gdbarch_debug >= 2)
2783 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2784 return gdbarch->deprecated_register_byte (reg_nr);
2788 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2789 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2791 gdbarch->deprecated_register_byte = deprecated_register_byte;
2795 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2797 gdb_assert (gdbarch != NULL);
2798 return gdbarch->deprecated_register_raw_size != generic_register_size;
2802 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2804 gdb_assert (gdbarch != NULL);
2805 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2806 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2807 if (gdbarch_debug >= 2)
2808 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2809 return gdbarch->deprecated_register_raw_size (reg_nr);
2813 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2814 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2816 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2820 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2822 gdb_assert (gdbarch != NULL);
2823 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2827 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2829 gdb_assert (gdbarch != NULL);
2830 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2831 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2832 if (gdbarch_debug >= 2)
2833 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2834 return gdbarch->deprecated_register_virtual_size (reg_nr);
2838 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2839 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2841 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2845 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
2847 gdb_assert (gdbarch != NULL);
2848 return gdbarch->deprecated_max_register_raw_size != 0;
2852 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
2854 gdb_assert (gdbarch != NULL);
2855 if (gdbarch_debug >= 2)
2856 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
2857 return gdbarch->deprecated_max_register_raw_size;
2861 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
2862 int deprecated_max_register_raw_size)
2864 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
2868 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
2870 gdb_assert (gdbarch != NULL);
2871 return gdbarch->deprecated_max_register_virtual_size != 0;
2875 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
2877 gdb_assert (gdbarch != NULL);
2878 if (gdbarch_debug >= 2)
2879 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
2880 return gdbarch->deprecated_max_register_virtual_size;
2884 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
2885 int deprecated_max_register_virtual_size)
2887 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
2891 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2893 gdb_assert (gdbarch != NULL);
2894 return gdbarch->unwind_dummy_id != NULL;
2898 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2900 gdb_assert (gdbarch != NULL);
2901 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2902 if (gdbarch_debug >= 2)
2903 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2904 return gdbarch->unwind_dummy_id (gdbarch, info);
2908 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2909 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2911 gdbarch->unwind_dummy_id = unwind_dummy_id;
2915 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2917 gdb_assert (gdbarch != NULL);
2918 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2922 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2924 gdb_assert (gdbarch != NULL);
2925 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2926 if (gdbarch_debug >= 2)
2927 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2928 gdbarch->deprecated_save_dummy_frame_tos (sp);
2932 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2933 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2935 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2939 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2941 gdb_assert (gdbarch != NULL);
2942 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2943 if (gdbarch_debug >= 2)
2944 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2945 return gdbarch->deprecated_fp_regnum;
2949 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2950 int deprecated_fp_regnum)
2952 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2956 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2958 gdb_assert (gdbarch != NULL);
2959 return gdbarch->deprecated_target_read_fp != NULL;
2963 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2965 gdb_assert (gdbarch != NULL);
2966 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
2967 if (gdbarch_debug >= 2)
2968 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2969 return gdbarch->deprecated_target_read_fp ();
2973 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2974 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2976 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2980 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2982 gdb_assert (gdbarch != NULL);
2983 return gdbarch->push_dummy_call != NULL;
2987 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2989 gdb_assert (gdbarch != NULL);
2990 gdb_assert (gdbarch->push_dummy_call != NULL);
2991 if (gdbarch_debug >= 2)
2992 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2993 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2997 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2998 gdbarch_push_dummy_call_ftype push_dummy_call)
3000 gdbarch->push_dummy_call = push_dummy_call;
3004 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3006 gdb_assert (gdbarch != NULL);
3007 return gdbarch->deprecated_push_arguments != NULL;
3011 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3013 gdb_assert (gdbarch != NULL);
3014 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3015 if (gdbarch_debug >= 2)
3016 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3017 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3021 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3022 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3024 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3028 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3030 gdb_assert (gdbarch != NULL);
3031 return gdbarch->deprecated_push_return_address != NULL;
3035 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3037 gdb_assert (gdbarch != NULL);
3038 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3039 if (gdbarch_debug >= 2)
3040 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3041 return gdbarch->deprecated_push_return_address (pc, sp);
3045 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3046 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3048 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3052 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3054 gdb_assert (gdbarch != NULL);
3055 return gdbarch->deprecated_dummy_write_sp != NULL;
3059 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3061 gdb_assert (gdbarch != NULL);
3062 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3063 if (gdbarch_debug >= 2)
3064 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3065 gdbarch->deprecated_dummy_write_sp (val);
3069 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3070 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3072 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3076 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3078 gdb_assert (gdbarch != NULL);
3079 if (gdbarch_debug >= 2)
3080 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3081 return gdbarch->deprecated_register_size;
3085 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3086 int deprecated_register_size)
3088 gdbarch->deprecated_register_size = deprecated_register_size;
3092 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3094 gdb_assert (gdbarch != NULL);
3095 /* Skip verify of call_dummy_location, invalid_p == 0 */
3096 if (gdbarch_debug >= 2)
3097 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3098 return gdbarch->call_dummy_location;
3102 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3103 int call_dummy_location)
3105 gdbarch->call_dummy_location = call_dummy_location;
3109 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3111 gdb_assert (gdbarch != NULL);
3112 return gdbarch->push_dummy_code != NULL;
3116 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)
3118 gdb_assert (gdbarch != NULL);
3119 gdb_assert (gdbarch->push_dummy_code != NULL);
3120 if (gdbarch_debug >= 2)
3121 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3122 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3126 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3127 gdbarch_push_dummy_code_ftype push_dummy_code)
3129 gdbarch->push_dummy_code = push_dummy_code;
3133 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3135 gdb_assert (gdbarch != NULL);
3136 return gdbarch->deprecated_do_registers_info != NULL;
3140 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3142 gdb_assert (gdbarch != NULL);
3143 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3144 if (gdbarch_debug >= 2)
3145 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3146 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3150 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3151 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3153 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3157 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3159 gdb_assert (gdbarch != NULL);
3160 gdb_assert (gdbarch->print_registers_info != NULL);
3161 if (gdbarch_debug >= 2)
3162 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3163 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3167 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3168 gdbarch_print_registers_info_ftype print_registers_info)
3170 gdbarch->print_registers_info = print_registers_info;
3174 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3176 gdb_assert (gdbarch != NULL);
3177 return gdbarch->print_float_info != NULL;
3181 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3183 gdb_assert (gdbarch != NULL);
3184 gdb_assert (gdbarch->print_float_info != NULL);
3185 if (gdbarch_debug >= 2)
3186 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3187 gdbarch->print_float_info (gdbarch, file, frame, args);
3191 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3192 gdbarch_print_float_info_ftype print_float_info)
3194 gdbarch->print_float_info = print_float_info;
3198 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3200 gdb_assert (gdbarch != NULL);
3201 return gdbarch->print_vector_info != NULL;
3205 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3207 gdb_assert (gdbarch != NULL);
3208 gdb_assert (gdbarch->print_vector_info != NULL);
3209 if (gdbarch_debug >= 2)
3210 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3211 gdbarch->print_vector_info (gdbarch, file, frame, args);
3215 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3216 gdbarch_print_vector_info_ftype print_vector_info)
3218 gdbarch->print_vector_info = print_vector_info;
3222 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3224 gdb_assert (gdbarch != NULL);
3225 gdb_assert (gdbarch->register_sim_regno != NULL);
3226 if (gdbarch_debug >= 2)
3227 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3228 return gdbarch->register_sim_regno (reg_nr);
3232 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3233 gdbarch_register_sim_regno_ftype register_sim_regno)
3235 gdbarch->register_sim_regno = register_sim_regno;
3239 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3241 gdb_assert (gdbarch != NULL);
3242 return gdbarch->register_bytes_ok != NULL;
3246 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3248 gdb_assert (gdbarch != NULL);
3249 gdb_assert (gdbarch->register_bytes_ok != NULL);
3250 if (gdbarch_debug >= 2)
3251 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3252 return gdbarch->register_bytes_ok (nr_bytes);
3256 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3257 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3259 gdbarch->register_bytes_ok = register_bytes_ok;
3263 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3265 gdb_assert (gdbarch != NULL);
3266 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3267 if (gdbarch_debug >= 2)
3268 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3269 return gdbarch->cannot_fetch_register (regnum);
3273 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3274 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3276 gdbarch->cannot_fetch_register = cannot_fetch_register;
3280 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3282 gdb_assert (gdbarch != NULL);
3283 gdb_assert (gdbarch->cannot_store_register != NULL);
3284 if (gdbarch_debug >= 2)
3285 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3286 return gdbarch->cannot_store_register (regnum);
3290 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3291 gdbarch_cannot_store_register_ftype cannot_store_register)
3293 gdbarch->cannot_store_register = cannot_store_register;
3297 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3299 gdb_assert (gdbarch != NULL);
3300 return gdbarch->get_longjmp_target != NULL;
3304 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3306 gdb_assert (gdbarch != NULL);
3307 gdb_assert (gdbarch->get_longjmp_target != NULL);
3308 if (gdbarch_debug >= 2)
3309 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3310 return gdbarch->get_longjmp_target (pc);
3314 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3315 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3317 gdbarch->get_longjmp_target = get_longjmp_target;
3321 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3323 gdb_assert (gdbarch != NULL);
3324 return gdbarch->deprecated_init_frame_pc != NULL;
3328 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3330 gdb_assert (gdbarch != NULL);
3331 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3332 if (gdbarch_debug >= 2)
3333 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3334 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3338 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3339 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3341 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3345 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3347 gdb_assert (gdbarch != NULL);
3348 if (gdbarch_debug >= 2)
3349 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3350 return gdbarch->believe_pcc_promotion;
3354 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3355 int believe_pcc_promotion)
3357 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3361 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3363 gdb_assert (gdbarch != NULL);
3364 return gdbarch->deprecated_get_saved_register != NULL;
3368 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)
3370 gdb_assert (gdbarch != NULL);
3371 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3372 if (gdbarch_debug >= 2)
3373 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3374 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3378 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3379 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3381 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3385 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3387 gdb_assert (gdbarch != NULL);
3388 gdb_assert (gdbarch->convert_register_p != NULL);
3389 if (gdbarch_debug >= 2)
3390 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3391 return gdbarch->convert_register_p (regnum, type);
3395 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3396 gdbarch_convert_register_p_ftype convert_register_p)
3398 gdbarch->convert_register_p = convert_register_p;
3402 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3404 gdb_assert (gdbarch != NULL);
3405 gdb_assert (gdbarch->register_to_value != NULL);
3406 if (gdbarch_debug >= 2)
3407 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3408 gdbarch->register_to_value (frame, regnum, type, buf);
3412 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3413 gdbarch_register_to_value_ftype register_to_value)
3415 gdbarch->register_to_value = register_to_value;
3419 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3421 gdb_assert (gdbarch != NULL);
3422 gdb_assert (gdbarch->value_to_register != NULL);
3423 if (gdbarch_debug >= 2)
3424 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3425 gdbarch->value_to_register (frame, regnum, type, buf);
3429 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3430 gdbarch_value_to_register_ftype value_to_register)
3432 gdbarch->value_to_register = value_to_register;
3436 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3438 gdb_assert (gdbarch != NULL);
3439 gdb_assert (gdbarch->pointer_to_address != NULL);
3440 if (gdbarch_debug >= 2)
3441 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3442 return gdbarch->pointer_to_address (type, buf);
3446 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3447 gdbarch_pointer_to_address_ftype pointer_to_address)
3449 gdbarch->pointer_to_address = pointer_to_address;
3453 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3455 gdb_assert (gdbarch != NULL);
3456 gdb_assert (gdbarch->address_to_pointer != NULL);
3457 if (gdbarch_debug >= 2)
3458 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3459 gdbarch->address_to_pointer (type, buf, addr);
3463 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3464 gdbarch_address_to_pointer_ftype address_to_pointer)
3466 gdbarch->address_to_pointer = address_to_pointer;
3470 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3472 gdb_assert (gdbarch != NULL);
3473 return gdbarch->integer_to_address != NULL;
3477 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3479 gdb_assert (gdbarch != NULL);
3480 gdb_assert (gdbarch->integer_to_address != NULL);
3481 if (gdbarch_debug >= 2)
3482 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3483 return gdbarch->integer_to_address (type, buf);
3487 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3488 gdbarch_integer_to_address_ftype integer_to_address)
3490 gdbarch->integer_to_address = integer_to_address;
3494 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3496 gdb_assert (gdbarch != NULL);
3497 return gdbarch->deprecated_pop_frame != NULL;
3501 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3503 gdb_assert (gdbarch != NULL);
3504 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3505 if (gdbarch_debug >= 2)
3506 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3507 gdbarch->deprecated_pop_frame ();
3511 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3512 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3514 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3518 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3520 gdb_assert (gdbarch != NULL);
3521 return gdbarch->deprecated_store_struct_return != NULL;
3525 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3527 gdb_assert (gdbarch != NULL);
3528 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3529 if (gdbarch_debug >= 2)
3530 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3531 gdbarch->deprecated_store_struct_return (addr, sp);
3535 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3536 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3538 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3542 gdbarch_return_value_p (struct gdbarch *gdbarch)
3544 gdb_assert (gdbarch != NULL);
3545 return gdbarch->return_value != NULL;
3548 enum return_value_convention
3549 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3551 gdb_assert (gdbarch != NULL);
3552 gdb_assert (gdbarch->return_value != NULL);
3553 if (gdbarch_debug >= 2)
3554 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3555 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3559 set_gdbarch_return_value (struct gdbarch *gdbarch,
3560 gdbarch_return_value_ftype return_value)
3562 gdbarch->return_value = return_value;
3566 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3568 gdb_assert (gdbarch != NULL);
3569 gdb_assert (gdbarch->extract_return_value != NULL);
3570 if (gdbarch_debug >= 2)
3571 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3572 gdbarch->extract_return_value (type, regcache, valbuf);
3576 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3577 gdbarch_extract_return_value_ftype extract_return_value)
3579 gdbarch->extract_return_value = extract_return_value;
3583 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3585 gdb_assert (gdbarch != NULL);
3586 gdb_assert (gdbarch->store_return_value != NULL);
3587 if (gdbarch_debug >= 2)
3588 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3589 gdbarch->store_return_value (type, regcache, valbuf);
3593 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3594 gdbarch_store_return_value_ftype store_return_value)
3596 gdbarch->store_return_value = store_return_value;
3600 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3602 gdb_assert (gdbarch != NULL);
3603 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3604 if (gdbarch_debug >= 2)
3605 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3606 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3610 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3611 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3613 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3617 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3619 gdb_assert (gdbarch != NULL);
3620 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3621 if (gdbarch_debug >= 2)
3622 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3623 gdbarch->deprecated_store_return_value (type, valbuf);
3627 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3628 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3630 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3634 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3636 gdb_assert (gdbarch != NULL);
3637 gdb_assert (gdbarch->use_struct_convention != NULL);
3638 if (gdbarch_debug >= 2)
3639 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3640 return gdbarch->use_struct_convention (gcc_p, value_type);
3644 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3645 gdbarch_use_struct_convention_ftype use_struct_convention)
3647 gdbarch->use_struct_convention = use_struct_convention;
3651 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3653 gdb_assert (gdbarch != NULL);
3654 return gdbarch->deprecated_extract_struct_value_address != NULL;
3658 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3660 gdb_assert (gdbarch != NULL);
3661 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3662 if (gdbarch_debug >= 2)
3663 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3664 return gdbarch->deprecated_extract_struct_value_address (regcache);
3668 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3669 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3671 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3675 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3677 gdb_assert (gdbarch != NULL);
3678 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3682 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3684 gdb_assert (gdbarch != NULL);
3685 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3686 if (gdbarch_debug >= 2)
3687 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3688 gdbarch->deprecated_frame_init_saved_regs (frame);
3692 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3693 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3695 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3699 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3701 gdb_assert (gdbarch != NULL);
3702 return gdbarch->deprecated_init_extra_frame_info != NULL;
3706 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3708 gdb_assert (gdbarch != NULL);
3709 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3710 if (gdbarch_debug >= 2)
3711 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3712 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3716 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3717 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3719 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3723 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3725 gdb_assert (gdbarch != NULL);
3726 gdb_assert (gdbarch->skip_prologue != NULL);
3727 if (gdbarch_debug >= 2)
3728 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3729 return gdbarch->skip_prologue (ip);
3733 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3734 gdbarch_skip_prologue_ftype skip_prologue)
3736 gdbarch->skip_prologue = skip_prologue;
3740 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3742 gdb_assert (gdbarch != NULL);
3743 gdb_assert (gdbarch->inner_than != NULL);
3744 if (gdbarch_debug >= 2)
3745 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3746 return gdbarch->inner_than (lhs, rhs);
3750 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3751 gdbarch_inner_than_ftype inner_than)
3753 gdbarch->inner_than = inner_than;
3756 const unsigned char *
3757 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3759 gdb_assert (gdbarch != NULL);
3760 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3761 if (gdbarch_debug >= 2)
3762 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3763 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3767 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3768 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3770 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3774 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3776 gdb_assert (gdbarch != NULL);
3777 return gdbarch->adjust_breakpoint_address != NULL;
3781 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3783 gdb_assert (gdbarch != NULL);
3784 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3785 if (gdbarch_debug >= 2)
3786 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3787 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3791 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3792 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3794 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3798 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3800 gdb_assert (gdbarch != NULL);
3801 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3802 if (gdbarch_debug >= 2)
3803 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3804 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3808 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3809 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3811 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3815 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3817 gdb_assert (gdbarch != NULL);
3818 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3819 if (gdbarch_debug >= 2)
3820 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3821 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3825 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3826 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3828 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3832 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3834 gdb_assert (gdbarch != NULL);
3835 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3838 return gdbarch->decr_pc_after_break;
3842 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3843 CORE_ADDR decr_pc_after_break)
3845 gdbarch->decr_pc_after_break = decr_pc_after_break;
3849 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3851 gdb_assert (gdbarch != NULL);
3852 /* Skip verify of function_start_offset, invalid_p == 0 */
3853 if (gdbarch_debug >= 2)
3854 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3855 return gdbarch->function_start_offset;
3859 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3860 CORE_ADDR function_start_offset)
3862 gdbarch->function_start_offset = function_start_offset;
3866 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)
3868 gdb_assert (gdbarch != NULL);
3869 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3870 if (gdbarch_debug >= 2)
3871 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3872 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3876 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3877 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3879 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3883 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3885 gdb_assert (gdbarch != NULL);
3886 /* Skip verify of frame_args_skip, invalid_p == 0 */
3887 if (gdbarch_debug >= 2)
3888 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3889 return gdbarch->frame_args_skip;
3893 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3894 CORE_ADDR frame_args_skip)
3896 gdbarch->frame_args_skip = frame_args_skip;
3900 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
3902 gdb_assert (gdbarch != NULL);
3903 return gdbarch->deprecated_frameless_function_invocation != NULL;
3907 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3909 gdb_assert (gdbarch != NULL);
3910 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
3911 if (gdbarch_debug >= 2)
3912 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
3913 return gdbarch->deprecated_frameless_function_invocation (fi);
3917 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
3918 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
3920 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
3924 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
3926 gdb_assert (gdbarch != NULL);
3927 return gdbarch->deprecated_frame_chain != NULL;
3931 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3933 gdb_assert (gdbarch != NULL);
3934 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
3935 if (gdbarch_debug >= 2)
3936 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
3937 return gdbarch->deprecated_frame_chain (frame);
3941 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
3942 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
3944 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
3948 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
3950 gdb_assert (gdbarch != NULL);
3951 return gdbarch->deprecated_frame_chain_valid != NULL;
3955 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3957 gdb_assert (gdbarch != NULL);
3958 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
3959 if (gdbarch_debug >= 2)
3960 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
3961 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
3965 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
3966 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
3968 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
3972 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
3974 gdb_assert (gdbarch != NULL);
3975 return gdbarch->deprecated_frame_saved_pc != NULL;
3979 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3981 gdb_assert (gdbarch != NULL);
3982 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
3983 if (gdbarch_debug >= 2)
3984 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
3985 return gdbarch->deprecated_frame_saved_pc (fi);
3989 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
3990 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
3992 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
3996 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3998 gdb_assert (gdbarch != NULL);
3999 return gdbarch->unwind_pc != NULL;
4003 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4005 gdb_assert (gdbarch != NULL);
4006 gdb_assert (gdbarch->unwind_pc != NULL);
4007 if (gdbarch_debug >= 2)
4008 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4009 return gdbarch->unwind_pc (gdbarch, next_frame);
4013 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4014 gdbarch_unwind_pc_ftype unwind_pc)
4016 gdbarch->unwind_pc = unwind_pc;
4020 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4022 gdb_assert (gdbarch != NULL);
4023 return gdbarch->unwind_sp != NULL;
4027 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4029 gdb_assert (gdbarch != NULL);
4030 gdb_assert (gdbarch->unwind_sp != NULL);
4031 if (gdbarch_debug >= 2)
4032 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4033 return gdbarch->unwind_sp (gdbarch, next_frame);
4037 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4038 gdbarch_unwind_sp_ftype unwind_sp)
4040 gdbarch->unwind_sp = unwind_sp;
4044 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4046 gdb_assert (gdbarch != NULL);
4047 return gdbarch->deprecated_frame_args_address != get_frame_base;
4051 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4053 gdb_assert (gdbarch != NULL);
4054 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4055 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4056 if (gdbarch_debug >= 2)
4057 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4058 return gdbarch->deprecated_frame_args_address (fi);
4062 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4063 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4065 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4069 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4071 gdb_assert (gdbarch != NULL);
4072 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4076 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4078 gdb_assert (gdbarch != NULL);
4079 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4080 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4081 if (gdbarch_debug >= 2)
4082 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4083 return gdbarch->deprecated_frame_locals_address (fi);
4087 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4088 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4090 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4094 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4096 gdb_assert (gdbarch != NULL);
4097 return gdbarch->deprecated_saved_pc_after_call != NULL;
4101 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4103 gdb_assert (gdbarch != NULL);
4104 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4105 if (gdbarch_debug >= 2)
4106 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4107 return gdbarch->deprecated_saved_pc_after_call (frame);
4111 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4112 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4114 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4118 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4120 gdb_assert (gdbarch != NULL);
4121 return gdbarch->frame_num_args != NULL;
4125 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4127 gdb_assert (gdbarch != NULL);
4128 gdb_assert (gdbarch->frame_num_args != NULL);
4129 if (gdbarch_debug >= 2)
4130 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4131 return gdbarch->frame_num_args (frame);
4135 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4136 gdbarch_frame_num_args_ftype frame_num_args)
4138 gdbarch->frame_num_args = frame_num_args;
4142 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4144 gdb_assert (gdbarch != NULL);
4145 return gdbarch->deprecated_stack_align != NULL;
4149 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4151 gdb_assert (gdbarch != NULL);
4152 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4153 if (gdbarch_debug >= 2)
4154 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4155 return gdbarch->deprecated_stack_align (sp);
4159 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4160 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4162 gdbarch->deprecated_stack_align = deprecated_stack_align;
4166 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4168 gdb_assert (gdbarch != NULL);
4169 return gdbarch->frame_align != NULL;
4173 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4175 gdb_assert (gdbarch != NULL);
4176 gdb_assert (gdbarch->frame_align != NULL);
4177 if (gdbarch_debug >= 2)
4178 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4179 return gdbarch->frame_align (gdbarch, address);
4183 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4184 gdbarch_frame_align_ftype frame_align)
4186 gdbarch->frame_align = frame_align;
4190 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4192 gdb_assert (gdbarch != NULL);
4193 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4197 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4199 gdb_assert (gdbarch != NULL);
4200 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4201 if (gdbarch_debug >= 2)
4202 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4203 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4207 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4208 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4210 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4214 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4216 gdb_assert (gdbarch != NULL);
4217 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4218 if (gdbarch_debug >= 2)
4219 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4220 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4224 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4225 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4227 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4231 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4233 gdb_assert (gdbarch != NULL);
4234 if (gdbarch_debug >= 2)
4235 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4236 return gdbarch->frame_red_zone_size;
4240 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4241 int frame_red_zone_size)
4243 gdbarch->frame_red_zone_size = frame_red_zone_size;
4246 const struct floatformat *
4247 gdbarch_float_format (struct gdbarch *gdbarch)
4249 gdb_assert (gdbarch != NULL);
4250 if (gdbarch_debug >= 2)
4251 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4252 return gdbarch->float_format;
4256 set_gdbarch_float_format (struct gdbarch *gdbarch,
4257 const struct floatformat * float_format)
4259 gdbarch->float_format = float_format;
4262 const struct floatformat *
4263 gdbarch_double_format (struct gdbarch *gdbarch)
4265 gdb_assert (gdbarch != NULL);
4266 if (gdbarch_debug >= 2)
4267 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4268 return gdbarch->double_format;
4272 set_gdbarch_double_format (struct gdbarch *gdbarch,
4273 const struct floatformat * double_format)
4275 gdbarch->double_format = double_format;
4278 const struct floatformat *
4279 gdbarch_long_double_format (struct gdbarch *gdbarch)
4281 gdb_assert (gdbarch != NULL);
4282 if (gdbarch_debug >= 2)
4283 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4284 return gdbarch->long_double_format;
4288 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4289 const struct floatformat * long_double_format)
4291 gdbarch->long_double_format = long_double_format;
4295 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4297 gdb_assert (gdbarch != NULL);
4298 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4299 if (gdbarch_debug >= 2)
4300 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4301 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4305 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4306 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4308 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4312 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4314 gdb_assert (gdbarch != NULL);
4315 gdb_assert (gdbarch->addr_bits_remove != NULL);
4316 if (gdbarch_debug >= 2)
4317 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4318 return gdbarch->addr_bits_remove (addr);
4322 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4323 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4325 gdbarch->addr_bits_remove = addr_bits_remove;
4329 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4331 gdb_assert (gdbarch != NULL);
4332 gdb_assert (gdbarch->smash_text_address != NULL);
4333 if (gdbarch_debug >= 2)
4334 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4335 return gdbarch->smash_text_address (addr);
4339 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4340 gdbarch_smash_text_address_ftype smash_text_address)
4342 gdbarch->smash_text_address = smash_text_address;
4346 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4348 gdb_assert (gdbarch != NULL);
4349 return gdbarch->software_single_step != NULL;
4353 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4355 gdb_assert (gdbarch != NULL);
4356 gdb_assert (gdbarch->software_single_step != NULL);
4357 if (gdbarch_debug >= 2)
4358 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4359 gdbarch->software_single_step (sig, insert_breakpoints_p);
4363 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4364 gdbarch_software_single_step_ftype software_single_step)
4366 gdbarch->software_single_step = software_single_step;
4370 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4372 gdb_assert (gdbarch != NULL);
4373 gdb_assert (gdbarch->print_insn != NULL);
4374 if (gdbarch_debug >= 2)
4375 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4376 return gdbarch->print_insn (vma, info);
4380 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4381 gdbarch_print_insn_ftype print_insn)
4383 gdbarch->print_insn = print_insn;
4387 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4389 gdb_assert (gdbarch != NULL);
4390 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4391 if (gdbarch_debug >= 2)
4392 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4393 return gdbarch->skip_trampoline_code (pc);
4397 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4398 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4400 gdbarch->skip_trampoline_code = skip_trampoline_code;
4404 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4406 gdb_assert (gdbarch != NULL);
4407 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4408 if (gdbarch_debug >= 2)
4409 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4410 return gdbarch->skip_solib_resolver (gdbarch, pc);
4414 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4415 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4417 gdbarch->skip_solib_resolver = skip_solib_resolver;
4421 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4423 gdb_assert (gdbarch != NULL);
4424 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4425 if (gdbarch_debug >= 2)
4426 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4427 return gdbarch->in_solib_call_trampoline (pc, name);
4431 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4432 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4434 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4438 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4440 gdb_assert (gdbarch != NULL);
4441 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4442 if (gdbarch_debug >= 2)
4443 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4444 return gdbarch->in_solib_return_trampoline (pc, name);
4448 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4449 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4451 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4455 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4457 gdb_assert (gdbarch != NULL);
4458 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4459 if (gdbarch_debug >= 2)
4460 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4461 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4465 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4466 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4468 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4472 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4474 gdb_assert (gdbarch != NULL);
4475 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4476 if (gdbarch_debug >= 2)
4477 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4478 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4482 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4483 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4485 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4489 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4491 gdb_assert (gdbarch != NULL);
4492 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4493 if (gdbarch_debug >= 2)
4494 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4495 gdbarch->elf_make_msymbol_special (sym, msym);
4499 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4500 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4502 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4506 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4508 gdb_assert (gdbarch != NULL);
4509 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4510 if (gdbarch_debug >= 2)
4511 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4512 gdbarch->coff_make_msymbol_special (val, msym);
4516 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4517 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4519 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4523 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4525 gdb_assert (gdbarch != NULL);
4526 /* Skip verify of name_of_malloc, invalid_p == 0 */
4527 if (gdbarch_debug >= 2)
4528 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4529 return gdbarch->name_of_malloc;
4533 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4534 const char * name_of_malloc)
4536 gdbarch->name_of_malloc = name_of_malloc;
4540 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4542 gdb_assert (gdbarch != NULL);
4543 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4544 if (gdbarch_debug >= 2)
4545 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4546 return gdbarch->cannot_step_breakpoint;
4550 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4551 int cannot_step_breakpoint)
4553 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4557 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4559 gdb_assert (gdbarch != NULL);
4560 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4561 if (gdbarch_debug >= 2)
4562 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4563 return gdbarch->have_nonsteppable_watchpoint;
4567 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4568 int have_nonsteppable_watchpoint)
4570 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4574 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4576 gdb_assert (gdbarch != NULL);
4577 return gdbarch->address_class_type_flags != NULL;
4581 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4583 gdb_assert (gdbarch != NULL);
4584 gdb_assert (gdbarch->address_class_type_flags != NULL);
4585 if (gdbarch_debug >= 2)
4586 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4587 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4591 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4592 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4594 gdbarch->address_class_type_flags = address_class_type_flags;
4598 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4600 gdb_assert (gdbarch != NULL);
4601 return gdbarch->address_class_type_flags_to_name != NULL;
4605 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4607 gdb_assert (gdbarch != NULL);
4608 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4609 if (gdbarch_debug >= 2)
4610 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4611 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4615 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4616 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4618 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4622 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4624 gdb_assert (gdbarch != NULL);
4625 return gdbarch->address_class_name_to_type_flags != NULL;
4629 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4631 gdb_assert (gdbarch != NULL);
4632 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4633 if (gdbarch_debug >= 2)
4634 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4635 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4639 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4640 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4642 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4646 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4648 gdb_assert (gdbarch != NULL);
4649 gdb_assert (gdbarch->register_reggroup_p != NULL);
4650 if (gdbarch_debug >= 2)
4651 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4652 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4656 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4657 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4659 gdbarch->register_reggroup_p = register_reggroup_p;
4663 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4665 gdb_assert (gdbarch != NULL);
4666 return gdbarch->fetch_pointer_argument != NULL;
4670 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4672 gdb_assert (gdbarch != NULL);
4673 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4674 if (gdbarch_debug >= 2)
4675 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4676 return gdbarch->fetch_pointer_argument (frame, argi, type);
4680 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4681 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4683 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4687 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4689 gdb_assert (gdbarch != NULL);
4690 return gdbarch->regset_from_core_section != NULL;
4693 const struct regset *
4694 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4696 gdb_assert (gdbarch != NULL);
4697 gdb_assert (gdbarch->regset_from_core_section != NULL);
4698 if (gdbarch_debug >= 2)
4699 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4700 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4704 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4705 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4707 gdbarch->regset_from_core_section = regset_from_core_section;
4711 /* Keep a registry of per-architecture data-pointers required by GDB
4718 gdbarch_data_pre_init_ftype *pre_init;
4719 gdbarch_data_post_init_ftype *post_init;
4722 struct gdbarch_data_registration
4724 struct gdbarch_data *data;
4725 struct gdbarch_data_registration *next;
4728 struct gdbarch_data_registry
4731 struct gdbarch_data_registration *registrations;
4734 struct gdbarch_data_registry gdbarch_data_registry =
4739 static struct gdbarch_data *
4740 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4741 gdbarch_data_post_init_ftype *post_init)
4743 struct gdbarch_data_registration **curr;
4744 /* Append the new registraration. */
4745 for (curr = &gdbarch_data_registry.registrations;
4747 curr = &(*curr)->next);
4748 (*curr) = XMALLOC (struct gdbarch_data_registration);
4749 (*curr)->next = NULL;
4750 (*curr)->data = XMALLOC (struct gdbarch_data);
4751 (*curr)->data->index = gdbarch_data_registry.nr++;
4752 (*curr)->data->pre_init = pre_init;
4753 (*curr)->data->post_init = post_init;
4754 (*curr)->data->init_p = 1;
4755 return (*curr)->data;
4758 struct gdbarch_data *
4759 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4761 return gdbarch_data_register (pre_init, NULL);
4764 struct gdbarch_data *
4765 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4767 return gdbarch_data_register (NULL, post_init);
4770 /* Create/delete the gdbarch data vector. */
4773 alloc_gdbarch_data (struct gdbarch *gdbarch)
4775 gdb_assert (gdbarch->data == NULL);
4776 gdbarch->nr_data = gdbarch_data_registry.nr;
4777 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4780 /* Initialize the current value of the specified per-architecture
4784 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4785 struct gdbarch_data *data,
4788 gdb_assert (data->index < gdbarch->nr_data);
4789 gdb_assert (gdbarch->data[data->index] == NULL);
4790 gdb_assert (data->pre_init == NULL);
4791 gdbarch->data[data->index] = pointer;
4794 /* Return the current value of the specified per-architecture
4798 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4800 gdb_assert (data->index < gdbarch->nr_data);
4801 if (gdbarch->data[data->index] == NULL)
4803 /* The data-pointer isn't initialized, call init() to get a
4805 if (data->pre_init != NULL)
4806 /* Mid architecture creation: pass just the obstack, and not
4807 the entire architecture, as that way it isn't possible for
4808 pre-init code to refer to undefined architecture
4810 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4811 else if (gdbarch->initialized_p
4812 && data->post_init != NULL)
4813 /* Post architecture creation: pass the entire architecture
4814 (as all fields are valid), but be careful to also detect
4815 recursive references. */
4817 gdb_assert (data->init_p);
4819 gdbarch->data[data->index] = data->post_init (gdbarch);
4823 /* The architecture initialization hasn't completed - punt -
4824 hope that the caller knows what they are doing. Once
4825 deprecated_set_gdbarch_data has been initialized, this can be
4826 changed to an internal error. */
4828 gdb_assert (gdbarch->data[data->index] != NULL);
4830 return gdbarch->data[data->index];
4835 /* Keep a registry of swapped data required by GDB modules. */
4840 struct gdbarch_swap_registration *source;
4841 struct gdbarch_swap *next;
4844 struct gdbarch_swap_registration
4847 unsigned long sizeof_data;
4848 gdbarch_swap_ftype *init;
4849 struct gdbarch_swap_registration *next;
4852 struct gdbarch_swap_registry
4855 struct gdbarch_swap_registration *registrations;
4858 struct gdbarch_swap_registry gdbarch_swap_registry =
4864 deprecated_register_gdbarch_swap (void *data,
4865 unsigned long sizeof_data,
4866 gdbarch_swap_ftype *init)
4868 struct gdbarch_swap_registration **rego;
4869 for (rego = &gdbarch_swap_registry.registrations;
4871 rego = &(*rego)->next);
4872 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4873 (*rego)->next = NULL;
4874 (*rego)->init = init;
4875 (*rego)->data = data;
4876 (*rego)->sizeof_data = sizeof_data;
4880 current_gdbarch_swap_init_hack (void)
4882 struct gdbarch_swap_registration *rego;
4883 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4884 for (rego = gdbarch_swap_registry.registrations;
4888 if (rego->data != NULL)
4890 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4891 struct gdbarch_swap);
4892 (*curr)->source = rego;
4893 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4895 (*curr)->next = NULL;
4896 curr = &(*curr)->next;
4898 if (rego->init != NULL)
4903 static struct gdbarch *
4904 current_gdbarch_swap_out_hack (void)
4906 struct gdbarch *old_gdbarch = current_gdbarch;
4907 struct gdbarch_swap *curr;
4909 gdb_assert (old_gdbarch != NULL);
4910 for (curr = old_gdbarch->swap;
4914 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4915 memset (curr->source->data, 0, curr->source->sizeof_data);
4917 current_gdbarch = NULL;
4922 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
4924 struct gdbarch_swap *curr;
4926 gdb_assert (current_gdbarch == NULL);
4927 for (curr = new_gdbarch->swap;
4930 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4931 current_gdbarch = new_gdbarch;
4935 /* Keep a registry of the architectures known by GDB. */
4937 struct gdbarch_registration
4939 enum bfd_architecture bfd_architecture;
4940 gdbarch_init_ftype *init;
4941 gdbarch_dump_tdep_ftype *dump_tdep;
4942 struct gdbarch_list *arches;
4943 struct gdbarch_registration *next;
4946 static struct gdbarch_registration *gdbarch_registry = NULL;
4949 append_name (const char ***buf, int *nr, const char *name)
4951 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4957 gdbarch_printable_names (void)
4959 /* Accumulate a list of names based on the registed list of
4961 enum bfd_architecture a;
4963 const char **arches = NULL;
4964 struct gdbarch_registration *rego;
4965 for (rego = gdbarch_registry;
4969 const struct bfd_arch_info *ap;
4970 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4972 internal_error (__FILE__, __LINE__,
4973 "gdbarch_architecture_names: multi-arch unknown");
4976 append_name (&arches, &nr_arches, ap->printable_name);
4981 append_name (&arches, &nr_arches, NULL);
4987 gdbarch_register (enum bfd_architecture bfd_architecture,
4988 gdbarch_init_ftype *init,
4989 gdbarch_dump_tdep_ftype *dump_tdep)
4991 struct gdbarch_registration **curr;
4992 const struct bfd_arch_info *bfd_arch_info;
4993 /* Check that BFD recognizes this architecture */
4994 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4995 if (bfd_arch_info == NULL)
4997 internal_error (__FILE__, __LINE__,
4998 "gdbarch: Attempt to register unknown architecture (%d)",
5001 /* Check that we haven't seen this architecture before */
5002 for (curr = &gdbarch_registry;
5004 curr = &(*curr)->next)
5006 if (bfd_architecture == (*curr)->bfd_architecture)
5007 internal_error (__FILE__, __LINE__,
5008 "gdbarch: Duplicate registraration of architecture (%s)",
5009 bfd_arch_info->printable_name);
5013 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5014 bfd_arch_info->printable_name,
5017 (*curr) = XMALLOC (struct gdbarch_registration);
5018 (*curr)->bfd_architecture = bfd_architecture;
5019 (*curr)->init = init;
5020 (*curr)->dump_tdep = dump_tdep;
5021 (*curr)->arches = NULL;
5022 (*curr)->next = NULL;
5026 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5027 gdbarch_init_ftype *init)
5029 gdbarch_register (bfd_architecture, init, NULL);
5033 /* Look for an architecture using gdbarch_info. Base search on only
5034 BFD_ARCH_INFO and BYTE_ORDER. */
5036 struct gdbarch_list *
5037 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5038 const struct gdbarch_info *info)
5040 for (; arches != NULL; arches = arches->next)
5042 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5044 if (info->byte_order != arches->gdbarch->byte_order)
5046 if (info->osabi != arches->gdbarch->osabi)
5054 /* Find an architecture that matches the specified INFO. Create a new
5055 architecture if needed. Return that new architecture. Assumes
5056 that there is no current architecture. */
5058 static struct gdbarch *
5059 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5061 struct gdbarch *new_gdbarch;
5062 struct gdbarch_registration *rego;
5064 /* The existing architecture has been swapped out - all this code
5065 works from a clean slate. */
5066 gdb_assert (current_gdbarch == NULL);
5068 /* Fill in missing parts of the INFO struct using a number of
5069 sources: "set ..."; INFOabfd supplied; and the existing
5071 gdbarch_info_fill (old_gdbarch, &info);
5073 /* Must have found some sort of architecture. */
5074 gdb_assert (info.bfd_arch_info != NULL);
5078 fprintf_unfiltered (gdb_stdlog,
5079 "find_arch_by_info: info.bfd_arch_info %s\n",
5080 (info.bfd_arch_info != NULL
5081 ? info.bfd_arch_info->printable_name
5083 fprintf_unfiltered (gdb_stdlog,
5084 "find_arch_by_info: info.byte_order %d (%s)\n",
5086 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5087 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5089 fprintf_unfiltered (gdb_stdlog,
5090 "find_arch_by_info: info.osabi %d (%s)\n",
5091 info.osabi, gdbarch_osabi_name (info.osabi));
5092 fprintf_unfiltered (gdb_stdlog,
5093 "find_arch_by_info: info.abfd 0x%lx\n",
5095 fprintf_unfiltered (gdb_stdlog,
5096 "find_arch_by_info: info.tdep_info 0x%lx\n",
5097 (long) info.tdep_info);
5100 /* Find the tdep code that knows about this architecture. */
5101 for (rego = gdbarch_registry;
5104 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5109 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5110 "No matching architecture\n");
5114 /* Ask the tdep code for an architecture that matches "info". */
5115 new_gdbarch = rego->init (info, rego->arches);
5117 /* Did the tdep code like it? No. Reject the change and revert to
5118 the old architecture. */
5119 if (new_gdbarch == NULL)
5122 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5123 "Target rejected architecture\n");
5127 /* Is this a pre-existing architecture (as determined by already
5128 being initialized)? Move it to the front of the architecture
5129 list (keeping the list sorted Most Recently Used). */
5130 if (new_gdbarch->initialized_p)
5132 struct gdbarch_list **list;
5133 struct gdbarch_list *this;
5135 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5136 "Previous architecture 0x%08lx (%s) selected\n",
5138 new_gdbarch->bfd_arch_info->printable_name);
5139 /* Find the existing arch in the list. */
5140 for (list = ®o->arches;
5141 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5142 list = &(*list)->next);
5143 /* It had better be in the list of architectures. */
5144 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5147 (*list) = this->next;
5148 /* Insert THIS at the front. */
5149 this->next = rego->arches;
5150 rego->arches = this;
5155 /* It's a new architecture. */
5157 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5158 "New architecture 0x%08lx (%s) selected\n",
5160 new_gdbarch->bfd_arch_info->printable_name);
5162 /* Insert the new architecture into the front of the architecture
5163 list (keep the list sorted Most Recently Used). */
5165 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5166 this->next = rego->arches;
5167 this->gdbarch = new_gdbarch;
5168 rego->arches = this;
5171 /* Check that the newly installed architecture is valid. Plug in
5172 any post init values. */
5173 new_gdbarch->dump_tdep = rego->dump_tdep;
5174 verify_gdbarch (new_gdbarch);
5175 new_gdbarch->initialized_p = 1;
5177 /* Initialize any per-architecture swap areas. This phase requires
5178 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5179 swap the entire architecture out. */
5180 current_gdbarch = new_gdbarch;
5181 current_gdbarch_swap_init_hack ();
5182 current_gdbarch_swap_out_hack ();
5185 gdbarch_dump (new_gdbarch, gdb_stdlog);
5191 gdbarch_find_by_info (struct gdbarch_info info)
5193 /* Save the previously selected architecture, setting the global to
5194 NULL. This stops things like gdbarch->init() trying to use the
5195 previous architecture's configuration. The previous architecture
5196 may not even be of the same architecture family. The most recent
5197 architecture of the same family is found at the head of the
5198 rego->arches list. */
5199 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5201 /* Find the specified architecture. */
5202 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5204 /* Restore the existing architecture. */
5205 gdb_assert (current_gdbarch == NULL);
5206 current_gdbarch_swap_in_hack (old_gdbarch);
5211 /* Make the specified architecture current, swapping the existing one
5215 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5217 gdb_assert (new_gdbarch != NULL);
5218 gdb_assert (current_gdbarch != NULL);
5219 gdb_assert (new_gdbarch->initialized_p);
5220 current_gdbarch_swap_out_hack ();
5221 current_gdbarch_swap_in_hack (new_gdbarch);
5222 architecture_changed_event ();
5225 extern void _initialize_gdbarch (void);
5228 _initialize_gdbarch (void)
5230 struct cmd_list_element *c;
5232 add_show_from_set (add_set_cmd ("arch",
5235 (char *)&gdbarch_debug,
5236 "Set architecture debugging.\n\
5237 When non-zero, architecture debugging is enabled.", &setdebuglist),
5239 c = add_set_cmd ("archdebug",
5242 (char *)&gdbarch_debug,
5243 "Set architecture debugging.\n\
5244 When non-zero, architecture debugging is enabled.", &setlist);
5246 deprecate_cmd (c, "set debug arch");
5247 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");