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_byte_ftype *deprecated_register_byte;
149 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
150 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
151 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
152 int deprecated_fp_regnum;
153 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
154 gdbarch_push_dummy_call_ftype *push_dummy_call;
155 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
156 int deprecated_register_size;
157 int call_dummy_location;
158 gdbarch_push_dummy_code_ftype *push_dummy_code;
159 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
160 gdbarch_print_registers_info_ftype *print_registers_info;
161 gdbarch_print_float_info_ftype *print_float_info;
162 gdbarch_print_vector_info_ftype *print_vector_info;
163 gdbarch_register_sim_regno_ftype *register_sim_regno;
164 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
165 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
166 gdbarch_cannot_store_register_ftype *cannot_store_register;
167 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
168 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
169 int believe_pcc_promotion;
170 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
171 gdbarch_convert_register_p_ftype *convert_register_p;
172 gdbarch_register_to_value_ftype *register_to_value;
173 gdbarch_value_to_register_ftype *value_to_register;
174 gdbarch_pointer_to_address_ftype *pointer_to_address;
175 gdbarch_address_to_pointer_ftype *address_to_pointer;
176 gdbarch_integer_to_address_ftype *integer_to_address;
177 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
178 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
179 gdbarch_return_value_ftype *return_value;
180 gdbarch_extract_return_value_ftype *extract_return_value;
181 gdbarch_store_return_value_ftype *store_return_value;
182 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
183 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
184 gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
185 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
186 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
187 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
188 gdbarch_skip_prologue_ftype *skip_prologue;
189 gdbarch_inner_than_ftype *inner_than;
190 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
191 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
192 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
193 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
194 CORE_ADDR decr_pc_after_break;
195 CORE_ADDR deprecated_function_start_offset;
196 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
197 CORE_ADDR frame_args_skip;
198 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
199 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
200 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
201 gdbarch_unwind_pc_ftype *unwind_pc;
202 gdbarch_unwind_sp_ftype *unwind_sp;
203 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
204 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
205 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
206 gdbarch_frame_num_args_ftype *frame_num_args;
207 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
208 gdbarch_frame_align_ftype *frame_align;
209 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
210 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
211 int frame_red_zone_size;
212 const struct floatformat * float_format;
213 const struct floatformat * double_format;
214 const struct floatformat * long_double_format;
215 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
216 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
217 gdbarch_smash_text_address_ftype *smash_text_address;
218 gdbarch_software_single_step_ftype *software_single_step;
219 gdbarch_print_insn_ftype *print_insn;
220 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
221 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
222 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
223 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
224 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
225 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
226 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
227 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
228 const char * name_of_malloc;
229 int cannot_step_breakpoint;
230 int have_nonsteppable_watchpoint;
231 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
232 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
233 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
234 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
235 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
236 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
240 /* The default architecture uses host values (for want of a better
243 extern const struct bfd_arch_info bfd_default_arch_struct;
245 struct gdbarch startup_gdbarch =
247 1, /* Always initialized. */
248 NULL, /* The obstack. */
249 /* basic architecture information */
250 &bfd_default_arch_struct, /* bfd_arch_info */
251 BFD_ENDIAN_BIG, /* byte_order */
252 GDB_OSABI_UNKNOWN, /* osabi */
253 /* target specific vector and its dump routine */
255 /*per-architecture data-pointers and swap regions */
257 /* Multi-arch values */
258 8 * sizeof (short), /* short_bit */
259 8 * sizeof (int), /* int_bit */
260 8 * sizeof (long), /* long_bit */
261 8 * sizeof (LONGEST), /* long_long_bit */
262 8 * sizeof (float), /* float_bit */
263 8 * sizeof (double), /* double_bit */
264 8 * sizeof (long double), /* long_double_bit */
265 8 * sizeof (void*), /* ptr_bit */
266 8 * sizeof (void*), /* addr_bit */
267 8 * sizeof (void*), /* bfd_vma_bit */
272 0, /* virtual_frame_pointer */
273 0, /* pseudo_register_read */
274 0, /* pseudo_register_write */
276 0, /* num_pseudo_regs */
281 0, /* stab_reg_to_regnum */
282 0, /* ecoff_reg_to_regnum */
283 0, /* dwarf_reg_to_regnum */
284 0, /* sdb_reg_to_regnum */
285 0, /* dwarf2_reg_to_regnum */
286 0, /* register_name */
287 0, /* register_type */
288 generic_register_byte, /* deprecated_register_byte */
289 generic_register_size, /* deprecated_register_raw_size */
290 generic_register_size, /* deprecated_register_virtual_size */
291 0, /* unwind_dummy_id */
292 -1, /* deprecated_fp_regnum */
293 0, /* deprecated_target_read_fp */
294 0, /* push_dummy_call */
295 0, /* deprecated_push_arguments */
296 0, /* deprecated_register_size */
297 0, /* call_dummy_location */
298 0, /* push_dummy_code */
299 0, /* deprecated_do_registers_info */
300 default_print_registers_info, /* print_registers_info */
301 0, /* print_float_info */
302 0, /* print_vector_info */
303 0, /* register_sim_regno */
304 0, /* register_bytes_ok */
305 0, /* cannot_fetch_register */
306 0, /* cannot_store_register */
307 0, /* get_longjmp_target */
308 0, /* deprecated_init_frame_pc */
309 0, /* believe_pcc_promotion */
310 0, /* deprecated_get_saved_register */
311 0, /* convert_register_p */
312 0, /* register_to_value */
313 0, /* value_to_register */
314 0, /* pointer_to_address */
315 0, /* address_to_pointer */
316 0, /* integer_to_address */
317 0, /* deprecated_pop_frame */
318 0, /* deprecated_store_struct_return */
319 0, /* return_value */
320 0, /* extract_return_value */
321 0, /* store_return_value */
322 0, /* deprecated_extract_return_value */
323 0, /* deprecated_store_return_value */
324 0, /* deprecated_use_struct_convention */
325 0, /* deprecated_extract_struct_value_address */
326 0, /* deprecated_frame_init_saved_regs */
327 0, /* deprecated_init_extra_frame_info */
328 0, /* skip_prologue */
330 0, /* breakpoint_from_pc */
331 0, /* adjust_breakpoint_address */
332 0, /* memory_insert_breakpoint */
333 0, /* memory_remove_breakpoint */
334 0, /* decr_pc_after_break */
335 0, /* deprecated_function_start_offset */
336 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
337 0, /* frame_args_skip */
338 0, /* deprecated_frame_chain */
339 0, /* deprecated_frame_chain_valid */
340 0, /* deprecated_frame_saved_pc */
343 get_frame_base, /* deprecated_frame_args_address */
344 get_frame_base, /* deprecated_frame_locals_address */
345 0, /* deprecated_saved_pc_after_call */
346 0, /* frame_num_args */
347 0, /* deprecated_stack_align */
349 0, /* deprecated_reg_struct_has_addr */
350 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
351 0, /* frame_red_zone_size */
352 0, /* float_format */
353 0, /* double_format */
354 0, /* long_double_format */
355 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
356 0, /* addr_bits_remove */
357 0, /* smash_text_address */
358 0, /* software_single_step */
360 0, /* skip_trampoline_code */
361 generic_skip_solib_resolver, /* skip_solib_resolver */
362 0, /* in_solib_call_trampoline */
363 0, /* in_solib_return_trampoline */
364 generic_in_function_epilogue_p, /* in_function_epilogue_p */
365 construct_inferior_arguments, /* construct_inferior_arguments */
366 0, /* elf_make_msymbol_special */
367 0, /* coff_make_msymbol_special */
368 "malloc", /* name_of_malloc */
369 0, /* cannot_step_breakpoint */
370 0, /* have_nonsteppable_watchpoint */
371 0, /* address_class_type_flags */
372 0, /* address_class_type_flags_to_name */
373 0, /* address_class_name_to_type_flags */
374 default_register_reggroup_p, /* register_reggroup_p */
375 0, /* fetch_pointer_argument */
376 0, /* regset_from_core_section */
377 /* startup_gdbarch() */
380 struct gdbarch *current_gdbarch = &startup_gdbarch;
382 /* Create a new ``struct gdbarch'' based on information provided by
383 ``struct gdbarch_info''. */
386 gdbarch_alloc (const struct gdbarch_info *info,
387 struct gdbarch_tdep *tdep)
389 /* NOTE: The new architecture variable is named ``current_gdbarch''
390 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
391 the current local architecture and not the previous global
392 architecture. This ensures that the new architectures initial
393 values are not influenced by the previous architecture. Once
394 everything is parameterised with gdbarch, this will go away. */
395 struct gdbarch *current_gdbarch;
397 /* Create an obstack for allocating all the per-architecture memory,
398 then use that to allocate the architecture vector. */
399 struct obstack *obstack = XMALLOC (struct obstack);
400 obstack_init (obstack);
401 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
402 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
403 current_gdbarch->obstack = obstack;
405 alloc_gdbarch_data (current_gdbarch);
407 current_gdbarch->tdep = tdep;
409 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
410 current_gdbarch->byte_order = info->byte_order;
411 current_gdbarch->osabi = info->osabi;
413 /* Force the explicit initialization of these. */
414 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
415 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
416 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
417 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
418 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
419 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
420 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
421 current_gdbarch->ptr_bit = TARGET_INT_BIT;
422 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
423 current_gdbarch->char_signed = -1;
424 current_gdbarch->write_pc = generic_target_write_pc;
425 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
426 current_gdbarch->num_regs = -1;
427 current_gdbarch->sp_regnum = -1;
428 current_gdbarch->pc_regnum = -1;
429 current_gdbarch->ps_regnum = -1;
430 current_gdbarch->fp0_regnum = -1;
431 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
432 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
433 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
434 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
435 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
436 current_gdbarch->deprecated_register_byte = generic_register_byte;
437 current_gdbarch->deprecated_register_raw_size = generic_register_size;
438 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
439 current_gdbarch->deprecated_fp_regnum = -1;
440 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
441 current_gdbarch->print_registers_info = default_print_registers_info;
442 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
443 current_gdbarch->cannot_fetch_register = cannot_register_not;
444 current_gdbarch->cannot_store_register = cannot_register_not;
445 current_gdbarch->convert_register_p = generic_convert_register_p;
446 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
447 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
448 current_gdbarch->return_value = legacy_return_value;
449 current_gdbarch->extract_return_value = legacy_extract_return_value;
450 current_gdbarch->store_return_value = legacy_store_return_value;
451 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
452 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
453 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
454 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
455 current_gdbarch->deprecated_frame_args_address = get_frame_base;
456 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
457 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
458 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
459 current_gdbarch->addr_bits_remove = core_addr_identity;
460 current_gdbarch->smash_text_address = core_addr_identity;
461 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
462 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
463 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
464 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
465 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
466 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
467 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
468 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
469 current_gdbarch->name_of_malloc = "malloc";
470 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
471 /* gdbarch_alloc() */
473 return current_gdbarch;
477 /* Allocate extra space using the per-architecture obstack. */
480 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
482 void *data = obstack_alloc (arch->obstack, size);
483 memset (data, 0, size);
488 /* Free a gdbarch struct. This should never happen in normal
489 operation --- once you've created a gdbarch, you keep it around.
490 However, if an architecture's init function encounters an error
491 building the structure, it may need to clean up a partially
492 constructed gdbarch. */
495 gdbarch_free (struct gdbarch *arch)
497 struct obstack *obstack;
498 gdb_assert (arch != NULL);
499 gdb_assert (!arch->initialized_p);
500 obstack = arch->obstack;
501 obstack_free (obstack, 0); /* Includes the ARCH. */
506 /* Ensure that all values in a GDBARCH are reasonable. */
508 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
509 just happens to match the global variable ``current_gdbarch''. That
510 way macros refering to that variable get the local and not the global
511 version - ulgh. Once everything is parameterised with gdbarch, this
515 verify_gdbarch (struct gdbarch *current_gdbarch)
518 struct cleanup *cleanups;
521 log = mem_fileopen ();
522 cleanups = make_cleanup_ui_file_delete (log);
524 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
525 fprintf_unfiltered (log, "\n\tbyte-order");
526 if (current_gdbarch->bfd_arch_info == NULL)
527 fprintf_unfiltered (log, "\n\tbfd_arch_info");
528 /* Check those that need to be defined for the given multi-arch level. */
529 /* Skip verify of short_bit, invalid_p == 0 */
530 /* Skip verify of int_bit, invalid_p == 0 */
531 /* Skip verify of long_bit, invalid_p == 0 */
532 /* Skip verify of long_long_bit, invalid_p == 0 */
533 /* Skip verify of float_bit, invalid_p == 0 */
534 /* Skip verify of double_bit, invalid_p == 0 */
535 /* Skip verify of long_double_bit, invalid_p == 0 */
536 /* Skip verify of ptr_bit, invalid_p == 0 */
537 if (current_gdbarch->addr_bit == 0)
538 current_gdbarch->addr_bit = TARGET_PTR_BIT;
539 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
540 if (current_gdbarch->char_signed == -1)
541 current_gdbarch->char_signed = 1;
542 /* Skip verify of read_pc, has predicate */
543 /* Skip verify of write_pc, invalid_p == 0 */
544 /* Skip verify of read_sp, has predicate */
545 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
546 /* Skip verify of pseudo_register_read, has predicate */
547 /* Skip verify of pseudo_register_write, has predicate */
548 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
549 && (current_gdbarch->num_regs == -1))
550 fprintf_unfiltered (log, "\n\tnum_regs");
551 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
552 /* Skip verify of sp_regnum, invalid_p == 0 */
553 /* Skip verify of pc_regnum, invalid_p == 0 */
554 /* Skip verify of ps_regnum, invalid_p == 0 */
555 /* Skip verify of fp0_regnum, invalid_p == 0 */
556 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
557 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
558 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
559 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
560 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
561 /* Skip verify of register_type, has predicate */
562 /* Skip verify of deprecated_register_byte, has predicate */
563 /* Skip verify of deprecated_register_raw_size, has predicate */
564 /* Skip verify of deprecated_register_virtual_size, has predicate */
565 /* Skip verify of unwind_dummy_id, has predicate */
566 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
567 /* Skip verify of deprecated_target_read_fp, has predicate */
568 /* Skip verify of push_dummy_call, has predicate */
569 /* Skip verify of deprecated_push_arguments, has predicate */
570 /* Skip verify of call_dummy_location, invalid_p == 0 */
571 /* Skip verify of push_dummy_code, has predicate */
572 /* Skip verify of deprecated_do_registers_info, has predicate */
573 /* Skip verify of print_registers_info, invalid_p == 0 */
574 /* Skip verify of print_float_info, has predicate */
575 /* Skip verify of print_vector_info, has predicate */
576 /* Skip verify of register_sim_regno, invalid_p == 0 */
577 /* Skip verify of register_bytes_ok, has predicate */
578 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
579 /* Skip verify of cannot_store_register, invalid_p == 0 */
580 /* Skip verify of get_longjmp_target, has predicate */
581 /* Skip verify of deprecated_init_frame_pc, has predicate */
582 /* Skip verify of deprecated_get_saved_register, has predicate */
583 /* Skip verify of convert_register_p, invalid_p == 0 */
584 /* Skip verify of pointer_to_address, invalid_p == 0 */
585 /* Skip verify of address_to_pointer, invalid_p == 0 */
586 /* Skip verify of integer_to_address, has predicate */
587 /* Skip verify of deprecated_pop_frame, has predicate */
588 /* Skip verify of deprecated_store_struct_return, has predicate */
589 /* Skip verify of return_value, has predicate */
590 /* Skip verify of extract_return_value, invalid_p == 0 */
591 /* Skip verify of store_return_value, invalid_p == 0 */
592 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
593 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
594 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
595 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
596 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
597 && (current_gdbarch->skip_prologue == 0))
598 fprintf_unfiltered (log, "\n\tskip_prologue");
599 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
600 && (current_gdbarch->inner_than == 0))
601 fprintf_unfiltered (log, "\n\tinner_than");
602 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
603 && (current_gdbarch->breakpoint_from_pc == 0))
604 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
605 /* Skip verify of adjust_breakpoint_address, has predicate */
606 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
607 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
608 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
609 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
610 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
611 /* Skip verify of frame_args_skip, invalid_p == 0 */
612 /* Skip verify of deprecated_frame_chain, has predicate */
613 /* Skip verify of deprecated_frame_chain_valid, has predicate */
614 /* Skip verify of deprecated_frame_saved_pc, has predicate */
615 /* Skip verify of unwind_pc, has predicate */
616 /* Skip verify of unwind_sp, has predicate */
617 /* Skip verify of deprecated_frame_args_address, has predicate */
618 /* Skip verify of deprecated_frame_locals_address, has predicate */
619 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
620 /* Skip verify of frame_num_args, has predicate */
621 /* Skip verify of deprecated_stack_align, has predicate */
622 /* Skip verify of frame_align, has predicate */
623 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
624 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
625 if (current_gdbarch->float_format == 0)
626 current_gdbarch->float_format = default_float_format (current_gdbarch);
627 if (current_gdbarch->double_format == 0)
628 current_gdbarch->double_format = default_double_format (current_gdbarch);
629 if (current_gdbarch->long_double_format == 0)
630 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
631 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
632 /* Skip verify of addr_bits_remove, invalid_p == 0 */
633 /* Skip verify of smash_text_address, invalid_p == 0 */
634 /* Skip verify of software_single_step, has predicate */
635 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
636 && (current_gdbarch->print_insn == 0))
637 fprintf_unfiltered (log, "\n\tprint_insn");
638 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
639 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
640 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
641 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
642 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
643 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
644 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
645 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
646 /* Skip verify of name_of_malloc, invalid_p == 0 */
647 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
648 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
649 /* Skip verify of address_class_type_flags, has predicate */
650 /* Skip verify of address_class_type_flags_to_name, has predicate */
651 /* Skip verify of address_class_name_to_type_flags, has predicate */
652 /* Skip verify of register_reggroup_p, invalid_p == 0 */
653 /* Skip verify of fetch_pointer_argument, has predicate */
654 /* Skip verify of regset_from_core_section, has predicate */
655 buf = ui_file_xstrdup (log, &dummy);
656 make_cleanup (xfree, buf);
657 if (strlen (buf) > 0)
658 internal_error (__FILE__, __LINE__,
659 "verify_gdbarch: the following are invalid ...%s",
661 do_cleanups (cleanups);
665 /* Print out the details of the current architecture. */
667 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
668 just happens to match the global variable ``current_gdbarch''. That
669 way macros refering to that variable get the local and not the global
670 version - ulgh. Once everything is parameterised with gdbarch, this
674 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
676 fprintf_unfiltered (file,
677 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
679 #ifdef TARGET_ADDR_BIT
680 fprintf_unfiltered (file,
681 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
682 XSTRING (TARGET_ADDR_BIT));
684 fprintf_unfiltered (file,
685 "gdbarch_dump: addr_bit = %s\n",
686 paddr_d (current_gdbarch->addr_bit));
687 #ifdef ADDR_BITS_REMOVE
688 fprintf_unfiltered (file,
689 "gdbarch_dump: %s # %s\n",
690 "ADDR_BITS_REMOVE(addr)",
691 XSTRING (ADDR_BITS_REMOVE (addr)));
693 fprintf_unfiltered (file,
694 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
695 (long) current_gdbarch->addr_bits_remove);
696 fprintf_unfiltered (file,
697 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
698 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
699 fprintf_unfiltered (file,
700 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
701 (long) current_gdbarch->address_class_name_to_type_flags);
702 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
703 fprintf_unfiltered (file,
704 "gdbarch_dump: %s # %s\n",
705 "ADDRESS_CLASS_TYPE_FLAGS_P()",
706 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
708 fprintf_unfiltered (file,
709 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
710 gdbarch_address_class_type_flags_p (current_gdbarch));
711 #ifdef ADDRESS_CLASS_TYPE_FLAGS
712 fprintf_unfiltered (file,
713 "gdbarch_dump: %s # %s\n",
714 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
715 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
717 fprintf_unfiltered (file,
718 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
719 (long) current_gdbarch->address_class_type_flags);
720 fprintf_unfiltered (file,
721 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
722 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
723 fprintf_unfiltered (file,
724 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
725 (long) current_gdbarch->address_class_type_flags_to_name);
726 #ifdef ADDRESS_TO_POINTER
727 fprintf_unfiltered (file,
728 "gdbarch_dump: %s # %s\n",
729 "ADDRESS_TO_POINTER(type, buf, addr)",
730 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
732 fprintf_unfiltered (file,
733 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
734 (long) current_gdbarch->address_to_pointer);
735 fprintf_unfiltered (file,
736 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
737 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
738 fprintf_unfiltered (file,
739 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
740 (long) current_gdbarch->adjust_breakpoint_address);
741 #ifdef BELIEVE_PCC_PROMOTION
742 fprintf_unfiltered (file,
743 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
744 XSTRING (BELIEVE_PCC_PROMOTION));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: believe_pcc_promotion = %s\n",
748 paddr_d (current_gdbarch->believe_pcc_promotion));
749 #ifdef TARGET_ARCHITECTURE
750 fprintf_unfiltered (file,
751 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
752 XSTRING (TARGET_ARCHITECTURE));
754 fprintf_unfiltered (file,
755 "gdbarch_dump: bfd_arch_info = %s\n",
756 TARGET_ARCHITECTURE->printable_name);
757 #ifdef TARGET_BFD_VMA_BIT
758 fprintf_unfiltered (file,
759 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
760 XSTRING (TARGET_BFD_VMA_BIT));
762 fprintf_unfiltered (file,
763 "gdbarch_dump: bfd_vma_bit = %s\n",
764 paddr_d (current_gdbarch->bfd_vma_bit));
765 #ifdef BREAKPOINT_FROM_PC
766 fprintf_unfiltered (file,
767 "gdbarch_dump: %s # %s\n",
768 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
769 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
771 fprintf_unfiltered (file,
772 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
773 (long) current_gdbarch->breakpoint_from_pc);
774 #ifdef TARGET_BYTE_ORDER
775 fprintf_unfiltered (file,
776 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
777 XSTRING (TARGET_BYTE_ORDER));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: byte_order = %s\n",
781 paddr_d (current_gdbarch->byte_order));
782 #ifdef CALL_DUMMY_LOCATION
783 fprintf_unfiltered (file,
784 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
785 XSTRING (CALL_DUMMY_LOCATION));
787 fprintf_unfiltered (file,
788 "gdbarch_dump: call_dummy_location = %s\n",
789 paddr_d (current_gdbarch->call_dummy_location));
790 #ifdef CANNOT_FETCH_REGISTER
791 fprintf_unfiltered (file,
792 "gdbarch_dump: %s # %s\n",
793 "CANNOT_FETCH_REGISTER(regnum)",
794 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
796 fprintf_unfiltered (file,
797 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
798 (long) current_gdbarch->cannot_fetch_register);
799 #ifdef CANNOT_STEP_BREAKPOINT
800 fprintf_unfiltered (file,
801 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
802 XSTRING (CANNOT_STEP_BREAKPOINT));
804 fprintf_unfiltered (file,
805 "gdbarch_dump: cannot_step_breakpoint = %s\n",
806 paddr_d (current_gdbarch->cannot_step_breakpoint));
807 #ifdef CANNOT_STORE_REGISTER
808 fprintf_unfiltered (file,
809 "gdbarch_dump: %s # %s\n",
810 "CANNOT_STORE_REGISTER(regnum)",
811 XSTRING (CANNOT_STORE_REGISTER (regnum)));
813 fprintf_unfiltered (file,
814 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
815 (long) current_gdbarch->cannot_store_register);
816 #ifdef TARGET_CHAR_SIGNED
817 fprintf_unfiltered (file,
818 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
819 XSTRING (TARGET_CHAR_SIGNED));
821 fprintf_unfiltered (file,
822 "gdbarch_dump: char_signed = %s\n",
823 paddr_d (current_gdbarch->char_signed));
824 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
825 fprintf_unfiltered (file,
826 "gdbarch_dump: %s # %s\n",
827 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
828 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
832 (long) current_gdbarch->coff_make_msymbol_special);
833 fprintf_unfiltered (file,
834 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
835 (long) current_gdbarch->construct_inferior_arguments);
836 fprintf_unfiltered (file,
837 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
838 (long) current_gdbarch->convert_from_func_ptr_addr);
839 #ifdef CONVERT_REGISTER_P
840 fprintf_unfiltered (file,
841 "gdbarch_dump: %s # %s\n",
842 "CONVERT_REGISTER_P(regnum, type)",
843 XSTRING (CONVERT_REGISTER_P (regnum, type)));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: convert_register_p = <0x%lx>\n",
847 (long) current_gdbarch->convert_register_p);
848 #ifdef DECR_PC_AFTER_BREAK
849 fprintf_unfiltered (file,
850 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
851 XSTRING (DECR_PC_AFTER_BREAK));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
855 paddr_nz (current_gdbarch->decr_pc_after_break));
856 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
857 fprintf_unfiltered (file,
858 "gdbarch_dump: %s # %s\n",
859 "DEPRECATED_DO_REGISTERS_INFO_P()",
860 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
862 fprintf_unfiltered (file,
863 "gdbarch_dump: gdbarch_deprecated_do_registers_info_p() = %d\n",
864 gdbarch_deprecated_do_registers_info_p (current_gdbarch));
865 #ifdef DEPRECATED_DO_REGISTERS_INFO
866 fprintf_unfiltered (file,
867 "gdbarch_dump: %s # %s\n",
868 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
869 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: deprecated_do_registers_info = <0x%lx>\n",
873 (long) current_gdbarch->deprecated_do_registers_info);
874 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
875 fprintf_unfiltered (file,
876 "gdbarch_dump: %s # %s\n",
877 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
878 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
882 (long) current_gdbarch->deprecated_extract_return_value);
883 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
884 fprintf_unfiltered (file,
885 "gdbarch_dump: %s # %s\n",
886 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
887 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
889 fprintf_unfiltered (file,
890 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
891 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
892 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
893 fprintf_unfiltered (file,
894 "gdbarch_dump: %s # %s\n",
895 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
896 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
900 (long) current_gdbarch->deprecated_extract_struct_value_address);
901 #ifdef DEPRECATED_FP_REGNUM
902 fprintf_unfiltered (file,
903 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
904 XSTRING (DEPRECATED_FP_REGNUM));
906 fprintf_unfiltered (file,
907 "gdbarch_dump: deprecated_fp_regnum = %s\n",
908 paddr_d (current_gdbarch->deprecated_fp_regnum));
909 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
910 fprintf_unfiltered (file,
911 "gdbarch_dump: %s # %s\n",
912 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
913 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: gdbarch_deprecated_frame_args_address_p() = %d\n",
917 gdbarch_deprecated_frame_args_address_p (current_gdbarch));
918 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
919 fprintf_unfiltered (file,
920 "gdbarch_dump: %s # %s\n",
921 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
922 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
924 fprintf_unfiltered (file,
925 "gdbarch_dump: deprecated_frame_args_address = <0x%lx>\n",
926 (long) current_gdbarch->deprecated_frame_args_address);
927 #ifdef DEPRECATED_FRAME_CHAIN_P
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
930 "DEPRECATED_FRAME_CHAIN_P()",
931 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: gdbarch_deprecated_frame_chain_p() = %d\n",
935 gdbarch_deprecated_frame_chain_p (current_gdbarch));
936 #ifdef DEPRECATED_FRAME_CHAIN
937 fprintf_unfiltered (file,
938 "gdbarch_dump: %s # %s\n",
939 "DEPRECATED_FRAME_CHAIN(frame)",
940 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: deprecated_frame_chain = <0x%lx>\n",
944 (long) current_gdbarch->deprecated_frame_chain);
945 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
946 fprintf_unfiltered (file,
947 "gdbarch_dump: %s # %s\n",
948 "DEPRECATED_FRAME_CHAIN_VALID_P()",
949 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
951 fprintf_unfiltered (file,
952 "gdbarch_dump: gdbarch_deprecated_frame_chain_valid_p() = %d\n",
953 gdbarch_deprecated_frame_chain_valid_p (current_gdbarch));
954 #ifdef DEPRECATED_FRAME_CHAIN_VALID
955 fprintf_unfiltered (file,
956 "gdbarch_dump: %s # %s\n",
957 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
958 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
960 fprintf_unfiltered (file,
961 "gdbarch_dump: deprecated_frame_chain_valid = <0x%lx>\n",
962 (long) current_gdbarch->deprecated_frame_chain_valid);
963 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
964 fprintf_unfiltered (file,
965 "gdbarch_dump: %s # %s\n",
966 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
967 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
969 fprintf_unfiltered (file,
970 "gdbarch_dump: gdbarch_deprecated_frame_init_saved_regs_p() = %d\n",
971 gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch));
972 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
973 fprintf_unfiltered (file,
974 "gdbarch_dump: %s # %s\n",
975 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
976 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: deprecated_frame_init_saved_regs = <0x%lx>\n",
980 (long) current_gdbarch->deprecated_frame_init_saved_regs);
981 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
982 fprintf_unfiltered (file,
983 "gdbarch_dump: %s # %s\n",
984 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
985 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
987 fprintf_unfiltered (file,
988 "gdbarch_dump: gdbarch_deprecated_frame_locals_address_p() = %d\n",
989 gdbarch_deprecated_frame_locals_address_p (current_gdbarch));
990 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
991 fprintf_unfiltered (file,
992 "gdbarch_dump: %s # %s\n",
993 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
994 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
996 fprintf_unfiltered (file,
997 "gdbarch_dump: deprecated_frame_locals_address = <0x%lx>\n",
998 (long) current_gdbarch->deprecated_frame_locals_address);
999 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1000 fprintf_unfiltered (file,
1001 "gdbarch_dump: %s # %s\n",
1002 "DEPRECATED_FRAME_SAVED_PC_P()",
1003 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: gdbarch_deprecated_frame_saved_pc_p() = %d\n",
1007 gdbarch_deprecated_frame_saved_pc_p (current_gdbarch));
1008 #ifdef DEPRECATED_FRAME_SAVED_PC
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: %s # %s\n",
1011 "DEPRECATED_FRAME_SAVED_PC(fi)",
1012 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: deprecated_frame_saved_pc = <0x%lx>\n",
1016 (long) current_gdbarch->deprecated_frame_saved_pc);
1017 #ifdef DEPRECATED_FUNCTION_START_OFFSET
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
1020 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
1024 paddr_nz (current_gdbarch->deprecated_function_start_offset));
1025 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: %s # %s\n",
1028 "DEPRECATED_GET_SAVED_REGISTER_P()",
1029 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: gdbarch_deprecated_get_saved_register_p() = %d\n",
1033 gdbarch_deprecated_get_saved_register_p (current_gdbarch));
1034 #ifdef DEPRECATED_GET_SAVED_REGISTER
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: %s # %s\n",
1037 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1038 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: deprecated_get_saved_register = <0x%lx>\n",
1042 (long) current_gdbarch->deprecated_get_saved_register);
1043 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: %s # %s\n",
1046 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1047 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: gdbarch_deprecated_init_extra_frame_info_p() = %d\n",
1051 gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch));
1052 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: %s # %s\n",
1055 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1056 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: deprecated_init_extra_frame_info = <0x%lx>\n",
1060 (long) current_gdbarch->deprecated_init_extra_frame_info);
1061 #ifdef DEPRECATED_INIT_FRAME_PC_P
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: %s # %s\n",
1064 "DEPRECATED_INIT_FRAME_PC_P()",
1065 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: gdbarch_deprecated_init_frame_pc_p() = %d\n",
1069 gdbarch_deprecated_init_frame_pc_p (current_gdbarch));
1070 #ifdef DEPRECATED_INIT_FRAME_PC
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: %s # %s\n",
1073 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1074 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: deprecated_init_frame_pc = <0x%lx>\n",
1078 (long) current_gdbarch->deprecated_init_frame_pc);
1079 #ifdef DEPRECATED_POP_FRAME_P
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: %s # %s\n",
1082 "DEPRECATED_POP_FRAME_P()",
1083 XSTRING (DEPRECATED_POP_FRAME_P ()));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: gdbarch_deprecated_pop_frame_p() = %d\n",
1087 gdbarch_deprecated_pop_frame_p (current_gdbarch));
1088 #ifdef DEPRECATED_POP_FRAME
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: %s # %s\n",
1091 "DEPRECATED_POP_FRAME(-)",
1092 XSTRING (DEPRECATED_POP_FRAME (-)));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: deprecated_pop_frame = <0x%lx>\n",
1096 (long) current_gdbarch->deprecated_pop_frame);
1097 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: %s # %s\n",
1100 "DEPRECATED_PUSH_ARGUMENTS_P()",
1101 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: gdbarch_deprecated_push_arguments_p() = %d\n",
1105 gdbarch_deprecated_push_arguments_p (current_gdbarch));
1106 #ifdef DEPRECATED_PUSH_ARGUMENTS
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: %s # %s\n",
1109 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1110 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: deprecated_push_arguments = <0x%lx>\n",
1114 (long) current_gdbarch->deprecated_push_arguments);
1115 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: %s # %s\n",
1118 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1119 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
1123 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
1124 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: %s # %s\n",
1127 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1128 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
1132 (long) current_gdbarch->deprecated_reg_struct_has_addr);
1133 #ifdef DEPRECATED_REGISTER_BYTE_P
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: %s # %s\n",
1136 "DEPRECATED_REGISTER_BYTE_P()",
1137 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
1141 gdbarch_deprecated_register_byte_p (current_gdbarch));
1142 #ifdef DEPRECATED_REGISTER_BYTE
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1146 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
1150 (long) current_gdbarch->deprecated_register_byte);
1151 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: %s # %s\n",
1154 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1155 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: gdbarch_deprecated_register_raw_size_p() = %d\n",
1159 gdbarch_deprecated_register_raw_size_p (current_gdbarch));
1160 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1161 fprintf_unfiltered (file,
1162 "gdbarch_dump: %s # %s\n",
1163 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1164 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: deprecated_register_raw_size = <0x%lx>\n",
1168 (long) current_gdbarch->deprecated_register_raw_size);
1169 #ifdef DEPRECATED_REGISTER_SIZE
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1172 XSTRING (DEPRECATED_REGISTER_SIZE));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: deprecated_register_size = %s\n",
1176 paddr_d (current_gdbarch->deprecated_register_size));
1177 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: %s # %s\n",
1180 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1181 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: gdbarch_deprecated_register_virtual_size_p() = %d\n",
1185 gdbarch_deprecated_register_virtual_size_p (current_gdbarch));
1186 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: %s # %s\n",
1189 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1190 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: deprecated_register_virtual_size = <0x%lx>\n",
1194 (long) current_gdbarch->deprecated_register_virtual_size);
1195 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: %s # %s\n",
1198 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1199 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: gdbarch_deprecated_saved_pc_after_call_p() = %d\n",
1203 gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch));
1204 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: %s # %s\n",
1207 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1208 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: deprecated_saved_pc_after_call = <0x%lx>\n",
1212 (long) current_gdbarch->deprecated_saved_pc_after_call);
1213 #ifdef DEPRECATED_STACK_ALIGN_P
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: %s # %s\n",
1216 "DEPRECATED_STACK_ALIGN_P()",
1217 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
1221 gdbarch_deprecated_stack_align_p (current_gdbarch));
1222 #ifdef DEPRECATED_STACK_ALIGN
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: %s # %s\n",
1225 "DEPRECATED_STACK_ALIGN(sp)",
1226 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1228 fprintf_unfiltered (file,
1229 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
1230 (long) current_gdbarch->deprecated_stack_align);
1231 #ifdef DEPRECATED_STORE_RETURN_VALUE
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: %s # %s\n",
1234 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1235 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
1239 (long) current_gdbarch->deprecated_store_return_value);
1240 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: %s # %s\n",
1243 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1244 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
1248 gdbarch_deprecated_store_struct_return_p (current_gdbarch));
1249 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: %s # %s\n",
1252 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1253 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
1257 (long) current_gdbarch->deprecated_store_struct_return);
1258 #ifdef DEPRECATED_TARGET_READ_FP_P
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: %s # %s\n",
1261 "DEPRECATED_TARGET_READ_FP_P()",
1262 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: gdbarch_deprecated_target_read_fp_p() = %d\n",
1266 gdbarch_deprecated_target_read_fp_p (current_gdbarch));
1267 #ifdef DEPRECATED_TARGET_READ_FP
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: %s # %s\n",
1270 "DEPRECATED_TARGET_READ_FP()",
1271 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: deprecated_target_read_fp = <0x%lx>\n",
1275 (long) current_gdbarch->deprecated_target_read_fp);
1276 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: %s # %s\n",
1279 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
1280 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
1284 (long) current_gdbarch->deprecated_use_struct_convention);
1285 #ifdef TARGET_DOUBLE_BIT
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1288 XSTRING (TARGET_DOUBLE_BIT));
1290 fprintf_unfiltered (file,
1291 "gdbarch_dump: double_bit = %s\n",
1292 paddr_d (current_gdbarch->double_bit));
1293 #ifdef TARGET_DOUBLE_FORMAT
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1296 XSTRING (TARGET_DOUBLE_FORMAT));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: double_format = %s\n",
1300 (TARGET_DOUBLE_FORMAT)->name);
1301 #ifdef DWARF2_REG_TO_REGNUM
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: %s # %s\n",
1304 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1305 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
1309 (long) current_gdbarch->dwarf2_reg_to_regnum);
1310 #ifdef DWARF_REG_TO_REGNUM
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: %s # %s\n",
1313 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1314 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
1318 (long) current_gdbarch->dwarf_reg_to_regnum);
1319 #ifdef ECOFF_REG_TO_REGNUM
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: %s # %s\n",
1322 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1323 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
1327 (long) current_gdbarch->ecoff_reg_to_regnum);
1328 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1329 fprintf_unfiltered (file,
1330 "gdbarch_dump: %s # %s\n",
1331 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1332 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
1336 (long) current_gdbarch->elf_make_msymbol_special);
1337 #ifdef EXTRACT_RETURN_VALUE
1338 fprintf_unfiltered (file,
1339 "gdbarch_dump: %s # %s\n",
1340 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1341 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1345 (long) current_gdbarch->extract_return_value);
1346 #ifdef FETCH_POINTER_ARGUMENT_P
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: %s # %s\n",
1349 "FETCH_POINTER_ARGUMENT_P()",
1350 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1354 gdbarch_fetch_pointer_argument_p (current_gdbarch));
1355 #ifdef FETCH_POINTER_ARGUMENT
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: %s # %s\n",
1358 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1359 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1363 (long) current_gdbarch->fetch_pointer_argument);
1364 #ifdef TARGET_FLOAT_BIT
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1367 XSTRING (TARGET_FLOAT_BIT));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: float_bit = %s\n",
1371 paddr_d (current_gdbarch->float_bit));
1372 #ifdef TARGET_FLOAT_FORMAT
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1375 XSTRING (TARGET_FLOAT_FORMAT));
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: float_format = %s\n",
1379 (TARGET_FLOAT_FORMAT)->name);
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: FP0_REGNUM # %s\n",
1383 XSTRING (FP0_REGNUM));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: fp0_regnum = %s\n",
1387 paddr_d (current_gdbarch->fp0_regnum));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1390 gdbarch_frame_align_p (current_gdbarch));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: frame_align = <0x%lx>\n",
1393 (long) current_gdbarch->frame_align);
1394 #ifdef FRAME_ARGS_SKIP
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1397 XSTRING (FRAME_ARGS_SKIP));
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: frame_args_skip = 0x%s\n",
1401 paddr_nz (current_gdbarch->frame_args_skip));
1402 #ifdef FRAME_NUM_ARGS_P
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: %s # %s\n",
1405 "FRAME_NUM_ARGS_P()",
1406 XSTRING (FRAME_NUM_ARGS_P ()));
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1410 gdbarch_frame_num_args_p (current_gdbarch));
1411 #ifdef FRAME_NUM_ARGS
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: %s # %s\n",
1414 "FRAME_NUM_ARGS(frame)",
1415 XSTRING (FRAME_NUM_ARGS (frame)));
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1419 (long) current_gdbarch->frame_num_args);
1420 #ifdef FRAME_RED_ZONE_SIZE
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1423 XSTRING (FRAME_RED_ZONE_SIZE));
1425 fprintf_unfiltered (file,
1426 "gdbarch_dump: frame_red_zone_size = %s\n",
1427 paddr_d (current_gdbarch->frame_red_zone_size));
1428 #ifdef GET_LONGJMP_TARGET_P
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: %s # %s\n",
1431 "GET_LONGJMP_TARGET_P()",
1432 XSTRING (GET_LONGJMP_TARGET_P ()));
1434 fprintf_unfiltered (file,
1435 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1436 gdbarch_get_longjmp_target_p (current_gdbarch));
1437 #ifdef GET_LONGJMP_TARGET
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: %s # %s\n",
1440 "GET_LONGJMP_TARGET(pc)",
1441 XSTRING (GET_LONGJMP_TARGET (pc)));
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1445 (long) current_gdbarch->get_longjmp_target);
1446 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1449 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1453 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1456 (long) current_gdbarch->in_function_epilogue_p);
1457 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1461 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: in_solib_call_trampoline = <0x%lx>\n",
1465 (long) current_gdbarch->in_solib_call_trampoline);
1466 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: %s # %s\n",
1469 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1470 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1474 (long) current_gdbarch->in_solib_return_trampoline);
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: %s # %s\n",
1478 "INNER_THAN(lhs, rhs)",
1479 XSTRING (INNER_THAN (lhs, rhs)));
1481 fprintf_unfiltered (file,
1482 "gdbarch_dump: inner_than = <0x%lx>\n",
1483 (long) current_gdbarch->inner_than);
1484 #ifdef TARGET_INT_BIT
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1487 XSTRING (TARGET_INT_BIT));
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: int_bit = %s\n",
1491 paddr_d (current_gdbarch->int_bit));
1492 #ifdef INTEGER_TO_ADDRESS_P
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: %s # %s\n",
1495 "INTEGER_TO_ADDRESS_P()",
1496 XSTRING (INTEGER_TO_ADDRESS_P ()));
1498 fprintf_unfiltered (file,
1499 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1500 gdbarch_integer_to_address_p (current_gdbarch));
1501 #ifdef INTEGER_TO_ADDRESS
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: %s # %s\n",
1504 "INTEGER_TO_ADDRESS(type, buf)",
1505 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1507 fprintf_unfiltered (file,
1508 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1509 (long) current_gdbarch->integer_to_address);
1510 #ifdef TARGET_LONG_BIT
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1513 XSTRING (TARGET_LONG_BIT));
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: long_bit = %s\n",
1517 paddr_d (current_gdbarch->long_bit));
1518 #ifdef TARGET_LONG_DOUBLE_BIT
1519 fprintf_unfiltered (file,
1520 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1521 XSTRING (TARGET_LONG_DOUBLE_BIT));
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: long_double_bit = %s\n",
1525 paddr_d (current_gdbarch->long_double_bit));
1526 #ifdef TARGET_LONG_DOUBLE_FORMAT
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1529 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: long_double_format = %s\n",
1533 (TARGET_LONG_DOUBLE_FORMAT)->name);
1534 #ifdef TARGET_LONG_LONG_BIT
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1537 XSTRING (TARGET_LONG_LONG_BIT));
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: long_long_bit = %s\n",
1541 paddr_d (current_gdbarch->long_long_bit));
1542 #ifdef MEMORY_INSERT_BREAKPOINT
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: %s # %s\n",
1545 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1546 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1550 (long) current_gdbarch->memory_insert_breakpoint);
1551 #ifdef MEMORY_REMOVE_BREAKPOINT
1552 fprintf_unfiltered (file,
1553 "gdbarch_dump: %s # %s\n",
1554 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1555 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1559 (long) current_gdbarch->memory_remove_breakpoint);
1560 #ifdef NAME_OF_MALLOC
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1563 XSTRING (NAME_OF_MALLOC));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: name_of_malloc = %s\n",
1568 #ifdef NUM_PSEUDO_REGS
1569 fprintf_unfiltered (file,
1570 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1571 XSTRING (NUM_PSEUDO_REGS));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: num_pseudo_regs = %s\n",
1575 paddr_d (current_gdbarch->num_pseudo_regs));
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: NUM_REGS # %s\n",
1579 XSTRING (NUM_REGS));
1581 fprintf_unfiltered (file,
1582 "gdbarch_dump: num_regs = %s\n",
1583 paddr_d (current_gdbarch->num_regs));
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: TARGET_OSABI # %s\n",
1587 XSTRING (TARGET_OSABI));
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: osabi = %s\n",
1591 paddr_d (current_gdbarch->osabi));
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: PC_REGNUM # %s\n",
1595 XSTRING (PC_REGNUM));
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: pc_regnum = %s\n",
1599 paddr_d (current_gdbarch->pc_regnum));
1600 #ifdef POINTER_TO_ADDRESS
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: %s # %s\n",
1603 "POINTER_TO_ADDRESS(type, buf)",
1604 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1606 fprintf_unfiltered (file,
1607 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1608 (long) current_gdbarch->pointer_to_address);
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1611 gdbarch_print_float_info_p (current_gdbarch));
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: print_float_info = <0x%lx>\n",
1614 (long) current_gdbarch->print_float_info);
1615 #ifdef TARGET_PRINT_INSN
1616 fprintf_unfiltered (file,
1617 "gdbarch_dump: %s # %s\n",
1618 "TARGET_PRINT_INSN(vma, info)",
1619 XSTRING (TARGET_PRINT_INSN (vma, info)));
1621 fprintf_unfiltered (file,
1622 "gdbarch_dump: print_insn = <0x%lx>\n",
1623 (long) current_gdbarch->print_insn);
1624 fprintf_unfiltered (file,
1625 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1626 (long) current_gdbarch->print_registers_info);
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1629 gdbarch_print_vector_info_p (current_gdbarch));
1630 fprintf_unfiltered (file,
1631 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1632 (long) current_gdbarch->print_vector_info);
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: PS_REGNUM # %s\n",
1636 XSTRING (PS_REGNUM));
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: ps_regnum = %s\n",
1640 paddr_d (current_gdbarch->ps_regnum));
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1643 gdbarch_pseudo_register_read_p (current_gdbarch));
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1646 (long) current_gdbarch->pseudo_register_read);
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1649 gdbarch_pseudo_register_write_p (current_gdbarch));
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1652 (long) current_gdbarch->pseudo_register_write);
1653 #ifdef TARGET_PTR_BIT
1654 fprintf_unfiltered (file,
1655 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1656 XSTRING (TARGET_PTR_BIT));
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: ptr_bit = %s\n",
1660 paddr_d (current_gdbarch->ptr_bit));
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1663 gdbarch_push_dummy_call_p (current_gdbarch));
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1666 (long) current_gdbarch->push_dummy_call);
1667 fprintf_unfiltered (file,
1668 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1669 gdbarch_push_dummy_code_p (current_gdbarch));
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1672 (long) current_gdbarch->push_dummy_code);
1673 #ifdef TARGET_READ_PC_P
1674 fprintf_unfiltered (file,
1675 "gdbarch_dump: %s # %s\n",
1676 "TARGET_READ_PC_P()",
1677 XSTRING (TARGET_READ_PC_P ()));
1679 fprintf_unfiltered (file,
1680 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1681 gdbarch_read_pc_p (current_gdbarch));
1682 #ifdef TARGET_READ_PC
1683 fprintf_unfiltered (file,
1684 "gdbarch_dump: %s # %s\n",
1685 "TARGET_READ_PC(ptid)",
1686 XSTRING (TARGET_READ_PC (ptid)));
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: read_pc = <0x%lx>\n",
1690 (long) current_gdbarch->read_pc);
1691 #ifdef TARGET_READ_SP_P
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: %s # %s\n",
1694 "TARGET_READ_SP_P()",
1695 XSTRING (TARGET_READ_SP_P ()));
1697 fprintf_unfiltered (file,
1698 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1699 gdbarch_read_sp_p (current_gdbarch));
1700 #ifdef TARGET_READ_SP
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: %s # %s\n",
1704 XSTRING (TARGET_READ_SP ()));
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: read_sp = <0x%lx>\n",
1708 (long) current_gdbarch->read_sp);
1709 #ifdef REGISTER_BYTES_OK_P
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: %s # %s\n",
1712 "REGISTER_BYTES_OK_P()",
1713 XSTRING (REGISTER_BYTES_OK_P ()));
1715 fprintf_unfiltered (file,
1716 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1717 gdbarch_register_bytes_ok_p (current_gdbarch));
1718 #ifdef REGISTER_BYTES_OK
1719 fprintf_unfiltered (file,
1720 "gdbarch_dump: %s # %s\n",
1721 "REGISTER_BYTES_OK(nr_bytes)",
1722 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1726 (long) current_gdbarch->register_bytes_ok);
1727 #ifdef REGISTER_NAME
1728 fprintf_unfiltered (file,
1729 "gdbarch_dump: %s # %s\n",
1730 "REGISTER_NAME(regnr)",
1731 XSTRING (REGISTER_NAME (regnr)));
1733 fprintf_unfiltered (file,
1734 "gdbarch_dump: register_name = <0x%lx>\n",
1735 (long) current_gdbarch->register_name);
1736 fprintf_unfiltered (file,
1737 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1738 (long) current_gdbarch->register_reggroup_p);
1739 #ifdef REGISTER_SIM_REGNO
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: %s # %s\n",
1742 "REGISTER_SIM_REGNO(reg_nr)",
1743 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1747 (long) current_gdbarch->register_sim_regno);
1748 #ifdef REGISTER_TO_VALUE
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: %s # %s\n",
1751 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1752 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: register_to_value = <0x%lx>\n",
1756 (long) current_gdbarch->register_to_value);
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1759 gdbarch_register_type_p (current_gdbarch));
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: register_type = <0x%lx>\n",
1762 (long) current_gdbarch->register_type);
1763 fprintf_unfiltered (file,
1764 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1765 gdbarch_regset_from_core_section_p (current_gdbarch));
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1768 (long) current_gdbarch->regset_from_core_section);
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1771 (long) current_gdbarch->remote_translate_xfer_address);
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1774 gdbarch_return_value_p (current_gdbarch));
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: return_value = <0x%lx>\n",
1777 (long) current_gdbarch->return_value);
1778 #ifdef SDB_REG_TO_REGNUM
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: %s # %s\n",
1781 "SDB_REG_TO_REGNUM(sdb_regnr)",
1782 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1786 (long) current_gdbarch->sdb_reg_to_regnum);
1787 #ifdef TARGET_SHORT_BIT
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1790 XSTRING (TARGET_SHORT_BIT));
1792 fprintf_unfiltered (file,
1793 "gdbarch_dump: short_bit = %s\n",
1794 paddr_d (current_gdbarch->short_bit));
1795 #ifdef SKIP_PROLOGUE
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "SKIP_PROLOGUE(ip)",
1799 XSTRING (SKIP_PROLOGUE (ip)));
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1803 (long) current_gdbarch->skip_prologue);
1804 fprintf_unfiltered (file,
1805 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1806 (long) current_gdbarch->skip_solib_resolver);
1807 #ifdef SKIP_TRAMPOLINE_CODE
1808 fprintf_unfiltered (file,
1809 "gdbarch_dump: %s # %s\n",
1810 "SKIP_TRAMPOLINE_CODE(pc)",
1811 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1813 fprintf_unfiltered (file,
1814 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1815 (long) current_gdbarch->skip_trampoline_code);
1816 #ifdef SMASH_TEXT_ADDRESS
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: %s # %s\n",
1819 "SMASH_TEXT_ADDRESS(addr)",
1820 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1824 (long) current_gdbarch->smash_text_address);
1825 #ifdef SOFTWARE_SINGLE_STEP_P
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: %s # %s\n",
1828 "SOFTWARE_SINGLE_STEP_P()",
1829 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1831 fprintf_unfiltered (file,
1832 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1833 gdbarch_software_single_step_p (current_gdbarch));
1834 #ifdef SOFTWARE_SINGLE_STEP
1835 fprintf_unfiltered (file,
1836 "gdbarch_dump: %s # %s\n",
1837 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1838 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: software_single_step = <0x%lx>\n",
1842 (long) current_gdbarch->software_single_step);
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: SP_REGNUM # %s\n",
1846 XSTRING (SP_REGNUM));
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: sp_regnum = %s\n",
1850 paddr_d (current_gdbarch->sp_regnum));
1851 #ifdef STAB_REG_TO_REGNUM
1852 fprintf_unfiltered (file,
1853 "gdbarch_dump: %s # %s\n",
1854 "STAB_REG_TO_REGNUM(stab_regnr)",
1855 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1857 fprintf_unfiltered (file,
1858 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1859 (long) current_gdbarch->stab_reg_to_regnum);
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1862 (long) current_gdbarch->stabs_argument_has_addr);
1863 #ifdef STORE_RETURN_VALUE
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: %s # %s\n",
1866 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1867 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: store_return_value = <0x%lx>\n",
1871 (long) current_gdbarch->store_return_value);
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1874 gdbarch_unwind_dummy_id_p (current_gdbarch));
1875 fprintf_unfiltered (file,
1876 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1877 (long) current_gdbarch->unwind_dummy_id);
1878 fprintf_unfiltered (file,
1879 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1880 gdbarch_unwind_pc_p (current_gdbarch));
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1883 (long) current_gdbarch->unwind_pc);
1884 fprintf_unfiltered (file,
1885 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1886 gdbarch_unwind_sp_p (current_gdbarch));
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1889 (long) current_gdbarch->unwind_sp);
1890 #ifdef VALUE_TO_REGISTER
1891 fprintf_unfiltered (file,
1892 "gdbarch_dump: %s # %s\n",
1893 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1894 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1896 fprintf_unfiltered (file,
1897 "gdbarch_dump: value_to_register = <0x%lx>\n",
1898 (long) current_gdbarch->value_to_register);
1899 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1900 fprintf_unfiltered (file,
1901 "gdbarch_dump: %s # %s\n",
1902 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1903 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1905 fprintf_unfiltered (file,
1906 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1907 (long) current_gdbarch->virtual_frame_pointer);
1908 #ifdef TARGET_WRITE_PC
1909 fprintf_unfiltered (file,
1910 "gdbarch_dump: %s # %s\n",
1911 "TARGET_WRITE_PC(val, ptid)",
1912 XSTRING (TARGET_WRITE_PC (val, ptid)));
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: write_pc = <0x%lx>\n",
1916 (long) current_gdbarch->write_pc);
1917 if (current_gdbarch->dump_tdep != NULL)
1918 current_gdbarch->dump_tdep (current_gdbarch, file);
1921 struct gdbarch_tdep *
1922 gdbarch_tdep (struct gdbarch *gdbarch)
1924 if (gdbarch_debug >= 2)
1925 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1926 return gdbarch->tdep;
1930 const struct bfd_arch_info *
1931 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1933 gdb_assert (gdbarch != NULL);
1934 if (gdbarch_debug >= 2)
1935 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1936 return gdbarch->bfd_arch_info;
1940 gdbarch_byte_order (struct gdbarch *gdbarch)
1942 gdb_assert (gdbarch != NULL);
1943 if (gdbarch_debug >= 2)
1944 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1945 return gdbarch->byte_order;
1949 gdbarch_osabi (struct gdbarch *gdbarch)
1951 gdb_assert (gdbarch != NULL);
1952 if (gdbarch_debug >= 2)
1953 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1954 return gdbarch->osabi;
1958 gdbarch_short_bit (struct gdbarch *gdbarch)
1960 gdb_assert (gdbarch != NULL);
1961 /* Skip verify of short_bit, invalid_p == 0 */
1962 if (gdbarch_debug >= 2)
1963 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1964 return gdbarch->short_bit;
1968 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1971 gdbarch->short_bit = short_bit;
1975 gdbarch_int_bit (struct gdbarch *gdbarch)
1977 gdb_assert (gdbarch != NULL);
1978 /* Skip verify of int_bit, invalid_p == 0 */
1979 if (gdbarch_debug >= 2)
1980 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1981 return gdbarch->int_bit;
1985 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1988 gdbarch->int_bit = int_bit;
1992 gdbarch_long_bit (struct gdbarch *gdbarch)
1994 gdb_assert (gdbarch != NULL);
1995 /* Skip verify of long_bit, invalid_p == 0 */
1996 if (gdbarch_debug >= 2)
1997 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1998 return gdbarch->long_bit;
2002 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2005 gdbarch->long_bit = long_bit;
2009 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2011 gdb_assert (gdbarch != NULL);
2012 /* Skip verify of long_long_bit, invalid_p == 0 */
2013 if (gdbarch_debug >= 2)
2014 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2015 return gdbarch->long_long_bit;
2019 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2022 gdbarch->long_long_bit = long_long_bit;
2026 gdbarch_float_bit (struct gdbarch *gdbarch)
2028 gdb_assert (gdbarch != NULL);
2029 /* Skip verify of float_bit, invalid_p == 0 */
2030 if (gdbarch_debug >= 2)
2031 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2032 return gdbarch->float_bit;
2036 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2039 gdbarch->float_bit = float_bit;
2043 gdbarch_double_bit (struct gdbarch *gdbarch)
2045 gdb_assert (gdbarch != NULL);
2046 /* Skip verify of double_bit, invalid_p == 0 */
2047 if (gdbarch_debug >= 2)
2048 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2049 return gdbarch->double_bit;
2053 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2056 gdbarch->double_bit = double_bit;
2060 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2062 gdb_assert (gdbarch != NULL);
2063 /* Skip verify of long_double_bit, invalid_p == 0 */
2064 if (gdbarch_debug >= 2)
2065 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2066 return gdbarch->long_double_bit;
2070 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2071 int long_double_bit)
2073 gdbarch->long_double_bit = long_double_bit;
2077 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2079 gdb_assert (gdbarch != NULL);
2080 /* Skip verify of ptr_bit, invalid_p == 0 */
2081 if (gdbarch_debug >= 2)
2082 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2083 return gdbarch->ptr_bit;
2087 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2090 gdbarch->ptr_bit = ptr_bit;
2094 gdbarch_addr_bit (struct gdbarch *gdbarch)
2096 gdb_assert (gdbarch != NULL);
2097 /* Check variable changed from pre-default. */
2098 gdb_assert (gdbarch->addr_bit != 0);
2099 if (gdbarch_debug >= 2)
2100 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2101 return gdbarch->addr_bit;
2105 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2108 gdbarch->addr_bit = addr_bit;
2112 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2114 gdb_assert (gdbarch != NULL);
2115 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2116 if (gdbarch_debug >= 2)
2117 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2118 return gdbarch->bfd_vma_bit;
2122 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2125 gdbarch->bfd_vma_bit = bfd_vma_bit;
2129 gdbarch_char_signed (struct gdbarch *gdbarch)
2131 gdb_assert (gdbarch != NULL);
2132 /* Check variable changed from pre-default. */
2133 gdb_assert (gdbarch->char_signed != -1);
2134 if (gdbarch_debug >= 2)
2135 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2136 return gdbarch->char_signed;
2140 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2143 gdbarch->char_signed = char_signed;
2147 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2149 gdb_assert (gdbarch != NULL);
2150 return gdbarch->read_pc != NULL;
2154 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2156 gdb_assert (gdbarch != NULL);
2157 gdb_assert (gdbarch->read_pc != NULL);
2158 if (gdbarch_debug >= 2)
2159 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2160 return gdbarch->read_pc (ptid);
2164 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2165 gdbarch_read_pc_ftype read_pc)
2167 gdbarch->read_pc = read_pc;
2171 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2173 gdb_assert (gdbarch != NULL);
2174 gdb_assert (gdbarch->write_pc != NULL);
2175 if (gdbarch_debug >= 2)
2176 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2177 gdbarch->write_pc (val, ptid);
2181 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2182 gdbarch_write_pc_ftype write_pc)
2184 gdbarch->write_pc = write_pc;
2188 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2190 gdb_assert (gdbarch != NULL);
2191 return gdbarch->read_sp != NULL;
2195 gdbarch_read_sp (struct gdbarch *gdbarch)
2197 gdb_assert (gdbarch != NULL);
2198 gdb_assert (gdbarch->read_sp != NULL);
2199 if (gdbarch_debug >= 2)
2200 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2201 return gdbarch->read_sp ();
2205 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2206 gdbarch_read_sp_ftype read_sp)
2208 gdbarch->read_sp = read_sp;
2212 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2214 gdb_assert (gdbarch != NULL);
2215 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2216 if (gdbarch_debug >= 2)
2217 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2218 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2222 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2223 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2225 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2229 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2231 gdb_assert (gdbarch != NULL);
2232 return gdbarch->pseudo_register_read != NULL;
2236 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2238 gdb_assert (gdbarch != NULL);
2239 gdb_assert (gdbarch->pseudo_register_read != NULL);
2240 if (gdbarch_debug >= 2)
2241 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2242 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2246 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2247 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2249 gdbarch->pseudo_register_read = pseudo_register_read;
2253 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2255 gdb_assert (gdbarch != NULL);
2256 return gdbarch->pseudo_register_write != NULL;
2260 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2262 gdb_assert (gdbarch != NULL);
2263 gdb_assert (gdbarch->pseudo_register_write != NULL);
2264 if (gdbarch_debug >= 2)
2265 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2266 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2270 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2271 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2273 gdbarch->pseudo_register_write = pseudo_register_write;
2277 gdbarch_num_regs (struct gdbarch *gdbarch)
2279 gdb_assert (gdbarch != NULL);
2280 /* Check variable changed from pre-default. */
2281 gdb_assert (gdbarch->num_regs != -1);
2282 if (gdbarch_debug >= 2)
2283 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2284 return gdbarch->num_regs;
2288 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2291 gdbarch->num_regs = num_regs;
2295 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2297 gdb_assert (gdbarch != NULL);
2298 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2299 if (gdbarch_debug >= 2)
2300 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2301 return gdbarch->num_pseudo_regs;
2305 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2306 int num_pseudo_regs)
2308 gdbarch->num_pseudo_regs = num_pseudo_regs;
2312 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2314 gdb_assert (gdbarch != NULL);
2315 /* Skip verify of sp_regnum, invalid_p == 0 */
2316 if (gdbarch_debug >= 2)
2317 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2318 return gdbarch->sp_regnum;
2322 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2325 gdbarch->sp_regnum = sp_regnum;
2329 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2331 gdb_assert (gdbarch != NULL);
2332 /* Skip verify of pc_regnum, invalid_p == 0 */
2333 if (gdbarch_debug >= 2)
2334 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2335 return gdbarch->pc_regnum;
2339 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2342 gdbarch->pc_regnum = pc_regnum;
2346 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2348 gdb_assert (gdbarch != NULL);
2349 /* Skip verify of ps_regnum, invalid_p == 0 */
2350 if (gdbarch_debug >= 2)
2351 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2352 return gdbarch->ps_regnum;
2356 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2359 gdbarch->ps_regnum = ps_regnum;
2363 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2365 gdb_assert (gdbarch != NULL);
2366 /* Skip verify of fp0_regnum, invalid_p == 0 */
2367 if (gdbarch_debug >= 2)
2368 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2369 return gdbarch->fp0_regnum;
2373 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2376 gdbarch->fp0_regnum = fp0_regnum;
2380 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2382 gdb_assert (gdbarch != NULL);
2383 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2384 if (gdbarch_debug >= 2)
2385 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2386 return gdbarch->stab_reg_to_regnum (stab_regnr);
2390 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2391 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2393 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2397 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2399 gdb_assert (gdbarch != NULL);
2400 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2401 if (gdbarch_debug >= 2)
2402 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2403 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2407 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2408 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2410 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2414 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2416 gdb_assert (gdbarch != NULL);
2417 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2418 if (gdbarch_debug >= 2)
2419 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2420 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2424 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2425 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2427 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2431 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2433 gdb_assert (gdbarch != NULL);
2434 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2435 if (gdbarch_debug >= 2)
2436 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2437 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2441 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2442 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2444 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2448 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2450 gdb_assert (gdbarch != NULL);
2451 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2452 if (gdbarch_debug >= 2)
2453 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2454 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2458 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2459 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2461 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2465 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2467 gdb_assert (gdbarch != NULL);
2468 gdb_assert (gdbarch->register_name != NULL);
2469 if (gdbarch_debug >= 2)
2470 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2471 return gdbarch->register_name (regnr);
2475 set_gdbarch_register_name (struct gdbarch *gdbarch,
2476 gdbarch_register_name_ftype register_name)
2478 gdbarch->register_name = register_name;
2482 gdbarch_register_type_p (struct gdbarch *gdbarch)
2484 gdb_assert (gdbarch != NULL);
2485 return gdbarch->register_type != NULL;
2489 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2491 gdb_assert (gdbarch != NULL);
2492 gdb_assert (gdbarch->register_type != NULL);
2493 if (gdbarch_debug >= 2)
2494 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2495 return gdbarch->register_type (gdbarch, reg_nr);
2499 set_gdbarch_register_type (struct gdbarch *gdbarch,
2500 gdbarch_register_type_ftype register_type)
2502 gdbarch->register_type = register_type;
2506 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2508 gdb_assert (gdbarch != NULL);
2509 return gdbarch->deprecated_register_byte != generic_register_byte;
2513 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2515 gdb_assert (gdbarch != NULL);
2516 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2517 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2518 if (gdbarch_debug >= 2)
2519 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2520 return gdbarch->deprecated_register_byte (reg_nr);
2524 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2525 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2527 gdbarch->deprecated_register_byte = deprecated_register_byte;
2531 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2533 gdb_assert (gdbarch != NULL);
2534 return gdbarch->deprecated_register_raw_size != generic_register_size;
2538 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2540 gdb_assert (gdbarch != NULL);
2541 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2542 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2543 if (gdbarch_debug >= 2)
2544 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2545 return gdbarch->deprecated_register_raw_size (reg_nr);
2549 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2550 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2552 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2556 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2558 gdb_assert (gdbarch != NULL);
2559 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2563 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2565 gdb_assert (gdbarch != NULL);
2566 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2567 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2568 if (gdbarch_debug >= 2)
2569 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2570 return gdbarch->deprecated_register_virtual_size (reg_nr);
2574 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2575 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2577 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2581 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2583 gdb_assert (gdbarch != NULL);
2584 return gdbarch->unwind_dummy_id != NULL;
2588 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2590 gdb_assert (gdbarch != NULL);
2591 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2592 if (gdbarch_debug >= 2)
2593 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2594 return gdbarch->unwind_dummy_id (gdbarch, info);
2598 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2599 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2601 gdbarch->unwind_dummy_id = unwind_dummy_id;
2605 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2607 gdb_assert (gdbarch != NULL);
2608 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2609 if (gdbarch_debug >= 2)
2610 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2611 return gdbarch->deprecated_fp_regnum;
2615 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2616 int deprecated_fp_regnum)
2618 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2622 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2624 gdb_assert (gdbarch != NULL);
2625 return gdbarch->deprecated_target_read_fp != NULL;
2629 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2631 gdb_assert (gdbarch != NULL);
2632 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
2633 if (gdbarch_debug >= 2)
2634 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2635 return gdbarch->deprecated_target_read_fp ();
2639 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2640 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2642 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2646 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2648 gdb_assert (gdbarch != NULL);
2649 return gdbarch->push_dummy_call != NULL;
2653 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)
2655 gdb_assert (gdbarch != NULL);
2656 gdb_assert (gdbarch->push_dummy_call != NULL);
2657 if (gdbarch_debug >= 2)
2658 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2659 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2663 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2664 gdbarch_push_dummy_call_ftype push_dummy_call)
2666 gdbarch->push_dummy_call = push_dummy_call;
2670 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
2672 gdb_assert (gdbarch != NULL);
2673 return gdbarch->deprecated_push_arguments != NULL;
2677 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2679 gdb_assert (gdbarch != NULL);
2680 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
2681 if (gdbarch_debug >= 2)
2682 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
2683 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
2687 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
2688 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
2690 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
2694 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2696 gdb_assert (gdbarch != NULL);
2697 if (gdbarch_debug >= 2)
2698 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2699 return gdbarch->deprecated_register_size;
2703 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2704 int deprecated_register_size)
2706 gdbarch->deprecated_register_size = deprecated_register_size;
2710 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2712 gdb_assert (gdbarch != NULL);
2713 /* Skip verify of call_dummy_location, invalid_p == 0 */
2714 if (gdbarch_debug >= 2)
2715 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2716 return gdbarch->call_dummy_location;
2720 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2721 int call_dummy_location)
2723 gdbarch->call_dummy_location = call_dummy_location;
2727 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2729 gdb_assert (gdbarch != NULL);
2730 return gdbarch->push_dummy_code != NULL;
2734 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)
2736 gdb_assert (gdbarch != NULL);
2737 gdb_assert (gdbarch->push_dummy_code != NULL);
2738 if (gdbarch_debug >= 2)
2739 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2740 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2744 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2745 gdbarch_push_dummy_code_ftype push_dummy_code)
2747 gdbarch->push_dummy_code = push_dummy_code;
2751 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
2753 gdb_assert (gdbarch != NULL);
2754 return gdbarch->deprecated_do_registers_info != NULL;
2758 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2760 gdb_assert (gdbarch != NULL);
2761 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
2762 if (gdbarch_debug >= 2)
2763 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
2764 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
2768 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
2769 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
2771 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
2775 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2777 gdb_assert (gdbarch != NULL);
2778 gdb_assert (gdbarch->print_registers_info != NULL);
2779 if (gdbarch_debug >= 2)
2780 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2781 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2785 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2786 gdbarch_print_registers_info_ftype print_registers_info)
2788 gdbarch->print_registers_info = print_registers_info;
2792 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2794 gdb_assert (gdbarch != NULL);
2795 return gdbarch->print_float_info != NULL;
2799 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2801 gdb_assert (gdbarch != NULL);
2802 gdb_assert (gdbarch->print_float_info != NULL);
2803 if (gdbarch_debug >= 2)
2804 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2805 gdbarch->print_float_info (gdbarch, file, frame, args);
2809 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2810 gdbarch_print_float_info_ftype print_float_info)
2812 gdbarch->print_float_info = print_float_info;
2816 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2818 gdb_assert (gdbarch != NULL);
2819 return gdbarch->print_vector_info != NULL;
2823 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2825 gdb_assert (gdbarch != NULL);
2826 gdb_assert (gdbarch->print_vector_info != NULL);
2827 if (gdbarch_debug >= 2)
2828 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2829 gdbarch->print_vector_info (gdbarch, file, frame, args);
2833 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2834 gdbarch_print_vector_info_ftype print_vector_info)
2836 gdbarch->print_vector_info = print_vector_info;
2840 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2842 gdb_assert (gdbarch != NULL);
2843 gdb_assert (gdbarch->register_sim_regno != NULL);
2844 if (gdbarch_debug >= 2)
2845 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2846 return gdbarch->register_sim_regno (reg_nr);
2850 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2851 gdbarch_register_sim_regno_ftype register_sim_regno)
2853 gdbarch->register_sim_regno = register_sim_regno;
2857 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2859 gdb_assert (gdbarch != NULL);
2860 return gdbarch->register_bytes_ok != NULL;
2864 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2866 gdb_assert (gdbarch != NULL);
2867 gdb_assert (gdbarch->register_bytes_ok != NULL);
2868 if (gdbarch_debug >= 2)
2869 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2870 return gdbarch->register_bytes_ok (nr_bytes);
2874 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2875 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2877 gdbarch->register_bytes_ok = register_bytes_ok;
2881 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2883 gdb_assert (gdbarch != NULL);
2884 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2885 if (gdbarch_debug >= 2)
2886 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2887 return gdbarch->cannot_fetch_register (regnum);
2891 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2892 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2894 gdbarch->cannot_fetch_register = cannot_fetch_register;
2898 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2900 gdb_assert (gdbarch != NULL);
2901 gdb_assert (gdbarch->cannot_store_register != NULL);
2902 if (gdbarch_debug >= 2)
2903 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2904 return gdbarch->cannot_store_register (regnum);
2908 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2909 gdbarch_cannot_store_register_ftype cannot_store_register)
2911 gdbarch->cannot_store_register = cannot_store_register;
2915 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2917 gdb_assert (gdbarch != NULL);
2918 return gdbarch->get_longjmp_target != NULL;
2922 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
2924 gdb_assert (gdbarch != NULL);
2925 gdb_assert (gdbarch->get_longjmp_target != NULL);
2926 if (gdbarch_debug >= 2)
2927 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2928 return gdbarch->get_longjmp_target (pc);
2932 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2933 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2935 gdbarch->get_longjmp_target = get_longjmp_target;
2939 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
2941 gdb_assert (gdbarch != NULL);
2942 return gdbarch->deprecated_init_frame_pc != NULL;
2946 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
2948 gdb_assert (gdbarch != NULL);
2949 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
2950 if (gdbarch_debug >= 2)
2951 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
2952 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
2956 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
2957 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
2959 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
2963 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2965 gdb_assert (gdbarch != NULL);
2966 if (gdbarch_debug >= 2)
2967 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2968 return gdbarch->believe_pcc_promotion;
2972 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2973 int believe_pcc_promotion)
2975 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2979 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
2981 gdb_assert (gdbarch != NULL);
2982 return gdbarch->deprecated_get_saved_register != NULL;
2986 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)
2988 gdb_assert (gdbarch != NULL);
2989 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
2990 if (gdbarch_debug >= 2)
2991 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
2992 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
2996 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
2997 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
2999 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3003 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3005 gdb_assert (gdbarch != NULL);
3006 gdb_assert (gdbarch->convert_register_p != NULL);
3007 if (gdbarch_debug >= 2)
3008 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3009 return gdbarch->convert_register_p (regnum, type);
3013 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3014 gdbarch_convert_register_p_ftype convert_register_p)
3016 gdbarch->convert_register_p = convert_register_p;
3020 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3022 gdb_assert (gdbarch != NULL);
3023 gdb_assert (gdbarch->register_to_value != NULL);
3024 if (gdbarch_debug >= 2)
3025 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3026 gdbarch->register_to_value (frame, regnum, type, buf);
3030 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3031 gdbarch_register_to_value_ftype register_to_value)
3033 gdbarch->register_to_value = register_to_value;
3037 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3039 gdb_assert (gdbarch != NULL);
3040 gdb_assert (gdbarch->value_to_register != NULL);
3041 if (gdbarch_debug >= 2)
3042 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3043 gdbarch->value_to_register (frame, regnum, type, buf);
3047 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3048 gdbarch_value_to_register_ftype value_to_register)
3050 gdbarch->value_to_register = value_to_register;
3054 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3056 gdb_assert (gdbarch != NULL);
3057 gdb_assert (gdbarch->pointer_to_address != NULL);
3058 if (gdbarch_debug >= 2)
3059 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3060 return gdbarch->pointer_to_address (type, buf);
3064 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3065 gdbarch_pointer_to_address_ftype pointer_to_address)
3067 gdbarch->pointer_to_address = pointer_to_address;
3071 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3073 gdb_assert (gdbarch != NULL);
3074 gdb_assert (gdbarch->address_to_pointer != NULL);
3075 if (gdbarch_debug >= 2)
3076 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3077 gdbarch->address_to_pointer (type, buf, addr);
3081 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3082 gdbarch_address_to_pointer_ftype address_to_pointer)
3084 gdbarch->address_to_pointer = address_to_pointer;
3088 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3090 gdb_assert (gdbarch != NULL);
3091 return gdbarch->integer_to_address != NULL;
3095 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3097 gdb_assert (gdbarch != NULL);
3098 gdb_assert (gdbarch->integer_to_address != NULL);
3099 if (gdbarch_debug >= 2)
3100 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3101 return gdbarch->integer_to_address (type, buf);
3105 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3106 gdbarch_integer_to_address_ftype integer_to_address)
3108 gdbarch->integer_to_address = integer_to_address;
3112 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3114 gdb_assert (gdbarch != NULL);
3115 return gdbarch->deprecated_pop_frame != NULL;
3119 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3121 gdb_assert (gdbarch != NULL);
3122 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3123 if (gdbarch_debug >= 2)
3124 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3125 gdbarch->deprecated_pop_frame ();
3129 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3130 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3132 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3136 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3138 gdb_assert (gdbarch != NULL);
3139 return gdbarch->deprecated_store_struct_return != NULL;
3143 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3145 gdb_assert (gdbarch != NULL);
3146 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3147 if (gdbarch_debug >= 2)
3148 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3149 gdbarch->deprecated_store_struct_return (addr, sp);
3153 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3154 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3156 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3160 gdbarch_return_value_p (struct gdbarch *gdbarch)
3162 gdb_assert (gdbarch != NULL);
3163 return gdbarch->return_value != legacy_return_value;
3166 enum return_value_convention
3167 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3169 gdb_assert (gdbarch != NULL);
3170 gdb_assert (gdbarch->return_value != NULL);
3171 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
3172 if (gdbarch_debug >= 2)
3173 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3174 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3178 set_gdbarch_return_value (struct gdbarch *gdbarch,
3179 gdbarch_return_value_ftype return_value)
3181 gdbarch->return_value = return_value;
3185 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3187 gdb_assert (gdbarch != NULL);
3188 gdb_assert (gdbarch->extract_return_value != NULL);
3189 if (gdbarch_debug >= 2)
3190 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3191 gdbarch->extract_return_value (type, regcache, valbuf);
3195 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3196 gdbarch_extract_return_value_ftype extract_return_value)
3198 gdbarch->extract_return_value = extract_return_value;
3202 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3204 gdb_assert (gdbarch != NULL);
3205 gdb_assert (gdbarch->store_return_value != NULL);
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3208 gdbarch->store_return_value (type, regcache, valbuf);
3212 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3213 gdbarch_store_return_value_ftype store_return_value)
3215 gdbarch->store_return_value = store_return_value;
3219 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3225 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3229 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3230 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3232 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3236 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3238 gdb_assert (gdbarch != NULL);
3239 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3242 gdbarch->deprecated_store_return_value (type, valbuf);
3246 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3247 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3249 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3253 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3255 gdb_assert (gdbarch != NULL);
3256 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
3259 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
3263 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
3264 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
3266 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
3270 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3272 gdb_assert (gdbarch != NULL);
3273 return gdbarch->deprecated_extract_struct_value_address != NULL;
3277 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3279 gdb_assert (gdbarch != NULL);
3280 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3281 if (gdbarch_debug >= 2)
3282 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3283 return gdbarch->deprecated_extract_struct_value_address (regcache);
3287 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3288 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3290 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3294 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3296 gdb_assert (gdbarch != NULL);
3297 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3301 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3303 gdb_assert (gdbarch != NULL);
3304 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3305 if (gdbarch_debug >= 2)
3306 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3307 gdbarch->deprecated_frame_init_saved_regs (frame);
3311 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3312 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3314 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3318 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3320 gdb_assert (gdbarch != NULL);
3321 return gdbarch->deprecated_init_extra_frame_info != NULL;
3325 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3327 gdb_assert (gdbarch != NULL);
3328 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3329 if (gdbarch_debug >= 2)
3330 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3331 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3335 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3336 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3338 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3342 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3344 gdb_assert (gdbarch != NULL);
3345 gdb_assert (gdbarch->skip_prologue != NULL);
3346 if (gdbarch_debug >= 2)
3347 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3348 return gdbarch->skip_prologue (ip);
3352 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3353 gdbarch_skip_prologue_ftype skip_prologue)
3355 gdbarch->skip_prologue = skip_prologue;
3359 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3361 gdb_assert (gdbarch != NULL);
3362 gdb_assert (gdbarch->inner_than != NULL);
3363 if (gdbarch_debug >= 2)
3364 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3365 return gdbarch->inner_than (lhs, rhs);
3369 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3370 gdbarch_inner_than_ftype inner_than)
3372 gdbarch->inner_than = inner_than;
3375 const unsigned char *
3376 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3378 gdb_assert (gdbarch != NULL);
3379 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3380 if (gdbarch_debug >= 2)
3381 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3382 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3386 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3387 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3389 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3393 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3395 gdb_assert (gdbarch != NULL);
3396 return gdbarch->adjust_breakpoint_address != NULL;
3400 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3402 gdb_assert (gdbarch != NULL);
3403 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3404 if (gdbarch_debug >= 2)
3405 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3406 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3410 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3411 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3413 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3417 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3419 gdb_assert (gdbarch != NULL);
3420 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3421 if (gdbarch_debug >= 2)
3422 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3423 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3427 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3428 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3430 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3434 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3436 gdb_assert (gdbarch != NULL);
3437 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3438 if (gdbarch_debug >= 2)
3439 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3440 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3444 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3445 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3447 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3451 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3453 gdb_assert (gdbarch != NULL);
3454 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3455 if (gdbarch_debug >= 2)
3456 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3457 return gdbarch->decr_pc_after_break;
3461 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3462 CORE_ADDR decr_pc_after_break)
3464 gdbarch->decr_pc_after_break = decr_pc_after_break;
3468 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
3470 gdb_assert (gdbarch != NULL);
3471 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
3472 if (gdbarch_debug >= 2)
3473 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
3474 return gdbarch->deprecated_function_start_offset;
3478 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
3479 CORE_ADDR deprecated_function_start_offset)
3481 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
3485 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)
3487 gdb_assert (gdbarch != NULL);
3488 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3489 if (gdbarch_debug >= 2)
3490 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3491 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3495 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3496 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3498 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3502 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3504 gdb_assert (gdbarch != NULL);
3505 /* Skip verify of frame_args_skip, invalid_p == 0 */
3506 if (gdbarch_debug >= 2)
3507 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3508 return gdbarch->frame_args_skip;
3512 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3513 CORE_ADDR frame_args_skip)
3515 gdbarch->frame_args_skip = frame_args_skip;
3519 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
3521 gdb_assert (gdbarch != NULL);
3522 return gdbarch->deprecated_frame_chain != NULL;
3526 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3528 gdb_assert (gdbarch != NULL);
3529 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
3530 if (gdbarch_debug >= 2)
3531 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
3532 return gdbarch->deprecated_frame_chain (frame);
3536 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
3537 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
3539 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
3543 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
3545 gdb_assert (gdbarch != NULL);
3546 return gdbarch->deprecated_frame_chain_valid != NULL;
3550 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3552 gdb_assert (gdbarch != NULL);
3553 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
3554 if (gdbarch_debug >= 2)
3555 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
3556 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
3560 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
3561 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
3563 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
3567 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
3569 gdb_assert (gdbarch != NULL);
3570 return gdbarch->deprecated_frame_saved_pc != NULL;
3574 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3576 gdb_assert (gdbarch != NULL);
3577 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
3578 if (gdbarch_debug >= 2)
3579 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
3580 return gdbarch->deprecated_frame_saved_pc (fi);
3584 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
3585 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
3587 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
3591 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3593 gdb_assert (gdbarch != NULL);
3594 return gdbarch->unwind_pc != NULL;
3598 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3600 gdb_assert (gdbarch != NULL);
3601 gdb_assert (gdbarch->unwind_pc != NULL);
3602 if (gdbarch_debug >= 2)
3603 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3604 return gdbarch->unwind_pc (gdbarch, next_frame);
3608 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3609 gdbarch_unwind_pc_ftype unwind_pc)
3611 gdbarch->unwind_pc = unwind_pc;
3615 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3617 gdb_assert (gdbarch != NULL);
3618 return gdbarch->unwind_sp != NULL;
3622 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3624 gdb_assert (gdbarch != NULL);
3625 gdb_assert (gdbarch->unwind_sp != NULL);
3626 if (gdbarch_debug >= 2)
3627 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3628 return gdbarch->unwind_sp (gdbarch, next_frame);
3632 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3633 gdbarch_unwind_sp_ftype unwind_sp)
3635 gdbarch->unwind_sp = unwind_sp;
3639 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
3641 gdb_assert (gdbarch != NULL);
3642 return gdbarch->deprecated_frame_args_address != get_frame_base;
3646 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3648 gdb_assert (gdbarch != NULL);
3649 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
3650 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
3651 if (gdbarch_debug >= 2)
3652 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
3653 return gdbarch->deprecated_frame_args_address (fi);
3657 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
3658 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
3660 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
3664 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
3666 gdb_assert (gdbarch != NULL);
3667 return gdbarch->deprecated_frame_locals_address != get_frame_base;
3671 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3673 gdb_assert (gdbarch != NULL);
3674 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
3675 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
3676 if (gdbarch_debug >= 2)
3677 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
3678 return gdbarch->deprecated_frame_locals_address (fi);
3682 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
3683 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
3685 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
3689 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
3691 gdb_assert (gdbarch != NULL);
3692 return gdbarch->deprecated_saved_pc_after_call != NULL;
3696 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3698 gdb_assert (gdbarch != NULL);
3699 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
3700 if (gdbarch_debug >= 2)
3701 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
3702 return gdbarch->deprecated_saved_pc_after_call (frame);
3706 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
3707 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
3709 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
3713 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3715 gdb_assert (gdbarch != NULL);
3716 return gdbarch->frame_num_args != NULL;
3720 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3722 gdb_assert (gdbarch != NULL);
3723 gdb_assert (gdbarch->frame_num_args != NULL);
3724 if (gdbarch_debug >= 2)
3725 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3726 return gdbarch->frame_num_args (frame);
3730 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3731 gdbarch_frame_num_args_ftype frame_num_args)
3733 gdbarch->frame_num_args = frame_num_args;
3737 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3739 gdb_assert (gdbarch != NULL);
3740 return gdbarch->deprecated_stack_align != NULL;
3744 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3746 gdb_assert (gdbarch != NULL);
3747 gdb_assert (gdbarch->deprecated_stack_align != NULL);
3748 if (gdbarch_debug >= 2)
3749 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3750 return gdbarch->deprecated_stack_align (sp);
3754 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3755 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3757 gdbarch->deprecated_stack_align = deprecated_stack_align;
3761 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3763 gdb_assert (gdbarch != NULL);
3764 return gdbarch->frame_align != NULL;
3768 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3770 gdb_assert (gdbarch != NULL);
3771 gdb_assert (gdbarch->frame_align != NULL);
3772 if (gdbarch_debug >= 2)
3773 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3774 return gdbarch->frame_align (gdbarch, address);
3778 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3779 gdbarch_frame_align_ftype frame_align)
3781 gdbarch->frame_align = frame_align;
3785 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3787 gdb_assert (gdbarch != NULL);
3788 return gdbarch->deprecated_reg_struct_has_addr != NULL;
3792 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3794 gdb_assert (gdbarch != NULL);
3795 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3796 if (gdbarch_debug >= 2)
3797 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3798 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3802 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3803 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3805 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3809 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3811 gdb_assert (gdbarch != NULL);
3812 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3813 if (gdbarch_debug >= 2)
3814 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3815 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3819 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3820 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3822 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3826 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3828 gdb_assert (gdbarch != NULL);
3829 if (gdbarch_debug >= 2)
3830 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3831 return gdbarch->frame_red_zone_size;
3835 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3836 int frame_red_zone_size)
3838 gdbarch->frame_red_zone_size = frame_red_zone_size;
3841 const struct floatformat *
3842 gdbarch_float_format (struct gdbarch *gdbarch)
3844 gdb_assert (gdbarch != NULL);
3845 if (gdbarch_debug >= 2)
3846 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
3847 return gdbarch->float_format;
3851 set_gdbarch_float_format (struct gdbarch *gdbarch,
3852 const struct floatformat * float_format)
3854 gdbarch->float_format = float_format;
3857 const struct floatformat *
3858 gdbarch_double_format (struct gdbarch *gdbarch)
3860 gdb_assert (gdbarch != NULL);
3861 if (gdbarch_debug >= 2)
3862 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
3863 return gdbarch->double_format;
3867 set_gdbarch_double_format (struct gdbarch *gdbarch,
3868 const struct floatformat * double_format)
3870 gdbarch->double_format = double_format;
3873 const struct floatformat *
3874 gdbarch_long_double_format (struct gdbarch *gdbarch)
3876 gdb_assert (gdbarch != NULL);
3877 if (gdbarch_debug >= 2)
3878 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
3879 return gdbarch->long_double_format;
3883 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
3884 const struct floatformat * long_double_format)
3886 gdbarch->long_double_format = long_double_format;
3890 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3892 gdb_assert (gdbarch != NULL);
3893 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3894 if (gdbarch_debug >= 2)
3895 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3896 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3900 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3901 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3903 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3907 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3909 gdb_assert (gdbarch != NULL);
3910 gdb_assert (gdbarch->addr_bits_remove != NULL);
3911 if (gdbarch_debug >= 2)
3912 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3913 return gdbarch->addr_bits_remove (addr);
3917 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3918 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3920 gdbarch->addr_bits_remove = addr_bits_remove;
3924 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3926 gdb_assert (gdbarch != NULL);
3927 gdb_assert (gdbarch->smash_text_address != NULL);
3928 if (gdbarch_debug >= 2)
3929 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3930 return gdbarch->smash_text_address (addr);
3934 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3935 gdbarch_smash_text_address_ftype smash_text_address)
3937 gdbarch->smash_text_address = smash_text_address;
3941 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3943 gdb_assert (gdbarch != NULL);
3944 return gdbarch->software_single_step != NULL;
3948 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
3950 gdb_assert (gdbarch != NULL);
3951 gdb_assert (gdbarch->software_single_step != NULL);
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3954 gdbarch->software_single_step (sig, insert_breakpoints_p);
3958 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3959 gdbarch_software_single_step_ftype software_single_step)
3961 gdbarch->software_single_step = software_single_step;
3965 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3967 gdb_assert (gdbarch != NULL);
3968 gdb_assert (gdbarch->print_insn != NULL);
3969 if (gdbarch_debug >= 2)
3970 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3971 return gdbarch->print_insn (vma, info);
3975 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3976 gdbarch_print_insn_ftype print_insn)
3978 gdbarch->print_insn = print_insn;
3982 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3984 gdb_assert (gdbarch != NULL);
3985 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3986 if (gdbarch_debug >= 2)
3987 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3988 return gdbarch->skip_trampoline_code (pc);
3992 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3993 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3995 gdbarch->skip_trampoline_code = skip_trampoline_code;
3999 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4001 gdb_assert (gdbarch != NULL);
4002 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4003 if (gdbarch_debug >= 2)
4004 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4005 return gdbarch->skip_solib_resolver (gdbarch, pc);
4009 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4010 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4012 gdbarch->skip_solib_resolver = skip_solib_resolver;
4016 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4018 gdb_assert (gdbarch != NULL);
4019 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4020 if (gdbarch_debug >= 2)
4021 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4022 return gdbarch->in_solib_call_trampoline (pc, name);
4026 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4027 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4029 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4033 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4035 gdb_assert (gdbarch != NULL);
4036 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4037 if (gdbarch_debug >= 2)
4038 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4039 return gdbarch->in_solib_return_trampoline (pc, name);
4043 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4044 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4046 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4050 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4052 gdb_assert (gdbarch != NULL);
4053 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4054 if (gdbarch_debug >= 2)
4055 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4056 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4060 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4061 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4063 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4067 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4069 gdb_assert (gdbarch != NULL);
4070 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4071 if (gdbarch_debug >= 2)
4072 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4073 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4077 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4078 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4080 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4084 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4086 gdb_assert (gdbarch != NULL);
4087 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4090 gdbarch->elf_make_msymbol_special (sym, msym);
4094 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4095 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4097 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4101 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4103 gdb_assert (gdbarch != NULL);
4104 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4105 if (gdbarch_debug >= 2)
4106 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4107 gdbarch->coff_make_msymbol_special (val, msym);
4111 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4112 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4114 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4118 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4120 gdb_assert (gdbarch != NULL);
4121 /* Skip verify of name_of_malloc, invalid_p == 0 */
4122 if (gdbarch_debug >= 2)
4123 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4124 return gdbarch->name_of_malloc;
4128 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4129 const char * name_of_malloc)
4131 gdbarch->name_of_malloc = name_of_malloc;
4135 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4137 gdb_assert (gdbarch != NULL);
4138 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4139 if (gdbarch_debug >= 2)
4140 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4141 return gdbarch->cannot_step_breakpoint;
4145 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4146 int cannot_step_breakpoint)
4148 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4152 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4154 gdb_assert (gdbarch != NULL);
4155 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4156 if (gdbarch_debug >= 2)
4157 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4158 return gdbarch->have_nonsteppable_watchpoint;
4162 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4163 int have_nonsteppable_watchpoint)
4165 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4169 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4171 gdb_assert (gdbarch != NULL);
4172 return gdbarch->address_class_type_flags != NULL;
4176 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4178 gdb_assert (gdbarch != NULL);
4179 gdb_assert (gdbarch->address_class_type_flags != NULL);
4180 if (gdbarch_debug >= 2)
4181 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4182 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4186 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4187 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4189 gdbarch->address_class_type_flags = address_class_type_flags;
4193 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4195 gdb_assert (gdbarch != NULL);
4196 return gdbarch->address_class_type_flags_to_name != NULL;
4200 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4202 gdb_assert (gdbarch != NULL);
4203 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4204 if (gdbarch_debug >= 2)
4205 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4206 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4210 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4211 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4213 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4217 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4219 gdb_assert (gdbarch != NULL);
4220 return gdbarch->address_class_name_to_type_flags != NULL;
4224 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4226 gdb_assert (gdbarch != NULL);
4227 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4228 if (gdbarch_debug >= 2)
4229 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4230 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4234 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4235 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4237 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4241 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4243 gdb_assert (gdbarch != NULL);
4244 gdb_assert (gdbarch->register_reggroup_p != NULL);
4245 if (gdbarch_debug >= 2)
4246 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4247 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4251 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4252 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4254 gdbarch->register_reggroup_p = register_reggroup_p;
4258 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4260 gdb_assert (gdbarch != NULL);
4261 return gdbarch->fetch_pointer_argument != NULL;
4265 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4267 gdb_assert (gdbarch != NULL);
4268 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4269 if (gdbarch_debug >= 2)
4270 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4271 return gdbarch->fetch_pointer_argument (frame, argi, type);
4275 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4276 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4278 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4282 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4284 gdb_assert (gdbarch != NULL);
4285 return gdbarch->regset_from_core_section != NULL;
4288 const struct regset *
4289 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4291 gdb_assert (gdbarch != NULL);
4292 gdb_assert (gdbarch->regset_from_core_section != NULL);
4293 if (gdbarch_debug >= 2)
4294 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4295 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4299 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4300 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4302 gdbarch->regset_from_core_section = regset_from_core_section;
4306 /* Keep a registry of per-architecture data-pointers required by GDB
4313 gdbarch_data_pre_init_ftype *pre_init;
4314 gdbarch_data_post_init_ftype *post_init;
4317 struct gdbarch_data_registration
4319 struct gdbarch_data *data;
4320 struct gdbarch_data_registration *next;
4323 struct gdbarch_data_registry
4326 struct gdbarch_data_registration *registrations;
4329 struct gdbarch_data_registry gdbarch_data_registry =
4334 static struct gdbarch_data *
4335 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4336 gdbarch_data_post_init_ftype *post_init)
4338 struct gdbarch_data_registration **curr;
4339 /* Append the new registraration. */
4340 for (curr = &gdbarch_data_registry.registrations;
4342 curr = &(*curr)->next);
4343 (*curr) = XMALLOC (struct gdbarch_data_registration);
4344 (*curr)->next = NULL;
4345 (*curr)->data = XMALLOC (struct gdbarch_data);
4346 (*curr)->data->index = gdbarch_data_registry.nr++;
4347 (*curr)->data->pre_init = pre_init;
4348 (*curr)->data->post_init = post_init;
4349 (*curr)->data->init_p = 1;
4350 return (*curr)->data;
4353 struct gdbarch_data *
4354 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4356 return gdbarch_data_register (pre_init, NULL);
4359 struct gdbarch_data *
4360 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4362 return gdbarch_data_register (NULL, post_init);
4365 /* Create/delete the gdbarch data vector. */
4368 alloc_gdbarch_data (struct gdbarch *gdbarch)
4370 gdb_assert (gdbarch->data == NULL);
4371 gdbarch->nr_data = gdbarch_data_registry.nr;
4372 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4375 /* Initialize the current value of the specified per-architecture
4379 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4380 struct gdbarch_data *data,
4383 gdb_assert (data->index < gdbarch->nr_data);
4384 gdb_assert (gdbarch->data[data->index] == NULL);
4385 gdb_assert (data->pre_init == NULL);
4386 gdbarch->data[data->index] = pointer;
4389 /* Return the current value of the specified per-architecture
4393 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4395 gdb_assert (data->index < gdbarch->nr_data);
4396 if (gdbarch->data[data->index] == NULL)
4398 /* The data-pointer isn't initialized, call init() to get a
4400 if (data->pre_init != NULL)
4401 /* Mid architecture creation: pass just the obstack, and not
4402 the entire architecture, as that way it isn't possible for
4403 pre-init code to refer to undefined architecture
4405 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4406 else if (gdbarch->initialized_p
4407 && data->post_init != NULL)
4408 /* Post architecture creation: pass the entire architecture
4409 (as all fields are valid), but be careful to also detect
4410 recursive references. */
4412 gdb_assert (data->init_p);
4414 gdbarch->data[data->index] = data->post_init (gdbarch);
4418 /* The architecture initialization hasn't completed - punt -
4419 hope that the caller knows what they are doing. Once
4420 deprecated_set_gdbarch_data has been initialized, this can be
4421 changed to an internal error. */
4423 gdb_assert (gdbarch->data[data->index] != NULL);
4425 return gdbarch->data[data->index];
4430 /* Keep a registry of swapped data required by GDB modules. */
4435 struct gdbarch_swap_registration *source;
4436 struct gdbarch_swap *next;
4439 struct gdbarch_swap_registration
4442 unsigned long sizeof_data;
4443 gdbarch_swap_ftype *init;
4444 struct gdbarch_swap_registration *next;
4447 struct gdbarch_swap_registry
4450 struct gdbarch_swap_registration *registrations;
4453 struct gdbarch_swap_registry gdbarch_swap_registry =
4459 deprecated_register_gdbarch_swap (void *data,
4460 unsigned long sizeof_data,
4461 gdbarch_swap_ftype *init)
4463 struct gdbarch_swap_registration **rego;
4464 for (rego = &gdbarch_swap_registry.registrations;
4466 rego = &(*rego)->next);
4467 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4468 (*rego)->next = NULL;
4469 (*rego)->init = init;
4470 (*rego)->data = data;
4471 (*rego)->sizeof_data = sizeof_data;
4475 current_gdbarch_swap_init_hack (void)
4477 struct gdbarch_swap_registration *rego;
4478 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4479 for (rego = gdbarch_swap_registry.registrations;
4483 if (rego->data != NULL)
4485 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4486 struct gdbarch_swap);
4487 (*curr)->source = rego;
4488 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4490 (*curr)->next = NULL;
4491 curr = &(*curr)->next;
4493 if (rego->init != NULL)
4498 static struct gdbarch *
4499 current_gdbarch_swap_out_hack (void)
4501 struct gdbarch *old_gdbarch = current_gdbarch;
4502 struct gdbarch_swap *curr;
4504 gdb_assert (old_gdbarch != NULL);
4505 for (curr = old_gdbarch->swap;
4509 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4510 memset (curr->source->data, 0, curr->source->sizeof_data);
4512 current_gdbarch = NULL;
4517 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
4519 struct gdbarch_swap *curr;
4521 gdb_assert (current_gdbarch == NULL);
4522 for (curr = new_gdbarch->swap;
4525 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4526 current_gdbarch = new_gdbarch;
4530 /* Keep a registry of the architectures known by GDB. */
4532 struct gdbarch_registration
4534 enum bfd_architecture bfd_architecture;
4535 gdbarch_init_ftype *init;
4536 gdbarch_dump_tdep_ftype *dump_tdep;
4537 struct gdbarch_list *arches;
4538 struct gdbarch_registration *next;
4541 static struct gdbarch_registration *gdbarch_registry = NULL;
4544 append_name (const char ***buf, int *nr, const char *name)
4546 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4552 gdbarch_printable_names (void)
4554 /* Accumulate a list of names based on the registed list of
4556 enum bfd_architecture a;
4558 const char **arches = NULL;
4559 struct gdbarch_registration *rego;
4560 for (rego = gdbarch_registry;
4564 const struct bfd_arch_info *ap;
4565 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4567 internal_error (__FILE__, __LINE__,
4568 "gdbarch_architecture_names: multi-arch unknown");
4571 append_name (&arches, &nr_arches, ap->printable_name);
4576 append_name (&arches, &nr_arches, NULL);
4582 gdbarch_register (enum bfd_architecture bfd_architecture,
4583 gdbarch_init_ftype *init,
4584 gdbarch_dump_tdep_ftype *dump_tdep)
4586 struct gdbarch_registration **curr;
4587 const struct bfd_arch_info *bfd_arch_info;
4588 /* Check that BFD recognizes this architecture */
4589 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4590 if (bfd_arch_info == NULL)
4592 internal_error (__FILE__, __LINE__,
4593 "gdbarch: Attempt to register unknown architecture (%d)",
4596 /* Check that we haven't seen this architecture before */
4597 for (curr = &gdbarch_registry;
4599 curr = &(*curr)->next)
4601 if (bfd_architecture == (*curr)->bfd_architecture)
4602 internal_error (__FILE__, __LINE__,
4603 "gdbarch: Duplicate registraration of architecture (%s)",
4604 bfd_arch_info->printable_name);
4608 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4609 bfd_arch_info->printable_name,
4612 (*curr) = XMALLOC (struct gdbarch_registration);
4613 (*curr)->bfd_architecture = bfd_architecture;
4614 (*curr)->init = init;
4615 (*curr)->dump_tdep = dump_tdep;
4616 (*curr)->arches = NULL;
4617 (*curr)->next = NULL;
4621 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4622 gdbarch_init_ftype *init)
4624 gdbarch_register (bfd_architecture, init, NULL);
4628 /* Look for an architecture using gdbarch_info. Base search on only
4629 BFD_ARCH_INFO and BYTE_ORDER. */
4631 struct gdbarch_list *
4632 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4633 const struct gdbarch_info *info)
4635 for (; arches != NULL; arches = arches->next)
4637 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4639 if (info->byte_order != arches->gdbarch->byte_order)
4641 if (info->osabi != arches->gdbarch->osabi)
4649 /* Find an architecture that matches the specified INFO. Create a new
4650 architecture if needed. Return that new architecture. Assumes
4651 that there is no current architecture. */
4653 static struct gdbarch *
4654 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
4656 struct gdbarch *new_gdbarch;
4657 struct gdbarch_registration *rego;
4659 /* The existing architecture has been swapped out - all this code
4660 works from a clean slate. */
4661 gdb_assert (current_gdbarch == NULL);
4663 /* Fill in missing parts of the INFO struct using a number of
4664 sources: "set ..."; INFOabfd supplied; and the existing
4666 gdbarch_info_fill (old_gdbarch, &info);
4668 /* Must have found some sort of architecture. */
4669 gdb_assert (info.bfd_arch_info != NULL);
4673 fprintf_unfiltered (gdb_stdlog,
4674 "find_arch_by_info: info.bfd_arch_info %s\n",
4675 (info.bfd_arch_info != NULL
4676 ? info.bfd_arch_info->printable_name
4678 fprintf_unfiltered (gdb_stdlog,
4679 "find_arch_by_info: info.byte_order %d (%s)\n",
4681 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4682 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4684 fprintf_unfiltered (gdb_stdlog,
4685 "find_arch_by_info: info.osabi %d (%s)\n",
4686 info.osabi, gdbarch_osabi_name (info.osabi));
4687 fprintf_unfiltered (gdb_stdlog,
4688 "find_arch_by_info: info.abfd 0x%lx\n",
4690 fprintf_unfiltered (gdb_stdlog,
4691 "find_arch_by_info: info.tdep_info 0x%lx\n",
4692 (long) info.tdep_info);
4695 /* Find the tdep code that knows about this architecture. */
4696 for (rego = gdbarch_registry;
4699 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4704 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4705 "No matching architecture\n");
4709 /* Ask the tdep code for an architecture that matches "info". */
4710 new_gdbarch = rego->init (info, rego->arches);
4712 /* Did the tdep code like it? No. Reject the change and revert to
4713 the old architecture. */
4714 if (new_gdbarch == NULL)
4717 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4718 "Target rejected architecture\n");
4722 /* Is this a pre-existing architecture (as determined by already
4723 being initialized)? Move it to the front of the architecture
4724 list (keeping the list sorted Most Recently Used). */
4725 if (new_gdbarch->initialized_p)
4727 struct gdbarch_list **list;
4728 struct gdbarch_list *this;
4730 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4731 "Previous architecture 0x%08lx (%s) selected\n",
4733 new_gdbarch->bfd_arch_info->printable_name);
4734 /* Find the existing arch in the list. */
4735 for (list = ®o->arches;
4736 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4737 list = &(*list)->next);
4738 /* It had better be in the list of architectures. */
4739 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4742 (*list) = this->next;
4743 /* Insert THIS at the front. */
4744 this->next = rego->arches;
4745 rego->arches = this;
4750 /* It's a new architecture. */
4752 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4753 "New architecture 0x%08lx (%s) selected\n",
4755 new_gdbarch->bfd_arch_info->printable_name);
4757 /* Insert the new architecture into the front of the architecture
4758 list (keep the list sorted Most Recently Used). */
4760 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4761 this->next = rego->arches;
4762 this->gdbarch = new_gdbarch;
4763 rego->arches = this;
4766 /* Check that the newly installed architecture is valid. Plug in
4767 any post init values. */
4768 new_gdbarch->dump_tdep = rego->dump_tdep;
4769 verify_gdbarch (new_gdbarch);
4770 new_gdbarch->initialized_p = 1;
4772 /* Initialize any per-architecture swap areas. This phase requires
4773 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4774 swap the entire architecture out. */
4775 current_gdbarch = new_gdbarch;
4776 current_gdbarch_swap_init_hack ();
4777 current_gdbarch_swap_out_hack ();
4780 gdbarch_dump (new_gdbarch, gdb_stdlog);
4786 gdbarch_find_by_info (struct gdbarch_info info)
4788 /* Save the previously selected architecture, setting the global to
4789 NULL. This stops things like gdbarch->init() trying to use the
4790 previous architecture's configuration. The previous architecture
4791 may not even be of the same architecture family. The most recent
4792 architecture of the same family is found at the head of the
4793 rego->arches list. */
4794 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4796 /* Find the specified architecture. */
4797 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
4799 /* Restore the existing architecture. */
4800 gdb_assert (current_gdbarch == NULL);
4801 current_gdbarch_swap_in_hack (old_gdbarch);
4806 /* Make the specified architecture current, swapping the existing one
4810 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4812 gdb_assert (new_gdbarch != NULL);
4813 gdb_assert (current_gdbarch != NULL);
4814 gdb_assert (new_gdbarch->initialized_p);
4815 current_gdbarch_swap_out_hack ();
4816 current_gdbarch_swap_in_hack (new_gdbarch);
4817 architecture_changed_event ();
4820 extern void _initialize_gdbarch (void);
4823 _initialize_gdbarch (void)
4825 struct cmd_list_element *c;
4827 deprecated_add_show_from_set
4828 (add_set_cmd ("arch",
4831 (char *)&gdbarch_debug,
4832 "Set architecture debugging.\n\
4833 When non-zero, architecture debugging is enabled.", &setdebuglist),
4835 c = add_set_cmd ("archdebug",
4838 (char *)&gdbarch_debug,
4839 "Set architecture debugging.\n\
4840 When non-zero, architecture debugging is enabled.", &setlist);
4842 deprecate_cmd (c, "set debug arch");
4843 deprecate_cmd (deprecated_add_show_from_set (c, &showlist), "show debug arch");