1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6 Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 /* This file was created with the aid of ``gdbarch.sh''.
27 The Bourne shell script ``gdbarch.sh'' creates the files
28 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29 against the existing ``gdbarch.[hc]''. Any differences found
32 If editing this file, please also run gdbarch.sh and merge any
33 changes into that script. Conversely, when making sweeping changes
34 to this file, modifying gdbarch.sh and using its output may prove
39 #include "arch-utils.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
45 #include "floatformat.h"
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
52 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 int gdbarch_debug = GDBARCH_DEBUG;
66 /* Maintain the struct gdbarch object */
70 /* Has this architecture been fully initialized? */
73 /* An obstack bound to the lifetime of the architecture. */
74 struct obstack *obstack;
76 /* basic architectural information */
77 const struct bfd_arch_info * bfd_arch_info;
81 /* target specific vector. */
82 struct gdbarch_tdep *tdep;
83 gdbarch_dump_tdep_ftype *dump_tdep;
85 /* per-architecture data-pointers */
89 /* per-architecture swap-regions */
90 struct gdbarch_swap *swap;
94 When extending this structure you must:
98 Declare set/get functions and define the corresponding
101 gdbarch_alloc(): If zero/NULL is not a suitable default,
102 initialize the new field.
104 verify_gdbarch(): Confirm that the target updated the field
107 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
110 ``startup_gdbarch()'': Append an initial value to the static
111 variable (base values on the host's c-type system).
113 get_gdbarch(): Implement the set/get functions (probably using
114 the macro's as shortcuts).
129 gdbarch_read_pc_ftype *read_pc;
130 gdbarch_write_pc_ftype *write_pc;
131 gdbarch_read_sp_ftype *read_sp;
132 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
133 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
134 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
141 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
142 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
143 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
144 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
145 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
146 gdbarch_register_name_ftype *register_name;
147 gdbarch_register_type_ftype *register_type;
148 gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
149 int deprecated_register_bytes;
150 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
151 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
152 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
153 int deprecated_max_register_raw_size;
154 int deprecated_max_register_virtual_size;
155 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
156 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
157 int deprecated_fp_regnum;
158 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
159 gdbarch_push_dummy_call_ftype *push_dummy_call;
160 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
161 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
162 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
163 int deprecated_register_size;
164 int call_dummy_location;
165 gdbarch_push_dummy_code_ftype *push_dummy_code;
166 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
167 gdbarch_print_registers_info_ftype *print_registers_info;
168 gdbarch_print_float_info_ftype *print_float_info;
169 gdbarch_print_vector_info_ftype *print_vector_info;
170 gdbarch_register_sim_regno_ftype *register_sim_regno;
171 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
172 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
173 gdbarch_cannot_store_register_ftype *cannot_store_register;
174 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
175 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
176 int believe_pcc_promotion;
177 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
178 gdbarch_convert_register_p_ftype *convert_register_p;
179 gdbarch_register_to_value_ftype *register_to_value;
180 gdbarch_value_to_register_ftype *value_to_register;
181 gdbarch_pointer_to_address_ftype *pointer_to_address;
182 gdbarch_address_to_pointer_ftype *address_to_pointer;
183 gdbarch_integer_to_address_ftype *integer_to_address;
184 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
185 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
186 gdbarch_return_value_ftype *return_value;
187 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
188 gdbarch_extract_return_value_ftype *extract_return_value;
189 gdbarch_store_return_value_ftype *store_return_value;
190 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
191 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
192 gdbarch_use_struct_convention_ftype *use_struct_convention;
193 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
194 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
195 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
196 gdbarch_skip_prologue_ftype *skip_prologue;
197 gdbarch_inner_than_ftype *inner_than;
198 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
199 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
200 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
201 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
202 CORE_ADDR decr_pc_after_break;
203 CORE_ADDR function_start_offset;
204 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
205 CORE_ADDR frame_args_skip;
206 gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
207 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
208 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
209 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
210 gdbarch_unwind_pc_ftype *unwind_pc;
211 gdbarch_unwind_sp_ftype *unwind_sp;
212 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
213 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
214 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
215 gdbarch_frame_num_args_ftype *frame_num_args;
216 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
217 gdbarch_frame_align_ftype *frame_align;
218 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
219 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
220 int frame_red_zone_size;
221 const struct floatformat * float_format;
222 const struct floatformat * double_format;
223 const struct floatformat * long_double_format;
224 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
225 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
226 gdbarch_smash_text_address_ftype *smash_text_address;
227 gdbarch_software_single_step_ftype *software_single_step;
228 gdbarch_print_insn_ftype *print_insn;
229 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
230 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
231 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
232 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
233 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
234 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
235 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
236 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
237 const char * name_of_malloc;
238 int cannot_step_breakpoint;
239 int have_nonsteppable_watchpoint;
240 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
241 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
242 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
243 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
244 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
245 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
249 /* The default architecture uses host values (for want of a better
252 extern const struct bfd_arch_info bfd_default_arch_struct;
254 struct gdbarch startup_gdbarch =
256 1, /* Always initialized. */
257 NULL, /* The obstack. */
258 /* basic architecture information */
259 &bfd_default_arch_struct, /* bfd_arch_info */
260 BFD_ENDIAN_BIG, /* byte_order */
261 GDB_OSABI_UNKNOWN, /* osabi */
262 /* target specific vector and its dump routine */
264 /*per-architecture data-pointers and swap regions */
266 /* Multi-arch values */
267 8 * sizeof (short), /* short_bit */
268 8 * sizeof (int), /* int_bit */
269 8 * sizeof (long), /* long_bit */
270 8 * sizeof (LONGEST), /* long_long_bit */
271 8 * sizeof (float), /* float_bit */
272 8 * sizeof (double), /* double_bit */
273 8 * sizeof (long double), /* long_double_bit */
274 8 * sizeof (void*), /* ptr_bit */
275 8 * sizeof (void*), /* addr_bit */
276 8 * sizeof (void*), /* bfd_vma_bit */
281 0, /* virtual_frame_pointer */
282 0, /* pseudo_register_read */
283 0, /* pseudo_register_write */
285 0, /* num_pseudo_regs */
290 0, /* stab_reg_to_regnum */
291 0, /* ecoff_reg_to_regnum */
292 0, /* dwarf_reg_to_regnum */
293 0, /* sdb_reg_to_regnum */
294 0, /* dwarf2_reg_to_regnum */
295 0, /* register_name */
296 0, /* register_type */
297 0, /* deprecated_register_virtual_type */
298 0, /* deprecated_register_bytes */
299 generic_register_byte, /* deprecated_register_byte */
300 generic_register_size, /* deprecated_register_raw_size */
301 generic_register_size, /* deprecated_register_virtual_size */
302 0, /* deprecated_max_register_raw_size */
303 0, /* deprecated_max_register_virtual_size */
304 0, /* unwind_dummy_id */
305 0, /* deprecated_save_dummy_frame_tos */
306 -1, /* deprecated_fp_regnum */
307 0, /* deprecated_target_read_fp */
308 0, /* push_dummy_call */
309 0, /* deprecated_push_arguments */
310 0, /* deprecated_push_return_address */
311 0, /* deprecated_dummy_write_sp */
312 0, /* deprecated_register_size */
313 0, /* call_dummy_location */
314 0, /* push_dummy_code */
315 0, /* deprecated_do_registers_info */
316 default_print_registers_info, /* print_registers_info */
317 0, /* print_float_info */
318 0, /* print_vector_info */
319 0, /* register_sim_regno */
320 0, /* register_bytes_ok */
321 0, /* cannot_fetch_register */
322 0, /* cannot_store_register */
323 0, /* get_longjmp_target */
324 0, /* deprecated_init_frame_pc */
325 0, /* believe_pcc_promotion */
326 0, /* deprecated_get_saved_register */
327 0, /* convert_register_p */
328 0, /* register_to_value */
329 0, /* value_to_register */
330 0, /* pointer_to_address */
331 0, /* address_to_pointer */
332 0, /* integer_to_address */
333 0, /* deprecated_pop_frame */
334 0, /* deprecated_store_struct_return */
335 0, /* return_value */
336 0, /* return_value_on_stack */
337 0, /* extract_return_value */
338 0, /* store_return_value */
339 0, /* deprecated_extract_return_value */
340 0, /* deprecated_store_return_value */
341 0, /* use_struct_convention */
342 0, /* deprecated_extract_struct_value_address */
343 0, /* deprecated_frame_init_saved_regs */
344 0, /* deprecated_init_extra_frame_info */
345 0, /* skip_prologue */
347 0, /* breakpoint_from_pc */
348 0, /* adjust_breakpoint_address */
349 0, /* memory_insert_breakpoint */
350 0, /* memory_remove_breakpoint */
351 0, /* decr_pc_after_break */
352 0, /* function_start_offset */
353 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
354 0, /* frame_args_skip */
355 0, /* deprecated_frameless_function_invocation */
356 0, /* deprecated_frame_chain */
357 0, /* deprecated_frame_chain_valid */
358 0, /* deprecated_frame_saved_pc */
361 get_frame_base, /* deprecated_frame_args_address */
362 get_frame_base, /* deprecated_frame_locals_address */
363 0, /* deprecated_saved_pc_after_call */
364 0, /* frame_num_args */
365 0, /* deprecated_stack_align */
367 0, /* deprecated_reg_struct_has_addr */
368 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
369 0, /* frame_red_zone_size */
370 0, /* float_format */
371 0, /* double_format */
372 0, /* long_double_format */
373 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
374 0, /* addr_bits_remove */
375 0, /* smash_text_address */
376 0, /* software_single_step */
378 0, /* skip_trampoline_code */
379 generic_skip_solib_resolver, /* skip_solib_resolver */
380 0, /* in_solib_call_trampoline */
381 0, /* in_solib_return_trampoline */
382 generic_in_function_epilogue_p, /* in_function_epilogue_p */
383 construct_inferior_arguments, /* construct_inferior_arguments */
384 0, /* elf_make_msymbol_special */
385 0, /* coff_make_msymbol_special */
386 "malloc", /* name_of_malloc */
387 0, /* cannot_step_breakpoint */
388 0, /* have_nonsteppable_watchpoint */
389 0, /* address_class_type_flags */
390 0, /* address_class_type_flags_to_name */
391 0, /* address_class_name_to_type_flags */
392 default_register_reggroup_p, /* register_reggroup_p */
393 0, /* fetch_pointer_argument */
394 0, /* regset_from_core_section */
395 /* startup_gdbarch() */
398 struct gdbarch *current_gdbarch = &startup_gdbarch;
400 /* Create a new ``struct gdbarch'' based on information provided by
401 ``struct gdbarch_info''. */
404 gdbarch_alloc (const struct gdbarch_info *info,
405 struct gdbarch_tdep *tdep)
407 /* NOTE: The new architecture variable is named ``current_gdbarch''
408 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
409 the current local architecture and not the previous global
410 architecture. This ensures that the new architectures initial
411 values are not influenced by the previous architecture. Once
412 everything is parameterised with gdbarch, this will go away. */
413 struct gdbarch *current_gdbarch;
415 /* Create an obstack for allocating all the per-architecture memory,
416 then use that to allocate the architecture vector. */
417 struct obstack *obstack = XMALLOC (struct obstack);
418 obstack_init (obstack);
419 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
420 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
421 current_gdbarch->obstack = obstack;
423 alloc_gdbarch_data (current_gdbarch);
425 current_gdbarch->tdep = tdep;
427 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
428 current_gdbarch->byte_order = info->byte_order;
429 current_gdbarch->osabi = info->osabi;
431 /* Force the explicit initialization of these. */
432 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
433 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
434 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
435 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
436 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
437 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
438 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
439 current_gdbarch->ptr_bit = TARGET_INT_BIT;
440 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
441 current_gdbarch->char_signed = -1;
442 current_gdbarch->write_pc = generic_target_write_pc;
443 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
444 current_gdbarch->num_regs = -1;
445 current_gdbarch->sp_regnum = -1;
446 current_gdbarch->pc_regnum = -1;
447 current_gdbarch->ps_regnum = -1;
448 current_gdbarch->fp0_regnum = -1;
449 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
450 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
451 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
452 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
453 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
454 current_gdbarch->deprecated_register_byte = generic_register_byte;
455 current_gdbarch->deprecated_register_raw_size = generic_register_size;
456 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
457 current_gdbarch->deprecated_fp_regnum = -1;
458 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
459 current_gdbarch->print_registers_info = default_print_registers_info;
460 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
461 current_gdbarch->cannot_fetch_register = cannot_register_not;
462 current_gdbarch->cannot_store_register = cannot_register_not;
463 current_gdbarch->convert_register_p = generic_convert_register_p;
464 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
465 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
466 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
467 current_gdbarch->extract_return_value = legacy_extract_return_value;
468 current_gdbarch->store_return_value = legacy_store_return_value;
469 current_gdbarch->use_struct_convention = generic_use_struct_convention;
470 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
471 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
472 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
473 current_gdbarch->deprecated_frame_args_address = get_frame_base;
474 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
475 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
476 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
477 current_gdbarch->addr_bits_remove = core_addr_identity;
478 current_gdbarch->smash_text_address = core_addr_identity;
479 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
480 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
481 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
482 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
483 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
484 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
485 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
486 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
487 current_gdbarch->name_of_malloc = "malloc";
488 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
489 /* gdbarch_alloc() */
491 return current_gdbarch;
495 /* Allocate extra space using the per-architecture obstack. */
498 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
500 void *data = obstack_alloc (arch->obstack, size);
501 memset (data, 0, size);
506 /* Free a gdbarch struct. This should never happen in normal
507 operation --- once you've created a gdbarch, you keep it around.
508 However, if an architecture's init function encounters an error
509 building the structure, it may need to clean up a partially
510 constructed gdbarch. */
513 gdbarch_free (struct gdbarch *arch)
515 struct obstack *obstack;
516 gdb_assert (arch != NULL);
517 gdb_assert (!arch->initialized_p);
518 obstack = arch->obstack;
519 obstack_free (obstack, 0); /* Includes the ARCH. */
524 /* Ensure that all values in a GDBARCH are reasonable. */
526 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
527 just happens to match the global variable ``current_gdbarch''. That
528 way macros refering to that variable get the local and not the global
529 version - ulgh. Once everything is parameterised with gdbarch, this
533 verify_gdbarch (struct gdbarch *current_gdbarch)
536 struct cleanup *cleanups;
539 log = mem_fileopen ();
540 cleanups = make_cleanup_ui_file_delete (log);
542 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
543 fprintf_unfiltered (log, "\n\tbyte-order");
544 if (current_gdbarch->bfd_arch_info == NULL)
545 fprintf_unfiltered (log, "\n\tbfd_arch_info");
546 /* Check those that need to be defined for the given multi-arch level. */
547 /* Skip verify of short_bit, invalid_p == 0 */
548 /* Skip verify of int_bit, invalid_p == 0 */
549 /* Skip verify of long_bit, invalid_p == 0 */
550 /* Skip verify of long_long_bit, invalid_p == 0 */
551 /* Skip verify of float_bit, invalid_p == 0 */
552 /* Skip verify of double_bit, invalid_p == 0 */
553 /* Skip verify of long_double_bit, invalid_p == 0 */
554 /* Skip verify of ptr_bit, invalid_p == 0 */
555 if (current_gdbarch->addr_bit == 0)
556 current_gdbarch->addr_bit = TARGET_PTR_BIT;
557 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
558 if (current_gdbarch->char_signed == -1)
559 current_gdbarch->char_signed = 1;
560 /* Skip verify of read_pc, has predicate */
561 /* Skip verify of write_pc, invalid_p == 0 */
562 /* Skip verify of read_sp, has predicate */
563 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
564 /* Skip verify of pseudo_register_read, has predicate */
565 /* Skip verify of pseudo_register_write, has predicate */
566 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
567 && (current_gdbarch->num_regs == -1))
568 fprintf_unfiltered (log, "\n\tnum_regs");
569 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
570 /* Skip verify of sp_regnum, invalid_p == 0 */
571 /* Skip verify of pc_regnum, invalid_p == 0 */
572 /* Skip verify of ps_regnum, invalid_p == 0 */
573 /* Skip verify of fp0_regnum, invalid_p == 0 */
574 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
575 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
576 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
577 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
578 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
579 /* Skip verify of register_type, has predicate */
580 /* Skip verify of deprecated_register_virtual_type, has predicate */
581 /* Skip verify of deprecated_register_byte, has predicate */
582 /* Skip verify of deprecated_register_raw_size, has predicate */
583 /* Skip verify of deprecated_register_virtual_size, has predicate */
584 /* Skip verify of deprecated_max_register_raw_size, has predicate */
585 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
586 /* Skip verify of unwind_dummy_id, has predicate */
587 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
588 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
589 /* Skip verify of deprecated_target_read_fp, has predicate */
590 /* Skip verify of push_dummy_call, has predicate */
591 /* Skip verify of deprecated_push_arguments, has predicate */
592 /* Skip verify of deprecated_push_return_address, has predicate */
593 /* Skip verify of deprecated_dummy_write_sp, has predicate */
594 /* Skip verify of call_dummy_location, invalid_p == 0 */
595 /* Skip verify of push_dummy_code, has predicate */
596 /* Skip verify of deprecated_do_registers_info, has predicate */
597 /* Skip verify of print_registers_info, invalid_p == 0 */
598 /* Skip verify of print_float_info, has predicate */
599 /* Skip verify of print_vector_info, has predicate */
600 /* Skip verify of register_sim_regno, invalid_p == 0 */
601 /* Skip verify of register_bytes_ok, has predicate */
602 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
603 /* Skip verify of cannot_store_register, invalid_p == 0 */
604 /* Skip verify of get_longjmp_target, has predicate */
605 /* Skip verify of deprecated_init_frame_pc, has predicate */
606 /* Skip verify of deprecated_get_saved_register, has predicate */
607 /* Skip verify of convert_register_p, invalid_p == 0 */
608 /* Skip verify of pointer_to_address, invalid_p == 0 */
609 /* Skip verify of address_to_pointer, invalid_p == 0 */
610 /* Skip verify of integer_to_address, has predicate */
611 /* Skip verify of deprecated_pop_frame, has predicate */
612 /* Skip verify of deprecated_store_struct_return, has predicate */
613 /* Skip verify of return_value, has predicate */
614 /* Skip verify of return_value_on_stack, invalid_p == 0 */
615 /* Skip verify of extract_return_value, invalid_p == 0 */
616 /* Skip verify of store_return_value, invalid_p == 0 */
617 /* Skip verify of use_struct_convention, invalid_p == 0 */
618 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
619 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
620 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
621 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
622 && (current_gdbarch->skip_prologue == 0))
623 fprintf_unfiltered (log, "\n\tskip_prologue");
624 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
625 && (current_gdbarch->inner_than == 0))
626 fprintf_unfiltered (log, "\n\tinner_than");
627 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
628 && (current_gdbarch->breakpoint_from_pc == 0))
629 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
630 /* Skip verify of adjust_breakpoint_address, has predicate */
631 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
632 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
633 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
634 /* Skip verify of function_start_offset, invalid_p == 0 */
635 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
636 /* Skip verify of frame_args_skip, invalid_p == 0 */
637 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
638 /* Skip verify of deprecated_frame_chain, has predicate */
639 /* Skip verify of deprecated_frame_chain_valid, has predicate */
640 /* Skip verify of deprecated_frame_saved_pc, has predicate */
641 /* Skip verify of unwind_pc, has predicate */
642 /* Skip verify of unwind_sp, has predicate */
643 /* Skip verify of deprecated_frame_args_address, has predicate */
644 /* Skip verify of deprecated_frame_locals_address, has predicate */
645 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
646 /* Skip verify of frame_num_args, has predicate */
647 /* Skip verify of deprecated_stack_align, has predicate */
648 /* Skip verify of frame_align, has predicate */
649 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
650 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
651 if (current_gdbarch->float_format == 0)
652 current_gdbarch->float_format = default_float_format (current_gdbarch);
653 if (current_gdbarch->double_format == 0)
654 current_gdbarch->double_format = default_double_format (current_gdbarch);
655 if (current_gdbarch->long_double_format == 0)
656 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
657 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
658 /* Skip verify of addr_bits_remove, invalid_p == 0 */
659 /* Skip verify of smash_text_address, invalid_p == 0 */
660 /* Skip verify of software_single_step, has predicate */
661 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
662 && (current_gdbarch->print_insn == 0))
663 fprintf_unfiltered (log, "\n\tprint_insn");
664 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
665 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
666 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
667 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
668 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
669 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
670 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
671 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
672 /* Skip verify of name_of_malloc, invalid_p == 0 */
673 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
674 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
675 /* Skip verify of address_class_type_flags, has predicate */
676 /* Skip verify of address_class_type_flags_to_name, has predicate */
677 /* Skip verify of address_class_name_to_type_flags, has predicate */
678 /* Skip verify of register_reggroup_p, invalid_p == 0 */
679 /* Skip verify of fetch_pointer_argument, has predicate */
680 /* Skip verify of regset_from_core_section, has predicate */
681 buf = ui_file_xstrdup (log, &dummy);
682 make_cleanup (xfree, buf);
683 if (strlen (buf) > 0)
684 internal_error (__FILE__, __LINE__,
685 "verify_gdbarch: the following are invalid ...%s",
687 do_cleanups (cleanups);
691 /* Print out the details of the current architecture. */
693 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
694 just happens to match the global variable ``current_gdbarch''. That
695 way macros refering to that variable get the local and not the global
696 version - ulgh. Once everything is parameterised with gdbarch, this
700 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
702 fprintf_unfiltered (file,
703 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
705 fprintf_unfiltered (file,
706 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
707 (long) current_gdbarch->convert_from_func_ptr_addr);
708 fprintf_unfiltered (file,
709 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
710 gdbarch_frame_align_p (current_gdbarch));
711 fprintf_unfiltered (file,
712 "gdbarch_dump: frame_align = 0x%08lx\n",
713 (long) current_gdbarch->frame_align);
714 fprintf_unfiltered (file,
715 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
716 gdbarch_regset_from_core_section_p (current_gdbarch));
717 fprintf_unfiltered (file,
718 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
719 (long) current_gdbarch->regset_from_core_section);
720 fprintf_unfiltered (file,
721 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
722 gdbarch_return_value_p (current_gdbarch));
723 fprintf_unfiltered (file,
724 "gdbarch_dump: return_value = 0x%08lx\n",
725 (long) current_gdbarch->return_value);
726 fprintf_unfiltered (file,
727 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
728 (long) current_gdbarch->in_function_epilogue_p);
729 fprintf_unfiltered (file,
730 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
731 (long) current_gdbarch->register_reggroup_p);
732 fprintf_unfiltered (file,
733 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
734 (long) current_gdbarch->stabs_argument_has_addr);
735 fprintf_unfiltered (file,
736 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
737 gdbarch_pseudo_register_read_p (current_gdbarch));
738 fprintf_unfiltered (file,
739 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
740 (long) current_gdbarch->pseudo_register_read);
741 fprintf_unfiltered (file,
742 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
743 gdbarch_pseudo_register_write_p (current_gdbarch));
744 fprintf_unfiltered (file,
745 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
746 (long) current_gdbarch->pseudo_register_write);
747 fprintf_unfiltered (file,
748 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
749 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
750 fprintf_unfiltered (file,
751 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
752 (long) current_gdbarch->address_class_name_to_type_flags);
753 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
754 fprintf_unfiltered (file,
755 "gdbarch_dump: %s # %s\n",
756 "ADDRESS_CLASS_TYPE_FLAGS_P()",
757 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
760 ADDRESS_CLASS_TYPE_FLAGS_P ());
762 #ifdef ADDRESS_CLASS_TYPE_FLAGS
763 fprintf_unfiltered (file,
764 "gdbarch_dump: %s # %s\n",
765 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
766 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
767 fprintf_unfiltered (file,
768 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
769 (long) current_gdbarch->address_class_type_flags
770 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
772 fprintf_unfiltered (file,
773 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
774 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
775 fprintf_unfiltered (file,
776 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
777 (long) current_gdbarch->address_class_type_flags_to_name);
778 #ifdef ADDRESS_TO_POINTER
779 fprintf_unfiltered (file,
780 "gdbarch_dump: %s # %s\n",
781 "ADDRESS_TO_POINTER(type, buf, addr)",
782 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
785 (long) current_gdbarch->address_to_pointer
786 /*ADDRESS_TO_POINTER ()*/);
788 #ifdef ADDR_BITS_REMOVE
789 fprintf_unfiltered (file,
790 "gdbarch_dump: %s # %s\n",
791 "ADDR_BITS_REMOVE(addr)",
792 XSTRING (ADDR_BITS_REMOVE (addr)));
793 fprintf_unfiltered (file,
794 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
795 (long) current_gdbarch->addr_bits_remove
796 /*ADDR_BITS_REMOVE ()*/);
798 fprintf_unfiltered (file,
799 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
800 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
801 fprintf_unfiltered (file,
802 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
803 (long) current_gdbarch->adjust_breakpoint_address);
804 #ifdef BELIEVE_PCC_PROMOTION
805 fprintf_unfiltered (file,
806 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
807 XSTRING (BELIEVE_PCC_PROMOTION));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
810 BELIEVE_PCC_PROMOTION);
812 #ifdef BREAKPOINT_FROM_PC
813 fprintf_unfiltered (file,
814 "gdbarch_dump: %s # %s\n",
815 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
816 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
817 fprintf_unfiltered (file,
818 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
819 (long) current_gdbarch->breakpoint_from_pc
820 /*BREAKPOINT_FROM_PC ()*/);
822 #ifdef CALL_DUMMY_LOCATION
823 fprintf_unfiltered (file,
824 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
825 XSTRING (CALL_DUMMY_LOCATION));
826 fprintf_unfiltered (file,
827 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
828 CALL_DUMMY_LOCATION);
830 #ifdef CANNOT_FETCH_REGISTER
831 fprintf_unfiltered (file,
832 "gdbarch_dump: %s # %s\n",
833 "CANNOT_FETCH_REGISTER(regnum)",
834 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
835 fprintf_unfiltered (file,
836 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
837 (long) current_gdbarch->cannot_fetch_register
838 /*CANNOT_FETCH_REGISTER ()*/);
840 #ifdef CANNOT_STEP_BREAKPOINT
841 fprintf_unfiltered (file,
842 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
843 XSTRING (CANNOT_STEP_BREAKPOINT));
844 fprintf_unfiltered (file,
845 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
846 CANNOT_STEP_BREAKPOINT);
848 #ifdef CANNOT_STORE_REGISTER
849 fprintf_unfiltered (file,
850 "gdbarch_dump: %s # %s\n",
851 "CANNOT_STORE_REGISTER(regnum)",
852 XSTRING (CANNOT_STORE_REGISTER (regnum)));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
855 (long) current_gdbarch->cannot_store_register
856 /*CANNOT_STORE_REGISTER ()*/);
858 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
859 fprintf_unfiltered (file,
860 "gdbarch_dump: %s # %s\n",
861 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
862 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
865 (long) current_gdbarch->coff_make_msymbol_special
866 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
868 fprintf_unfiltered (file,
869 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
870 (long) current_gdbarch->construct_inferior_arguments);
871 #ifdef CONVERT_REGISTER_P
872 fprintf_unfiltered (file,
873 "gdbarch_dump: %s # %s\n",
874 "CONVERT_REGISTER_P(regnum, type)",
875 XSTRING (CONVERT_REGISTER_P (regnum, type)));
876 fprintf_unfiltered (file,
877 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
878 (long) current_gdbarch->convert_register_p
879 /*CONVERT_REGISTER_P ()*/);
881 #ifdef DECR_PC_AFTER_BREAK
882 fprintf_unfiltered (file,
883 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
884 XSTRING (DECR_PC_AFTER_BREAK));
885 fprintf_unfiltered (file,
886 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
887 (long) DECR_PC_AFTER_BREAK);
889 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
890 fprintf_unfiltered (file,
891 "gdbarch_dump: %s # %s\n",
892 "DEPRECATED_DO_REGISTERS_INFO_P()",
893 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
894 fprintf_unfiltered (file,
895 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
896 DEPRECATED_DO_REGISTERS_INFO_P ());
898 #ifdef DEPRECATED_DO_REGISTERS_INFO
899 fprintf_unfiltered (file,
900 "gdbarch_dump: %s # %s\n",
901 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
902 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
903 fprintf_unfiltered (file,
904 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
905 (long) current_gdbarch->deprecated_do_registers_info
906 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
908 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
909 fprintf_unfiltered (file,
910 "gdbarch_dump: %s # %s\n",
911 "DEPRECATED_DUMMY_WRITE_SP_P()",
912 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
915 DEPRECATED_DUMMY_WRITE_SP_P ());
917 #ifdef DEPRECATED_DUMMY_WRITE_SP
918 fprintf_unfiltered (file,
919 "gdbarch_dump: %s # %s\n",
920 "DEPRECATED_DUMMY_WRITE_SP(val)",
921 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
922 fprintf_unfiltered (file,
923 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
924 (long) current_gdbarch->deprecated_dummy_write_sp
925 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
927 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
930 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
931 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
934 (long) current_gdbarch->deprecated_extract_return_value
935 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
937 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
938 fprintf_unfiltered (file,
939 "gdbarch_dump: %s # %s\n",
940 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
941 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
944 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
946 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
947 fprintf_unfiltered (file,
948 "gdbarch_dump: %s # %s\n",
949 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
950 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
951 fprintf_unfiltered (file,
952 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
953 (long) current_gdbarch->deprecated_extract_struct_value_address
954 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
956 #ifdef DEPRECATED_FP_REGNUM
957 fprintf_unfiltered (file,
958 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
959 XSTRING (DEPRECATED_FP_REGNUM));
960 fprintf_unfiltered (file,
961 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
962 DEPRECATED_FP_REGNUM);
964 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
965 fprintf_unfiltered (file,
966 "gdbarch_dump: %s # %s\n",
967 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
968 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
969 fprintf_unfiltered (file,
970 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
971 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
973 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
974 fprintf_unfiltered (file,
975 "gdbarch_dump: %s # %s\n",
976 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
977 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
980 (long) current_gdbarch->deprecated_frameless_function_invocation
981 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
983 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
984 fprintf_unfiltered (file,
985 "gdbarch_dump: %s # %s\n",
986 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
987 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
990 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
992 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
993 fprintf_unfiltered (file,
994 "gdbarch_dump: %s # %s\n",
995 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
996 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
999 (long) current_gdbarch->deprecated_frame_args_address
1000 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1002 #ifdef DEPRECATED_FRAME_CHAIN_P
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: %s # %s\n",
1005 "DEPRECATED_FRAME_CHAIN_P()",
1006 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1009 DEPRECATED_FRAME_CHAIN_P ());
1011 #ifdef DEPRECATED_FRAME_CHAIN
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: %s # %s\n",
1014 "DEPRECATED_FRAME_CHAIN(frame)",
1015 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1018 (long) current_gdbarch->deprecated_frame_chain
1019 /*DEPRECATED_FRAME_CHAIN ()*/);
1021 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: %s # %s\n",
1024 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1025 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1028 DEPRECATED_FRAME_CHAIN_VALID_P ());
1030 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: %s # %s\n",
1033 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1034 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1037 (long) current_gdbarch->deprecated_frame_chain_valid
1038 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1040 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: %s # %s\n",
1043 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1044 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1047 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1049 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: %s # %s\n",
1052 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1053 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1056 (long) current_gdbarch->deprecated_frame_init_saved_regs
1057 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1059 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: %s # %s\n",
1062 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1063 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1066 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1068 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: %s # %s\n",
1071 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1072 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1075 (long) current_gdbarch->deprecated_frame_locals_address
1076 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1078 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: %s # %s\n",
1081 "DEPRECATED_FRAME_SAVED_PC_P()",
1082 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1085 DEPRECATED_FRAME_SAVED_PC_P ());
1087 #ifdef DEPRECATED_FRAME_SAVED_PC
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: %s # %s\n",
1090 "DEPRECATED_FRAME_SAVED_PC(fi)",
1091 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1094 (long) current_gdbarch->deprecated_frame_saved_pc
1095 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1097 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: %s # %s\n",
1100 "DEPRECATED_GET_SAVED_REGISTER_P()",
1101 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1104 DEPRECATED_GET_SAVED_REGISTER_P ());
1106 #ifdef DEPRECATED_GET_SAVED_REGISTER
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: %s # %s\n",
1109 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1110 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1113 (long) current_gdbarch->deprecated_get_saved_register
1114 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1116 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: %s # %s\n",
1119 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1120 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1123 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1125 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: %s # %s\n",
1128 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1129 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1132 (long) current_gdbarch->deprecated_init_extra_frame_info
1133 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1135 #ifdef DEPRECATED_INIT_FRAME_PC_P
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: %s # %s\n",
1138 "DEPRECATED_INIT_FRAME_PC_P()",
1139 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1142 DEPRECATED_INIT_FRAME_PC_P ());
1144 #ifdef DEPRECATED_INIT_FRAME_PC
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: %s # %s\n",
1147 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1148 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1151 (long) current_gdbarch->deprecated_init_frame_pc
1152 /*DEPRECATED_INIT_FRAME_PC ()*/);
1154 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: %s # %s\n",
1157 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1158 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1161 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1163 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1166 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1169 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1171 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: %s # %s\n",
1174 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1175 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1178 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1180 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1183 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1186 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1188 #ifdef DEPRECATED_POP_FRAME_P
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: %s # %s\n",
1191 "DEPRECATED_POP_FRAME_P()",
1192 XSTRING (DEPRECATED_POP_FRAME_P ()));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1195 DEPRECATED_POP_FRAME_P ());
1197 #ifdef DEPRECATED_POP_FRAME
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: %s # %s\n",
1200 "DEPRECATED_POP_FRAME(-)",
1201 XSTRING (DEPRECATED_POP_FRAME (-)));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1204 (long) current_gdbarch->deprecated_pop_frame
1205 /*DEPRECATED_POP_FRAME ()*/);
1207 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: %s # %s\n",
1210 "DEPRECATED_PUSH_ARGUMENTS_P()",
1211 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1214 DEPRECATED_PUSH_ARGUMENTS_P ());
1216 #ifdef DEPRECATED_PUSH_ARGUMENTS
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: %s # %s\n",
1219 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1220 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1223 (long) current_gdbarch->deprecated_push_arguments
1224 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1226 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1227 fprintf_unfiltered (file,
1228 "gdbarch_dump: %s # %s\n",
1229 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1230 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1233 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1235 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: %s # %s\n",
1238 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1239 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1242 (long) current_gdbarch->deprecated_push_return_address
1243 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1245 #ifdef DEPRECATED_REGISTER_BYTE_P
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: %s # %s\n",
1248 "DEPRECATED_REGISTER_BYTE_P()",
1249 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1252 DEPRECATED_REGISTER_BYTE_P ());
1254 #ifdef DEPRECATED_REGISTER_BYTE
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: %s # %s\n",
1257 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1258 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1261 (long) current_gdbarch->deprecated_register_byte
1262 /*DEPRECATED_REGISTER_BYTE ()*/);
1264 #ifdef DEPRECATED_REGISTER_BYTES
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1267 XSTRING (DEPRECATED_REGISTER_BYTES));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1270 DEPRECATED_REGISTER_BYTES);
1272 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1276 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1279 DEPRECATED_REGISTER_RAW_SIZE_P ());
1281 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1285 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1288 (long) current_gdbarch->deprecated_register_raw_size
1289 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1291 #ifdef DEPRECATED_REGISTER_SIZE
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1294 XSTRING (DEPRECATED_REGISTER_SIZE));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1297 DEPRECATED_REGISTER_SIZE);
1299 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: %s # %s\n",
1302 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1303 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1306 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1308 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: %s # %s\n",
1311 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1312 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1315 (long) current_gdbarch->deprecated_register_virtual_size
1316 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1318 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: %s # %s\n",
1321 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1322 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1325 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1327 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: %s # %s\n",
1330 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1331 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1334 (long) current_gdbarch->deprecated_register_virtual_type
1335 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1337 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1338 fprintf_unfiltered (file,
1339 "gdbarch_dump: %s # %s\n",
1340 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1341 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1344 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1346 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: %s # %s\n",
1349 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1350 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1353 (long) current_gdbarch->deprecated_reg_struct_has_addr
1354 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1356 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: %s # %s\n",
1359 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1360 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1363 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1365 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: %s # %s\n",
1368 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1369 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1372 (long) current_gdbarch->deprecated_saved_pc_after_call
1373 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1375 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: %s # %s\n",
1378 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1379 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1382 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1384 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: %s # %s\n",
1387 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1388 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1391 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1392 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1394 #ifdef DEPRECATED_STACK_ALIGN_P
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: %s # %s\n",
1397 "DEPRECATED_STACK_ALIGN_P()",
1398 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1401 DEPRECATED_STACK_ALIGN_P ());
1403 #ifdef DEPRECATED_STACK_ALIGN
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: %s # %s\n",
1406 "DEPRECATED_STACK_ALIGN(sp)",
1407 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1410 (long) current_gdbarch->deprecated_stack_align
1411 /*DEPRECATED_STACK_ALIGN ()*/);
1413 #ifdef DEPRECATED_STORE_RETURN_VALUE
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: %s # %s\n",
1416 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1417 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1420 (long) current_gdbarch->deprecated_store_return_value
1421 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1423 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: %s # %s\n",
1426 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1427 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1430 DEPRECATED_STORE_STRUCT_RETURN_P ());
1432 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: %s # %s\n",
1435 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1436 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1439 (long) current_gdbarch->deprecated_store_struct_return
1440 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1442 #ifdef DEPRECATED_TARGET_READ_FP_P
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: %s # %s\n",
1445 "DEPRECATED_TARGET_READ_FP_P()",
1446 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1449 DEPRECATED_TARGET_READ_FP_P ());
1451 #ifdef DEPRECATED_TARGET_READ_FP
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: %s # %s\n",
1454 "DEPRECATED_TARGET_READ_FP()",
1455 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1458 (long) current_gdbarch->deprecated_target_read_fp
1459 /*DEPRECATED_TARGET_READ_FP ()*/);
1461 #ifdef DWARF2_REG_TO_REGNUM
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: %s # %s\n",
1464 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1465 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1468 (long) current_gdbarch->dwarf2_reg_to_regnum
1469 /*DWARF2_REG_TO_REGNUM ()*/);
1471 #ifdef DWARF_REG_TO_REGNUM
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: %s # %s\n",
1474 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1475 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1478 (long) current_gdbarch->dwarf_reg_to_regnum
1479 /*DWARF_REG_TO_REGNUM ()*/);
1481 #ifdef ECOFF_REG_TO_REGNUM
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: %s # %s\n",
1484 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1485 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1488 (long) current_gdbarch->ecoff_reg_to_regnum
1489 /*ECOFF_REG_TO_REGNUM ()*/);
1491 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1495 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1498 (long) current_gdbarch->elf_make_msymbol_special
1499 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1501 #ifdef EXTRACT_RETURN_VALUE
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: %s # %s\n",
1504 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1505 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1508 (long) current_gdbarch->extract_return_value
1509 /*EXTRACT_RETURN_VALUE ()*/);
1511 #ifdef FETCH_POINTER_ARGUMENT_P
1512 fprintf_unfiltered (file,
1513 "gdbarch_dump: %s # %s\n",
1514 "FETCH_POINTER_ARGUMENT_P()",
1515 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1516 fprintf_unfiltered (file,
1517 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1518 FETCH_POINTER_ARGUMENT_P ());
1520 #ifdef FETCH_POINTER_ARGUMENT
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: %s # %s\n",
1523 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1524 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1527 (long) current_gdbarch->fetch_pointer_argument
1528 /*FETCH_POINTER_ARGUMENT ()*/);
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: FP0_REGNUM # %s\n",
1533 XSTRING (FP0_REGNUM));
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: FP0_REGNUM = %d\n",
1538 #ifdef FRAME_ARGS_SKIP
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1541 XSTRING (FRAME_ARGS_SKIP));
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1544 (long) FRAME_ARGS_SKIP);
1546 #ifdef FRAME_NUM_ARGS_P
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: %s # %s\n",
1549 "FRAME_NUM_ARGS_P()",
1550 XSTRING (FRAME_NUM_ARGS_P ()));
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1553 FRAME_NUM_ARGS_P ());
1555 #ifdef FRAME_NUM_ARGS
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: %s # %s\n",
1558 "FRAME_NUM_ARGS(frame)",
1559 XSTRING (FRAME_NUM_ARGS (frame)));
1560 fprintf_unfiltered (file,
1561 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1562 (long) current_gdbarch->frame_num_args
1563 /*FRAME_NUM_ARGS ()*/);
1565 #ifdef FRAME_RED_ZONE_SIZE
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1568 XSTRING (FRAME_RED_ZONE_SIZE));
1569 fprintf_unfiltered (file,
1570 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1571 FRAME_RED_ZONE_SIZE);
1573 #ifdef FUNCTION_START_OFFSET
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1576 XSTRING (FUNCTION_START_OFFSET));
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1579 (long) FUNCTION_START_OFFSET);
1581 #ifdef GET_LONGJMP_TARGET_P
1582 fprintf_unfiltered (file,
1583 "gdbarch_dump: %s # %s\n",
1584 "GET_LONGJMP_TARGET_P()",
1585 XSTRING (GET_LONGJMP_TARGET_P ()));
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1588 GET_LONGJMP_TARGET_P ());
1590 #ifdef GET_LONGJMP_TARGET
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: %s # %s\n",
1593 "GET_LONGJMP_TARGET(pc)",
1594 XSTRING (GET_LONGJMP_TARGET (pc)));
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1597 (long) current_gdbarch->get_longjmp_target
1598 /*GET_LONGJMP_TARGET ()*/);
1600 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1603 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1606 HAVE_NONSTEPPABLE_WATCHPOINT);
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: %s # %s\n",
1611 "INNER_THAN(lhs, rhs)",
1612 XSTRING (INNER_THAN (lhs, rhs)));
1613 fprintf_unfiltered (file,
1614 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1615 (long) current_gdbarch->inner_than
1618 #ifdef INTEGER_TO_ADDRESS_P
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: %s # %s\n",
1621 "INTEGER_TO_ADDRESS_P()",
1622 XSTRING (INTEGER_TO_ADDRESS_P ()));
1623 fprintf_unfiltered (file,
1624 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1625 INTEGER_TO_ADDRESS_P ());
1627 #ifdef INTEGER_TO_ADDRESS
1628 fprintf_unfiltered (file,
1629 "gdbarch_dump: %s # %s\n",
1630 "INTEGER_TO_ADDRESS(type, buf)",
1631 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1632 fprintf_unfiltered (file,
1633 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1634 (long) current_gdbarch->integer_to_address
1635 /*INTEGER_TO_ADDRESS ()*/);
1637 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: %s # %s\n",
1640 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1641 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1642 fprintf_unfiltered (file,
1643 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1644 (long) current_gdbarch->in_solib_call_trampoline
1645 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1647 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1648 fprintf_unfiltered (file,
1649 "gdbarch_dump: %s # %s\n",
1650 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1651 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1652 fprintf_unfiltered (file,
1653 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1654 (long) current_gdbarch->in_solib_return_trampoline
1655 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1657 #ifdef MEMORY_INSERT_BREAKPOINT
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: %s # %s\n",
1660 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1661 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1662 fprintf_unfiltered (file,
1663 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1664 (long) current_gdbarch->memory_insert_breakpoint
1665 /*MEMORY_INSERT_BREAKPOINT ()*/);
1667 #ifdef MEMORY_REMOVE_BREAKPOINT
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: %s # %s\n",
1670 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1671 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1672 fprintf_unfiltered (file,
1673 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1674 (long) current_gdbarch->memory_remove_breakpoint
1675 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1677 #ifdef NAME_OF_MALLOC
1678 fprintf_unfiltered (file,
1679 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1680 XSTRING (NAME_OF_MALLOC));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1685 #ifdef NUM_PSEUDO_REGS
1686 fprintf_unfiltered (file,
1687 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1688 XSTRING (NUM_PSEUDO_REGS));
1689 fprintf_unfiltered (file,
1690 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: NUM_REGS # %s\n",
1696 XSTRING (NUM_REGS));
1697 fprintf_unfiltered (file,
1698 "gdbarch_dump: NUM_REGS = %d\n",
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: PC_REGNUM # %s\n",
1704 XSTRING (PC_REGNUM));
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: PC_REGNUM = %d\n",
1709 #ifdef POINTER_TO_ADDRESS
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: %s # %s\n",
1712 "POINTER_TO_ADDRESS(type, buf)",
1713 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1716 (long) current_gdbarch->pointer_to_address
1717 /*POINTER_TO_ADDRESS ()*/);
1719 fprintf_unfiltered (file,
1720 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1721 gdbarch_print_float_info_p (current_gdbarch));
1722 fprintf_unfiltered (file,
1723 "gdbarch_dump: print_float_info = 0x%08lx\n",
1724 (long) current_gdbarch->print_float_info);
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1727 (long) current_gdbarch->print_registers_info);
1728 fprintf_unfiltered (file,
1729 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1730 gdbarch_print_vector_info_p (current_gdbarch));
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1733 (long) current_gdbarch->print_vector_info);
1735 fprintf_unfiltered (file,
1736 "gdbarch_dump: PS_REGNUM # %s\n",
1737 XSTRING (PS_REGNUM));
1738 fprintf_unfiltered (file,
1739 "gdbarch_dump: PS_REGNUM = %d\n",
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1744 gdbarch_push_dummy_call_p (current_gdbarch));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1747 (long) current_gdbarch->push_dummy_call);
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1750 gdbarch_push_dummy_code_p (current_gdbarch));
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1753 (long) current_gdbarch->push_dummy_code);
1754 #ifdef REGISTER_BYTES_OK_P
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: %s # %s\n",
1757 "REGISTER_BYTES_OK_P()",
1758 XSTRING (REGISTER_BYTES_OK_P ()));
1759 fprintf_unfiltered (file,
1760 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1761 REGISTER_BYTES_OK_P ());
1763 #ifdef REGISTER_BYTES_OK
1764 fprintf_unfiltered (file,
1765 "gdbarch_dump: %s # %s\n",
1766 "REGISTER_BYTES_OK(nr_bytes)",
1767 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1768 fprintf_unfiltered (file,
1769 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1770 (long) current_gdbarch->register_bytes_ok
1771 /*REGISTER_BYTES_OK ()*/);
1773 #ifdef REGISTER_NAME
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: %s # %s\n",
1776 "REGISTER_NAME(regnr)",
1777 XSTRING (REGISTER_NAME (regnr)));
1778 fprintf_unfiltered (file,
1779 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1780 (long) current_gdbarch->register_name
1781 /*REGISTER_NAME ()*/);
1783 #ifdef REGISTER_SIM_REGNO
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: %s # %s\n",
1786 "REGISTER_SIM_REGNO(reg_nr)",
1787 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1790 (long) current_gdbarch->register_sim_regno
1791 /*REGISTER_SIM_REGNO ()*/);
1793 #ifdef REGISTER_TO_VALUE
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: %s # %s\n",
1796 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1797 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1798 fprintf_unfiltered (file,
1799 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1800 (long) current_gdbarch->register_to_value
1801 /*REGISTER_TO_VALUE ()*/);
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1805 gdbarch_register_type_p (current_gdbarch));
1806 fprintf_unfiltered (file,
1807 "gdbarch_dump: register_type = 0x%08lx\n",
1808 (long) current_gdbarch->register_type);
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1811 (long) current_gdbarch->remote_translate_xfer_address);
1812 #ifdef RETURN_VALUE_ON_STACK
1813 fprintf_unfiltered (file,
1814 "gdbarch_dump: %s # %s\n",
1815 "RETURN_VALUE_ON_STACK(type)",
1816 XSTRING (RETURN_VALUE_ON_STACK (type)));
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1819 (long) current_gdbarch->return_value_on_stack
1820 /*RETURN_VALUE_ON_STACK ()*/);
1822 #ifdef SDB_REG_TO_REGNUM
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: %s # %s\n",
1825 "SDB_REG_TO_REGNUM(sdb_regnr)",
1826 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1829 (long) current_gdbarch->sdb_reg_to_regnum
1830 /*SDB_REG_TO_REGNUM ()*/);
1832 #ifdef SKIP_PROLOGUE
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: %s # %s\n",
1835 "SKIP_PROLOGUE(ip)",
1836 XSTRING (SKIP_PROLOGUE (ip)));
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1839 (long) current_gdbarch->skip_prologue
1840 /*SKIP_PROLOGUE ()*/);
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1844 (long) current_gdbarch->skip_solib_resolver);
1845 #ifdef SKIP_TRAMPOLINE_CODE
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: %s # %s\n",
1848 "SKIP_TRAMPOLINE_CODE(pc)",
1849 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1852 (long) current_gdbarch->skip_trampoline_code
1853 /*SKIP_TRAMPOLINE_CODE ()*/);
1855 #ifdef SMASH_TEXT_ADDRESS
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: %s # %s\n",
1858 "SMASH_TEXT_ADDRESS(addr)",
1859 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1862 (long) current_gdbarch->smash_text_address
1863 /*SMASH_TEXT_ADDRESS ()*/);
1865 #ifdef SOFTWARE_SINGLE_STEP_P
1866 fprintf_unfiltered (file,
1867 "gdbarch_dump: %s # %s\n",
1868 "SOFTWARE_SINGLE_STEP_P()",
1869 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1870 fprintf_unfiltered (file,
1871 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1872 SOFTWARE_SINGLE_STEP_P ());
1874 #ifdef SOFTWARE_SINGLE_STEP
1875 fprintf_unfiltered (file,
1876 "gdbarch_dump: %s # %s\n",
1877 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1878 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1881 (long) current_gdbarch->software_single_step
1882 /*SOFTWARE_SINGLE_STEP ()*/);
1885 fprintf_unfiltered (file,
1886 "gdbarch_dump: SP_REGNUM # %s\n",
1887 XSTRING (SP_REGNUM));
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: SP_REGNUM = %d\n",
1892 #ifdef STAB_REG_TO_REGNUM
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: %s # %s\n",
1895 "STAB_REG_TO_REGNUM(stab_regnr)",
1896 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1899 (long) current_gdbarch->stab_reg_to_regnum
1900 /*STAB_REG_TO_REGNUM ()*/);
1902 #ifdef STORE_RETURN_VALUE
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: %s # %s\n",
1905 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1906 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1909 (long) current_gdbarch->store_return_value
1910 /*STORE_RETURN_VALUE ()*/);
1912 #ifdef TARGET_ADDR_BIT
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1915 XSTRING (TARGET_ADDR_BIT));
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1920 #ifdef TARGET_ARCHITECTURE
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1923 XSTRING (TARGET_ARCHITECTURE));
1924 if (TARGET_ARCHITECTURE != NULL)
1925 fprintf_unfiltered (file,
1926 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1927 TARGET_ARCHITECTURE->printable_name);
1929 #ifdef TARGET_BFD_VMA_BIT
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1932 XSTRING (TARGET_BFD_VMA_BIT));
1933 fprintf_unfiltered (file,
1934 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1935 TARGET_BFD_VMA_BIT);
1937 #ifdef TARGET_BYTE_ORDER
1938 fprintf_unfiltered (file,
1939 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1940 XSTRING (TARGET_BYTE_ORDER));
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1943 (long) TARGET_BYTE_ORDER);
1945 #ifdef TARGET_CHAR_SIGNED
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1948 XSTRING (TARGET_CHAR_SIGNED));
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1951 TARGET_CHAR_SIGNED);
1953 #ifdef TARGET_DOUBLE_BIT
1954 fprintf_unfiltered (file,
1955 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1956 XSTRING (TARGET_DOUBLE_BIT));
1957 fprintf_unfiltered (file,
1958 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1961 #ifdef TARGET_DOUBLE_FORMAT
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1964 XSTRING (TARGET_DOUBLE_FORMAT));
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
1967 (TARGET_DOUBLE_FORMAT)->name);
1969 #ifdef TARGET_FLOAT_BIT
1970 fprintf_unfiltered (file,
1971 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1972 XSTRING (TARGET_FLOAT_BIT));
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1977 #ifdef TARGET_FLOAT_FORMAT
1978 fprintf_unfiltered (file,
1979 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1980 XSTRING (TARGET_FLOAT_FORMAT));
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
1983 (TARGET_FLOAT_FORMAT)->name);
1985 #ifdef TARGET_INT_BIT
1986 fprintf_unfiltered (file,
1987 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1988 XSTRING (TARGET_INT_BIT));
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1993 #ifdef TARGET_LONG_BIT
1994 fprintf_unfiltered (file,
1995 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1996 XSTRING (TARGET_LONG_BIT));
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2001 #ifdef TARGET_LONG_DOUBLE_BIT
2002 fprintf_unfiltered (file,
2003 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2004 XSTRING (TARGET_LONG_DOUBLE_BIT));
2005 fprintf_unfiltered (file,
2006 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2007 TARGET_LONG_DOUBLE_BIT);
2009 #ifdef TARGET_LONG_DOUBLE_FORMAT
2010 fprintf_unfiltered (file,
2011 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2012 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2013 fprintf_unfiltered (file,
2014 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2015 (TARGET_LONG_DOUBLE_FORMAT)->name);
2017 #ifdef TARGET_LONG_LONG_BIT
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2020 XSTRING (TARGET_LONG_LONG_BIT));
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2023 TARGET_LONG_LONG_BIT);
2026 fprintf_unfiltered (file,
2027 "gdbarch_dump: TARGET_OSABI # %s\n",
2028 XSTRING (TARGET_OSABI));
2029 fprintf_unfiltered (file,
2030 "gdbarch_dump: TARGET_OSABI = %ld\n",
2031 (long) TARGET_OSABI);
2033 #ifdef TARGET_PRINT_INSN
2034 fprintf_unfiltered (file,
2035 "gdbarch_dump: %s # %s\n",
2036 "TARGET_PRINT_INSN(vma, info)",
2037 XSTRING (TARGET_PRINT_INSN (vma, info)));
2038 fprintf_unfiltered (file,
2039 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2040 (long) current_gdbarch->print_insn
2041 /*TARGET_PRINT_INSN ()*/);
2043 #ifdef TARGET_PTR_BIT
2044 fprintf_unfiltered (file,
2045 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2046 XSTRING (TARGET_PTR_BIT));
2047 fprintf_unfiltered (file,
2048 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2051 #ifdef TARGET_READ_PC_P
2052 fprintf_unfiltered (file,
2053 "gdbarch_dump: %s # %s\n",
2054 "TARGET_READ_PC_P()",
2055 XSTRING (TARGET_READ_PC_P ()));
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2058 TARGET_READ_PC_P ());
2060 #ifdef TARGET_READ_PC
2061 fprintf_unfiltered (file,
2062 "gdbarch_dump: %s # %s\n",
2063 "TARGET_READ_PC(ptid)",
2064 XSTRING (TARGET_READ_PC (ptid)));
2065 fprintf_unfiltered (file,
2066 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2067 (long) current_gdbarch->read_pc
2068 /*TARGET_READ_PC ()*/);
2070 #ifdef TARGET_READ_SP_P
2071 fprintf_unfiltered (file,
2072 "gdbarch_dump: %s # %s\n",
2073 "TARGET_READ_SP_P()",
2074 XSTRING (TARGET_READ_SP_P ()));
2075 fprintf_unfiltered (file,
2076 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2077 TARGET_READ_SP_P ());
2079 #ifdef TARGET_READ_SP
2080 fprintf_unfiltered (file,
2081 "gdbarch_dump: %s # %s\n",
2083 XSTRING (TARGET_READ_SP ()));
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2086 (long) current_gdbarch->read_sp
2087 /*TARGET_READ_SP ()*/);
2089 #ifdef TARGET_SHORT_BIT
2090 fprintf_unfiltered (file,
2091 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2092 XSTRING (TARGET_SHORT_BIT));
2093 fprintf_unfiltered (file,
2094 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2097 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: %s # %s\n",
2100 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2101 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2102 fprintf_unfiltered (file,
2103 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2104 (long) current_gdbarch->virtual_frame_pointer
2105 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2107 #ifdef TARGET_WRITE_PC
2108 fprintf_unfiltered (file,
2109 "gdbarch_dump: %s # %s\n",
2110 "TARGET_WRITE_PC(val, ptid)",
2111 XSTRING (TARGET_WRITE_PC (val, ptid)));
2112 fprintf_unfiltered (file,
2113 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2114 (long) current_gdbarch->write_pc
2115 /*TARGET_WRITE_PC ()*/);
2117 fprintf_unfiltered (file,
2118 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2119 gdbarch_unwind_dummy_id_p (current_gdbarch));
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2122 (long) current_gdbarch->unwind_dummy_id);
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2125 gdbarch_unwind_pc_p (current_gdbarch));
2126 fprintf_unfiltered (file,
2127 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2128 (long) current_gdbarch->unwind_pc);
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2131 gdbarch_unwind_sp_p (current_gdbarch));
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2134 (long) current_gdbarch->unwind_sp);
2135 #ifdef USE_STRUCT_CONVENTION
2136 fprintf_unfiltered (file,
2137 "gdbarch_dump: %s # %s\n",
2138 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2139 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2142 (long) current_gdbarch->use_struct_convention
2143 /*USE_STRUCT_CONVENTION ()*/);
2145 #ifdef VALUE_TO_REGISTER
2146 fprintf_unfiltered (file,
2147 "gdbarch_dump: %s # %s\n",
2148 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2149 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2150 fprintf_unfiltered (file,
2151 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2152 (long) current_gdbarch->value_to_register
2153 /*VALUE_TO_REGISTER ()*/);
2155 if (current_gdbarch->dump_tdep != NULL)
2156 current_gdbarch->dump_tdep (current_gdbarch, file);
2159 struct gdbarch_tdep *
2160 gdbarch_tdep (struct gdbarch *gdbarch)
2162 if (gdbarch_debug >= 2)
2163 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2164 return gdbarch->tdep;
2168 const struct bfd_arch_info *
2169 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2171 gdb_assert (gdbarch != NULL);
2172 if (gdbarch_debug >= 2)
2173 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2174 return gdbarch->bfd_arch_info;
2178 gdbarch_byte_order (struct gdbarch *gdbarch)
2180 gdb_assert (gdbarch != NULL);
2181 if (gdbarch_debug >= 2)
2182 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2183 return gdbarch->byte_order;
2187 gdbarch_osabi (struct gdbarch *gdbarch)
2189 gdb_assert (gdbarch != NULL);
2190 if (gdbarch_debug >= 2)
2191 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2192 return gdbarch->osabi;
2196 gdbarch_short_bit (struct gdbarch *gdbarch)
2198 gdb_assert (gdbarch != NULL);
2199 /* Skip verify of short_bit, invalid_p == 0 */
2200 if (gdbarch_debug >= 2)
2201 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2202 return gdbarch->short_bit;
2206 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2209 gdbarch->short_bit = short_bit;
2213 gdbarch_int_bit (struct gdbarch *gdbarch)
2215 gdb_assert (gdbarch != NULL);
2216 /* Skip verify of int_bit, invalid_p == 0 */
2217 if (gdbarch_debug >= 2)
2218 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2219 return gdbarch->int_bit;
2223 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2226 gdbarch->int_bit = int_bit;
2230 gdbarch_long_bit (struct gdbarch *gdbarch)
2232 gdb_assert (gdbarch != NULL);
2233 /* Skip verify of long_bit, invalid_p == 0 */
2234 if (gdbarch_debug >= 2)
2235 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2236 return gdbarch->long_bit;
2240 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2243 gdbarch->long_bit = long_bit;
2247 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2249 gdb_assert (gdbarch != NULL);
2250 /* Skip verify of long_long_bit, invalid_p == 0 */
2251 if (gdbarch_debug >= 2)
2252 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2253 return gdbarch->long_long_bit;
2257 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2260 gdbarch->long_long_bit = long_long_bit;
2264 gdbarch_float_bit (struct gdbarch *gdbarch)
2266 gdb_assert (gdbarch != NULL);
2267 /* Skip verify of float_bit, invalid_p == 0 */
2268 if (gdbarch_debug >= 2)
2269 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2270 return gdbarch->float_bit;
2274 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2277 gdbarch->float_bit = float_bit;
2281 gdbarch_double_bit (struct gdbarch *gdbarch)
2283 gdb_assert (gdbarch != NULL);
2284 /* Skip verify of double_bit, invalid_p == 0 */
2285 if (gdbarch_debug >= 2)
2286 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2287 return gdbarch->double_bit;
2291 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2294 gdbarch->double_bit = double_bit;
2298 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2300 gdb_assert (gdbarch != NULL);
2301 /* Skip verify of long_double_bit, invalid_p == 0 */
2302 if (gdbarch_debug >= 2)
2303 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2304 return gdbarch->long_double_bit;
2308 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2309 int long_double_bit)
2311 gdbarch->long_double_bit = long_double_bit;
2315 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2317 gdb_assert (gdbarch != NULL);
2318 /* Skip verify of ptr_bit, invalid_p == 0 */
2319 if (gdbarch_debug >= 2)
2320 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2321 return gdbarch->ptr_bit;
2325 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2328 gdbarch->ptr_bit = ptr_bit;
2332 gdbarch_addr_bit (struct gdbarch *gdbarch)
2334 gdb_assert (gdbarch != NULL);
2335 /* Check variable changed from pre-default. */
2336 gdb_assert (gdbarch->addr_bit != 0);
2337 if (gdbarch_debug >= 2)
2338 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2339 return gdbarch->addr_bit;
2343 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2346 gdbarch->addr_bit = addr_bit;
2350 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2352 gdb_assert (gdbarch != NULL);
2353 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2354 if (gdbarch_debug >= 2)
2355 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2356 return gdbarch->bfd_vma_bit;
2360 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2363 gdbarch->bfd_vma_bit = bfd_vma_bit;
2367 gdbarch_char_signed (struct gdbarch *gdbarch)
2369 gdb_assert (gdbarch != NULL);
2370 /* Check variable changed from pre-default. */
2371 gdb_assert (gdbarch->char_signed != -1);
2372 if (gdbarch_debug >= 2)
2373 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2374 return gdbarch->char_signed;
2378 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2381 gdbarch->char_signed = char_signed;
2385 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2387 gdb_assert (gdbarch != NULL);
2388 return gdbarch->read_pc != NULL;
2392 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2394 gdb_assert (gdbarch != NULL);
2395 gdb_assert (gdbarch->read_pc != NULL);
2396 if (gdbarch_debug >= 2)
2397 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2398 return gdbarch->read_pc (ptid);
2402 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2403 gdbarch_read_pc_ftype read_pc)
2405 gdbarch->read_pc = read_pc;
2409 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2411 gdb_assert (gdbarch != NULL);
2412 gdb_assert (gdbarch->write_pc != NULL);
2413 if (gdbarch_debug >= 2)
2414 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2415 gdbarch->write_pc (val, ptid);
2419 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2420 gdbarch_write_pc_ftype write_pc)
2422 gdbarch->write_pc = write_pc;
2426 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2428 gdb_assert (gdbarch != NULL);
2429 return gdbarch->read_sp != NULL;
2433 gdbarch_read_sp (struct gdbarch *gdbarch)
2435 gdb_assert (gdbarch != NULL);
2436 gdb_assert (gdbarch->read_sp != NULL);
2437 if (gdbarch_debug >= 2)
2438 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2439 return gdbarch->read_sp ();
2443 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2444 gdbarch_read_sp_ftype read_sp)
2446 gdbarch->read_sp = read_sp;
2450 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2452 gdb_assert (gdbarch != NULL);
2453 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2454 if (gdbarch_debug >= 2)
2455 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2456 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2460 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2461 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2463 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2467 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2469 gdb_assert (gdbarch != NULL);
2470 return gdbarch->pseudo_register_read != NULL;
2474 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2476 gdb_assert (gdbarch != NULL);
2477 gdb_assert (gdbarch->pseudo_register_read != NULL);
2478 if (gdbarch_debug >= 2)
2479 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2480 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2484 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2485 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2487 gdbarch->pseudo_register_read = pseudo_register_read;
2491 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2493 gdb_assert (gdbarch != NULL);
2494 return gdbarch->pseudo_register_write != NULL;
2498 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2500 gdb_assert (gdbarch != NULL);
2501 gdb_assert (gdbarch->pseudo_register_write != NULL);
2502 if (gdbarch_debug >= 2)
2503 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2504 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2508 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2509 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2511 gdbarch->pseudo_register_write = pseudo_register_write;
2515 gdbarch_num_regs (struct gdbarch *gdbarch)
2517 gdb_assert (gdbarch != NULL);
2518 /* Check variable changed from pre-default. */
2519 gdb_assert (gdbarch->num_regs != -1);
2520 if (gdbarch_debug >= 2)
2521 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2522 return gdbarch->num_regs;
2526 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2529 gdbarch->num_regs = num_regs;
2533 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2535 gdb_assert (gdbarch != NULL);
2536 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2537 if (gdbarch_debug >= 2)
2538 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2539 return gdbarch->num_pseudo_regs;
2543 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2544 int num_pseudo_regs)
2546 gdbarch->num_pseudo_regs = num_pseudo_regs;
2550 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2552 gdb_assert (gdbarch != NULL);
2553 /* Skip verify of sp_regnum, invalid_p == 0 */
2554 if (gdbarch_debug >= 2)
2555 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2556 return gdbarch->sp_regnum;
2560 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2563 gdbarch->sp_regnum = sp_regnum;
2567 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2569 gdb_assert (gdbarch != NULL);
2570 /* Skip verify of pc_regnum, invalid_p == 0 */
2571 if (gdbarch_debug >= 2)
2572 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2573 return gdbarch->pc_regnum;
2577 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2580 gdbarch->pc_regnum = pc_regnum;
2584 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2586 gdb_assert (gdbarch != NULL);
2587 /* Skip verify of ps_regnum, invalid_p == 0 */
2588 if (gdbarch_debug >= 2)
2589 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2590 return gdbarch->ps_regnum;
2594 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2597 gdbarch->ps_regnum = ps_regnum;
2601 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2603 gdb_assert (gdbarch != NULL);
2604 /* Skip verify of fp0_regnum, invalid_p == 0 */
2605 if (gdbarch_debug >= 2)
2606 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2607 return gdbarch->fp0_regnum;
2611 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2614 gdbarch->fp0_regnum = fp0_regnum;
2618 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2620 gdb_assert (gdbarch != NULL);
2621 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2622 if (gdbarch_debug >= 2)
2623 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2624 return gdbarch->stab_reg_to_regnum (stab_regnr);
2628 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2629 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2631 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2635 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2637 gdb_assert (gdbarch != NULL);
2638 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2639 if (gdbarch_debug >= 2)
2640 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2641 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2645 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2646 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2648 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2652 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2654 gdb_assert (gdbarch != NULL);
2655 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2656 if (gdbarch_debug >= 2)
2657 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2658 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2662 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2663 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2665 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2669 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2671 gdb_assert (gdbarch != NULL);
2672 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2673 if (gdbarch_debug >= 2)
2674 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2675 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2679 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2680 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2682 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2686 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2688 gdb_assert (gdbarch != NULL);
2689 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2690 if (gdbarch_debug >= 2)
2691 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2692 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2696 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2697 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2699 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2703 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2705 gdb_assert (gdbarch != NULL);
2706 gdb_assert (gdbarch->register_name != NULL);
2707 if (gdbarch_debug >= 2)
2708 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2709 return gdbarch->register_name (regnr);
2713 set_gdbarch_register_name (struct gdbarch *gdbarch,
2714 gdbarch_register_name_ftype register_name)
2716 gdbarch->register_name = register_name;
2720 gdbarch_register_type_p (struct gdbarch *gdbarch)
2722 gdb_assert (gdbarch != NULL);
2723 return gdbarch->register_type != NULL;
2727 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2729 gdb_assert (gdbarch != NULL);
2730 gdb_assert (gdbarch->register_type != NULL);
2731 if (gdbarch_debug >= 2)
2732 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2733 return gdbarch->register_type (gdbarch, reg_nr);
2737 set_gdbarch_register_type (struct gdbarch *gdbarch,
2738 gdbarch_register_type_ftype register_type)
2740 gdbarch->register_type = register_type;
2744 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2746 gdb_assert (gdbarch != NULL);
2747 return gdbarch->deprecated_register_virtual_type != NULL;
2751 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2753 gdb_assert (gdbarch != NULL);
2754 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2755 if (gdbarch_debug >= 2)
2756 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2757 return gdbarch->deprecated_register_virtual_type (reg_nr);
2761 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2762 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2764 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2768 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2770 gdb_assert (gdbarch != NULL);
2771 if (gdbarch_debug >= 2)
2772 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2773 return gdbarch->deprecated_register_bytes;
2777 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2778 int deprecated_register_bytes)
2780 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2784 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2786 gdb_assert (gdbarch != NULL);
2787 return gdbarch->deprecated_register_byte != generic_register_byte;
2791 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2793 gdb_assert (gdbarch != NULL);
2794 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2795 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2796 if (gdbarch_debug >= 2)
2797 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2798 return gdbarch->deprecated_register_byte (reg_nr);
2802 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2803 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2805 gdbarch->deprecated_register_byte = deprecated_register_byte;
2809 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2811 gdb_assert (gdbarch != NULL);
2812 return gdbarch->deprecated_register_raw_size != generic_register_size;
2816 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2818 gdb_assert (gdbarch != NULL);
2819 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2820 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2821 if (gdbarch_debug >= 2)
2822 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2823 return gdbarch->deprecated_register_raw_size (reg_nr);
2827 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2828 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2830 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2834 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2836 gdb_assert (gdbarch != NULL);
2837 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2841 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2843 gdb_assert (gdbarch != NULL);
2844 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2845 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2846 if (gdbarch_debug >= 2)
2847 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2848 return gdbarch->deprecated_register_virtual_size (reg_nr);
2852 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2853 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2855 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2859 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
2861 gdb_assert (gdbarch != NULL);
2862 return gdbarch->deprecated_max_register_raw_size != 0;
2866 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
2868 gdb_assert (gdbarch != NULL);
2869 if (gdbarch_debug >= 2)
2870 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
2871 return gdbarch->deprecated_max_register_raw_size;
2875 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
2876 int deprecated_max_register_raw_size)
2878 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
2882 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
2884 gdb_assert (gdbarch != NULL);
2885 return gdbarch->deprecated_max_register_virtual_size != 0;
2889 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
2891 gdb_assert (gdbarch != NULL);
2892 if (gdbarch_debug >= 2)
2893 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
2894 return gdbarch->deprecated_max_register_virtual_size;
2898 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
2899 int deprecated_max_register_virtual_size)
2901 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
2905 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2907 gdb_assert (gdbarch != NULL);
2908 return gdbarch->unwind_dummy_id != NULL;
2912 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2914 gdb_assert (gdbarch != NULL);
2915 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2916 if (gdbarch_debug >= 2)
2917 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2918 return gdbarch->unwind_dummy_id (gdbarch, info);
2922 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2923 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2925 gdbarch->unwind_dummy_id = unwind_dummy_id;
2929 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2931 gdb_assert (gdbarch != NULL);
2932 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2936 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2938 gdb_assert (gdbarch != NULL);
2939 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2940 if (gdbarch_debug >= 2)
2941 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2942 gdbarch->deprecated_save_dummy_frame_tos (sp);
2946 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2947 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2949 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2953 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2955 gdb_assert (gdbarch != NULL);
2956 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2957 if (gdbarch_debug >= 2)
2958 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2959 return gdbarch->deprecated_fp_regnum;
2963 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2964 int deprecated_fp_regnum)
2966 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2970 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2972 gdb_assert (gdbarch != NULL);
2973 return gdbarch->deprecated_target_read_fp != NULL;
2977 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2979 gdb_assert (gdbarch != NULL);
2980 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
2981 if (gdbarch_debug >= 2)
2982 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2983 return gdbarch->deprecated_target_read_fp ();
2987 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2988 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2990 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2994 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2996 gdb_assert (gdbarch != NULL);
2997 return gdbarch->push_dummy_call != NULL;
3001 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)
3003 gdb_assert (gdbarch != NULL);
3004 gdb_assert (gdbarch->push_dummy_call != NULL);
3005 if (gdbarch_debug >= 2)
3006 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3007 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3011 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3012 gdbarch_push_dummy_call_ftype push_dummy_call)
3014 gdbarch->push_dummy_call = push_dummy_call;
3018 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3020 gdb_assert (gdbarch != NULL);
3021 return gdbarch->deprecated_push_arguments != NULL;
3025 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3027 gdb_assert (gdbarch != NULL);
3028 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3029 if (gdbarch_debug >= 2)
3030 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3031 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3035 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3036 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3038 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3042 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3044 gdb_assert (gdbarch != NULL);
3045 return gdbarch->deprecated_push_return_address != NULL;
3049 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3051 gdb_assert (gdbarch != NULL);
3052 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3053 if (gdbarch_debug >= 2)
3054 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3055 return gdbarch->deprecated_push_return_address (pc, sp);
3059 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3060 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3062 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3066 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3068 gdb_assert (gdbarch != NULL);
3069 return gdbarch->deprecated_dummy_write_sp != NULL;
3073 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3075 gdb_assert (gdbarch != NULL);
3076 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3077 if (gdbarch_debug >= 2)
3078 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3079 gdbarch->deprecated_dummy_write_sp (val);
3083 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3084 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3086 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3090 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3092 gdb_assert (gdbarch != NULL);
3093 if (gdbarch_debug >= 2)
3094 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3095 return gdbarch->deprecated_register_size;
3099 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3100 int deprecated_register_size)
3102 gdbarch->deprecated_register_size = deprecated_register_size;
3106 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3108 gdb_assert (gdbarch != NULL);
3109 /* Skip verify of call_dummy_location, invalid_p == 0 */
3110 if (gdbarch_debug >= 2)
3111 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3112 return gdbarch->call_dummy_location;
3116 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3117 int call_dummy_location)
3119 gdbarch->call_dummy_location = call_dummy_location;
3123 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3125 gdb_assert (gdbarch != NULL);
3126 return gdbarch->push_dummy_code != NULL;
3130 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)
3132 gdb_assert (gdbarch != NULL);
3133 gdb_assert (gdbarch->push_dummy_code != NULL);
3134 if (gdbarch_debug >= 2)
3135 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3136 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3140 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3141 gdbarch_push_dummy_code_ftype push_dummy_code)
3143 gdbarch->push_dummy_code = push_dummy_code;
3147 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3149 gdb_assert (gdbarch != NULL);
3150 return gdbarch->deprecated_do_registers_info != NULL;
3154 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3156 gdb_assert (gdbarch != NULL);
3157 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3158 if (gdbarch_debug >= 2)
3159 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3160 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3164 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3165 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3167 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3171 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3173 gdb_assert (gdbarch != NULL);
3174 gdb_assert (gdbarch->print_registers_info != NULL);
3175 if (gdbarch_debug >= 2)
3176 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3177 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3181 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3182 gdbarch_print_registers_info_ftype print_registers_info)
3184 gdbarch->print_registers_info = print_registers_info;
3188 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3190 gdb_assert (gdbarch != NULL);
3191 return gdbarch->print_float_info != NULL;
3195 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3197 gdb_assert (gdbarch != NULL);
3198 gdb_assert (gdbarch->print_float_info != NULL);
3199 if (gdbarch_debug >= 2)
3200 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3201 gdbarch->print_float_info (gdbarch, file, frame, args);
3205 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3206 gdbarch_print_float_info_ftype print_float_info)
3208 gdbarch->print_float_info = print_float_info;
3212 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3214 gdb_assert (gdbarch != NULL);
3215 return gdbarch->print_vector_info != NULL;
3219 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->print_vector_info != NULL);
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3225 gdbarch->print_vector_info (gdbarch, file, frame, args);
3229 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3230 gdbarch_print_vector_info_ftype print_vector_info)
3232 gdbarch->print_vector_info = print_vector_info;
3236 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3238 gdb_assert (gdbarch != NULL);
3239 gdb_assert (gdbarch->register_sim_regno != NULL);
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3242 return gdbarch->register_sim_regno (reg_nr);
3246 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3247 gdbarch_register_sim_regno_ftype register_sim_regno)
3249 gdbarch->register_sim_regno = register_sim_regno;
3253 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3255 gdb_assert (gdbarch != NULL);
3256 return gdbarch->register_bytes_ok != NULL;
3260 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3262 gdb_assert (gdbarch != NULL);
3263 gdb_assert (gdbarch->register_bytes_ok != NULL);
3264 if (gdbarch_debug >= 2)
3265 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3266 return gdbarch->register_bytes_ok (nr_bytes);
3270 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3271 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3273 gdbarch->register_bytes_ok = register_bytes_ok;
3277 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3279 gdb_assert (gdbarch != NULL);
3280 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3281 if (gdbarch_debug >= 2)
3282 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3283 return gdbarch->cannot_fetch_register (regnum);
3287 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3288 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3290 gdbarch->cannot_fetch_register = cannot_fetch_register;
3294 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3296 gdb_assert (gdbarch != NULL);
3297 gdb_assert (gdbarch->cannot_store_register != NULL);
3298 if (gdbarch_debug >= 2)
3299 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3300 return gdbarch->cannot_store_register (regnum);
3304 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3305 gdbarch_cannot_store_register_ftype cannot_store_register)
3307 gdbarch->cannot_store_register = cannot_store_register;
3311 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3313 gdb_assert (gdbarch != NULL);
3314 return gdbarch->get_longjmp_target != NULL;
3318 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3320 gdb_assert (gdbarch != NULL);
3321 gdb_assert (gdbarch->get_longjmp_target != NULL);
3322 if (gdbarch_debug >= 2)
3323 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3324 return gdbarch->get_longjmp_target (pc);
3328 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3329 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3331 gdbarch->get_longjmp_target = get_longjmp_target;
3335 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3337 gdb_assert (gdbarch != NULL);
3338 return gdbarch->deprecated_init_frame_pc != NULL;
3342 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3344 gdb_assert (gdbarch != NULL);
3345 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3346 if (gdbarch_debug >= 2)
3347 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3348 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3352 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3353 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3355 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3359 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3361 gdb_assert (gdbarch != NULL);
3362 if (gdbarch_debug >= 2)
3363 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3364 return gdbarch->believe_pcc_promotion;
3368 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3369 int believe_pcc_promotion)
3371 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3375 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3377 gdb_assert (gdbarch != NULL);
3378 return gdbarch->deprecated_get_saved_register != NULL;
3382 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)
3384 gdb_assert (gdbarch != NULL);
3385 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3386 if (gdbarch_debug >= 2)
3387 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3388 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3392 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3393 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3395 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3399 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3401 gdb_assert (gdbarch != NULL);
3402 gdb_assert (gdbarch->convert_register_p != NULL);
3403 if (gdbarch_debug >= 2)
3404 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3405 return gdbarch->convert_register_p (regnum, type);
3409 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3410 gdbarch_convert_register_p_ftype convert_register_p)
3412 gdbarch->convert_register_p = convert_register_p;
3416 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3418 gdb_assert (gdbarch != NULL);
3419 gdb_assert (gdbarch->register_to_value != NULL);
3420 if (gdbarch_debug >= 2)
3421 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3422 gdbarch->register_to_value (frame, regnum, type, buf);
3426 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3427 gdbarch_register_to_value_ftype register_to_value)
3429 gdbarch->register_to_value = register_to_value;
3433 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3435 gdb_assert (gdbarch != NULL);
3436 gdb_assert (gdbarch->value_to_register != NULL);
3437 if (gdbarch_debug >= 2)
3438 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3439 gdbarch->value_to_register (frame, regnum, type, buf);
3443 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3444 gdbarch_value_to_register_ftype value_to_register)
3446 gdbarch->value_to_register = value_to_register;
3450 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3452 gdb_assert (gdbarch != NULL);
3453 gdb_assert (gdbarch->pointer_to_address != NULL);
3454 if (gdbarch_debug >= 2)
3455 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3456 return gdbarch->pointer_to_address (type, buf);
3460 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3461 gdbarch_pointer_to_address_ftype pointer_to_address)
3463 gdbarch->pointer_to_address = pointer_to_address;
3467 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3469 gdb_assert (gdbarch != NULL);
3470 gdb_assert (gdbarch->address_to_pointer != NULL);
3471 if (gdbarch_debug >= 2)
3472 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3473 gdbarch->address_to_pointer (type, buf, addr);
3477 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3478 gdbarch_address_to_pointer_ftype address_to_pointer)
3480 gdbarch->address_to_pointer = address_to_pointer;
3484 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3486 gdb_assert (gdbarch != NULL);
3487 return gdbarch->integer_to_address != NULL;
3491 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3493 gdb_assert (gdbarch != NULL);
3494 gdb_assert (gdbarch->integer_to_address != NULL);
3495 if (gdbarch_debug >= 2)
3496 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3497 return gdbarch->integer_to_address (type, buf);
3501 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3502 gdbarch_integer_to_address_ftype integer_to_address)
3504 gdbarch->integer_to_address = integer_to_address;
3508 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3510 gdb_assert (gdbarch != NULL);
3511 return gdbarch->deprecated_pop_frame != NULL;
3515 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3517 gdb_assert (gdbarch != NULL);
3518 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3519 if (gdbarch_debug >= 2)
3520 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3521 gdbarch->deprecated_pop_frame ();
3525 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3526 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3528 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3532 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3534 gdb_assert (gdbarch != NULL);
3535 return gdbarch->deprecated_store_struct_return != NULL;
3539 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3541 gdb_assert (gdbarch != NULL);
3542 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3543 if (gdbarch_debug >= 2)
3544 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3545 gdbarch->deprecated_store_struct_return (addr, sp);
3549 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3550 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3552 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3556 gdbarch_return_value_p (struct gdbarch *gdbarch)
3558 gdb_assert (gdbarch != NULL);
3559 return gdbarch->return_value != NULL;
3562 enum return_value_convention
3563 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3565 gdb_assert (gdbarch != NULL);
3566 gdb_assert (gdbarch->return_value != NULL);
3567 if (gdbarch_debug >= 2)
3568 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3569 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3573 set_gdbarch_return_value (struct gdbarch *gdbarch,
3574 gdbarch_return_value_ftype return_value)
3576 gdbarch->return_value = return_value;
3580 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3582 gdb_assert (gdbarch != NULL);
3583 gdb_assert (gdbarch->return_value_on_stack != NULL);
3584 if (gdbarch_debug >= 2)
3585 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3586 return gdbarch->return_value_on_stack (type);
3590 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3591 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3593 gdbarch->return_value_on_stack = return_value_on_stack;
3597 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3599 gdb_assert (gdbarch != NULL);
3600 gdb_assert (gdbarch->extract_return_value != NULL);
3601 if (gdbarch_debug >= 2)
3602 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3603 gdbarch->extract_return_value (type, regcache, valbuf);
3607 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3608 gdbarch_extract_return_value_ftype extract_return_value)
3610 gdbarch->extract_return_value = extract_return_value;
3614 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3616 gdb_assert (gdbarch != NULL);
3617 gdb_assert (gdbarch->store_return_value != NULL);
3618 if (gdbarch_debug >= 2)
3619 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3620 gdbarch->store_return_value (type, regcache, valbuf);
3624 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3625 gdbarch_store_return_value_ftype store_return_value)
3627 gdbarch->store_return_value = store_return_value;
3631 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3633 gdb_assert (gdbarch != NULL);
3634 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3635 if (gdbarch_debug >= 2)
3636 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3637 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3641 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3642 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3644 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3648 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3650 gdb_assert (gdbarch != NULL);
3651 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3652 if (gdbarch_debug >= 2)
3653 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3654 gdbarch->deprecated_store_return_value (type, valbuf);
3658 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3659 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3661 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3665 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3667 gdb_assert (gdbarch != NULL);
3668 gdb_assert (gdbarch->use_struct_convention != NULL);
3669 if (gdbarch_debug >= 2)
3670 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3671 return gdbarch->use_struct_convention (gcc_p, value_type);
3675 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3676 gdbarch_use_struct_convention_ftype use_struct_convention)
3678 gdbarch->use_struct_convention = use_struct_convention;
3682 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3684 gdb_assert (gdbarch != NULL);
3685 return gdbarch->deprecated_extract_struct_value_address != NULL;
3689 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3691 gdb_assert (gdbarch != NULL);
3692 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3693 if (gdbarch_debug >= 2)
3694 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3695 return gdbarch->deprecated_extract_struct_value_address (regcache);
3699 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3700 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3702 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3706 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3708 gdb_assert (gdbarch != NULL);
3709 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3713 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3715 gdb_assert (gdbarch != NULL);
3716 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3717 if (gdbarch_debug >= 2)
3718 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3719 gdbarch->deprecated_frame_init_saved_regs (frame);
3723 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3724 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3726 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3730 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3732 gdb_assert (gdbarch != NULL);
3733 return gdbarch->deprecated_init_extra_frame_info != NULL;
3737 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3739 gdb_assert (gdbarch != NULL);
3740 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3741 if (gdbarch_debug >= 2)
3742 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3743 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3747 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3748 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3750 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3754 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3756 gdb_assert (gdbarch != NULL);
3757 gdb_assert (gdbarch->skip_prologue != NULL);
3758 if (gdbarch_debug >= 2)
3759 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3760 return gdbarch->skip_prologue (ip);
3764 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3765 gdbarch_skip_prologue_ftype skip_prologue)
3767 gdbarch->skip_prologue = skip_prologue;
3771 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3773 gdb_assert (gdbarch != NULL);
3774 gdb_assert (gdbarch->inner_than != NULL);
3775 if (gdbarch_debug >= 2)
3776 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3777 return gdbarch->inner_than (lhs, rhs);
3781 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3782 gdbarch_inner_than_ftype inner_than)
3784 gdbarch->inner_than = inner_than;
3787 const unsigned char *
3788 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3790 gdb_assert (gdbarch != NULL);
3791 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3792 if (gdbarch_debug >= 2)
3793 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3794 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3798 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3799 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3801 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3805 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3807 gdb_assert (gdbarch != NULL);
3808 return gdbarch->adjust_breakpoint_address != NULL;
3812 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3814 gdb_assert (gdbarch != NULL);
3815 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3816 if (gdbarch_debug >= 2)
3817 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3818 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3822 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3823 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3825 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3829 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3831 gdb_assert (gdbarch != NULL);
3832 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3833 if (gdbarch_debug >= 2)
3834 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3835 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3839 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3840 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3842 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3846 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3848 gdb_assert (gdbarch != NULL);
3849 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3850 if (gdbarch_debug >= 2)
3851 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3852 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3856 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3857 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3859 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3863 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3865 gdb_assert (gdbarch != NULL);
3866 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3867 if (gdbarch_debug >= 2)
3868 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3869 return gdbarch->decr_pc_after_break;
3873 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3874 CORE_ADDR decr_pc_after_break)
3876 gdbarch->decr_pc_after_break = decr_pc_after_break;
3880 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3882 gdb_assert (gdbarch != NULL);
3883 /* Skip verify of function_start_offset, invalid_p == 0 */
3884 if (gdbarch_debug >= 2)
3885 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3886 return gdbarch->function_start_offset;
3890 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3891 CORE_ADDR function_start_offset)
3893 gdbarch->function_start_offset = function_start_offset;
3897 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)
3899 gdb_assert (gdbarch != NULL);
3900 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3901 if (gdbarch_debug >= 2)
3902 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3903 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3907 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3908 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3910 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3914 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3916 gdb_assert (gdbarch != NULL);
3917 /* Skip verify of frame_args_skip, invalid_p == 0 */
3918 if (gdbarch_debug >= 2)
3919 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3920 return gdbarch->frame_args_skip;
3924 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3925 CORE_ADDR frame_args_skip)
3927 gdbarch->frame_args_skip = frame_args_skip;
3931 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
3933 gdb_assert (gdbarch != NULL);
3934 return gdbarch->deprecated_frameless_function_invocation != NULL;
3938 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3940 gdb_assert (gdbarch != NULL);
3941 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
3942 if (gdbarch_debug >= 2)
3943 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
3944 return gdbarch->deprecated_frameless_function_invocation (fi);
3948 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
3949 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
3951 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
3955 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
3957 gdb_assert (gdbarch != NULL);
3958 return gdbarch->deprecated_frame_chain != NULL;
3962 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3964 gdb_assert (gdbarch != NULL);
3965 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
3966 if (gdbarch_debug >= 2)
3967 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
3968 return gdbarch->deprecated_frame_chain (frame);
3972 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
3973 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
3975 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
3979 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
3981 gdb_assert (gdbarch != NULL);
3982 return gdbarch->deprecated_frame_chain_valid != NULL;
3986 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3988 gdb_assert (gdbarch != NULL);
3989 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
3990 if (gdbarch_debug >= 2)
3991 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
3992 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
3996 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
3997 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
3999 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4003 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4005 gdb_assert (gdbarch != NULL);
4006 return gdbarch->deprecated_frame_saved_pc != NULL;
4010 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4012 gdb_assert (gdbarch != NULL);
4013 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4014 if (gdbarch_debug >= 2)
4015 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4016 return gdbarch->deprecated_frame_saved_pc (fi);
4020 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4021 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4023 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4027 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4029 gdb_assert (gdbarch != NULL);
4030 return gdbarch->unwind_pc != NULL;
4034 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4036 gdb_assert (gdbarch != NULL);
4037 gdb_assert (gdbarch->unwind_pc != NULL);
4038 if (gdbarch_debug >= 2)
4039 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4040 return gdbarch->unwind_pc (gdbarch, next_frame);
4044 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4045 gdbarch_unwind_pc_ftype unwind_pc)
4047 gdbarch->unwind_pc = unwind_pc;
4051 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4053 gdb_assert (gdbarch != NULL);
4054 return gdbarch->unwind_sp != NULL;
4058 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4060 gdb_assert (gdbarch != NULL);
4061 gdb_assert (gdbarch->unwind_sp != NULL);
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4064 return gdbarch->unwind_sp (gdbarch, next_frame);
4068 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4069 gdbarch_unwind_sp_ftype unwind_sp)
4071 gdbarch->unwind_sp = unwind_sp;
4075 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4077 gdb_assert (gdbarch != NULL);
4078 return gdbarch->deprecated_frame_args_address != get_frame_base;
4082 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4084 gdb_assert (gdbarch != NULL);
4085 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4086 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4087 if (gdbarch_debug >= 2)
4088 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4089 return gdbarch->deprecated_frame_args_address (fi);
4093 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4094 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4096 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4100 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4102 gdb_assert (gdbarch != NULL);
4103 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4107 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4109 gdb_assert (gdbarch != NULL);
4110 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4111 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4112 if (gdbarch_debug >= 2)
4113 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4114 return gdbarch->deprecated_frame_locals_address (fi);
4118 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4119 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4121 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4125 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4127 gdb_assert (gdbarch != NULL);
4128 return gdbarch->deprecated_saved_pc_after_call != NULL;
4132 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4134 gdb_assert (gdbarch != NULL);
4135 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4136 if (gdbarch_debug >= 2)
4137 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4138 return gdbarch->deprecated_saved_pc_after_call (frame);
4142 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4143 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4145 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4149 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4151 gdb_assert (gdbarch != NULL);
4152 return gdbarch->frame_num_args != NULL;
4156 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4158 gdb_assert (gdbarch != NULL);
4159 gdb_assert (gdbarch->frame_num_args != NULL);
4160 if (gdbarch_debug >= 2)
4161 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4162 return gdbarch->frame_num_args (frame);
4166 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4167 gdbarch_frame_num_args_ftype frame_num_args)
4169 gdbarch->frame_num_args = frame_num_args;
4173 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4175 gdb_assert (gdbarch != NULL);
4176 return gdbarch->deprecated_stack_align != NULL;
4180 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4182 gdb_assert (gdbarch != NULL);
4183 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4184 if (gdbarch_debug >= 2)
4185 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4186 return gdbarch->deprecated_stack_align (sp);
4190 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4191 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4193 gdbarch->deprecated_stack_align = deprecated_stack_align;
4197 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4199 gdb_assert (gdbarch != NULL);
4200 return gdbarch->frame_align != NULL;
4204 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4206 gdb_assert (gdbarch != NULL);
4207 gdb_assert (gdbarch->frame_align != NULL);
4208 if (gdbarch_debug >= 2)
4209 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4210 return gdbarch->frame_align (gdbarch, address);
4214 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4215 gdbarch_frame_align_ftype frame_align)
4217 gdbarch->frame_align = frame_align;
4221 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4223 gdb_assert (gdbarch != NULL);
4224 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4228 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4230 gdb_assert (gdbarch != NULL);
4231 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4232 if (gdbarch_debug >= 2)
4233 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4234 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4238 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4239 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4241 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4245 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4247 gdb_assert (gdbarch != NULL);
4248 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4249 if (gdbarch_debug >= 2)
4250 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4251 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4255 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4256 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4258 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4262 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4264 gdb_assert (gdbarch != NULL);
4265 if (gdbarch_debug >= 2)
4266 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4267 return gdbarch->frame_red_zone_size;
4271 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4272 int frame_red_zone_size)
4274 gdbarch->frame_red_zone_size = frame_red_zone_size;
4277 const struct floatformat *
4278 gdbarch_float_format (struct gdbarch *gdbarch)
4280 gdb_assert (gdbarch != NULL);
4281 if (gdbarch_debug >= 2)
4282 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4283 return gdbarch->float_format;
4287 set_gdbarch_float_format (struct gdbarch *gdbarch,
4288 const struct floatformat * float_format)
4290 gdbarch->float_format = float_format;
4293 const struct floatformat *
4294 gdbarch_double_format (struct gdbarch *gdbarch)
4296 gdb_assert (gdbarch != NULL);
4297 if (gdbarch_debug >= 2)
4298 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4299 return gdbarch->double_format;
4303 set_gdbarch_double_format (struct gdbarch *gdbarch,
4304 const struct floatformat * double_format)
4306 gdbarch->double_format = double_format;
4309 const struct floatformat *
4310 gdbarch_long_double_format (struct gdbarch *gdbarch)
4312 gdb_assert (gdbarch != NULL);
4313 if (gdbarch_debug >= 2)
4314 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4315 return gdbarch->long_double_format;
4319 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4320 const struct floatformat * long_double_format)
4322 gdbarch->long_double_format = long_double_format;
4326 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4328 gdb_assert (gdbarch != NULL);
4329 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4330 if (gdbarch_debug >= 2)
4331 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4332 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4336 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4337 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4339 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4343 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4345 gdb_assert (gdbarch != NULL);
4346 gdb_assert (gdbarch->addr_bits_remove != NULL);
4347 if (gdbarch_debug >= 2)
4348 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4349 return gdbarch->addr_bits_remove (addr);
4353 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4354 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4356 gdbarch->addr_bits_remove = addr_bits_remove;
4360 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4362 gdb_assert (gdbarch != NULL);
4363 gdb_assert (gdbarch->smash_text_address != NULL);
4364 if (gdbarch_debug >= 2)
4365 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4366 return gdbarch->smash_text_address (addr);
4370 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4371 gdbarch_smash_text_address_ftype smash_text_address)
4373 gdbarch->smash_text_address = smash_text_address;
4377 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4379 gdb_assert (gdbarch != NULL);
4380 return gdbarch->software_single_step != NULL;
4384 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4386 gdb_assert (gdbarch != NULL);
4387 gdb_assert (gdbarch->software_single_step != NULL);
4388 if (gdbarch_debug >= 2)
4389 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4390 gdbarch->software_single_step (sig, insert_breakpoints_p);
4394 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4395 gdbarch_software_single_step_ftype software_single_step)
4397 gdbarch->software_single_step = software_single_step;
4401 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4403 gdb_assert (gdbarch != NULL);
4404 gdb_assert (gdbarch->print_insn != NULL);
4405 if (gdbarch_debug >= 2)
4406 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4407 return gdbarch->print_insn (vma, info);
4411 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4412 gdbarch_print_insn_ftype print_insn)
4414 gdbarch->print_insn = print_insn;
4418 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4420 gdb_assert (gdbarch != NULL);
4421 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4422 if (gdbarch_debug >= 2)
4423 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4424 return gdbarch->skip_trampoline_code (pc);
4428 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4429 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4431 gdbarch->skip_trampoline_code = skip_trampoline_code;
4435 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4437 gdb_assert (gdbarch != NULL);
4438 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4439 if (gdbarch_debug >= 2)
4440 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4441 return gdbarch->skip_solib_resolver (gdbarch, pc);
4445 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4446 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4448 gdbarch->skip_solib_resolver = skip_solib_resolver;
4452 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4454 gdb_assert (gdbarch != NULL);
4455 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4456 if (gdbarch_debug >= 2)
4457 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4458 return gdbarch->in_solib_call_trampoline (pc, name);
4462 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4463 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4465 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4469 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4471 gdb_assert (gdbarch != NULL);
4472 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4473 if (gdbarch_debug >= 2)
4474 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4475 return gdbarch->in_solib_return_trampoline (pc, name);
4479 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4480 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4482 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4486 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4488 gdb_assert (gdbarch != NULL);
4489 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4490 if (gdbarch_debug >= 2)
4491 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4492 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4496 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4497 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4499 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4503 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4505 gdb_assert (gdbarch != NULL);
4506 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4507 if (gdbarch_debug >= 2)
4508 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4509 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4513 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4514 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4516 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4520 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4522 gdb_assert (gdbarch != NULL);
4523 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4524 if (gdbarch_debug >= 2)
4525 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4526 gdbarch->elf_make_msymbol_special (sym, msym);
4530 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4531 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4533 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4537 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4539 gdb_assert (gdbarch != NULL);
4540 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4541 if (gdbarch_debug >= 2)
4542 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4543 gdbarch->coff_make_msymbol_special (val, msym);
4547 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4548 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4550 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4554 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4556 gdb_assert (gdbarch != NULL);
4557 /* Skip verify of name_of_malloc, invalid_p == 0 */
4558 if (gdbarch_debug >= 2)
4559 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4560 return gdbarch->name_of_malloc;
4564 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4565 const char * name_of_malloc)
4567 gdbarch->name_of_malloc = name_of_malloc;
4571 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4573 gdb_assert (gdbarch != NULL);
4574 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4575 if (gdbarch_debug >= 2)
4576 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4577 return gdbarch->cannot_step_breakpoint;
4581 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4582 int cannot_step_breakpoint)
4584 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4588 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4590 gdb_assert (gdbarch != NULL);
4591 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4592 if (gdbarch_debug >= 2)
4593 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4594 return gdbarch->have_nonsteppable_watchpoint;
4598 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4599 int have_nonsteppable_watchpoint)
4601 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4605 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4607 gdb_assert (gdbarch != NULL);
4608 return gdbarch->address_class_type_flags != NULL;
4612 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4614 gdb_assert (gdbarch != NULL);
4615 gdb_assert (gdbarch->address_class_type_flags != NULL);
4616 if (gdbarch_debug >= 2)
4617 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4618 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4622 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4623 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4625 gdbarch->address_class_type_flags = address_class_type_flags;
4629 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4631 gdb_assert (gdbarch != NULL);
4632 return gdbarch->address_class_type_flags_to_name != NULL;
4636 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4638 gdb_assert (gdbarch != NULL);
4639 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4640 if (gdbarch_debug >= 2)
4641 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4642 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4646 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4647 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4649 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4653 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4655 gdb_assert (gdbarch != NULL);
4656 return gdbarch->address_class_name_to_type_flags != NULL;
4660 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4662 gdb_assert (gdbarch != NULL);
4663 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4664 if (gdbarch_debug >= 2)
4665 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4666 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4670 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4671 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4673 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4677 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4679 gdb_assert (gdbarch != NULL);
4680 gdb_assert (gdbarch->register_reggroup_p != NULL);
4681 if (gdbarch_debug >= 2)
4682 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4683 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4687 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4688 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4690 gdbarch->register_reggroup_p = register_reggroup_p;
4694 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4696 gdb_assert (gdbarch != NULL);
4697 return gdbarch->fetch_pointer_argument != NULL;
4701 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4703 gdb_assert (gdbarch != NULL);
4704 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4705 if (gdbarch_debug >= 2)
4706 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4707 return gdbarch->fetch_pointer_argument (frame, argi, type);
4711 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4712 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4714 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4718 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4720 gdb_assert (gdbarch != NULL);
4721 return gdbarch->regset_from_core_section != NULL;
4724 const struct regset *
4725 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4727 gdb_assert (gdbarch != NULL);
4728 gdb_assert (gdbarch->regset_from_core_section != NULL);
4729 if (gdbarch_debug >= 2)
4730 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4731 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4735 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4736 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4738 gdbarch->regset_from_core_section = regset_from_core_section;
4742 /* Keep a registry of per-architecture data-pointers required by GDB
4749 gdbarch_data_pre_init_ftype *pre_init;
4750 gdbarch_data_post_init_ftype *post_init;
4753 struct gdbarch_data_registration
4755 struct gdbarch_data *data;
4756 struct gdbarch_data_registration *next;
4759 struct gdbarch_data_registry
4762 struct gdbarch_data_registration *registrations;
4765 struct gdbarch_data_registry gdbarch_data_registry =
4770 static struct gdbarch_data *
4771 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4772 gdbarch_data_post_init_ftype *post_init)
4774 struct gdbarch_data_registration **curr;
4775 /* Append the new registraration. */
4776 for (curr = &gdbarch_data_registry.registrations;
4778 curr = &(*curr)->next);
4779 (*curr) = XMALLOC (struct gdbarch_data_registration);
4780 (*curr)->next = NULL;
4781 (*curr)->data = XMALLOC (struct gdbarch_data);
4782 (*curr)->data->index = gdbarch_data_registry.nr++;
4783 (*curr)->data->pre_init = pre_init;
4784 (*curr)->data->post_init = post_init;
4785 (*curr)->data->init_p = 1;
4786 return (*curr)->data;
4789 struct gdbarch_data *
4790 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4792 return gdbarch_data_register (pre_init, NULL);
4795 struct gdbarch_data *
4796 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4798 return gdbarch_data_register (NULL, post_init);
4801 /* Create/delete the gdbarch data vector. */
4804 alloc_gdbarch_data (struct gdbarch *gdbarch)
4806 gdb_assert (gdbarch->data == NULL);
4807 gdbarch->nr_data = gdbarch_data_registry.nr;
4808 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4811 /* Initialize the current value of the specified per-architecture
4815 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4816 struct gdbarch_data *data,
4819 gdb_assert (data->index < gdbarch->nr_data);
4820 gdb_assert (gdbarch->data[data->index] == NULL);
4821 gdb_assert (data->pre_init == NULL);
4822 gdbarch->data[data->index] = pointer;
4825 /* Return the current value of the specified per-architecture
4829 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4831 gdb_assert (data->index < gdbarch->nr_data);
4832 if (gdbarch->data[data->index] == NULL)
4834 /* The data-pointer isn't initialized, call init() to get a
4836 if (data->pre_init != NULL)
4837 /* Mid architecture creation: pass just the obstack, and not
4838 the entire architecture, as that way it isn't possible for
4839 pre-init code to refer to undefined architecture
4841 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4842 else if (gdbarch->initialized_p
4843 && data->post_init != NULL)
4844 /* Post architecture creation: pass the entire architecture
4845 (as all fields are valid), but be careful to also detect
4846 recursive references. */
4848 gdb_assert (data->init_p);
4850 gdbarch->data[data->index] = data->post_init (gdbarch);
4854 /* The architecture initialization hasn't completed - punt -
4855 hope that the caller knows what they are doing. Once
4856 deprecated_set_gdbarch_data has been initialized, this can be
4857 changed to an internal error. */
4859 gdb_assert (gdbarch->data[data->index] != NULL);
4861 return gdbarch->data[data->index];
4866 /* Keep a registry of swapped data required by GDB modules. */
4871 struct gdbarch_swap_registration *source;
4872 struct gdbarch_swap *next;
4875 struct gdbarch_swap_registration
4878 unsigned long sizeof_data;
4879 gdbarch_swap_ftype *init;
4880 struct gdbarch_swap_registration *next;
4883 struct gdbarch_swap_registry
4886 struct gdbarch_swap_registration *registrations;
4889 struct gdbarch_swap_registry gdbarch_swap_registry =
4895 deprecated_register_gdbarch_swap (void *data,
4896 unsigned long sizeof_data,
4897 gdbarch_swap_ftype *init)
4899 struct gdbarch_swap_registration **rego;
4900 for (rego = &gdbarch_swap_registry.registrations;
4902 rego = &(*rego)->next);
4903 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4904 (*rego)->next = NULL;
4905 (*rego)->init = init;
4906 (*rego)->data = data;
4907 (*rego)->sizeof_data = sizeof_data;
4911 current_gdbarch_swap_init_hack (void)
4913 struct gdbarch_swap_registration *rego;
4914 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4915 for (rego = gdbarch_swap_registry.registrations;
4919 if (rego->data != NULL)
4921 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4922 struct gdbarch_swap);
4923 (*curr)->source = rego;
4924 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4926 (*curr)->next = NULL;
4927 curr = &(*curr)->next;
4929 if (rego->init != NULL)
4934 static struct gdbarch *
4935 current_gdbarch_swap_out_hack (void)
4937 struct gdbarch *old_gdbarch = current_gdbarch;
4938 struct gdbarch_swap *curr;
4940 gdb_assert (old_gdbarch != NULL);
4941 for (curr = old_gdbarch->swap;
4945 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4946 memset (curr->source->data, 0, curr->source->sizeof_data);
4948 current_gdbarch = NULL;
4953 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
4955 struct gdbarch_swap *curr;
4957 gdb_assert (current_gdbarch == NULL);
4958 for (curr = new_gdbarch->swap;
4961 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4962 current_gdbarch = new_gdbarch;
4966 /* Keep a registry of the architectures known by GDB. */
4968 struct gdbarch_registration
4970 enum bfd_architecture bfd_architecture;
4971 gdbarch_init_ftype *init;
4972 gdbarch_dump_tdep_ftype *dump_tdep;
4973 struct gdbarch_list *arches;
4974 struct gdbarch_registration *next;
4977 static struct gdbarch_registration *gdbarch_registry = NULL;
4980 append_name (const char ***buf, int *nr, const char *name)
4982 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4988 gdbarch_printable_names (void)
4990 /* Accumulate a list of names based on the registed list of
4992 enum bfd_architecture a;
4994 const char **arches = NULL;
4995 struct gdbarch_registration *rego;
4996 for (rego = gdbarch_registry;
5000 const struct bfd_arch_info *ap;
5001 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5003 internal_error (__FILE__, __LINE__,
5004 "gdbarch_architecture_names: multi-arch unknown");
5007 append_name (&arches, &nr_arches, ap->printable_name);
5012 append_name (&arches, &nr_arches, NULL);
5018 gdbarch_register (enum bfd_architecture bfd_architecture,
5019 gdbarch_init_ftype *init,
5020 gdbarch_dump_tdep_ftype *dump_tdep)
5022 struct gdbarch_registration **curr;
5023 const struct bfd_arch_info *bfd_arch_info;
5024 /* Check that BFD recognizes this architecture */
5025 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5026 if (bfd_arch_info == NULL)
5028 internal_error (__FILE__, __LINE__,
5029 "gdbarch: Attempt to register unknown architecture (%d)",
5032 /* Check that we haven't seen this architecture before */
5033 for (curr = &gdbarch_registry;
5035 curr = &(*curr)->next)
5037 if (bfd_architecture == (*curr)->bfd_architecture)
5038 internal_error (__FILE__, __LINE__,
5039 "gdbarch: Duplicate registraration of architecture (%s)",
5040 bfd_arch_info->printable_name);
5044 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5045 bfd_arch_info->printable_name,
5048 (*curr) = XMALLOC (struct gdbarch_registration);
5049 (*curr)->bfd_architecture = bfd_architecture;
5050 (*curr)->init = init;
5051 (*curr)->dump_tdep = dump_tdep;
5052 (*curr)->arches = NULL;
5053 (*curr)->next = NULL;
5057 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5058 gdbarch_init_ftype *init)
5060 gdbarch_register (bfd_architecture, init, NULL);
5064 /* Look for an architecture using gdbarch_info. Base search on only
5065 BFD_ARCH_INFO and BYTE_ORDER. */
5067 struct gdbarch_list *
5068 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5069 const struct gdbarch_info *info)
5071 for (; arches != NULL; arches = arches->next)
5073 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5075 if (info->byte_order != arches->gdbarch->byte_order)
5077 if (info->osabi != arches->gdbarch->osabi)
5085 /* Find an architecture that matches the specified INFO. Create a new
5086 architecture if needed. Return that new architecture. Assumes
5087 that there is no current architecture. */
5089 static struct gdbarch *
5090 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5092 struct gdbarch *new_gdbarch;
5093 struct gdbarch_registration *rego;
5095 /* The existing architecture has been swapped out - all this code
5096 works from a clean slate. */
5097 gdb_assert (current_gdbarch == NULL);
5099 /* Fill in missing parts of the INFO struct using a number of
5100 sources: "set ..."; INFOabfd supplied; and the existing
5102 gdbarch_info_fill (old_gdbarch, &info);
5104 /* Must have found some sort of architecture. */
5105 gdb_assert (info.bfd_arch_info != NULL);
5109 fprintf_unfiltered (gdb_stdlog,
5110 "find_arch_by_info: info.bfd_arch_info %s\n",
5111 (info.bfd_arch_info != NULL
5112 ? info.bfd_arch_info->printable_name
5114 fprintf_unfiltered (gdb_stdlog,
5115 "find_arch_by_info: info.byte_order %d (%s)\n",
5117 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5118 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5120 fprintf_unfiltered (gdb_stdlog,
5121 "find_arch_by_info: info.osabi %d (%s)\n",
5122 info.osabi, gdbarch_osabi_name (info.osabi));
5123 fprintf_unfiltered (gdb_stdlog,
5124 "find_arch_by_info: info.abfd 0x%lx\n",
5126 fprintf_unfiltered (gdb_stdlog,
5127 "find_arch_by_info: info.tdep_info 0x%lx\n",
5128 (long) info.tdep_info);
5131 /* Find the tdep code that knows about this architecture. */
5132 for (rego = gdbarch_registry;
5135 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5140 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5141 "No matching architecture\n");
5145 /* Ask the tdep code for an architecture that matches "info". */
5146 new_gdbarch = rego->init (info, rego->arches);
5148 /* Did the tdep code like it? No. Reject the change and revert to
5149 the old architecture. */
5150 if (new_gdbarch == NULL)
5153 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5154 "Target rejected architecture\n");
5158 /* Is this a pre-existing architecture (as determined by already
5159 being initialized)? Move it to the front of the architecture
5160 list (keeping the list sorted Most Recently Used). */
5161 if (new_gdbarch->initialized_p)
5163 struct gdbarch_list **list;
5164 struct gdbarch_list *this;
5166 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5167 "Previous architecture 0x%08lx (%s) selected\n",
5169 new_gdbarch->bfd_arch_info->printable_name);
5170 /* Find the existing arch in the list. */
5171 for (list = ®o->arches;
5172 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5173 list = &(*list)->next);
5174 /* It had better be in the list of architectures. */
5175 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5178 (*list) = this->next;
5179 /* Insert THIS at the front. */
5180 this->next = rego->arches;
5181 rego->arches = this;
5186 /* It's a new architecture. */
5188 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5189 "New architecture 0x%08lx (%s) selected\n",
5191 new_gdbarch->bfd_arch_info->printable_name);
5193 /* Insert the new architecture into the front of the architecture
5194 list (keep the list sorted Most Recently Used). */
5196 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5197 this->next = rego->arches;
5198 this->gdbarch = new_gdbarch;
5199 rego->arches = this;
5202 /* Check that the newly installed architecture is valid. Plug in
5203 any post init values. */
5204 new_gdbarch->dump_tdep = rego->dump_tdep;
5205 verify_gdbarch (new_gdbarch);
5206 new_gdbarch->initialized_p = 1;
5208 /* Initialize any per-architecture swap areas. This phase requires
5209 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5210 swap the entire architecture out. */
5211 current_gdbarch = new_gdbarch;
5212 current_gdbarch_swap_init_hack ();
5213 current_gdbarch_swap_out_hack ();
5216 gdbarch_dump (new_gdbarch, gdb_stdlog);
5222 gdbarch_find_by_info (struct gdbarch_info info)
5224 /* Save the previously selected architecture, setting the global to
5225 NULL. This stops things like gdbarch->init() trying to use the
5226 previous architecture's configuration. The previous architecture
5227 may not even be of the same architecture family. The most recent
5228 architecture of the same family is found at the head of the
5229 rego->arches list. */
5230 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5232 /* Find the specified architecture. */
5233 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5235 /* Restore the existing architecture. */
5236 gdb_assert (current_gdbarch == NULL);
5237 current_gdbarch_swap_in_hack (old_gdbarch);
5242 /* Make the specified architecture current, swapping the existing one
5246 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5248 gdb_assert (new_gdbarch != NULL);
5249 gdb_assert (current_gdbarch != NULL);
5250 gdb_assert (new_gdbarch->initialized_p);
5251 current_gdbarch_swap_out_hack ();
5252 current_gdbarch_swap_in_hack (new_gdbarch);
5253 architecture_changed_event ();
5256 extern void _initialize_gdbarch (void);
5259 _initialize_gdbarch (void)
5261 struct cmd_list_element *c;
5263 add_show_from_set (add_set_cmd ("arch",
5266 (char *)&gdbarch_debug,
5267 "Set architecture debugging.\n\
5268 When non-zero, architecture debugging is enabled.", &setdebuglist),
5270 c = add_set_cmd ("archdebug",
5273 (char *)&gdbarch_debug,
5274 "Set architecture debugging.\n\
5275 When non-zero, architecture debugging is enabled.", &setlist);
5277 deprecate_cmd (c, "set debug arch");
5278 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");