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_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
176 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
177 int believe_pcc_promotion;
178 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
179 gdbarch_convert_register_p_ftype *convert_register_p;
180 gdbarch_register_to_value_ftype *register_to_value;
181 gdbarch_value_to_register_ftype *value_to_register;
182 gdbarch_pointer_to_address_ftype *pointer_to_address;
183 gdbarch_address_to_pointer_ftype *address_to_pointer;
184 gdbarch_integer_to_address_ftype *integer_to_address;
185 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
186 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
187 gdbarch_return_value_ftype *return_value;
188 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
189 gdbarch_extract_return_value_ftype *extract_return_value;
190 gdbarch_store_return_value_ftype *store_return_value;
191 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
192 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
193 gdbarch_use_struct_convention_ftype *use_struct_convention;
194 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
195 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
196 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
197 gdbarch_skip_prologue_ftype *skip_prologue;
198 gdbarch_inner_than_ftype *inner_than;
199 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
200 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
201 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
202 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
203 CORE_ADDR decr_pc_after_break;
204 CORE_ADDR function_start_offset;
205 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
206 CORE_ADDR frame_args_skip;
207 gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
208 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
209 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
210 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
211 gdbarch_unwind_pc_ftype *unwind_pc;
212 gdbarch_unwind_sp_ftype *unwind_sp;
213 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
214 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
215 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
216 gdbarch_frame_num_args_ftype *frame_num_args;
217 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
218 gdbarch_frame_align_ftype *frame_align;
219 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
220 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
221 int frame_red_zone_size;
222 const struct floatformat * float_format;
223 const struct floatformat * double_format;
224 const struct floatformat * long_double_format;
225 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
226 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
227 gdbarch_smash_text_address_ftype *smash_text_address;
228 gdbarch_software_single_step_ftype *software_single_step;
229 gdbarch_print_insn_ftype *print_insn;
230 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
231 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
232 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
233 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
234 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
235 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
236 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
237 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
238 const char * name_of_malloc;
239 int cannot_step_breakpoint;
240 int have_nonsteppable_watchpoint;
241 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
242 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
243 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
244 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
245 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
246 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
250 /* The default architecture uses host values (for want of a better
253 extern const struct bfd_arch_info bfd_default_arch_struct;
255 struct gdbarch startup_gdbarch =
257 1, /* Always initialized. */
258 NULL, /* The obstack. */
259 /* basic architecture information */
260 &bfd_default_arch_struct, /* bfd_arch_info */
261 BFD_ENDIAN_BIG, /* byte_order */
262 GDB_OSABI_UNKNOWN, /* osabi */
263 /* target specific vector and its dump routine */
265 /*per-architecture data-pointers and swap regions */
267 /* Multi-arch values */
268 8 * sizeof (short), /* short_bit */
269 8 * sizeof (int), /* int_bit */
270 8 * sizeof (long), /* long_bit */
271 8 * sizeof (LONGEST), /* long_long_bit */
272 8 * sizeof (float), /* float_bit */
273 8 * sizeof (double), /* double_bit */
274 8 * sizeof (long double), /* long_double_bit */
275 8 * sizeof (void*), /* ptr_bit */
276 8 * sizeof (void*), /* addr_bit */
277 8 * sizeof (void*), /* bfd_vma_bit */
282 0, /* virtual_frame_pointer */
283 0, /* pseudo_register_read */
284 0, /* pseudo_register_write */
286 0, /* num_pseudo_regs */
291 0, /* stab_reg_to_regnum */
292 0, /* ecoff_reg_to_regnum */
293 0, /* dwarf_reg_to_regnum */
294 0, /* sdb_reg_to_regnum */
295 0, /* dwarf2_reg_to_regnum */
296 0, /* register_name */
297 0, /* register_type */
298 0, /* deprecated_register_virtual_type */
299 0, /* deprecated_register_bytes */
300 generic_register_byte, /* deprecated_register_byte */
301 generic_register_size, /* deprecated_register_raw_size */
302 generic_register_size, /* deprecated_register_virtual_size */
303 0, /* deprecated_max_register_raw_size */
304 0, /* deprecated_max_register_virtual_size */
305 0, /* unwind_dummy_id */
306 0, /* deprecated_save_dummy_frame_tos */
307 -1, /* deprecated_fp_regnum */
308 0, /* deprecated_target_read_fp */
309 0, /* push_dummy_call */
310 0, /* deprecated_push_arguments */
311 0, /* deprecated_push_return_address */
312 0, /* deprecated_dummy_write_sp */
313 0, /* deprecated_register_size */
314 0, /* call_dummy_location */
315 0, /* push_dummy_code */
316 0, /* deprecated_do_registers_info */
317 default_print_registers_info, /* print_registers_info */
318 0, /* print_float_info */
319 0, /* print_vector_info */
320 0, /* register_sim_regno */
321 0, /* register_bytes_ok */
322 0, /* cannot_fetch_register */
323 0, /* cannot_store_register */
324 0, /* get_longjmp_target */
325 deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
326 0, /* deprecated_init_frame_pc */
327 0, /* believe_pcc_promotion */
328 0, /* deprecated_get_saved_register */
329 0, /* convert_register_p */
330 0, /* register_to_value */
331 0, /* value_to_register */
332 0, /* pointer_to_address */
333 0, /* address_to_pointer */
334 0, /* integer_to_address */
335 0, /* deprecated_pop_frame */
336 0, /* deprecated_store_struct_return */
337 0, /* return_value */
338 0, /* return_value_on_stack */
339 0, /* extract_return_value */
340 0, /* store_return_value */
341 0, /* deprecated_extract_return_value */
342 0, /* deprecated_store_return_value */
343 0, /* use_struct_convention */
344 0, /* deprecated_extract_struct_value_address */
345 0, /* deprecated_frame_init_saved_regs */
346 0, /* deprecated_init_extra_frame_info */
347 0, /* skip_prologue */
349 0, /* breakpoint_from_pc */
350 0, /* adjust_breakpoint_address */
351 0, /* memory_insert_breakpoint */
352 0, /* memory_remove_breakpoint */
353 0, /* decr_pc_after_break */
354 0, /* function_start_offset */
355 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
356 0, /* frame_args_skip */
357 0, /* deprecated_frameless_function_invocation */
358 0, /* deprecated_frame_chain */
359 0, /* deprecated_frame_chain_valid */
360 0, /* deprecated_frame_saved_pc */
363 get_frame_base, /* deprecated_frame_args_address */
364 get_frame_base, /* deprecated_frame_locals_address */
365 0, /* deprecated_saved_pc_after_call */
366 0, /* frame_num_args */
367 0, /* deprecated_stack_align */
369 0, /* deprecated_reg_struct_has_addr */
370 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
371 0, /* frame_red_zone_size */
372 0, /* float_format */
373 0, /* double_format */
374 0, /* long_double_format */
375 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
376 0, /* addr_bits_remove */
377 0, /* smash_text_address */
378 0, /* software_single_step */
380 0, /* skip_trampoline_code */
381 generic_skip_solib_resolver, /* skip_solib_resolver */
382 0, /* in_solib_call_trampoline */
383 0, /* in_solib_return_trampoline */
384 generic_in_function_epilogue_p, /* in_function_epilogue_p */
385 construct_inferior_arguments, /* construct_inferior_arguments */
386 0, /* elf_make_msymbol_special */
387 0, /* coff_make_msymbol_special */
388 "malloc", /* name_of_malloc */
389 0, /* cannot_step_breakpoint */
390 0, /* have_nonsteppable_watchpoint */
391 0, /* address_class_type_flags */
392 0, /* address_class_type_flags_to_name */
393 0, /* address_class_name_to_type_flags */
394 default_register_reggroup_p, /* register_reggroup_p */
395 0, /* fetch_pointer_argument */
396 0, /* regset_from_core_section */
397 /* startup_gdbarch() */
400 struct gdbarch *current_gdbarch = &startup_gdbarch;
402 /* Create a new ``struct gdbarch'' based on information provided by
403 ``struct gdbarch_info''. */
406 gdbarch_alloc (const struct gdbarch_info *info,
407 struct gdbarch_tdep *tdep)
409 /* NOTE: The new architecture variable is named ``current_gdbarch''
410 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
411 the current local architecture and not the previous global
412 architecture. This ensures that the new architectures initial
413 values are not influenced by the previous architecture. Once
414 everything is parameterised with gdbarch, this will go away. */
415 struct gdbarch *current_gdbarch;
417 /* Create an obstack for allocating all the per-architecture memory,
418 then use that to allocate the architecture vector. */
419 struct obstack *obstack = XMALLOC (struct obstack);
420 obstack_init (obstack);
421 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
422 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
423 current_gdbarch->obstack = obstack;
425 alloc_gdbarch_data (current_gdbarch);
427 current_gdbarch->tdep = tdep;
429 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
430 current_gdbarch->byte_order = info->byte_order;
431 current_gdbarch->osabi = info->osabi;
433 /* Force the explicit initialization of these. */
434 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
435 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
436 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
437 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
438 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
439 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
440 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
441 current_gdbarch->ptr_bit = TARGET_INT_BIT;
442 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
443 current_gdbarch->char_signed = -1;
444 current_gdbarch->write_pc = generic_target_write_pc;
445 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
446 current_gdbarch->num_regs = -1;
447 current_gdbarch->sp_regnum = -1;
448 current_gdbarch->pc_regnum = -1;
449 current_gdbarch->ps_regnum = -1;
450 current_gdbarch->fp0_regnum = -1;
451 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
452 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
453 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
454 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
455 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
456 current_gdbarch->deprecated_register_byte = generic_register_byte;
457 current_gdbarch->deprecated_register_raw_size = generic_register_size;
458 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
459 current_gdbarch->deprecated_fp_regnum = -1;
460 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
461 current_gdbarch->print_registers_info = default_print_registers_info;
462 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
463 current_gdbarch->cannot_fetch_register = cannot_register_not;
464 current_gdbarch->cannot_store_register = cannot_register_not;
465 current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
466 current_gdbarch->convert_register_p = legacy_convert_register_p;
467 current_gdbarch->register_to_value = legacy_register_to_value;
468 current_gdbarch->value_to_register = legacy_value_to_register;
469 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
470 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
471 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
472 current_gdbarch->extract_return_value = legacy_extract_return_value;
473 current_gdbarch->store_return_value = legacy_store_return_value;
474 current_gdbarch->use_struct_convention = generic_use_struct_convention;
475 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
476 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
477 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
478 current_gdbarch->deprecated_frame_args_address = get_frame_base;
479 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
480 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
481 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
482 current_gdbarch->addr_bits_remove = core_addr_identity;
483 current_gdbarch->smash_text_address = core_addr_identity;
484 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
485 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
486 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
487 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
488 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
489 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
490 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
491 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
492 current_gdbarch->name_of_malloc = "malloc";
493 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
494 /* gdbarch_alloc() */
496 return current_gdbarch;
500 /* Allocate extra space using the per-architecture obstack. */
503 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
505 void *data = obstack_alloc (arch->obstack, size);
506 memset (data, 0, size);
511 /* Free a gdbarch struct. This should never happen in normal
512 operation --- once you've created a gdbarch, you keep it around.
513 However, if an architecture's init function encounters an error
514 building the structure, it may need to clean up a partially
515 constructed gdbarch. */
518 gdbarch_free (struct gdbarch *arch)
520 struct obstack *obstack;
521 gdb_assert (arch != NULL);
522 gdb_assert (!arch->initialized_p);
523 obstack = arch->obstack;
524 obstack_free (obstack, 0); /* Includes the ARCH. */
529 /* Ensure that all values in a GDBARCH are reasonable. */
531 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
532 just happens to match the global variable ``current_gdbarch''. That
533 way macros refering to that variable get the local and not the global
534 version - ulgh. Once everything is parameterised with gdbarch, this
538 verify_gdbarch (struct gdbarch *current_gdbarch)
541 struct cleanup *cleanups;
544 log = mem_fileopen ();
545 cleanups = make_cleanup_ui_file_delete (log);
547 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
548 fprintf_unfiltered (log, "\n\tbyte-order");
549 if (current_gdbarch->bfd_arch_info == NULL)
550 fprintf_unfiltered (log, "\n\tbfd_arch_info");
551 /* Check those that need to be defined for the given multi-arch level. */
552 /* Skip verify of short_bit, invalid_p == 0 */
553 /* Skip verify of int_bit, invalid_p == 0 */
554 /* Skip verify of long_bit, invalid_p == 0 */
555 /* Skip verify of long_long_bit, invalid_p == 0 */
556 /* Skip verify of float_bit, invalid_p == 0 */
557 /* Skip verify of double_bit, invalid_p == 0 */
558 /* Skip verify of long_double_bit, invalid_p == 0 */
559 /* Skip verify of ptr_bit, invalid_p == 0 */
560 if (current_gdbarch->addr_bit == 0)
561 current_gdbarch->addr_bit = TARGET_PTR_BIT;
562 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
563 if (current_gdbarch->char_signed == -1)
564 current_gdbarch->char_signed = 1;
565 /* Skip verify of read_pc, has predicate */
566 /* Skip verify of write_pc, invalid_p == 0 */
567 /* Skip verify of read_sp, has predicate */
568 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
569 /* Skip verify of pseudo_register_read, has predicate */
570 /* Skip verify of pseudo_register_write, has predicate */
571 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
572 && (current_gdbarch->num_regs == -1))
573 fprintf_unfiltered (log, "\n\tnum_regs");
574 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
575 /* Skip verify of sp_regnum, invalid_p == 0 */
576 /* Skip verify of pc_regnum, invalid_p == 0 */
577 /* Skip verify of ps_regnum, invalid_p == 0 */
578 /* Skip verify of fp0_regnum, invalid_p == 0 */
579 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
580 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
581 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
582 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
583 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
584 /* Skip verify of register_type, has predicate */
585 /* Skip verify of deprecated_register_virtual_type, has predicate */
586 /* Skip verify of deprecated_register_byte, has predicate */
587 /* Skip verify of deprecated_register_raw_size, has predicate */
588 /* Skip verify of deprecated_register_virtual_size, has predicate */
589 /* Skip verify of deprecated_max_register_raw_size, has predicate */
590 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
591 /* Skip verify of unwind_dummy_id, has predicate */
592 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
593 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
594 /* Skip verify of deprecated_target_read_fp, has predicate */
595 /* Skip verify of push_dummy_call, has predicate */
596 /* Skip verify of deprecated_push_arguments, has predicate */
597 /* Skip verify of deprecated_push_return_address, has predicate */
598 /* Skip verify of deprecated_dummy_write_sp, has predicate */
599 /* Skip verify of call_dummy_location, invalid_p == 0 */
600 /* Skip verify of push_dummy_code, has predicate */
601 /* Skip verify of deprecated_do_registers_info, has predicate */
602 /* Skip verify of print_registers_info, invalid_p == 0 */
603 /* Skip verify of print_float_info, has predicate */
604 /* Skip verify of print_vector_info, has predicate */
605 /* Skip verify of register_sim_regno, invalid_p == 0 */
606 /* Skip verify of register_bytes_ok, has predicate */
607 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
608 /* Skip verify of cannot_store_register, invalid_p == 0 */
609 /* Skip verify of get_longjmp_target, has predicate */
610 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
611 /* Skip verify of deprecated_init_frame_pc, has predicate */
612 /* Skip verify of deprecated_get_saved_register, has predicate */
613 /* Skip verify of convert_register_p, invalid_p == 0 */
614 /* Skip verify of register_to_value, invalid_p == 0 */
615 /* Skip verify of value_to_register, invalid_p == 0 */
616 /* Skip verify of pointer_to_address, invalid_p == 0 */
617 /* Skip verify of address_to_pointer, invalid_p == 0 */
618 /* Skip verify of integer_to_address, has predicate */
619 /* Skip verify of deprecated_pop_frame, has predicate */
620 /* Skip verify of deprecated_store_struct_return, has predicate */
621 /* Skip verify of return_value, has predicate */
622 /* Skip verify of return_value_on_stack, invalid_p == 0 */
623 /* Skip verify of extract_return_value, invalid_p == 0 */
624 /* Skip verify of store_return_value, invalid_p == 0 */
625 /* Skip verify of use_struct_convention, invalid_p == 0 */
626 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
627 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
628 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
629 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
630 && (current_gdbarch->skip_prologue == 0))
631 fprintf_unfiltered (log, "\n\tskip_prologue");
632 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
633 && (current_gdbarch->inner_than == 0))
634 fprintf_unfiltered (log, "\n\tinner_than");
635 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
636 && (current_gdbarch->breakpoint_from_pc == 0))
637 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
638 /* Skip verify of adjust_breakpoint_address, has predicate */
639 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
640 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
641 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
642 /* Skip verify of function_start_offset, invalid_p == 0 */
643 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
644 /* Skip verify of frame_args_skip, invalid_p == 0 */
645 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
646 /* Skip verify of deprecated_frame_chain, has predicate */
647 /* Skip verify of deprecated_frame_chain_valid, has predicate */
648 /* Skip verify of deprecated_frame_saved_pc, has predicate */
649 /* Skip verify of unwind_pc, has predicate */
650 /* Skip verify of unwind_sp, has predicate */
651 /* Skip verify of deprecated_frame_args_address, has predicate */
652 /* Skip verify of deprecated_frame_locals_address, has predicate */
653 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
654 /* Skip verify of frame_num_args, has predicate */
655 /* Skip verify of deprecated_stack_align, has predicate */
656 /* Skip verify of frame_align, has predicate */
657 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
658 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
659 if (current_gdbarch->float_format == 0)
660 current_gdbarch->float_format = default_float_format (current_gdbarch);
661 if (current_gdbarch->double_format == 0)
662 current_gdbarch->double_format = default_double_format (current_gdbarch);
663 if (current_gdbarch->long_double_format == 0)
664 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
665 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
666 /* Skip verify of addr_bits_remove, invalid_p == 0 */
667 /* Skip verify of smash_text_address, invalid_p == 0 */
668 /* Skip verify of software_single_step, has predicate */
669 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
670 && (current_gdbarch->print_insn == 0))
671 fprintf_unfiltered (log, "\n\tprint_insn");
672 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
673 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
674 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
675 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
676 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
677 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
678 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
679 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
680 /* Skip verify of name_of_malloc, invalid_p == 0 */
681 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
682 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
683 /* Skip verify of address_class_type_flags, has predicate */
684 /* Skip verify of address_class_type_flags_to_name, has predicate */
685 /* Skip verify of address_class_name_to_type_flags, has predicate */
686 /* Skip verify of register_reggroup_p, invalid_p == 0 */
687 /* Skip verify of fetch_pointer_argument, has predicate */
688 /* Skip verify of regset_from_core_section, has predicate */
689 buf = ui_file_xstrdup (log, &dummy);
690 make_cleanup (xfree, buf);
691 if (strlen (buf) > 0)
692 internal_error (__FILE__, __LINE__,
693 "verify_gdbarch: the following are invalid ...%s",
695 do_cleanups (cleanups);
699 /* Print out the details of the current architecture. */
701 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
702 just happens to match the global variable ``current_gdbarch''. That
703 way macros refering to that variable get the local and not the global
704 version - ulgh. Once everything is parameterised with gdbarch, this
708 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
710 fprintf_unfiltered (file,
711 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
713 fprintf_unfiltered (file,
714 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
715 (long) current_gdbarch->convert_from_func_ptr_addr);
716 fprintf_unfiltered (file,
717 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
718 gdbarch_frame_align_p (current_gdbarch));
719 fprintf_unfiltered (file,
720 "gdbarch_dump: frame_align = 0x%08lx\n",
721 (long) current_gdbarch->frame_align);
722 fprintf_unfiltered (file,
723 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
724 gdbarch_regset_from_core_section_p (current_gdbarch));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
727 (long) current_gdbarch->regset_from_core_section);
728 fprintf_unfiltered (file,
729 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
730 gdbarch_return_value_p (current_gdbarch));
731 fprintf_unfiltered (file,
732 "gdbarch_dump: return_value = 0x%08lx\n",
733 (long) current_gdbarch->return_value);
734 fprintf_unfiltered (file,
735 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
736 (long) current_gdbarch->in_function_epilogue_p);
737 fprintf_unfiltered (file,
738 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
739 (long) current_gdbarch->register_reggroup_p);
740 fprintf_unfiltered (file,
741 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
742 (long) current_gdbarch->stabs_argument_has_addr);
743 fprintf_unfiltered (file,
744 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
745 gdbarch_pseudo_register_read_p (current_gdbarch));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
748 (long) current_gdbarch->pseudo_register_read);
749 fprintf_unfiltered (file,
750 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
751 gdbarch_pseudo_register_write_p (current_gdbarch));
752 fprintf_unfiltered (file,
753 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
754 (long) current_gdbarch->pseudo_register_write);
755 fprintf_unfiltered (file,
756 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
757 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
760 (long) current_gdbarch->address_class_name_to_type_flags);
761 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
762 fprintf_unfiltered (file,
763 "gdbarch_dump: %s # %s\n",
764 "ADDRESS_CLASS_TYPE_FLAGS_P()",
765 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
766 fprintf_unfiltered (file,
767 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
768 ADDRESS_CLASS_TYPE_FLAGS_P ());
770 #ifdef ADDRESS_CLASS_TYPE_FLAGS
771 fprintf_unfiltered (file,
772 "gdbarch_dump: %s # %s\n",
773 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
774 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
775 fprintf_unfiltered (file,
776 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
777 (long) current_gdbarch->address_class_type_flags
778 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
780 fprintf_unfiltered (file,
781 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
782 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
785 (long) current_gdbarch->address_class_type_flags_to_name);
786 #ifdef ADDRESS_TO_POINTER
787 fprintf_unfiltered (file,
788 "gdbarch_dump: %s # %s\n",
789 "ADDRESS_TO_POINTER(type, buf, addr)",
790 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
793 (long) current_gdbarch->address_to_pointer
794 /*ADDRESS_TO_POINTER ()*/);
796 #ifdef ADDR_BITS_REMOVE
797 fprintf_unfiltered (file,
798 "gdbarch_dump: %s # %s\n",
799 "ADDR_BITS_REMOVE(addr)",
800 XSTRING (ADDR_BITS_REMOVE (addr)));
801 fprintf_unfiltered (file,
802 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
803 (long) current_gdbarch->addr_bits_remove
804 /*ADDR_BITS_REMOVE ()*/);
806 fprintf_unfiltered (file,
807 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
808 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
811 (long) current_gdbarch->adjust_breakpoint_address);
812 #ifdef BELIEVE_PCC_PROMOTION
813 fprintf_unfiltered (file,
814 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
815 XSTRING (BELIEVE_PCC_PROMOTION));
816 fprintf_unfiltered (file,
817 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
818 BELIEVE_PCC_PROMOTION);
820 #ifdef BREAKPOINT_FROM_PC
821 fprintf_unfiltered (file,
822 "gdbarch_dump: %s # %s\n",
823 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
824 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
825 fprintf_unfiltered (file,
826 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
827 (long) current_gdbarch->breakpoint_from_pc
828 /*BREAKPOINT_FROM_PC ()*/);
830 #ifdef CALL_DUMMY_LOCATION
831 fprintf_unfiltered (file,
832 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
833 XSTRING (CALL_DUMMY_LOCATION));
834 fprintf_unfiltered (file,
835 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
836 CALL_DUMMY_LOCATION);
838 #ifdef CANNOT_FETCH_REGISTER
839 fprintf_unfiltered (file,
840 "gdbarch_dump: %s # %s\n",
841 "CANNOT_FETCH_REGISTER(regnum)",
842 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
843 fprintf_unfiltered (file,
844 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
845 (long) current_gdbarch->cannot_fetch_register
846 /*CANNOT_FETCH_REGISTER ()*/);
848 #ifdef CANNOT_STEP_BREAKPOINT
849 fprintf_unfiltered (file,
850 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
851 XSTRING (CANNOT_STEP_BREAKPOINT));
852 fprintf_unfiltered (file,
853 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
854 CANNOT_STEP_BREAKPOINT);
856 #ifdef CANNOT_STORE_REGISTER
857 fprintf_unfiltered (file,
858 "gdbarch_dump: %s # %s\n",
859 "CANNOT_STORE_REGISTER(regnum)",
860 XSTRING (CANNOT_STORE_REGISTER (regnum)));
861 fprintf_unfiltered (file,
862 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
863 (long) current_gdbarch->cannot_store_register
864 /*CANNOT_STORE_REGISTER ()*/);
866 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
867 fprintf_unfiltered (file,
868 "gdbarch_dump: %s # %s\n",
869 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
870 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
873 (long) current_gdbarch->coff_make_msymbol_special
874 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
876 fprintf_unfiltered (file,
877 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
878 (long) current_gdbarch->construct_inferior_arguments);
879 #ifdef CONVERT_REGISTER_P
880 fprintf_unfiltered (file,
881 "gdbarch_dump: %s # %s\n",
882 "CONVERT_REGISTER_P(regnum, type)",
883 XSTRING (CONVERT_REGISTER_P (regnum, type)));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
886 (long) current_gdbarch->convert_register_p
887 /*CONVERT_REGISTER_P ()*/);
889 #ifdef DECR_PC_AFTER_BREAK
890 fprintf_unfiltered (file,
891 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
892 XSTRING (DECR_PC_AFTER_BREAK));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
895 (long) DECR_PC_AFTER_BREAK);
897 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
898 fprintf_unfiltered (file,
899 "gdbarch_dump: %s # %s\n",
900 "DEPRECATED_DO_REGISTERS_INFO_P()",
901 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
904 DEPRECATED_DO_REGISTERS_INFO_P ());
906 #ifdef DEPRECATED_DO_REGISTERS_INFO
907 fprintf_unfiltered (file,
908 "gdbarch_dump: %s # %s\n",
909 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
910 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
913 (long) current_gdbarch->deprecated_do_registers_info
914 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
916 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
917 fprintf_unfiltered (file,
918 "gdbarch_dump: %s # %s\n",
919 "DEPRECATED_DUMMY_WRITE_SP_P()",
920 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
921 fprintf_unfiltered (file,
922 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
923 DEPRECATED_DUMMY_WRITE_SP_P ());
925 #ifdef DEPRECATED_DUMMY_WRITE_SP
926 fprintf_unfiltered (file,
927 "gdbarch_dump: %s # %s\n",
928 "DEPRECATED_DUMMY_WRITE_SP(val)",
929 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
930 fprintf_unfiltered (file,
931 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
932 (long) current_gdbarch->deprecated_dummy_write_sp
933 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
935 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
936 fprintf_unfiltered (file,
937 "gdbarch_dump: %s # %s\n",
938 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
939 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
942 (long) current_gdbarch->deprecated_extract_return_value
943 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
945 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
946 fprintf_unfiltered (file,
947 "gdbarch_dump: %s # %s\n",
948 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
949 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
952 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
954 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
955 fprintf_unfiltered (file,
956 "gdbarch_dump: %s # %s\n",
957 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
958 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
961 (long) current_gdbarch->deprecated_extract_struct_value_address
962 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
964 #ifdef DEPRECATED_FP_REGNUM
965 fprintf_unfiltered (file,
966 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
967 XSTRING (DEPRECATED_FP_REGNUM));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
970 DEPRECATED_FP_REGNUM);
972 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
973 fprintf_unfiltered (file,
974 "gdbarch_dump: %s # %s\n",
975 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
976 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
979 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
981 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
982 fprintf_unfiltered (file,
983 "gdbarch_dump: %s # %s\n",
984 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
985 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
988 (long) current_gdbarch->deprecated_frameless_function_invocation
989 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
991 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
992 fprintf_unfiltered (file,
993 "gdbarch_dump: %s # %s\n",
994 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
995 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
996 fprintf_unfiltered (file,
997 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
998 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1000 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: %s # %s\n",
1003 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1004 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1007 (long) current_gdbarch->deprecated_frame_args_address
1008 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1010 #ifdef DEPRECATED_FRAME_CHAIN_P
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: %s # %s\n",
1013 "DEPRECATED_FRAME_CHAIN_P()",
1014 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1017 DEPRECATED_FRAME_CHAIN_P ());
1019 #ifdef DEPRECATED_FRAME_CHAIN
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: %s # %s\n",
1022 "DEPRECATED_FRAME_CHAIN(frame)",
1023 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1026 (long) current_gdbarch->deprecated_frame_chain
1027 /*DEPRECATED_FRAME_CHAIN ()*/);
1029 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: %s # %s\n",
1032 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1033 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1036 DEPRECATED_FRAME_CHAIN_VALID_P ());
1038 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: %s # %s\n",
1041 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1042 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1045 (long) current_gdbarch->deprecated_frame_chain_valid
1046 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1048 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: %s # %s\n",
1051 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1052 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1055 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1057 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: %s # %s\n",
1060 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1061 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1064 (long) current_gdbarch->deprecated_frame_init_saved_regs
1065 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1067 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: %s # %s\n",
1070 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1071 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1074 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1076 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: %s # %s\n",
1079 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1080 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1083 (long) current_gdbarch->deprecated_frame_locals_address
1084 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1086 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: %s # %s\n",
1089 "DEPRECATED_FRAME_SAVED_PC_P()",
1090 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1093 DEPRECATED_FRAME_SAVED_PC_P ());
1095 #ifdef DEPRECATED_FRAME_SAVED_PC
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: %s # %s\n",
1098 "DEPRECATED_FRAME_SAVED_PC(fi)",
1099 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1102 (long) current_gdbarch->deprecated_frame_saved_pc
1103 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1105 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_GET_SAVED_REGISTER_P()",
1109 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1112 DEPRECATED_GET_SAVED_REGISTER_P ());
1114 #ifdef DEPRECATED_GET_SAVED_REGISTER
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: %s # %s\n",
1117 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1118 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1121 (long) current_gdbarch->deprecated_get_saved_register
1122 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1124 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: %s # %s\n",
1127 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1128 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1131 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1133 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: %s # %s\n",
1136 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1137 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1140 (long) current_gdbarch->deprecated_init_extra_frame_info
1141 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1143 #ifdef DEPRECATED_INIT_FRAME_PC_P
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: %s # %s\n",
1146 "DEPRECATED_INIT_FRAME_PC_P()",
1147 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1150 DEPRECATED_INIT_FRAME_PC_P ());
1152 #ifdef DEPRECATED_INIT_FRAME_PC
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: %s # %s\n",
1155 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1156 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1159 (long) current_gdbarch->deprecated_init_frame_pc
1160 /*DEPRECATED_INIT_FRAME_PC ()*/);
1162 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: %s # %s\n",
1165 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1166 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1169 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1171 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1174 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1177 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1179 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: %s # %s\n",
1182 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1183 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1186 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1188 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1191 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1194 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1196 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: %s # %s\n",
1199 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1200 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1203 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1205 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: %s # %s\n",
1208 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1209 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1212 (long) current_gdbarch->deprecated_pc_in_call_dummy
1213 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1215 #ifdef DEPRECATED_POP_FRAME_P
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: %s # %s\n",
1218 "DEPRECATED_POP_FRAME_P()",
1219 XSTRING (DEPRECATED_POP_FRAME_P ()));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1222 DEPRECATED_POP_FRAME_P ());
1224 #ifdef DEPRECATED_POP_FRAME
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: %s # %s\n",
1227 "DEPRECATED_POP_FRAME(-)",
1228 XSTRING (DEPRECATED_POP_FRAME (-)));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1231 (long) current_gdbarch->deprecated_pop_frame
1232 /*DEPRECATED_POP_FRAME ()*/);
1234 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: %s # %s\n",
1237 "DEPRECATED_PUSH_ARGUMENTS_P()",
1238 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1241 DEPRECATED_PUSH_ARGUMENTS_P ());
1243 #ifdef DEPRECATED_PUSH_ARGUMENTS
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: %s # %s\n",
1246 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1247 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1250 (long) current_gdbarch->deprecated_push_arguments
1251 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1253 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1257 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1260 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1262 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1263 fprintf_unfiltered (file,
1264 "gdbarch_dump: %s # %s\n",
1265 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1266 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1267 fprintf_unfiltered (file,
1268 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1269 (long) current_gdbarch->deprecated_push_return_address
1270 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1272 #ifdef DEPRECATED_REGISTER_BYTE_P
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "DEPRECATED_REGISTER_BYTE_P()",
1276 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1279 DEPRECATED_REGISTER_BYTE_P ());
1281 #ifdef DEPRECATED_REGISTER_BYTE
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1285 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1288 (long) current_gdbarch->deprecated_register_byte
1289 /*DEPRECATED_REGISTER_BYTE ()*/);
1291 #ifdef DEPRECATED_REGISTER_BYTES
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1294 XSTRING (DEPRECATED_REGISTER_BYTES));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1297 DEPRECATED_REGISTER_BYTES);
1299 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: %s # %s\n",
1302 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1303 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1306 DEPRECATED_REGISTER_RAW_SIZE_P ());
1308 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: %s # %s\n",
1311 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1312 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1315 (long) current_gdbarch->deprecated_register_raw_size
1316 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1318 #ifdef DEPRECATED_REGISTER_SIZE
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1321 XSTRING (DEPRECATED_REGISTER_SIZE));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1324 DEPRECATED_REGISTER_SIZE);
1326 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: %s # %s\n",
1329 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1330 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1333 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1335 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: %s # %s\n",
1338 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1339 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1342 (long) current_gdbarch->deprecated_register_virtual_size
1343 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1345 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: %s # %s\n",
1348 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1349 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1352 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1354 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: %s # %s\n",
1357 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1358 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1359 fprintf_unfiltered (file,
1360 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1361 (long) current_gdbarch->deprecated_register_virtual_type
1362 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1364 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: %s # %s\n",
1367 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1368 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1371 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1373 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1374 fprintf_unfiltered (file,
1375 "gdbarch_dump: %s # %s\n",
1376 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1377 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1380 (long) current_gdbarch->deprecated_reg_struct_has_addr
1381 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1383 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: %s # %s\n",
1386 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1387 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1390 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1392 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: %s # %s\n",
1395 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1396 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1399 (long) current_gdbarch->deprecated_saved_pc_after_call
1400 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1402 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: %s # %s\n",
1405 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1406 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1409 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1411 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: %s # %s\n",
1414 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1415 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1418 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1419 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1421 #ifdef DEPRECATED_STACK_ALIGN_P
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: %s # %s\n",
1424 "DEPRECATED_STACK_ALIGN_P()",
1425 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1428 DEPRECATED_STACK_ALIGN_P ());
1430 #ifdef DEPRECATED_STACK_ALIGN
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: %s # %s\n",
1433 "DEPRECATED_STACK_ALIGN(sp)",
1434 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1437 (long) current_gdbarch->deprecated_stack_align
1438 /*DEPRECATED_STACK_ALIGN ()*/);
1440 #ifdef DEPRECATED_STORE_RETURN_VALUE
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: %s # %s\n",
1443 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1444 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1447 (long) current_gdbarch->deprecated_store_return_value
1448 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1450 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: %s # %s\n",
1453 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1454 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1457 DEPRECATED_STORE_STRUCT_RETURN_P ());
1459 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: %s # %s\n",
1462 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1463 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1464 fprintf_unfiltered (file,
1465 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1466 (long) current_gdbarch->deprecated_store_struct_return
1467 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1469 #ifdef DEPRECATED_TARGET_READ_FP_P
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: %s # %s\n",
1472 "DEPRECATED_TARGET_READ_FP_P()",
1473 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1474 fprintf_unfiltered (file,
1475 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1476 DEPRECATED_TARGET_READ_FP_P ());
1478 #ifdef DEPRECATED_TARGET_READ_FP
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: %s # %s\n",
1481 "DEPRECATED_TARGET_READ_FP()",
1482 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1485 (long) current_gdbarch->deprecated_target_read_fp
1486 /*DEPRECATED_TARGET_READ_FP ()*/);
1488 #ifdef DWARF2_REG_TO_REGNUM
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: %s # %s\n",
1491 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1492 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1495 (long) current_gdbarch->dwarf2_reg_to_regnum
1496 /*DWARF2_REG_TO_REGNUM ()*/);
1498 #ifdef DWARF_REG_TO_REGNUM
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: %s # %s\n",
1501 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1502 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1505 (long) current_gdbarch->dwarf_reg_to_regnum
1506 /*DWARF_REG_TO_REGNUM ()*/);
1508 #ifdef ECOFF_REG_TO_REGNUM
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: %s # %s\n",
1511 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1512 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1515 (long) current_gdbarch->ecoff_reg_to_regnum
1516 /*ECOFF_REG_TO_REGNUM ()*/);
1518 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1519 fprintf_unfiltered (file,
1520 "gdbarch_dump: %s # %s\n",
1521 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1522 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1525 (long) current_gdbarch->elf_make_msymbol_special
1526 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1528 #ifdef EXTRACT_RETURN_VALUE
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: %s # %s\n",
1531 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1532 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1535 (long) current_gdbarch->extract_return_value
1536 /*EXTRACT_RETURN_VALUE ()*/);
1538 #ifdef FETCH_POINTER_ARGUMENT_P
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: %s # %s\n",
1541 "FETCH_POINTER_ARGUMENT_P()",
1542 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1545 FETCH_POINTER_ARGUMENT_P ());
1547 #ifdef FETCH_POINTER_ARGUMENT
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: %s # %s\n",
1550 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1551 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1552 fprintf_unfiltered (file,
1553 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1554 (long) current_gdbarch->fetch_pointer_argument
1555 /*FETCH_POINTER_ARGUMENT ()*/);
1558 fprintf_unfiltered (file,
1559 "gdbarch_dump: FP0_REGNUM # %s\n",
1560 XSTRING (FP0_REGNUM));
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: FP0_REGNUM = %d\n",
1565 #ifdef FRAME_ARGS_SKIP
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1568 XSTRING (FRAME_ARGS_SKIP));
1569 fprintf_unfiltered (file,
1570 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1571 (long) FRAME_ARGS_SKIP);
1573 #ifdef FRAME_NUM_ARGS_P
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: %s # %s\n",
1576 "FRAME_NUM_ARGS_P()",
1577 XSTRING (FRAME_NUM_ARGS_P ()));
1578 fprintf_unfiltered (file,
1579 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1580 FRAME_NUM_ARGS_P ());
1582 #ifdef FRAME_NUM_ARGS
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: %s # %s\n",
1585 "FRAME_NUM_ARGS(frame)",
1586 XSTRING (FRAME_NUM_ARGS (frame)));
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1589 (long) current_gdbarch->frame_num_args
1590 /*FRAME_NUM_ARGS ()*/);
1592 #ifdef FRAME_RED_ZONE_SIZE
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1595 XSTRING (FRAME_RED_ZONE_SIZE));
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1598 FRAME_RED_ZONE_SIZE);
1600 #ifdef FUNCTION_START_OFFSET
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1603 XSTRING (FUNCTION_START_OFFSET));
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1606 (long) FUNCTION_START_OFFSET);
1608 #ifdef GET_LONGJMP_TARGET_P
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: %s # %s\n",
1611 "GET_LONGJMP_TARGET_P()",
1612 XSTRING (GET_LONGJMP_TARGET_P ()));
1613 fprintf_unfiltered (file,
1614 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1615 GET_LONGJMP_TARGET_P ());
1617 #ifdef GET_LONGJMP_TARGET
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: %s # %s\n",
1620 "GET_LONGJMP_TARGET(pc)",
1621 XSTRING (GET_LONGJMP_TARGET (pc)));
1622 fprintf_unfiltered (file,
1623 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1624 (long) current_gdbarch->get_longjmp_target
1625 /*GET_LONGJMP_TARGET ()*/);
1627 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1628 fprintf_unfiltered (file,
1629 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1630 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1633 HAVE_NONSTEPPABLE_WATCHPOINT);
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: %s # %s\n",
1638 "INNER_THAN(lhs, rhs)",
1639 XSTRING (INNER_THAN (lhs, rhs)));
1640 fprintf_unfiltered (file,
1641 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1642 (long) current_gdbarch->inner_than
1645 #ifdef INTEGER_TO_ADDRESS_P
1646 fprintf_unfiltered (file,
1647 "gdbarch_dump: %s # %s\n",
1648 "INTEGER_TO_ADDRESS_P()",
1649 XSTRING (INTEGER_TO_ADDRESS_P ()));
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1652 INTEGER_TO_ADDRESS_P ());
1654 #ifdef INTEGER_TO_ADDRESS
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: %s # %s\n",
1657 "INTEGER_TO_ADDRESS(type, buf)",
1658 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1661 (long) current_gdbarch->integer_to_address
1662 /*INTEGER_TO_ADDRESS ()*/);
1664 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1665 fprintf_unfiltered (file,
1666 "gdbarch_dump: %s # %s\n",
1667 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1668 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1671 (long) current_gdbarch->in_solib_call_trampoline
1672 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1674 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: %s # %s\n",
1677 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1678 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1679 fprintf_unfiltered (file,
1680 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1681 (long) current_gdbarch->in_solib_return_trampoline
1682 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1684 #ifdef MEMORY_INSERT_BREAKPOINT
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: %s # %s\n",
1687 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1688 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1689 fprintf_unfiltered (file,
1690 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1691 (long) current_gdbarch->memory_insert_breakpoint
1692 /*MEMORY_INSERT_BREAKPOINT ()*/);
1694 #ifdef MEMORY_REMOVE_BREAKPOINT
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: %s # %s\n",
1697 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1698 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1701 (long) current_gdbarch->memory_remove_breakpoint
1702 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1704 #ifdef NAME_OF_MALLOC
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1707 XSTRING (NAME_OF_MALLOC));
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1712 #ifdef NUM_PSEUDO_REGS
1713 fprintf_unfiltered (file,
1714 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1715 XSTRING (NUM_PSEUDO_REGS));
1716 fprintf_unfiltered (file,
1717 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: NUM_REGS # %s\n",
1723 XSTRING (NUM_REGS));
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: NUM_REGS = %d\n",
1729 fprintf_unfiltered (file,
1730 "gdbarch_dump: PC_REGNUM # %s\n",
1731 XSTRING (PC_REGNUM));
1732 fprintf_unfiltered (file,
1733 "gdbarch_dump: PC_REGNUM = %d\n",
1736 #ifdef POINTER_TO_ADDRESS
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: %s # %s\n",
1739 "POINTER_TO_ADDRESS(type, buf)",
1740 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1743 (long) current_gdbarch->pointer_to_address
1744 /*POINTER_TO_ADDRESS ()*/);
1746 fprintf_unfiltered (file,
1747 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1748 gdbarch_print_float_info_p (current_gdbarch));
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: print_float_info = 0x%08lx\n",
1751 (long) current_gdbarch->print_float_info);
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1754 (long) current_gdbarch->print_registers_info);
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1757 gdbarch_print_vector_info_p (current_gdbarch));
1758 fprintf_unfiltered (file,
1759 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1760 (long) current_gdbarch->print_vector_info);
1762 fprintf_unfiltered (file,
1763 "gdbarch_dump: PS_REGNUM # %s\n",
1764 XSTRING (PS_REGNUM));
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: PS_REGNUM = %d\n",
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1771 gdbarch_push_dummy_call_p (current_gdbarch));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1774 (long) current_gdbarch->push_dummy_call);
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1777 gdbarch_push_dummy_code_p (current_gdbarch));
1778 fprintf_unfiltered (file,
1779 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1780 (long) current_gdbarch->push_dummy_code);
1781 #ifdef REGISTER_BYTES_OK_P
1782 fprintf_unfiltered (file,
1783 "gdbarch_dump: %s # %s\n",
1784 "REGISTER_BYTES_OK_P()",
1785 XSTRING (REGISTER_BYTES_OK_P ()));
1786 fprintf_unfiltered (file,
1787 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1788 REGISTER_BYTES_OK_P ());
1790 #ifdef REGISTER_BYTES_OK
1791 fprintf_unfiltered (file,
1792 "gdbarch_dump: %s # %s\n",
1793 "REGISTER_BYTES_OK(nr_bytes)",
1794 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1795 fprintf_unfiltered (file,
1796 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1797 (long) current_gdbarch->register_bytes_ok
1798 /*REGISTER_BYTES_OK ()*/);
1800 #ifdef REGISTER_NAME
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: %s # %s\n",
1803 "REGISTER_NAME(regnr)",
1804 XSTRING (REGISTER_NAME (regnr)));
1805 fprintf_unfiltered (file,
1806 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1807 (long) current_gdbarch->register_name
1808 /*REGISTER_NAME ()*/);
1810 #ifdef REGISTER_SIM_REGNO
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: %s # %s\n",
1813 "REGISTER_SIM_REGNO(reg_nr)",
1814 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1817 (long) current_gdbarch->register_sim_regno
1818 /*REGISTER_SIM_REGNO ()*/);
1820 #ifdef REGISTER_TO_VALUE
1821 fprintf_unfiltered (file,
1822 "gdbarch_dump: %s # %s\n",
1823 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1824 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1825 fprintf_unfiltered (file,
1826 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1827 (long) current_gdbarch->register_to_value
1828 /*REGISTER_TO_VALUE ()*/);
1830 fprintf_unfiltered (file,
1831 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1832 gdbarch_register_type_p (current_gdbarch));
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: register_type = 0x%08lx\n",
1835 (long) current_gdbarch->register_type);
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1838 (long) current_gdbarch->remote_translate_xfer_address);
1839 #ifdef RETURN_VALUE_ON_STACK
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: %s # %s\n",
1842 "RETURN_VALUE_ON_STACK(type)",
1843 XSTRING (RETURN_VALUE_ON_STACK (type)));
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1846 (long) current_gdbarch->return_value_on_stack
1847 /*RETURN_VALUE_ON_STACK ()*/);
1849 #ifdef SDB_REG_TO_REGNUM
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: %s # %s\n",
1852 "SDB_REG_TO_REGNUM(sdb_regnr)",
1853 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1854 fprintf_unfiltered (file,
1855 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1856 (long) current_gdbarch->sdb_reg_to_regnum
1857 /*SDB_REG_TO_REGNUM ()*/);
1859 #ifdef SKIP_PROLOGUE
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: %s # %s\n",
1862 "SKIP_PROLOGUE(ip)",
1863 XSTRING (SKIP_PROLOGUE (ip)));
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1866 (long) current_gdbarch->skip_prologue
1867 /*SKIP_PROLOGUE ()*/);
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1871 (long) current_gdbarch->skip_solib_resolver);
1872 #ifdef SKIP_TRAMPOLINE_CODE
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: %s # %s\n",
1875 "SKIP_TRAMPOLINE_CODE(pc)",
1876 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1879 (long) current_gdbarch->skip_trampoline_code
1880 /*SKIP_TRAMPOLINE_CODE ()*/);
1882 #ifdef SMASH_TEXT_ADDRESS
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: %s # %s\n",
1885 "SMASH_TEXT_ADDRESS(addr)",
1886 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1889 (long) current_gdbarch->smash_text_address
1890 /*SMASH_TEXT_ADDRESS ()*/);
1892 #ifdef SOFTWARE_SINGLE_STEP_P
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: %s # %s\n",
1895 "SOFTWARE_SINGLE_STEP_P()",
1896 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1899 SOFTWARE_SINGLE_STEP_P ());
1901 #ifdef SOFTWARE_SINGLE_STEP
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: %s # %s\n",
1904 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1905 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1908 (long) current_gdbarch->software_single_step
1909 /*SOFTWARE_SINGLE_STEP ()*/);
1912 fprintf_unfiltered (file,
1913 "gdbarch_dump: SP_REGNUM # %s\n",
1914 XSTRING (SP_REGNUM));
1915 fprintf_unfiltered (file,
1916 "gdbarch_dump: SP_REGNUM = %d\n",
1919 #ifdef STAB_REG_TO_REGNUM
1920 fprintf_unfiltered (file,
1921 "gdbarch_dump: %s # %s\n",
1922 "STAB_REG_TO_REGNUM(stab_regnr)",
1923 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1926 (long) current_gdbarch->stab_reg_to_regnum
1927 /*STAB_REG_TO_REGNUM ()*/);
1929 #ifdef STORE_RETURN_VALUE
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: %s # %s\n",
1932 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1933 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1936 (long) current_gdbarch->store_return_value
1937 /*STORE_RETURN_VALUE ()*/);
1939 #ifdef TARGET_ADDR_BIT
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1942 XSTRING (TARGET_ADDR_BIT));
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1947 #ifdef TARGET_ARCHITECTURE
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1950 XSTRING (TARGET_ARCHITECTURE));
1951 if (TARGET_ARCHITECTURE != NULL)
1952 fprintf_unfiltered (file,
1953 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1954 TARGET_ARCHITECTURE->printable_name);
1956 #ifdef TARGET_BFD_VMA_BIT
1957 fprintf_unfiltered (file,
1958 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1959 XSTRING (TARGET_BFD_VMA_BIT));
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1962 TARGET_BFD_VMA_BIT);
1964 #ifdef TARGET_BYTE_ORDER
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1967 XSTRING (TARGET_BYTE_ORDER));
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1970 (long) TARGET_BYTE_ORDER);
1972 #ifdef TARGET_CHAR_SIGNED
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1975 XSTRING (TARGET_CHAR_SIGNED));
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1978 TARGET_CHAR_SIGNED);
1980 #ifdef TARGET_DOUBLE_BIT
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1983 XSTRING (TARGET_DOUBLE_BIT));
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1988 #ifdef TARGET_DOUBLE_FORMAT
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1991 XSTRING (TARGET_DOUBLE_FORMAT));
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
1994 (TARGET_DOUBLE_FORMAT)->name);
1996 #ifdef TARGET_FLOAT_BIT
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1999 XSTRING (TARGET_FLOAT_BIT));
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2004 #ifdef TARGET_FLOAT_FORMAT
2005 fprintf_unfiltered (file,
2006 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2007 XSTRING (TARGET_FLOAT_FORMAT));
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2010 (TARGET_FLOAT_FORMAT)->name);
2012 #ifdef TARGET_INT_BIT
2013 fprintf_unfiltered (file,
2014 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2015 XSTRING (TARGET_INT_BIT));
2016 fprintf_unfiltered (file,
2017 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2020 #ifdef TARGET_LONG_BIT
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2023 XSTRING (TARGET_LONG_BIT));
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2028 #ifdef TARGET_LONG_DOUBLE_BIT
2029 fprintf_unfiltered (file,
2030 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2031 XSTRING (TARGET_LONG_DOUBLE_BIT));
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2034 TARGET_LONG_DOUBLE_BIT);
2036 #ifdef TARGET_LONG_DOUBLE_FORMAT
2037 fprintf_unfiltered (file,
2038 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2039 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2042 (TARGET_LONG_DOUBLE_FORMAT)->name);
2044 #ifdef TARGET_LONG_LONG_BIT
2045 fprintf_unfiltered (file,
2046 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2047 XSTRING (TARGET_LONG_LONG_BIT));
2048 fprintf_unfiltered (file,
2049 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2050 TARGET_LONG_LONG_BIT);
2053 fprintf_unfiltered (file,
2054 "gdbarch_dump: TARGET_OSABI # %s\n",
2055 XSTRING (TARGET_OSABI));
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: TARGET_OSABI = %ld\n",
2058 (long) TARGET_OSABI);
2060 #ifdef TARGET_PRINT_INSN
2061 fprintf_unfiltered (file,
2062 "gdbarch_dump: %s # %s\n",
2063 "TARGET_PRINT_INSN(vma, info)",
2064 XSTRING (TARGET_PRINT_INSN (vma, info)));
2065 fprintf_unfiltered (file,
2066 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2067 (long) current_gdbarch->print_insn
2068 /*TARGET_PRINT_INSN ()*/);
2070 #ifdef TARGET_PTR_BIT
2071 fprintf_unfiltered (file,
2072 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2073 XSTRING (TARGET_PTR_BIT));
2074 fprintf_unfiltered (file,
2075 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2078 #ifdef TARGET_READ_PC_P
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: %s # %s\n",
2081 "TARGET_READ_PC_P()",
2082 XSTRING (TARGET_READ_PC_P ()));
2083 fprintf_unfiltered (file,
2084 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2085 TARGET_READ_PC_P ());
2087 #ifdef TARGET_READ_PC
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: %s # %s\n",
2090 "TARGET_READ_PC(ptid)",
2091 XSTRING (TARGET_READ_PC (ptid)));
2092 fprintf_unfiltered (file,
2093 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2094 (long) current_gdbarch->read_pc
2095 /*TARGET_READ_PC ()*/);
2097 #ifdef TARGET_READ_SP_P
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: %s # %s\n",
2100 "TARGET_READ_SP_P()",
2101 XSTRING (TARGET_READ_SP_P ()));
2102 fprintf_unfiltered (file,
2103 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2104 TARGET_READ_SP_P ());
2106 #ifdef TARGET_READ_SP
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: %s # %s\n",
2110 XSTRING (TARGET_READ_SP ()));
2111 fprintf_unfiltered (file,
2112 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2113 (long) current_gdbarch->read_sp
2114 /*TARGET_READ_SP ()*/);
2116 #ifdef TARGET_SHORT_BIT
2117 fprintf_unfiltered (file,
2118 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2119 XSTRING (TARGET_SHORT_BIT));
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2124 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2125 fprintf_unfiltered (file,
2126 "gdbarch_dump: %s # %s\n",
2127 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2128 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2131 (long) current_gdbarch->virtual_frame_pointer
2132 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2134 #ifdef TARGET_WRITE_PC
2135 fprintf_unfiltered (file,
2136 "gdbarch_dump: %s # %s\n",
2137 "TARGET_WRITE_PC(val, ptid)",
2138 XSTRING (TARGET_WRITE_PC (val, ptid)));
2139 fprintf_unfiltered (file,
2140 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2141 (long) current_gdbarch->write_pc
2142 /*TARGET_WRITE_PC ()*/);
2144 fprintf_unfiltered (file,
2145 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2146 gdbarch_unwind_dummy_id_p (current_gdbarch));
2147 fprintf_unfiltered (file,
2148 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2149 (long) current_gdbarch->unwind_dummy_id);
2150 fprintf_unfiltered (file,
2151 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2152 gdbarch_unwind_pc_p (current_gdbarch));
2153 fprintf_unfiltered (file,
2154 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2155 (long) current_gdbarch->unwind_pc);
2156 fprintf_unfiltered (file,
2157 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2158 gdbarch_unwind_sp_p (current_gdbarch));
2159 fprintf_unfiltered (file,
2160 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2161 (long) current_gdbarch->unwind_sp);
2162 #ifdef USE_STRUCT_CONVENTION
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: %s # %s\n",
2165 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2166 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2167 fprintf_unfiltered (file,
2168 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2169 (long) current_gdbarch->use_struct_convention
2170 /*USE_STRUCT_CONVENTION ()*/);
2172 #ifdef VALUE_TO_REGISTER
2173 fprintf_unfiltered (file,
2174 "gdbarch_dump: %s # %s\n",
2175 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2176 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2179 (long) current_gdbarch->value_to_register
2180 /*VALUE_TO_REGISTER ()*/);
2182 if (current_gdbarch->dump_tdep != NULL)
2183 current_gdbarch->dump_tdep (current_gdbarch, file);
2186 struct gdbarch_tdep *
2187 gdbarch_tdep (struct gdbarch *gdbarch)
2189 if (gdbarch_debug >= 2)
2190 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2191 return gdbarch->tdep;
2195 const struct bfd_arch_info *
2196 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2198 gdb_assert (gdbarch != NULL);
2199 if (gdbarch_debug >= 2)
2200 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2201 return gdbarch->bfd_arch_info;
2205 gdbarch_byte_order (struct gdbarch *gdbarch)
2207 gdb_assert (gdbarch != NULL);
2208 if (gdbarch_debug >= 2)
2209 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2210 return gdbarch->byte_order;
2214 gdbarch_osabi (struct gdbarch *gdbarch)
2216 gdb_assert (gdbarch != NULL);
2217 if (gdbarch_debug >= 2)
2218 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2219 return gdbarch->osabi;
2223 gdbarch_short_bit (struct gdbarch *gdbarch)
2225 gdb_assert (gdbarch != NULL);
2226 /* Skip verify of short_bit, invalid_p == 0 */
2227 if (gdbarch_debug >= 2)
2228 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2229 return gdbarch->short_bit;
2233 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2236 gdbarch->short_bit = short_bit;
2240 gdbarch_int_bit (struct gdbarch *gdbarch)
2242 gdb_assert (gdbarch != NULL);
2243 /* Skip verify of int_bit, invalid_p == 0 */
2244 if (gdbarch_debug >= 2)
2245 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2246 return gdbarch->int_bit;
2250 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2253 gdbarch->int_bit = int_bit;
2257 gdbarch_long_bit (struct gdbarch *gdbarch)
2259 gdb_assert (gdbarch != NULL);
2260 /* Skip verify of long_bit, invalid_p == 0 */
2261 if (gdbarch_debug >= 2)
2262 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2263 return gdbarch->long_bit;
2267 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2270 gdbarch->long_bit = long_bit;
2274 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2276 gdb_assert (gdbarch != NULL);
2277 /* Skip verify of long_long_bit, invalid_p == 0 */
2278 if (gdbarch_debug >= 2)
2279 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2280 return gdbarch->long_long_bit;
2284 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2287 gdbarch->long_long_bit = long_long_bit;
2291 gdbarch_float_bit (struct gdbarch *gdbarch)
2293 gdb_assert (gdbarch != NULL);
2294 /* Skip verify of float_bit, invalid_p == 0 */
2295 if (gdbarch_debug >= 2)
2296 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2297 return gdbarch->float_bit;
2301 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2304 gdbarch->float_bit = float_bit;
2308 gdbarch_double_bit (struct gdbarch *gdbarch)
2310 gdb_assert (gdbarch != NULL);
2311 /* Skip verify of double_bit, invalid_p == 0 */
2312 if (gdbarch_debug >= 2)
2313 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2314 return gdbarch->double_bit;
2318 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2321 gdbarch->double_bit = double_bit;
2325 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2327 gdb_assert (gdbarch != NULL);
2328 /* Skip verify of long_double_bit, invalid_p == 0 */
2329 if (gdbarch_debug >= 2)
2330 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2331 return gdbarch->long_double_bit;
2335 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2336 int long_double_bit)
2338 gdbarch->long_double_bit = long_double_bit;
2342 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2344 gdb_assert (gdbarch != NULL);
2345 /* Skip verify of ptr_bit, invalid_p == 0 */
2346 if (gdbarch_debug >= 2)
2347 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2348 return gdbarch->ptr_bit;
2352 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2355 gdbarch->ptr_bit = ptr_bit;
2359 gdbarch_addr_bit (struct gdbarch *gdbarch)
2361 gdb_assert (gdbarch != NULL);
2362 /* Check variable changed from pre-default. */
2363 gdb_assert (gdbarch->addr_bit != 0);
2364 if (gdbarch_debug >= 2)
2365 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2366 return gdbarch->addr_bit;
2370 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2373 gdbarch->addr_bit = addr_bit;
2377 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2379 gdb_assert (gdbarch != NULL);
2380 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2381 if (gdbarch_debug >= 2)
2382 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2383 return gdbarch->bfd_vma_bit;
2387 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2390 gdbarch->bfd_vma_bit = bfd_vma_bit;
2394 gdbarch_char_signed (struct gdbarch *gdbarch)
2396 gdb_assert (gdbarch != NULL);
2397 /* Check variable changed from pre-default. */
2398 gdb_assert (gdbarch->char_signed != -1);
2399 if (gdbarch_debug >= 2)
2400 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2401 return gdbarch->char_signed;
2405 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2408 gdbarch->char_signed = char_signed;
2412 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2414 gdb_assert (gdbarch != NULL);
2415 return gdbarch->read_pc != NULL;
2419 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2421 gdb_assert (gdbarch != NULL);
2422 gdb_assert (gdbarch->read_pc != NULL);
2423 if (gdbarch_debug >= 2)
2424 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2425 return gdbarch->read_pc (ptid);
2429 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2430 gdbarch_read_pc_ftype read_pc)
2432 gdbarch->read_pc = read_pc;
2436 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2438 gdb_assert (gdbarch != NULL);
2439 gdb_assert (gdbarch->write_pc != NULL);
2440 if (gdbarch_debug >= 2)
2441 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2442 gdbarch->write_pc (val, ptid);
2446 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2447 gdbarch_write_pc_ftype write_pc)
2449 gdbarch->write_pc = write_pc;
2453 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2455 gdb_assert (gdbarch != NULL);
2456 return gdbarch->read_sp != NULL;
2460 gdbarch_read_sp (struct gdbarch *gdbarch)
2462 gdb_assert (gdbarch != NULL);
2463 gdb_assert (gdbarch->read_sp != NULL);
2464 if (gdbarch_debug >= 2)
2465 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2466 return gdbarch->read_sp ();
2470 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2471 gdbarch_read_sp_ftype read_sp)
2473 gdbarch->read_sp = read_sp;
2477 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2479 gdb_assert (gdbarch != NULL);
2480 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2481 if (gdbarch_debug >= 2)
2482 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2483 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2487 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2488 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2490 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2494 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2496 gdb_assert (gdbarch != NULL);
2497 return gdbarch->pseudo_register_read != NULL;
2501 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2503 gdb_assert (gdbarch != NULL);
2504 gdb_assert (gdbarch->pseudo_register_read != NULL);
2505 if (gdbarch_debug >= 2)
2506 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2507 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2511 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2512 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2514 gdbarch->pseudo_register_read = pseudo_register_read;
2518 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2520 gdb_assert (gdbarch != NULL);
2521 return gdbarch->pseudo_register_write != NULL;
2525 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2527 gdb_assert (gdbarch != NULL);
2528 gdb_assert (gdbarch->pseudo_register_write != NULL);
2529 if (gdbarch_debug >= 2)
2530 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2531 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2535 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2536 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2538 gdbarch->pseudo_register_write = pseudo_register_write;
2542 gdbarch_num_regs (struct gdbarch *gdbarch)
2544 gdb_assert (gdbarch != NULL);
2545 /* Check variable changed from pre-default. */
2546 gdb_assert (gdbarch->num_regs != -1);
2547 if (gdbarch_debug >= 2)
2548 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2549 return gdbarch->num_regs;
2553 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2556 gdbarch->num_regs = num_regs;
2560 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2562 gdb_assert (gdbarch != NULL);
2563 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2564 if (gdbarch_debug >= 2)
2565 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2566 return gdbarch->num_pseudo_regs;
2570 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2571 int num_pseudo_regs)
2573 gdbarch->num_pseudo_regs = num_pseudo_regs;
2577 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2579 gdb_assert (gdbarch != NULL);
2580 /* Skip verify of sp_regnum, invalid_p == 0 */
2581 if (gdbarch_debug >= 2)
2582 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2583 return gdbarch->sp_regnum;
2587 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2590 gdbarch->sp_regnum = sp_regnum;
2594 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2596 gdb_assert (gdbarch != NULL);
2597 /* Skip verify of pc_regnum, invalid_p == 0 */
2598 if (gdbarch_debug >= 2)
2599 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2600 return gdbarch->pc_regnum;
2604 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2607 gdbarch->pc_regnum = pc_regnum;
2611 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2613 gdb_assert (gdbarch != NULL);
2614 /* Skip verify of ps_regnum, invalid_p == 0 */
2615 if (gdbarch_debug >= 2)
2616 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2617 return gdbarch->ps_regnum;
2621 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2624 gdbarch->ps_regnum = ps_regnum;
2628 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2630 gdb_assert (gdbarch != NULL);
2631 /* Skip verify of fp0_regnum, invalid_p == 0 */
2632 if (gdbarch_debug >= 2)
2633 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2634 return gdbarch->fp0_regnum;
2638 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2641 gdbarch->fp0_regnum = fp0_regnum;
2645 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2647 gdb_assert (gdbarch != NULL);
2648 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2649 if (gdbarch_debug >= 2)
2650 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2651 return gdbarch->stab_reg_to_regnum (stab_regnr);
2655 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2656 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2658 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2662 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2664 gdb_assert (gdbarch != NULL);
2665 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2666 if (gdbarch_debug >= 2)
2667 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2668 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2672 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2673 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2675 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2679 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2681 gdb_assert (gdbarch != NULL);
2682 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2683 if (gdbarch_debug >= 2)
2684 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2685 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2689 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2690 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2692 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2696 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2698 gdb_assert (gdbarch != NULL);
2699 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2700 if (gdbarch_debug >= 2)
2701 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2702 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2706 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2707 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2709 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2713 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2715 gdb_assert (gdbarch != NULL);
2716 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2717 if (gdbarch_debug >= 2)
2718 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2719 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2723 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2724 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2726 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2730 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2732 gdb_assert (gdbarch != NULL);
2733 gdb_assert (gdbarch->register_name != NULL);
2734 if (gdbarch_debug >= 2)
2735 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2736 return gdbarch->register_name (regnr);
2740 set_gdbarch_register_name (struct gdbarch *gdbarch,
2741 gdbarch_register_name_ftype register_name)
2743 gdbarch->register_name = register_name;
2747 gdbarch_register_type_p (struct gdbarch *gdbarch)
2749 gdb_assert (gdbarch != NULL);
2750 return gdbarch->register_type != NULL;
2754 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2756 gdb_assert (gdbarch != NULL);
2757 gdb_assert (gdbarch->register_type != NULL);
2758 if (gdbarch_debug >= 2)
2759 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2760 return gdbarch->register_type (gdbarch, reg_nr);
2764 set_gdbarch_register_type (struct gdbarch *gdbarch,
2765 gdbarch_register_type_ftype register_type)
2767 gdbarch->register_type = register_type;
2771 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2773 gdb_assert (gdbarch != NULL);
2774 return gdbarch->deprecated_register_virtual_type != NULL;
2778 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2780 gdb_assert (gdbarch != NULL);
2781 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2782 if (gdbarch_debug >= 2)
2783 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2784 return gdbarch->deprecated_register_virtual_type (reg_nr);
2788 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2789 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2791 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2795 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2797 gdb_assert (gdbarch != NULL);
2798 if (gdbarch_debug >= 2)
2799 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2800 return gdbarch->deprecated_register_bytes;
2804 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2805 int deprecated_register_bytes)
2807 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2811 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2813 gdb_assert (gdbarch != NULL);
2814 return gdbarch->deprecated_register_byte != generic_register_byte;
2818 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2820 gdb_assert (gdbarch != NULL);
2821 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2822 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2823 if (gdbarch_debug >= 2)
2824 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2825 return gdbarch->deprecated_register_byte (reg_nr);
2829 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2830 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2832 gdbarch->deprecated_register_byte = deprecated_register_byte;
2836 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2838 gdb_assert (gdbarch != NULL);
2839 return gdbarch->deprecated_register_raw_size != generic_register_size;
2843 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2845 gdb_assert (gdbarch != NULL);
2846 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2847 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2848 if (gdbarch_debug >= 2)
2849 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2850 return gdbarch->deprecated_register_raw_size (reg_nr);
2854 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2855 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2857 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2861 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2863 gdb_assert (gdbarch != NULL);
2864 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2868 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2870 gdb_assert (gdbarch != NULL);
2871 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2872 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2873 if (gdbarch_debug >= 2)
2874 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2875 return gdbarch->deprecated_register_virtual_size (reg_nr);
2879 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2880 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2882 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2886 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
2888 gdb_assert (gdbarch != NULL);
2889 return gdbarch->deprecated_max_register_raw_size != 0;
2893 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
2895 gdb_assert (gdbarch != NULL);
2896 if (gdbarch_debug >= 2)
2897 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
2898 return gdbarch->deprecated_max_register_raw_size;
2902 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
2903 int deprecated_max_register_raw_size)
2905 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
2909 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
2911 gdb_assert (gdbarch != NULL);
2912 return gdbarch->deprecated_max_register_virtual_size != 0;
2916 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
2918 gdb_assert (gdbarch != NULL);
2919 if (gdbarch_debug >= 2)
2920 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
2921 return gdbarch->deprecated_max_register_virtual_size;
2925 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
2926 int deprecated_max_register_virtual_size)
2928 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
2932 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2934 gdb_assert (gdbarch != NULL);
2935 return gdbarch->unwind_dummy_id != NULL;
2939 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2941 gdb_assert (gdbarch != NULL);
2942 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2943 if (gdbarch_debug >= 2)
2944 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2945 return gdbarch->unwind_dummy_id (gdbarch, info);
2949 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2950 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2952 gdbarch->unwind_dummy_id = unwind_dummy_id;
2956 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2958 gdb_assert (gdbarch != NULL);
2959 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2963 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2965 gdb_assert (gdbarch != NULL);
2966 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2967 if (gdbarch_debug >= 2)
2968 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2969 gdbarch->deprecated_save_dummy_frame_tos (sp);
2973 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2974 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2976 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2980 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2982 gdb_assert (gdbarch != NULL);
2983 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2984 if (gdbarch_debug >= 2)
2985 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2986 return gdbarch->deprecated_fp_regnum;
2990 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2991 int deprecated_fp_regnum)
2993 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2997 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2999 gdb_assert (gdbarch != NULL);
3000 return gdbarch->deprecated_target_read_fp != NULL;
3004 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3006 gdb_assert (gdbarch != NULL);
3007 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
3008 if (gdbarch_debug >= 2)
3009 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3010 return gdbarch->deprecated_target_read_fp ();
3014 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3015 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3017 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3021 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3023 gdb_assert (gdbarch != NULL);
3024 return gdbarch->push_dummy_call != NULL;
3028 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)
3030 gdb_assert (gdbarch != NULL);
3031 gdb_assert (gdbarch->push_dummy_call != NULL);
3032 if (gdbarch_debug >= 2)
3033 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3034 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3038 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3039 gdbarch_push_dummy_call_ftype push_dummy_call)
3041 gdbarch->push_dummy_call = push_dummy_call;
3045 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3047 gdb_assert (gdbarch != NULL);
3048 return gdbarch->deprecated_push_arguments != NULL;
3052 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3054 gdb_assert (gdbarch != NULL);
3055 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3056 if (gdbarch_debug >= 2)
3057 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3058 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3062 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3063 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3065 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3069 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3071 gdb_assert (gdbarch != NULL);
3072 return gdbarch->deprecated_push_return_address != NULL;
3076 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3078 gdb_assert (gdbarch != NULL);
3079 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3080 if (gdbarch_debug >= 2)
3081 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3082 return gdbarch->deprecated_push_return_address (pc, sp);
3086 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3087 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3089 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3093 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3095 gdb_assert (gdbarch != NULL);
3096 return gdbarch->deprecated_dummy_write_sp != NULL;
3100 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3102 gdb_assert (gdbarch != NULL);
3103 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3104 if (gdbarch_debug >= 2)
3105 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3106 gdbarch->deprecated_dummy_write_sp (val);
3110 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3111 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3113 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3117 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3119 gdb_assert (gdbarch != NULL);
3120 if (gdbarch_debug >= 2)
3121 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3122 return gdbarch->deprecated_register_size;
3126 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3127 int deprecated_register_size)
3129 gdbarch->deprecated_register_size = deprecated_register_size;
3133 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3135 gdb_assert (gdbarch != NULL);
3136 /* Skip verify of call_dummy_location, invalid_p == 0 */
3137 if (gdbarch_debug >= 2)
3138 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3139 return gdbarch->call_dummy_location;
3143 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3144 int call_dummy_location)
3146 gdbarch->call_dummy_location = call_dummy_location;
3150 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3152 gdb_assert (gdbarch != NULL);
3153 return gdbarch->push_dummy_code != NULL;
3157 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)
3159 gdb_assert (gdbarch != NULL);
3160 gdb_assert (gdbarch->push_dummy_code != NULL);
3161 if (gdbarch_debug >= 2)
3162 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3163 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3167 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3168 gdbarch_push_dummy_code_ftype push_dummy_code)
3170 gdbarch->push_dummy_code = push_dummy_code;
3174 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3176 gdb_assert (gdbarch != NULL);
3177 return gdbarch->deprecated_do_registers_info != NULL;
3181 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3183 gdb_assert (gdbarch != NULL);
3184 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3185 if (gdbarch_debug >= 2)
3186 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3187 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3191 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3192 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3194 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3198 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3200 gdb_assert (gdbarch != NULL);
3201 gdb_assert (gdbarch->print_registers_info != NULL);
3202 if (gdbarch_debug >= 2)
3203 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3204 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3208 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3209 gdbarch_print_registers_info_ftype print_registers_info)
3211 gdbarch->print_registers_info = print_registers_info;
3215 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3217 gdb_assert (gdbarch != NULL);
3218 return gdbarch->print_float_info != NULL;
3222 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3224 gdb_assert (gdbarch != NULL);
3225 gdb_assert (gdbarch->print_float_info != NULL);
3226 if (gdbarch_debug >= 2)
3227 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3228 gdbarch->print_float_info (gdbarch, file, frame, args);
3232 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3233 gdbarch_print_float_info_ftype print_float_info)
3235 gdbarch->print_float_info = print_float_info;
3239 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3241 gdb_assert (gdbarch != NULL);
3242 return gdbarch->print_vector_info != NULL;
3246 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3248 gdb_assert (gdbarch != NULL);
3249 gdb_assert (gdbarch->print_vector_info != NULL);
3250 if (gdbarch_debug >= 2)
3251 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3252 gdbarch->print_vector_info (gdbarch, file, frame, args);
3256 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3257 gdbarch_print_vector_info_ftype print_vector_info)
3259 gdbarch->print_vector_info = print_vector_info;
3263 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3265 gdb_assert (gdbarch != NULL);
3266 gdb_assert (gdbarch->register_sim_regno != NULL);
3267 if (gdbarch_debug >= 2)
3268 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3269 return gdbarch->register_sim_regno (reg_nr);
3273 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3274 gdbarch_register_sim_regno_ftype register_sim_regno)
3276 gdbarch->register_sim_regno = register_sim_regno;
3280 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3282 gdb_assert (gdbarch != NULL);
3283 return gdbarch->register_bytes_ok != NULL;
3287 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3289 gdb_assert (gdbarch != NULL);
3290 gdb_assert (gdbarch->register_bytes_ok != NULL);
3291 if (gdbarch_debug >= 2)
3292 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3293 return gdbarch->register_bytes_ok (nr_bytes);
3297 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3298 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3300 gdbarch->register_bytes_ok = register_bytes_ok;
3304 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3306 gdb_assert (gdbarch != NULL);
3307 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3308 if (gdbarch_debug >= 2)
3309 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3310 return gdbarch->cannot_fetch_register (regnum);
3314 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3315 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3317 gdbarch->cannot_fetch_register = cannot_fetch_register;
3321 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3323 gdb_assert (gdbarch != NULL);
3324 gdb_assert (gdbarch->cannot_store_register != NULL);
3325 if (gdbarch_debug >= 2)
3326 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3327 return gdbarch->cannot_store_register (regnum);
3331 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3332 gdbarch_cannot_store_register_ftype cannot_store_register)
3334 gdbarch->cannot_store_register = cannot_store_register;
3338 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3340 gdb_assert (gdbarch != NULL);
3341 return gdbarch->get_longjmp_target != NULL;
3345 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3347 gdb_assert (gdbarch != NULL);
3348 gdb_assert (gdbarch->get_longjmp_target != NULL);
3349 if (gdbarch_debug >= 2)
3350 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3351 return gdbarch->get_longjmp_target (pc);
3355 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3356 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3358 gdbarch->get_longjmp_target = get_longjmp_target;
3362 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3364 gdb_assert (gdbarch != NULL);
3365 return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
3369 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3371 gdb_assert (gdbarch != NULL);
3372 gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
3373 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3374 if (gdbarch_debug >= 2)
3375 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3376 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3380 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3381 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3383 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3387 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3389 gdb_assert (gdbarch != NULL);
3390 return gdbarch->deprecated_init_frame_pc != NULL;
3394 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3396 gdb_assert (gdbarch != NULL);
3397 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3398 if (gdbarch_debug >= 2)
3399 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3400 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3404 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3405 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3407 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3411 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3413 gdb_assert (gdbarch != NULL);
3414 if (gdbarch_debug >= 2)
3415 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3416 return gdbarch->believe_pcc_promotion;
3420 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3421 int believe_pcc_promotion)
3423 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3427 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3429 gdb_assert (gdbarch != NULL);
3430 return gdbarch->deprecated_get_saved_register != NULL;
3434 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)
3436 gdb_assert (gdbarch != NULL);
3437 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3438 if (gdbarch_debug >= 2)
3439 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3440 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3444 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3445 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3447 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3451 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3453 gdb_assert (gdbarch != NULL);
3454 gdb_assert (gdbarch->convert_register_p != NULL);
3455 if (gdbarch_debug >= 2)
3456 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3457 return gdbarch->convert_register_p (regnum, type);
3461 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3462 gdbarch_convert_register_p_ftype convert_register_p)
3464 gdbarch->convert_register_p = convert_register_p;
3468 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3470 gdb_assert (gdbarch != NULL);
3471 gdb_assert (gdbarch->register_to_value != NULL);
3472 if (gdbarch_debug >= 2)
3473 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3474 gdbarch->register_to_value (frame, regnum, type, buf);
3478 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3479 gdbarch_register_to_value_ftype register_to_value)
3481 gdbarch->register_to_value = register_to_value;
3485 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3487 gdb_assert (gdbarch != NULL);
3488 gdb_assert (gdbarch->value_to_register != NULL);
3489 if (gdbarch_debug >= 2)
3490 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3491 gdbarch->value_to_register (frame, regnum, type, buf);
3495 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3496 gdbarch_value_to_register_ftype value_to_register)
3498 gdbarch->value_to_register = value_to_register;
3502 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3504 gdb_assert (gdbarch != NULL);
3505 gdb_assert (gdbarch->pointer_to_address != NULL);
3506 if (gdbarch_debug >= 2)
3507 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3508 return gdbarch->pointer_to_address (type, buf);
3512 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3513 gdbarch_pointer_to_address_ftype pointer_to_address)
3515 gdbarch->pointer_to_address = pointer_to_address;
3519 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3521 gdb_assert (gdbarch != NULL);
3522 gdb_assert (gdbarch->address_to_pointer != NULL);
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3525 gdbarch->address_to_pointer (type, buf, addr);
3529 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3530 gdbarch_address_to_pointer_ftype address_to_pointer)
3532 gdbarch->address_to_pointer = address_to_pointer;
3536 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3538 gdb_assert (gdbarch != NULL);
3539 return gdbarch->integer_to_address != NULL;
3543 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3545 gdb_assert (gdbarch != NULL);
3546 gdb_assert (gdbarch->integer_to_address != NULL);
3547 if (gdbarch_debug >= 2)
3548 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3549 return gdbarch->integer_to_address (type, buf);
3553 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3554 gdbarch_integer_to_address_ftype integer_to_address)
3556 gdbarch->integer_to_address = integer_to_address;
3560 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3562 gdb_assert (gdbarch != NULL);
3563 return gdbarch->deprecated_pop_frame != NULL;
3567 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3569 gdb_assert (gdbarch != NULL);
3570 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3571 if (gdbarch_debug >= 2)
3572 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3573 gdbarch->deprecated_pop_frame ();
3577 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3578 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3580 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3584 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3586 gdb_assert (gdbarch != NULL);
3587 return gdbarch->deprecated_store_struct_return != NULL;
3591 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3593 gdb_assert (gdbarch != NULL);
3594 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3595 if (gdbarch_debug >= 2)
3596 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3597 gdbarch->deprecated_store_struct_return (addr, sp);
3601 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3602 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3604 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3608 gdbarch_return_value_p (struct gdbarch *gdbarch)
3610 gdb_assert (gdbarch != NULL);
3611 return gdbarch->return_value != NULL;
3614 enum return_value_convention
3615 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3617 gdb_assert (gdbarch != NULL);
3618 gdb_assert (gdbarch->return_value != NULL);
3619 if (gdbarch_debug >= 2)
3620 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3621 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3625 set_gdbarch_return_value (struct gdbarch *gdbarch,
3626 gdbarch_return_value_ftype return_value)
3628 gdbarch->return_value = return_value;
3632 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3634 gdb_assert (gdbarch != NULL);
3635 gdb_assert (gdbarch->return_value_on_stack != NULL);
3636 if (gdbarch_debug >= 2)
3637 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3638 return gdbarch->return_value_on_stack (type);
3642 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3643 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3645 gdbarch->return_value_on_stack = return_value_on_stack;
3649 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3651 gdb_assert (gdbarch != NULL);
3652 gdb_assert (gdbarch->extract_return_value != NULL);
3653 if (gdbarch_debug >= 2)
3654 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3655 gdbarch->extract_return_value (type, regcache, valbuf);
3659 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3660 gdbarch_extract_return_value_ftype extract_return_value)
3662 gdbarch->extract_return_value = extract_return_value;
3666 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3668 gdb_assert (gdbarch != NULL);
3669 gdb_assert (gdbarch->store_return_value != NULL);
3670 if (gdbarch_debug >= 2)
3671 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3672 gdbarch->store_return_value (type, regcache, valbuf);
3676 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3677 gdbarch_store_return_value_ftype store_return_value)
3679 gdbarch->store_return_value = store_return_value;
3683 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3685 gdb_assert (gdbarch != NULL);
3686 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3687 if (gdbarch_debug >= 2)
3688 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3689 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3693 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3694 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3696 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3700 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3702 gdb_assert (gdbarch != NULL);
3703 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3704 if (gdbarch_debug >= 2)
3705 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3706 gdbarch->deprecated_store_return_value (type, valbuf);
3710 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3711 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3713 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3717 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3719 gdb_assert (gdbarch != NULL);
3720 gdb_assert (gdbarch->use_struct_convention != NULL);
3721 if (gdbarch_debug >= 2)
3722 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3723 return gdbarch->use_struct_convention (gcc_p, value_type);
3727 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3728 gdbarch_use_struct_convention_ftype use_struct_convention)
3730 gdbarch->use_struct_convention = use_struct_convention;
3734 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3736 gdb_assert (gdbarch != NULL);
3737 return gdbarch->deprecated_extract_struct_value_address != NULL;
3741 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3743 gdb_assert (gdbarch != NULL);
3744 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3745 if (gdbarch_debug >= 2)
3746 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3747 return gdbarch->deprecated_extract_struct_value_address (regcache);
3751 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3752 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3754 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3758 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3760 gdb_assert (gdbarch != NULL);
3761 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3765 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3767 gdb_assert (gdbarch != NULL);
3768 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3769 if (gdbarch_debug >= 2)
3770 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3771 gdbarch->deprecated_frame_init_saved_regs (frame);
3775 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3776 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3778 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3782 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3784 gdb_assert (gdbarch != NULL);
3785 return gdbarch->deprecated_init_extra_frame_info != NULL;
3789 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3791 gdb_assert (gdbarch != NULL);
3792 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3793 if (gdbarch_debug >= 2)
3794 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3795 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3799 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3800 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3802 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3806 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3808 gdb_assert (gdbarch != NULL);
3809 gdb_assert (gdbarch->skip_prologue != NULL);
3810 if (gdbarch_debug >= 2)
3811 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3812 return gdbarch->skip_prologue (ip);
3816 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3817 gdbarch_skip_prologue_ftype skip_prologue)
3819 gdbarch->skip_prologue = skip_prologue;
3823 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3825 gdb_assert (gdbarch != NULL);
3826 gdb_assert (gdbarch->inner_than != NULL);
3827 if (gdbarch_debug >= 2)
3828 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3829 return gdbarch->inner_than (lhs, rhs);
3833 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3834 gdbarch_inner_than_ftype inner_than)
3836 gdbarch->inner_than = inner_than;
3839 const unsigned char *
3840 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3842 gdb_assert (gdbarch != NULL);
3843 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3844 if (gdbarch_debug >= 2)
3845 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3846 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3850 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3851 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3853 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3857 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3859 gdb_assert (gdbarch != NULL);
3860 return gdbarch->adjust_breakpoint_address != NULL;
3864 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3866 gdb_assert (gdbarch != NULL);
3867 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3868 if (gdbarch_debug >= 2)
3869 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3870 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3874 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3875 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3877 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3881 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3883 gdb_assert (gdbarch != NULL);
3884 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3885 if (gdbarch_debug >= 2)
3886 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3887 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3891 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3892 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3894 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3898 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3900 gdb_assert (gdbarch != NULL);
3901 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3902 if (gdbarch_debug >= 2)
3903 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3904 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3908 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3909 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3911 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3915 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3917 gdb_assert (gdbarch != NULL);
3918 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3919 if (gdbarch_debug >= 2)
3920 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3921 return gdbarch->decr_pc_after_break;
3925 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3926 CORE_ADDR decr_pc_after_break)
3928 gdbarch->decr_pc_after_break = decr_pc_after_break;
3932 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3934 gdb_assert (gdbarch != NULL);
3935 /* Skip verify of function_start_offset, invalid_p == 0 */
3936 if (gdbarch_debug >= 2)
3937 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3938 return gdbarch->function_start_offset;
3942 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3943 CORE_ADDR function_start_offset)
3945 gdbarch->function_start_offset = function_start_offset;
3949 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)
3951 gdb_assert (gdbarch != NULL);
3952 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3953 if (gdbarch_debug >= 2)
3954 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3955 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3959 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3960 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3962 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3966 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3968 gdb_assert (gdbarch != NULL);
3969 /* Skip verify of frame_args_skip, invalid_p == 0 */
3970 if (gdbarch_debug >= 2)
3971 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3972 return gdbarch->frame_args_skip;
3976 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3977 CORE_ADDR frame_args_skip)
3979 gdbarch->frame_args_skip = frame_args_skip;
3983 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
3985 gdb_assert (gdbarch != NULL);
3986 return gdbarch->deprecated_frameless_function_invocation != NULL;
3990 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3992 gdb_assert (gdbarch != NULL);
3993 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
3994 if (gdbarch_debug >= 2)
3995 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
3996 return gdbarch->deprecated_frameless_function_invocation (fi);
4000 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
4001 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
4003 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
4007 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4009 gdb_assert (gdbarch != NULL);
4010 return gdbarch->deprecated_frame_chain != NULL;
4014 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4016 gdb_assert (gdbarch != NULL);
4017 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
4018 if (gdbarch_debug >= 2)
4019 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4020 return gdbarch->deprecated_frame_chain (frame);
4024 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4025 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4027 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4031 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4033 gdb_assert (gdbarch != NULL);
4034 return gdbarch->deprecated_frame_chain_valid != NULL;
4038 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4040 gdb_assert (gdbarch != NULL);
4041 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
4042 if (gdbarch_debug >= 2)
4043 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4044 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4048 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4049 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4051 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4055 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4057 gdb_assert (gdbarch != NULL);
4058 return gdbarch->deprecated_frame_saved_pc != NULL;
4062 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4064 gdb_assert (gdbarch != NULL);
4065 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4066 if (gdbarch_debug >= 2)
4067 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4068 return gdbarch->deprecated_frame_saved_pc (fi);
4072 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4073 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4075 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4079 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4081 gdb_assert (gdbarch != NULL);
4082 return gdbarch->unwind_pc != NULL;
4086 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4088 gdb_assert (gdbarch != NULL);
4089 gdb_assert (gdbarch->unwind_pc != NULL);
4090 if (gdbarch_debug >= 2)
4091 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4092 return gdbarch->unwind_pc (gdbarch, next_frame);
4096 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4097 gdbarch_unwind_pc_ftype unwind_pc)
4099 gdbarch->unwind_pc = unwind_pc;
4103 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4105 gdb_assert (gdbarch != NULL);
4106 return gdbarch->unwind_sp != NULL;
4110 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4112 gdb_assert (gdbarch != NULL);
4113 gdb_assert (gdbarch->unwind_sp != NULL);
4114 if (gdbarch_debug >= 2)
4115 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4116 return gdbarch->unwind_sp (gdbarch, next_frame);
4120 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4121 gdbarch_unwind_sp_ftype unwind_sp)
4123 gdbarch->unwind_sp = unwind_sp;
4127 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4129 gdb_assert (gdbarch != NULL);
4130 return gdbarch->deprecated_frame_args_address != get_frame_base;
4134 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4136 gdb_assert (gdbarch != NULL);
4137 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4138 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4139 if (gdbarch_debug >= 2)
4140 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4141 return gdbarch->deprecated_frame_args_address (fi);
4145 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4146 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4148 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4152 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4154 gdb_assert (gdbarch != NULL);
4155 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4159 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4161 gdb_assert (gdbarch != NULL);
4162 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4163 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4166 return gdbarch->deprecated_frame_locals_address (fi);
4170 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4171 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4173 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4177 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4179 gdb_assert (gdbarch != NULL);
4180 return gdbarch->deprecated_saved_pc_after_call != NULL;
4184 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4186 gdb_assert (gdbarch != NULL);
4187 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4188 if (gdbarch_debug >= 2)
4189 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4190 return gdbarch->deprecated_saved_pc_after_call (frame);
4194 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4195 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4197 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4201 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4203 gdb_assert (gdbarch != NULL);
4204 return gdbarch->frame_num_args != NULL;
4208 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4210 gdb_assert (gdbarch != NULL);
4211 gdb_assert (gdbarch->frame_num_args != NULL);
4212 if (gdbarch_debug >= 2)
4213 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4214 return gdbarch->frame_num_args (frame);
4218 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4219 gdbarch_frame_num_args_ftype frame_num_args)
4221 gdbarch->frame_num_args = frame_num_args;
4225 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4227 gdb_assert (gdbarch != NULL);
4228 return gdbarch->deprecated_stack_align != NULL;
4232 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4234 gdb_assert (gdbarch != NULL);
4235 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4236 if (gdbarch_debug >= 2)
4237 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4238 return gdbarch->deprecated_stack_align (sp);
4242 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4243 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4245 gdbarch->deprecated_stack_align = deprecated_stack_align;
4249 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4251 gdb_assert (gdbarch != NULL);
4252 return gdbarch->frame_align != NULL;
4256 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4258 gdb_assert (gdbarch != NULL);
4259 gdb_assert (gdbarch->frame_align != NULL);
4260 if (gdbarch_debug >= 2)
4261 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4262 return gdbarch->frame_align (gdbarch, address);
4266 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4267 gdbarch_frame_align_ftype frame_align)
4269 gdbarch->frame_align = frame_align;
4273 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4275 gdb_assert (gdbarch != NULL);
4276 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4280 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4282 gdb_assert (gdbarch != NULL);
4283 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4284 if (gdbarch_debug >= 2)
4285 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4286 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4290 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4291 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4293 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4297 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4299 gdb_assert (gdbarch != NULL);
4300 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4301 if (gdbarch_debug >= 2)
4302 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4303 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4307 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4308 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4310 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4314 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4316 gdb_assert (gdbarch != NULL);
4317 if (gdbarch_debug >= 2)
4318 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4319 return gdbarch->frame_red_zone_size;
4323 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4324 int frame_red_zone_size)
4326 gdbarch->frame_red_zone_size = frame_red_zone_size;
4329 const struct floatformat *
4330 gdbarch_float_format (struct gdbarch *gdbarch)
4332 gdb_assert (gdbarch != NULL);
4333 if (gdbarch_debug >= 2)
4334 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4335 return gdbarch->float_format;
4339 set_gdbarch_float_format (struct gdbarch *gdbarch,
4340 const struct floatformat * float_format)
4342 gdbarch->float_format = float_format;
4345 const struct floatformat *
4346 gdbarch_double_format (struct gdbarch *gdbarch)
4348 gdb_assert (gdbarch != NULL);
4349 if (gdbarch_debug >= 2)
4350 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4351 return gdbarch->double_format;
4355 set_gdbarch_double_format (struct gdbarch *gdbarch,
4356 const struct floatformat * double_format)
4358 gdbarch->double_format = double_format;
4361 const struct floatformat *
4362 gdbarch_long_double_format (struct gdbarch *gdbarch)
4364 gdb_assert (gdbarch != NULL);
4365 if (gdbarch_debug >= 2)
4366 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4367 return gdbarch->long_double_format;
4371 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4372 const struct floatformat * long_double_format)
4374 gdbarch->long_double_format = long_double_format;
4378 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4380 gdb_assert (gdbarch != NULL);
4381 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4382 if (gdbarch_debug >= 2)
4383 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4384 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4388 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4389 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4391 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4395 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4397 gdb_assert (gdbarch != NULL);
4398 gdb_assert (gdbarch->addr_bits_remove != NULL);
4399 if (gdbarch_debug >= 2)
4400 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4401 return gdbarch->addr_bits_remove (addr);
4405 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4406 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4408 gdbarch->addr_bits_remove = addr_bits_remove;
4412 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4414 gdb_assert (gdbarch != NULL);
4415 gdb_assert (gdbarch->smash_text_address != NULL);
4416 if (gdbarch_debug >= 2)
4417 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4418 return gdbarch->smash_text_address (addr);
4422 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4423 gdbarch_smash_text_address_ftype smash_text_address)
4425 gdbarch->smash_text_address = smash_text_address;
4429 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4431 gdb_assert (gdbarch != NULL);
4432 return gdbarch->software_single_step != NULL;
4436 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4438 gdb_assert (gdbarch != NULL);
4439 gdb_assert (gdbarch->software_single_step != NULL);
4440 if (gdbarch_debug >= 2)
4441 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4442 gdbarch->software_single_step (sig, insert_breakpoints_p);
4446 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4447 gdbarch_software_single_step_ftype software_single_step)
4449 gdbarch->software_single_step = software_single_step;
4453 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4455 gdb_assert (gdbarch != NULL);
4456 gdb_assert (gdbarch->print_insn != NULL);
4457 if (gdbarch_debug >= 2)
4458 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4459 return gdbarch->print_insn (vma, info);
4463 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4464 gdbarch_print_insn_ftype print_insn)
4466 gdbarch->print_insn = print_insn;
4470 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4472 gdb_assert (gdbarch != NULL);
4473 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4474 if (gdbarch_debug >= 2)
4475 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4476 return gdbarch->skip_trampoline_code (pc);
4480 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4481 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4483 gdbarch->skip_trampoline_code = skip_trampoline_code;
4487 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4489 gdb_assert (gdbarch != NULL);
4490 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4491 if (gdbarch_debug >= 2)
4492 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4493 return gdbarch->skip_solib_resolver (gdbarch, pc);
4497 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4498 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4500 gdbarch->skip_solib_resolver = skip_solib_resolver;
4504 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4506 gdb_assert (gdbarch != NULL);
4507 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4508 if (gdbarch_debug >= 2)
4509 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4510 return gdbarch->in_solib_call_trampoline (pc, name);
4514 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4515 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4517 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4521 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4523 gdb_assert (gdbarch != NULL);
4524 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4525 if (gdbarch_debug >= 2)
4526 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4527 return gdbarch->in_solib_return_trampoline (pc, name);
4531 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4532 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4534 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4538 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4540 gdb_assert (gdbarch != NULL);
4541 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4542 if (gdbarch_debug >= 2)
4543 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4544 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4548 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4549 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4551 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4555 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4557 gdb_assert (gdbarch != NULL);
4558 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4559 if (gdbarch_debug >= 2)
4560 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4561 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4565 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4566 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4568 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4572 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4574 gdb_assert (gdbarch != NULL);
4575 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4576 if (gdbarch_debug >= 2)
4577 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4578 gdbarch->elf_make_msymbol_special (sym, msym);
4582 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4583 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4585 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4589 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4591 gdb_assert (gdbarch != NULL);
4592 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4593 if (gdbarch_debug >= 2)
4594 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4595 gdbarch->coff_make_msymbol_special (val, msym);
4599 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4600 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4602 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4606 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4608 gdb_assert (gdbarch != NULL);
4609 /* Skip verify of name_of_malloc, invalid_p == 0 */
4610 if (gdbarch_debug >= 2)
4611 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4612 return gdbarch->name_of_malloc;
4616 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4617 const char * name_of_malloc)
4619 gdbarch->name_of_malloc = name_of_malloc;
4623 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4625 gdb_assert (gdbarch != NULL);
4626 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4627 if (gdbarch_debug >= 2)
4628 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4629 return gdbarch->cannot_step_breakpoint;
4633 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4634 int cannot_step_breakpoint)
4636 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4640 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4642 gdb_assert (gdbarch != NULL);
4643 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4644 if (gdbarch_debug >= 2)
4645 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4646 return gdbarch->have_nonsteppable_watchpoint;
4650 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4651 int have_nonsteppable_watchpoint)
4653 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4657 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4659 gdb_assert (gdbarch != NULL);
4660 return gdbarch->address_class_type_flags != NULL;
4664 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4666 gdb_assert (gdbarch != NULL);
4667 gdb_assert (gdbarch->address_class_type_flags != NULL);
4668 if (gdbarch_debug >= 2)
4669 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4670 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4674 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4675 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4677 gdbarch->address_class_type_flags = address_class_type_flags;
4681 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4683 gdb_assert (gdbarch != NULL);
4684 return gdbarch->address_class_type_flags_to_name != NULL;
4688 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4690 gdb_assert (gdbarch != NULL);
4691 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4692 if (gdbarch_debug >= 2)
4693 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4694 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4698 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4699 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4701 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4705 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4707 gdb_assert (gdbarch != NULL);
4708 return gdbarch->address_class_name_to_type_flags != NULL;
4712 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4714 gdb_assert (gdbarch != NULL);
4715 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4716 if (gdbarch_debug >= 2)
4717 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4718 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4722 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4723 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4725 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4729 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4731 gdb_assert (gdbarch != NULL);
4732 gdb_assert (gdbarch->register_reggroup_p != NULL);
4733 if (gdbarch_debug >= 2)
4734 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4735 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4739 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4740 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4742 gdbarch->register_reggroup_p = register_reggroup_p;
4746 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4748 gdb_assert (gdbarch != NULL);
4749 return gdbarch->fetch_pointer_argument != NULL;
4753 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4755 gdb_assert (gdbarch != NULL);
4756 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4757 if (gdbarch_debug >= 2)
4758 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4759 return gdbarch->fetch_pointer_argument (frame, argi, type);
4763 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4764 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4766 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4770 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4772 gdb_assert (gdbarch != NULL);
4773 return gdbarch->regset_from_core_section != NULL;
4776 const struct regset *
4777 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4779 gdb_assert (gdbarch != NULL);
4780 gdb_assert (gdbarch->regset_from_core_section != NULL);
4781 if (gdbarch_debug >= 2)
4782 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4783 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4787 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4788 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4790 gdbarch->regset_from_core_section = regset_from_core_section;
4794 /* Keep a registry of per-architecture data-pointers required by GDB
4801 gdbarch_data_pre_init_ftype *pre_init;
4802 gdbarch_data_post_init_ftype *post_init;
4805 struct gdbarch_data_registration
4807 struct gdbarch_data *data;
4808 struct gdbarch_data_registration *next;
4811 struct gdbarch_data_registry
4814 struct gdbarch_data_registration *registrations;
4817 struct gdbarch_data_registry gdbarch_data_registry =
4822 static struct gdbarch_data *
4823 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4824 gdbarch_data_post_init_ftype *post_init)
4826 struct gdbarch_data_registration **curr;
4827 /* Append the new registraration. */
4828 for (curr = &gdbarch_data_registry.registrations;
4830 curr = &(*curr)->next);
4831 (*curr) = XMALLOC (struct gdbarch_data_registration);
4832 (*curr)->next = NULL;
4833 (*curr)->data = XMALLOC (struct gdbarch_data);
4834 (*curr)->data->index = gdbarch_data_registry.nr++;
4835 (*curr)->data->pre_init = pre_init;
4836 (*curr)->data->post_init = post_init;
4837 (*curr)->data->init_p = 1;
4838 return (*curr)->data;
4841 struct gdbarch_data *
4842 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4844 return gdbarch_data_register (pre_init, NULL);
4847 struct gdbarch_data *
4848 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4850 return gdbarch_data_register (NULL, post_init);
4853 /* Create/delete the gdbarch data vector. */
4856 alloc_gdbarch_data (struct gdbarch *gdbarch)
4858 gdb_assert (gdbarch->data == NULL);
4859 gdbarch->nr_data = gdbarch_data_registry.nr;
4860 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4863 /* Initialize the current value of the specified per-architecture
4867 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4868 struct gdbarch_data *data,
4871 gdb_assert (data->index < gdbarch->nr_data);
4872 gdb_assert (gdbarch->data[data->index] == NULL);
4873 gdb_assert (data->pre_init == NULL);
4874 gdbarch->data[data->index] = pointer;
4877 /* Return the current value of the specified per-architecture
4881 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4883 gdb_assert (data->index < gdbarch->nr_data);
4884 if (gdbarch->data[data->index] == NULL)
4886 /* The data-pointer isn't initialized, call init() to get a
4888 if (data->pre_init != NULL)
4889 /* Mid architecture creation: pass just the obstack, and not
4890 the entire architecture, as that way it isn't possible for
4891 pre-init code to refer to undefined architecture
4893 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4894 else if (gdbarch->initialized_p
4895 && data->post_init != NULL)
4896 /* Post architecture creation: pass the entire architecture
4897 (as all fields are valid), but be careful to also detect
4898 recursive references. */
4900 gdb_assert (data->init_p);
4902 gdbarch->data[data->index] = data->post_init (gdbarch);
4906 /* The architecture initialization hasn't completed - punt -
4907 hope that the caller knows what they are doing. Once
4908 deprecated_set_gdbarch_data has been initialized, this can be
4909 changed to an internal error. */
4911 gdb_assert (gdbarch->data[data->index] != NULL);
4913 return gdbarch->data[data->index];
4918 /* Keep a registry of swapped data required by GDB modules. */
4923 struct gdbarch_swap_registration *source;
4924 struct gdbarch_swap *next;
4927 struct gdbarch_swap_registration
4930 unsigned long sizeof_data;
4931 gdbarch_swap_ftype *init;
4932 struct gdbarch_swap_registration *next;
4935 struct gdbarch_swap_registry
4938 struct gdbarch_swap_registration *registrations;
4941 struct gdbarch_swap_registry gdbarch_swap_registry =
4947 deprecated_register_gdbarch_swap (void *data,
4948 unsigned long sizeof_data,
4949 gdbarch_swap_ftype *init)
4951 struct gdbarch_swap_registration **rego;
4952 for (rego = &gdbarch_swap_registry.registrations;
4954 rego = &(*rego)->next);
4955 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4956 (*rego)->next = NULL;
4957 (*rego)->init = init;
4958 (*rego)->data = data;
4959 (*rego)->sizeof_data = sizeof_data;
4963 current_gdbarch_swap_init_hack (void)
4965 struct gdbarch_swap_registration *rego;
4966 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4967 for (rego = gdbarch_swap_registry.registrations;
4971 if (rego->data != NULL)
4973 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4974 struct gdbarch_swap);
4975 (*curr)->source = rego;
4976 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4978 (*curr)->next = NULL;
4979 curr = &(*curr)->next;
4981 if (rego->init != NULL)
4986 static struct gdbarch *
4987 current_gdbarch_swap_out_hack (void)
4989 struct gdbarch *old_gdbarch = current_gdbarch;
4990 struct gdbarch_swap *curr;
4992 gdb_assert (old_gdbarch != NULL);
4993 for (curr = old_gdbarch->swap;
4997 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4998 memset (curr->source->data, 0, curr->source->sizeof_data);
5000 current_gdbarch = NULL;
5005 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
5007 struct gdbarch_swap *curr;
5009 gdb_assert (current_gdbarch == NULL);
5010 for (curr = new_gdbarch->swap;
5013 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5014 current_gdbarch = new_gdbarch;
5018 /* Keep a registry of the architectures known by GDB. */
5020 struct gdbarch_registration
5022 enum bfd_architecture bfd_architecture;
5023 gdbarch_init_ftype *init;
5024 gdbarch_dump_tdep_ftype *dump_tdep;
5025 struct gdbarch_list *arches;
5026 struct gdbarch_registration *next;
5029 static struct gdbarch_registration *gdbarch_registry = NULL;
5032 append_name (const char ***buf, int *nr, const char *name)
5034 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5040 gdbarch_printable_names (void)
5042 /* Accumulate a list of names based on the registed list of
5044 enum bfd_architecture a;
5046 const char **arches = NULL;
5047 struct gdbarch_registration *rego;
5048 for (rego = gdbarch_registry;
5052 const struct bfd_arch_info *ap;
5053 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5055 internal_error (__FILE__, __LINE__,
5056 "gdbarch_architecture_names: multi-arch unknown");
5059 append_name (&arches, &nr_arches, ap->printable_name);
5064 append_name (&arches, &nr_arches, NULL);
5070 gdbarch_register (enum bfd_architecture bfd_architecture,
5071 gdbarch_init_ftype *init,
5072 gdbarch_dump_tdep_ftype *dump_tdep)
5074 struct gdbarch_registration **curr;
5075 const struct bfd_arch_info *bfd_arch_info;
5076 /* Check that BFD recognizes this architecture */
5077 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5078 if (bfd_arch_info == NULL)
5080 internal_error (__FILE__, __LINE__,
5081 "gdbarch: Attempt to register unknown architecture (%d)",
5084 /* Check that we haven't seen this architecture before */
5085 for (curr = &gdbarch_registry;
5087 curr = &(*curr)->next)
5089 if (bfd_architecture == (*curr)->bfd_architecture)
5090 internal_error (__FILE__, __LINE__,
5091 "gdbarch: Duplicate registraration of architecture (%s)",
5092 bfd_arch_info->printable_name);
5096 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5097 bfd_arch_info->printable_name,
5100 (*curr) = XMALLOC (struct gdbarch_registration);
5101 (*curr)->bfd_architecture = bfd_architecture;
5102 (*curr)->init = init;
5103 (*curr)->dump_tdep = dump_tdep;
5104 (*curr)->arches = NULL;
5105 (*curr)->next = NULL;
5109 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5110 gdbarch_init_ftype *init)
5112 gdbarch_register (bfd_architecture, init, NULL);
5116 /* Look for an architecture using gdbarch_info. Base search on only
5117 BFD_ARCH_INFO and BYTE_ORDER. */
5119 struct gdbarch_list *
5120 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5121 const struct gdbarch_info *info)
5123 for (; arches != NULL; arches = arches->next)
5125 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5127 if (info->byte_order != arches->gdbarch->byte_order)
5129 if (info->osabi != arches->gdbarch->osabi)
5137 /* Find an architecture that matches the specified INFO. Create a new
5138 architecture if needed. Return that new architecture. Assumes
5139 that there is no current architecture. */
5141 static struct gdbarch *
5142 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5144 struct gdbarch *new_gdbarch;
5145 struct gdbarch_registration *rego;
5147 /* The existing architecture has been swapped out - all this code
5148 works from a clean slate. */
5149 gdb_assert (current_gdbarch == NULL);
5151 /* Fill in missing parts of the INFO struct using a number of
5152 sources: "set ..."; INFOabfd supplied; and the existing
5154 gdbarch_info_fill (old_gdbarch, &info);
5156 /* Must have found some sort of architecture. */
5157 gdb_assert (info.bfd_arch_info != NULL);
5161 fprintf_unfiltered (gdb_stdlog,
5162 "find_arch_by_info: info.bfd_arch_info %s\n",
5163 (info.bfd_arch_info != NULL
5164 ? info.bfd_arch_info->printable_name
5166 fprintf_unfiltered (gdb_stdlog,
5167 "find_arch_by_info: info.byte_order %d (%s)\n",
5169 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5170 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5172 fprintf_unfiltered (gdb_stdlog,
5173 "find_arch_by_info: info.osabi %d (%s)\n",
5174 info.osabi, gdbarch_osabi_name (info.osabi));
5175 fprintf_unfiltered (gdb_stdlog,
5176 "find_arch_by_info: info.abfd 0x%lx\n",
5178 fprintf_unfiltered (gdb_stdlog,
5179 "find_arch_by_info: info.tdep_info 0x%lx\n",
5180 (long) info.tdep_info);
5183 /* Find the tdep code that knows about this architecture. */
5184 for (rego = gdbarch_registry;
5187 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5192 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5193 "No matching architecture\n");
5197 /* Ask the tdep code for an architecture that matches "info". */
5198 new_gdbarch = rego->init (info, rego->arches);
5200 /* Did the tdep code like it? No. Reject the change and revert to
5201 the old architecture. */
5202 if (new_gdbarch == NULL)
5205 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5206 "Target rejected architecture\n");
5210 /* Is this a pre-existing architecture (as determined by already
5211 being initialized)? Move it to the front of the architecture
5212 list (keeping the list sorted Most Recently Used). */
5213 if (new_gdbarch->initialized_p)
5215 struct gdbarch_list **list;
5216 struct gdbarch_list *this;
5218 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5219 "Previous architecture 0x%08lx (%s) selected\n",
5221 new_gdbarch->bfd_arch_info->printable_name);
5222 /* Find the existing arch in the list. */
5223 for (list = ®o->arches;
5224 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5225 list = &(*list)->next);
5226 /* It had better be in the list of architectures. */
5227 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5230 (*list) = this->next;
5231 /* Insert THIS at the front. */
5232 this->next = rego->arches;
5233 rego->arches = this;
5238 /* It's a new architecture. */
5240 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5241 "New architecture 0x%08lx (%s) selected\n",
5243 new_gdbarch->bfd_arch_info->printable_name);
5245 /* Insert the new architecture into the front of the architecture
5246 list (keep the list sorted Most Recently Used). */
5248 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5249 this->next = rego->arches;
5250 this->gdbarch = new_gdbarch;
5251 rego->arches = this;
5254 /* Check that the newly installed architecture is valid. Plug in
5255 any post init values. */
5256 new_gdbarch->dump_tdep = rego->dump_tdep;
5257 verify_gdbarch (new_gdbarch);
5258 new_gdbarch->initialized_p = 1;
5260 /* Initialize any per-architecture swap areas. This phase requires
5261 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5262 swap the entire architecture out. */
5263 current_gdbarch = new_gdbarch;
5264 current_gdbarch_swap_init_hack ();
5265 current_gdbarch_swap_out_hack ();
5268 gdbarch_dump (new_gdbarch, gdb_stdlog);
5274 gdbarch_find_by_info (struct gdbarch_info info)
5276 /* Save the previously selected architecture, setting the global to
5277 NULL. This stops things like gdbarch->init() trying to use the
5278 previous architecture's configuration. The previous architecture
5279 may not even be of the same architecture family. The most recent
5280 architecture of the same family is found at the head of the
5281 rego->arches list. */
5282 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5284 /* Find the specified architecture. */
5285 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5287 /* Restore the existing architecture. */
5288 gdb_assert (current_gdbarch == NULL);
5289 current_gdbarch_swap_in_hack (old_gdbarch);
5294 /* Make the specified architecture current, swapping the existing one
5298 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5300 gdb_assert (new_gdbarch != NULL);
5301 gdb_assert (current_gdbarch != NULL);
5302 gdb_assert (new_gdbarch->initialized_p);
5303 current_gdbarch_swap_out_hack ();
5304 current_gdbarch_swap_in_hack (new_gdbarch);
5305 architecture_changed_event ();
5308 extern void _initialize_gdbarch (void);
5311 _initialize_gdbarch (void)
5313 struct cmd_list_element *c;
5315 add_show_from_set (add_set_cmd ("arch",
5318 (char *)&gdbarch_debug,
5319 "Set architecture debugging.\n\
5320 When non-zero, architecture debugging is enabled.", &setdebuglist),
5322 c = add_set_cmd ("archdebug",
5325 (char *)&gdbarch_debug,
5326 "Set architecture debugging.\n\
5327 When non-zero, architecture debugging is enabled.", &setlist);
5329 deprecate_cmd (c, "set debug arch");
5330 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");