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 = generic_convert_register_p;
467 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
468 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
469 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
470 current_gdbarch->extract_return_value = legacy_extract_return_value;
471 current_gdbarch->store_return_value = legacy_store_return_value;
472 current_gdbarch->use_struct_convention = generic_use_struct_convention;
473 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
474 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
475 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
476 current_gdbarch->deprecated_frame_args_address = get_frame_base;
477 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
478 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
479 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
480 current_gdbarch->addr_bits_remove = core_addr_identity;
481 current_gdbarch->smash_text_address = core_addr_identity;
482 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
483 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
484 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
485 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
486 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
487 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
488 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
489 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
490 current_gdbarch->name_of_malloc = "malloc";
491 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
492 /* gdbarch_alloc() */
494 return current_gdbarch;
498 /* Allocate extra space using the per-architecture obstack. */
501 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
503 void *data = obstack_alloc (arch->obstack, size);
504 memset (data, 0, size);
509 /* Free a gdbarch struct. This should never happen in normal
510 operation --- once you've created a gdbarch, you keep it around.
511 However, if an architecture's init function encounters an error
512 building the structure, it may need to clean up a partially
513 constructed gdbarch. */
516 gdbarch_free (struct gdbarch *arch)
518 struct obstack *obstack;
519 gdb_assert (arch != NULL);
520 gdb_assert (!arch->initialized_p);
521 obstack = arch->obstack;
522 obstack_free (obstack, 0); /* Includes the ARCH. */
527 /* Ensure that all values in a GDBARCH are reasonable. */
529 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
530 just happens to match the global variable ``current_gdbarch''. That
531 way macros refering to that variable get the local and not the global
532 version - ulgh. Once everything is parameterised with gdbarch, this
536 verify_gdbarch (struct gdbarch *current_gdbarch)
539 struct cleanup *cleanups;
542 log = mem_fileopen ();
543 cleanups = make_cleanup_ui_file_delete (log);
545 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
546 fprintf_unfiltered (log, "\n\tbyte-order");
547 if (current_gdbarch->bfd_arch_info == NULL)
548 fprintf_unfiltered (log, "\n\tbfd_arch_info");
549 /* Check those that need to be defined for the given multi-arch level. */
550 /* Skip verify of short_bit, invalid_p == 0 */
551 /* Skip verify of int_bit, invalid_p == 0 */
552 /* Skip verify of long_bit, invalid_p == 0 */
553 /* Skip verify of long_long_bit, invalid_p == 0 */
554 /* Skip verify of float_bit, invalid_p == 0 */
555 /* Skip verify of double_bit, invalid_p == 0 */
556 /* Skip verify of long_double_bit, invalid_p == 0 */
557 /* Skip verify of ptr_bit, invalid_p == 0 */
558 if (current_gdbarch->addr_bit == 0)
559 current_gdbarch->addr_bit = TARGET_PTR_BIT;
560 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
561 if (current_gdbarch->char_signed == -1)
562 current_gdbarch->char_signed = 1;
563 /* Skip verify of read_pc, has predicate */
564 /* Skip verify of write_pc, invalid_p == 0 */
565 /* Skip verify of read_sp, has predicate */
566 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
567 /* Skip verify of pseudo_register_read, has predicate */
568 /* Skip verify of pseudo_register_write, has predicate */
569 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
570 && (current_gdbarch->num_regs == -1))
571 fprintf_unfiltered (log, "\n\tnum_regs");
572 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
573 /* Skip verify of sp_regnum, invalid_p == 0 */
574 /* Skip verify of pc_regnum, invalid_p == 0 */
575 /* Skip verify of ps_regnum, invalid_p == 0 */
576 /* Skip verify of fp0_regnum, invalid_p == 0 */
577 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
578 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
579 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
580 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
581 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
582 /* Skip verify of register_type, has predicate */
583 /* Skip verify of deprecated_register_virtual_type, has predicate */
584 /* Skip verify of deprecated_register_byte, has predicate */
585 /* Skip verify of deprecated_register_raw_size, has predicate */
586 /* Skip verify of deprecated_register_virtual_size, has predicate */
587 /* Skip verify of deprecated_max_register_raw_size, has predicate */
588 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
589 /* Skip verify of unwind_dummy_id, has predicate */
590 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
591 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
592 /* Skip verify of deprecated_target_read_fp, has predicate */
593 /* Skip verify of push_dummy_call, has predicate */
594 /* Skip verify of deprecated_push_arguments, has predicate */
595 /* Skip verify of deprecated_push_return_address, has predicate */
596 /* Skip verify of deprecated_dummy_write_sp, has predicate */
597 /* Skip verify of call_dummy_location, invalid_p == 0 */
598 /* Skip verify of push_dummy_code, has predicate */
599 /* Skip verify of deprecated_do_registers_info, has predicate */
600 /* Skip verify of print_registers_info, invalid_p == 0 */
601 /* Skip verify of print_float_info, has predicate */
602 /* Skip verify of print_vector_info, has predicate */
603 /* Skip verify of register_sim_regno, invalid_p == 0 */
604 /* Skip verify of register_bytes_ok, has predicate */
605 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
606 /* Skip verify of cannot_store_register, invalid_p == 0 */
607 /* Skip verify of get_longjmp_target, has predicate */
608 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
609 /* Skip verify of deprecated_init_frame_pc, has predicate */
610 /* Skip verify of deprecated_get_saved_register, has predicate */
611 /* Skip verify of convert_register_p, invalid_p == 0 */
612 /* Skip verify of pointer_to_address, invalid_p == 0 */
613 /* Skip verify of address_to_pointer, invalid_p == 0 */
614 /* Skip verify of integer_to_address, has predicate */
615 /* Skip verify of deprecated_pop_frame, has predicate */
616 /* Skip verify of deprecated_store_struct_return, has predicate */
617 /* Skip verify of return_value, has predicate */
618 /* Skip verify of return_value_on_stack, invalid_p == 0 */
619 /* Skip verify of extract_return_value, invalid_p == 0 */
620 /* Skip verify of store_return_value, invalid_p == 0 */
621 /* Skip verify of use_struct_convention, invalid_p == 0 */
622 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
623 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
624 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
625 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
626 && (current_gdbarch->skip_prologue == 0))
627 fprintf_unfiltered (log, "\n\tskip_prologue");
628 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
629 && (current_gdbarch->inner_than == 0))
630 fprintf_unfiltered (log, "\n\tinner_than");
631 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
632 && (current_gdbarch->breakpoint_from_pc == 0))
633 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
634 /* Skip verify of adjust_breakpoint_address, has predicate */
635 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
636 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
637 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
638 /* Skip verify of function_start_offset, invalid_p == 0 */
639 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
640 /* Skip verify of frame_args_skip, invalid_p == 0 */
641 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
642 /* Skip verify of deprecated_frame_chain, has predicate */
643 /* Skip verify of deprecated_frame_chain_valid, has predicate */
644 /* Skip verify of deprecated_frame_saved_pc, has predicate */
645 /* Skip verify of unwind_pc, has predicate */
646 /* Skip verify of unwind_sp, has predicate */
647 /* Skip verify of deprecated_frame_args_address, has predicate */
648 /* Skip verify of deprecated_frame_locals_address, has predicate */
649 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
650 /* Skip verify of frame_num_args, has predicate */
651 /* Skip verify of deprecated_stack_align, has predicate */
652 /* Skip verify of frame_align, has predicate */
653 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
654 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
655 if (current_gdbarch->float_format == 0)
656 current_gdbarch->float_format = default_float_format (current_gdbarch);
657 if (current_gdbarch->double_format == 0)
658 current_gdbarch->double_format = default_double_format (current_gdbarch);
659 if (current_gdbarch->long_double_format == 0)
660 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
661 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
662 /* Skip verify of addr_bits_remove, invalid_p == 0 */
663 /* Skip verify of smash_text_address, invalid_p == 0 */
664 /* Skip verify of software_single_step, has predicate */
665 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
666 && (current_gdbarch->print_insn == 0))
667 fprintf_unfiltered (log, "\n\tprint_insn");
668 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
669 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
670 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
671 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
672 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
673 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
674 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
675 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
676 /* Skip verify of name_of_malloc, invalid_p == 0 */
677 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
678 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
679 /* Skip verify of address_class_type_flags, has predicate */
680 /* Skip verify of address_class_type_flags_to_name, has predicate */
681 /* Skip verify of address_class_name_to_type_flags, has predicate */
682 /* Skip verify of register_reggroup_p, invalid_p == 0 */
683 /* Skip verify of fetch_pointer_argument, has predicate */
684 /* Skip verify of regset_from_core_section, has predicate */
685 buf = ui_file_xstrdup (log, &dummy);
686 make_cleanup (xfree, buf);
687 if (strlen (buf) > 0)
688 internal_error (__FILE__, __LINE__,
689 "verify_gdbarch: the following are invalid ...%s",
691 do_cleanups (cleanups);
695 /* Print out the details of the current architecture. */
697 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
698 just happens to match the global variable ``current_gdbarch''. That
699 way macros refering to that variable get the local and not the global
700 version - ulgh. Once everything is parameterised with gdbarch, this
704 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
706 fprintf_unfiltered (file,
707 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
709 fprintf_unfiltered (file,
710 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
711 (long) current_gdbarch->convert_from_func_ptr_addr);
712 fprintf_unfiltered (file,
713 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
714 gdbarch_frame_align_p (current_gdbarch));
715 fprintf_unfiltered (file,
716 "gdbarch_dump: frame_align = 0x%08lx\n",
717 (long) current_gdbarch->frame_align);
718 fprintf_unfiltered (file,
719 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
720 gdbarch_regset_from_core_section_p (current_gdbarch));
721 fprintf_unfiltered (file,
722 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
723 (long) current_gdbarch->regset_from_core_section);
724 fprintf_unfiltered (file,
725 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
726 gdbarch_return_value_p (current_gdbarch));
727 fprintf_unfiltered (file,
728 "gdbarch_dump: return_value = 0x%08lx\n",
729 (long) current_gdbarch->return_value);
730 fprintf_unfiltered (file,
731 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
732 (long) current_gdbarch->in_function_epilogue_p);
733 fprintf_unfiltered (file,
734 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
735 (long) current_gdbarch->register_reggroup_p);
736 fprintf_unfiltered (file,
737 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
738 (long) current_gdbarch->stabs_argument_has_addr);
739 fprintf_unfiltered (file,
740 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
741 gdbarch_pseudo_register_read_p (current_gdbarch));
742 fprintf_unfiltered (file,
743 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
744 (long) current_gdbarch->pseudo_register_read);
745 fprintf_unfiltered (file,
746 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
747 gdbarch_pseudo_register_write_p (current_gdbarch));
748 fprintf_unfiltered (file,
749 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
750 (long) current_gdbarch->pseudo_register_write);
751 fprintf_unfiltered (file,
752 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
753 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
754 fprintf_unfiltered (file,
755 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
756 (long) current_gdbarch->address_class_name_to_type_flags);
757 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
758 fprintf_unfiltered (file,
759 "gdbarch_dump: %s # %s\n",
760 "ADDRESS_CLASS_TYPE_FLAGS_P()",
761 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
762 fprintf_unfiltered (file,
763 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
764 ADDRESS_CLASS_TYPE_FLAGS_P ());
766 #ifdef ADDRESS_CLASS_TYPE_FLAGS
767 fprintf_unfiltered (file,
768 "gdbarch_dump: %s # %s\n",
769 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
770 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
771 fprintf_unfiltered (file,
772 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
773 (long) current_gdbarch->address_class_type_flags
774 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
776 fprintf_unfiltered (file,
777 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
778 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
781 (long) current_gdbarch->address_class_type_flags_to_name);
782 #ifdef ADDRESS_TO_POINTER
783 fprintf_unfiltered (file,
784 "gdbarch_dump: %s # %s\n",
785 "ADDRESS_TO_POINTER(type, buf, addr)",
786 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
787 fprintf_unfiltered (file,
788 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
789 (long) current_gdbarch->address_to_pointer
790 /*ADDRESS_TO_POINTER ()*/);
792 #ifdef ADDR_BITS_REMOVE
793 fprintf_unfiltered (file,
794 "gdbarch_dump: %s # %s\n",
795 "ADDR_BITS_REMOVE(addr)",
796 XSTRING (ADDR_BITS_REMOVE (addr)));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
799 (long) current_gdbarch->addr_bits_remove
800 /*ADDR_BITS_REMOVE ()*/);
802 fprintf_unfiltered (file,
803 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
804 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
805 fprintf_unfiltered (file,
806 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
807 (long) current_gdbarch->adjust_breakpoint_address);
808 #ifdef BELIEVE_PCC_PROMOTION
809 fprintf_unfiltered (file,
810 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
811 XSTRING (BELIEVE_PCC_PROMOTION));
812 fprintf_unfiltered (file,
813 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
814 BELIEVE_PCC_PROMOTION);
816 #ifdef BREAKPOINT_FROM_PC
817 fprintf_unfiltered (file,
818 "gdbarch_dump: %s # %s\n",
819 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
820 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
821 fprintf_unfiltered (file,
822 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
823 (long) current_gdbarch->breakpoint_from_pc
824 /*BREAKPOINT_FROM_PC ()*/);
826 #ifdef CALL_DUMMY_LOCATION
827 fprintf_unfiltered (file,
828 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
829 XSTRING (CALL_DUMMY_LOCATION));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
832 CALL_DUMMY_LOCATION);
834 #ifdef CANNOT_FETCH_REGISTER
835 fprintf_unfiltered (file,
836 "gdbarch_dump: %s # %s\n",
837 "CANNOT_FETCH_REGISTER(regnum)",
838 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
841 (long) current_gdbarch->cannot_fetch_register
842 /*CANNOT_FETCH_REGISTER ()*/);
844 #ifdef CANNOT_STEP_BREAKPOINT
845 fprintf_unfiltered (file,
846 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
847 XSTRING (CANNOT_STEP_BREAKPOINT));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
850 CANNOT_STEP_BREAKPOINT);
852 #ifdef CANNOT_STORE_REGISTER
853 fprintf_unfiltered (file,
854 "gdbarch_dump: %s # %s\n",
855 "CANNOT_STORE_REGISTER(regnum)",
856 XSTRING (CANNOT_STORE_REGISTER (regnum)));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
859 (long) current_gdbarch->cannot_store_register
860 /*CANNOT_STORE_REGISTER ()*/);
862 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
863 fprintf_unfiltered (file,
864 "gdbarch_dump: %s # %s\n",
865 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
866 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
867 fprintf_unfiltered (file,
868 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
869 (long) current_gdbarch->coff_make_msymbol_special
870 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
872 fprintf_unfiltered (file,
873 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
874 (long) current_gdbarch->construct_inferior_arguments);
875 #ifdef CONVERT_REGISTER_P
876 fprintf_unfiltered (file,
877 "gdbarch_dump: %s # %s\n",
878 "CONVERT_REGISTER_P(regnum, type)",
879 XSTRING (CONVERT_REGISTER_P (regnum, type)));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
882 (long) current_gdbarch->convert_register_p
883 /*CONVERT_REGISTER_P ()*/);
885 #ifdef DECR_PC_AFTER_BREAK
886 fprintf_unfiltered (file,
887 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
888 XSTRING (DECR_PC_AFTER_BREAK));
889 fprintf_unfiltered (file,
890 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
891 (long) DECR_PC_AFTER_BREAK);
893 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
894 fprintf_unfiltered (file,
895 "gdbarch_dump: %s # %s\n",
896 "DEPRECATED_DO_REGISTERS_INFO_P()",
897 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
900 DEPRECATED_DO_REGISTERS_INFO_P ());
902 #ifdef DEPRECATED_DO_REGISTERS_INFO
903 fprintf_unfiltered (file,
904 "gdbarch_dump: %s # %s\n",
905 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
906 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
907 fprintf_unfiltered (file,
908 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
909 (long) current_gdbarch->deprecated_do_registers_info
910 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
912 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
913 fprintf_unfiltered (file,
914 "gdbarch_dump: %s # %s\n",
915 "DEPRECATED_DUMMY_WRITE_SP_P()",
916 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
919 DEPRECATED_DUMMY_WRITE_SP_P ());
921 #ifdef DEPRECATED_DUMMY_WRITE_SP
922 fprintf_unfiltered (file,
923 "gdbarch_dump: %s # %s\n",
924 "DEPRECATED_DUMMY_WRITE_SP(val)",
925 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
928 (long) current_gdbarch->deprecated_dummy_write_sp
929 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
931 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
932 fprintf_unfiltered (file,
933 "gdbarch_dump: %s # %s\n",
934 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
935 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
938 (long) current_gdbarch->deprecated_extract_return_value
939 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
941 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
942 fprintf_unfiltered (file,
943 "gdbarch_dump: %s # %s\n",
944 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
945 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
946 fprintf_unfiltered (file,
947 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
948 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
950 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
951 fprintf_unfiltered (file,
952 "gdbarch_dump: %s # %s\n",
953 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
954 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
955 fprintf_unfiltered (file,
956 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
957 (long) current_gdbarch->deprecated_extract_struct_value_address
958 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
960 #ifdef DEPRECATED_FP_REGNUM
961 fprintf_unfiltered (file,
962 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
963 XSTRING (DEPRECATED_FP_REGNUM));
964 fprintf_unfiltered (file,
965 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
966 DEPRECATED_FP_REGNUM);
968 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
969 fprintf_unfiltered (file,
970 "gdbarch_dump: %s # %s\n",
971 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
972 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
973 fprintf_unfiltered (file,
974 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
975 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
977 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
978 fprintf_unfiltered (file,
979 "gdbarch_dump: %s # %s\n",
980 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
981 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
982 fprintf_unfiltered (file,
983 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
984 (long) current_gdbarch->deprecated_frameless_function_invocation
985 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
987 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
988 fprintf_unfiltered (file,
989 "gdbarch_dump: %s # %s\n",
990 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
991 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
994 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
996 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
997 fprintf_unfiltered (file,
998 "gdbarch_dump: %s # %s\n",
999 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1000 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1003 (long) current_gdbarch->deprecated_frame_args_address
1004 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1006 #ifdef DEPRECATED_FRAME_CHAIN_P
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: %s # %s\n",
1009 "DEPRECATED_FRAME_CHAIN_P()",
1010 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1013 DEPRECATED_FRAME_CHAIN_P ());
1015 #ifdef DEPRECATED_FRAME_CHAIN
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: %s # %s\n",
1018 "DEPRECATED_FRAME_CHAIN(frame)",
1019 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1022 (long) current_gdbarch->deprecated_frame_chain
1023 /*DEPRECATED_FRAME_CHAIN ()*/);
1025 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: %s # %s\n",
1028 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1029 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1032 DEPRECATED_FRAME_CHAIN_VALID_P ());
1034 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: %s # %s\n",
1037 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1038 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1041 (long) current_gdbarch->deprecated_frame_chain_valid
1042 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1044 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: %s # %s\n",
1047 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1048 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1051 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1053 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: %s # %s\n",
1056 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1057 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1060 (long) current_gdbarch->deprecated_frame_init_saved_regs
1061 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1063 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: %s # %s\n",
1066 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1067 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1070 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1072 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: %s # %s\n",
1075 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1076 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1079 (long) current_gdbarch->deprecated_frame_locals_address
1080 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1082 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: %s # %s\n",
1085 "DEPRECATED_FRAME_SAVED_PC_P()",
1086 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1089 DEPRECATED_FRAME_SAVED_PC_P ());
1091 #ifdef DEPRECATED_FRAME_SAVED_PC
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: %s # %s\n",
1094 "DEPRECATED_FRAME_SAVED_PC(fi)",
1095 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1098 (long) current_gdbarch->deprecated_frame_saved_pc
1099 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1101 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: %s # %s\n",
1104 "DEPRECATED_GET_SAVED_REGISTER_P()",
1105 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1108 DEPRECATED_GET_SAVED_REGISTER_P ());
1110 #ifdef DEPRECATED_GET_SAVED_REGISTER
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: %s # %s\n",
1113 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1114 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1117 (long) current_gdbarch->deprecated_get_saved_register
1118 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1120 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: %s # %s\n",
1123 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1124 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1127 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1129 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: %s # %s\n",
1132 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1133 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1136 (long) current_gdbarch->deprecated_init_extra_frame_info
1137 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1139 #ifdef DEPRECATED_INIT_FRAME_PC_P
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: %s # %s\n",
1142 "DEPRECATED_INIT_FRAME_PC_P()",
1143 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1146 DEPRECATED_INIT_FRAME_PC_P ());
1148 #ifdef DEPRECATED_INIT_FRAME_PC
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: %s # %s\n",
1151 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1152 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1155 (long) current_gdbarch->deprecated_init_frame_pc
1156 /*DEPRECATED_INIT_FRAME_PC ()*/);
1158 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: %s # %s\n",
1161 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1162 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1165 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1167 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1170 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1173 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1175 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: %s # %s\n",
1178 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1179 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1182 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1184 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1185 fprintf_unfiltered (file,
1186 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1187 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1190 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1192 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: %s # %s\n",
1195 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1196 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1199 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1201 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: %s # %s\n",
1204 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1205 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1208 (long) current_gdbarch->deprecated_pc_in_call_dummy
1209 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1211 #ifdef DEPRECATED_POP_FRAME_P
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: %s # %s\n",
1214 "DEPRECATED_POP_FRAME_P()",
1215 XSTRING (DEPRECATED_POP_FRAME_P ()));
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1218 DEPRECATED_POP_FRAME_P ());
1220 #ifdef DEPRECATED_POP_FRAME
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: %s # %s\n",
1223 "DEPRECATED_POP_FRAME(-)",
1224 XSTRING (DEPRECATED_POP_FRAME (-)));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1227 (long) current_gdbarch->deprecated_pop_frame
1228 /*DEPRECATED_POP_FRAME ()*/);
1230 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: %s # %s\n",
1233 "DEPRECATED_PUSH_ARGUMENTS_P()",
1234 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1237 DEPRECATED_PUSH_ARGUMENTS_P ());
1239 #ifdef DEPRECATED_PUSH_ARGUMENTS
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: %s # %s\n",
1242 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1243 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1246 (long) current_gdbarch->deprecated_push_arguments
1247 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1249 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: %s # %s\n",
1252 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1253 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1256 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1258 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: %s # %s\n",
1261 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1262 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1263 fprintf_unfiltered (file,
1264 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1265 (long) current_gdbarch->deprecated_push_return_address
1266 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1268 #ifdef DEPRECATED_REGISTER_BYTE_P
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: %s # %s\n",
1271 "DEPRECATED_REGISTER_BYTE_P()",
1272 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1275 DEPRECATED_REGISTER_BYTE_P ());
1277 #ifdef DEPRECATED_REGISTER_BYTE
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: %s # %s\n",
1280 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1281 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1284 (long) current_gdbarch->deprecated_register_byte
1285 /*DEPRECATED_REGISTER_BYTE ()*/);
1287 #ifdef DEPRECATED_REGISTER_BYTES
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1290 XSTRING (DEPRECATED_REGISTER_BYTES));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1293 DEPRECATED_REGISTER_BYTES);
1295 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: %s # %s\n",
1298 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1299 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1302 DEPRECATED_REGISTER_RAW_SIZE_P ());
1304 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1305 fprintf_unfiltered (file,
1306 "gdbarch_dump: %s # %s\n",
1307 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1308 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1311 (long) current_gdbarch->deprecated_register_raw_size
1312 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1314 #ifdef DEPRECATED_REGISTER_SIZE
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1317 XSTRING (DEPRECATED_REGISTER_SIZE));
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1320 DEPRECATED_REGISTER_SIZE);
1322 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: %s # %s\n",
1325 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1326 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1329 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1331 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: %s # %s\n",
1334 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1335 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1338 (long) current_gdbarch->deprecated_register_virtual_size
1339 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1341 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: %s # %s\n",
1344 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1345 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1348 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1350 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: %s # %s\n",
1353 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1354 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1357 (long) current_gdbarch->deprecated_register_virtual_type
1358 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1360 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1363 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1364 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1367 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1369 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: %s # %s\n",
1372 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1373 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1374 fprintf_unfiltered (file,
1375 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1376 (long) current_gdbarch->deprecated_reg_struct_has_addr
1377 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1379 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: %s # %s\n",
1382 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1383 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1386 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1388 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: %s # %s\n",
1391 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1392 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1395 (long) current_gdbarch->deprecated_saved_pc_after_call
1396 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1398 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: %s # %s\n",
1401 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1402 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1405 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1407 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: %s # %s\n",
1410 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1411 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1414 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1415 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1417 #ifdef DEPRECATED_STACK_ALIGN_P
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: %s # %s\n",
1420 "DEPRECATED_STACK_ALIGN_P()",
1421 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1424 DEPRECATED_STACK_ALIGN_P ());
1426 #ifdef DEPRECATED_STACK_ALIGN
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: %s # %s\n",
1429 "DEPRECATED_STACK_ALIGN(sp)",
1430 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1433 (long) current_gdbarch->deprecated_stack_align
1434 /*DEPRECATED_STACK_ALIGN ()*/);
1436 #ifdef DEPRECATED_STORE_RETURN_VALUE
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: %s # %s\n",
1439 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1440 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1443 (long) current_gdbarch->deprecated_store_return_value
1444 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1446 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: %s # %s\n",
1449 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1450 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1453 DEPRECATED_STORE_STRUCT_RETURN_P ());
1455 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: %s # %s\n",
1458 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1459 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1462 (long) current_gdbarch->deprecated_store_struct_return
1463 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1465 #ifdef DEPRECATED_TARGET_READ_FP_P
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "DEPRECATED_TARGET_READ_FP_P()",
1469 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1472 DEPRECATED_TARGET_READ_FP_P ());
1474 #ifdef DEPRECATED_TARGET_READ_FP
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: %s # %s\n",
1477 "DEPRECATED_TARGET_READ_FP()",
1478 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1481 (long) current_gdbarch->deprecated_target_read_fp
1482 /*DEPRECATED_TARGET_READ_FP ()*/);
1484 #ifdef DWARF2_REG_TO_REGNUM
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: %s # %s\n",
1487 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1488 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1491 (long) current_gdbarch->dwarf2_reg_to_regnum
1492 /*DWARF2_REG_TO_REGNUM ()*/);
1494 #ifdef DWARF_REG_TO_REGNUM
1495 fprintf_unfiltered (file,
1496 "gdbarch_dump: %s # %s\n",
1497 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1498 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1501 (long) current_gdbarch->dwarf_reg_to_regnum
1502 /*DWARF_REG_TO_REGNUM ()*/);
1504 #ifdef ECOFF_REG_TO_REGNUM
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: %s # %s\n",
1507 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1508 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1511 (long) current_gdbarch->ecoff_reg_to_regnum
1512 /*ECOFF_REG_TO_REGNUM ()*/);
1514 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: %s # %s\n",
1517 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1518 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1519 fprintf_unfiltered (file,
1520 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1521 (long) current_gdbarch->elf_make_msymbol_special
1522 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1524 #ifdef EXTRACT_RETURN_VALUE
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: %s # %s\n",
1527 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1528 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1531 (long) current_gdbarch->extract_return_value
1532 /*EXTRACT_RETURN_VALUE ()*/);
1534 #ifdef FETCH_POINTER_ARGUMENT_P
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: %s # %s\n",
1537 "FETCH_POINTER_ARGUMENT_P()",
1538 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1541 FETCH_POINTER_ARGUMENT_P ());
1543 #ifdef FETCH_POINTER_ARGUMENT
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: %s # %s\n",
1546 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1547 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1550 (long) current_gdbarch->fetch_pointer_argument
1551 /*FETCH_POINTER_ARGUMENT ()*/);
1554 fprintf_unfiltered (file,
1555 "gdbarch_dump: FP0_REGNUM # %s\n",
1556 XSTRING (FP0_REGNUM));
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: FP0_REGNUM = %d\n",
1561 #ifdef FRAME_ARGS_SKIP
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1564 XSTRING (FRAME_ARGS_SKIP));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1567 (long) FRAME_ARGS_SKIP);
1569 #ifdef FRAME_NUM_ARGS_P
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: %s # %s\n",
1572 "FRAME_NUM_ARGS_P()",
1573 XSTRING (FRAME_NUM_ARGS_P ()));
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1576 FRAME_NUM_ARGS_P ());
1578 #ifdef FRAME_NUM_ARGS
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: %s # %s\n",
1581 "FRAME_NUM_ARGS(frame)",
1582 XSTRING (FRAME_NUM_ARGS (frame)));
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1585 (long) current_gdbarch->frame_num_args
1586 /*FRAME_NUM_ARGS ()*/);
1588 #ifdef FRAME_RED_ZONE_SIZE
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1591 XSTRING (FRAME_RED_ZONE_SIZE));
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1594 FRAME_RED_ZONE_SIZE);
1596 #ifdef FUNCTION_START_OFFSET
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1599 XSTRING (FUNCTION_START_OFFSET));
1600 fprintf_unfiltered (file,
1601 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1602 (long) FUNCTION_START_OFFSET);
1604 #ifdef GET_LONGJMP_TARGET_P
1605 fprintf_unfiltered (file,
1606 "gdbarch_dump: %s # %s\n",
1607 "GET_LONGJMP_TARGET_P()",
1608 XSTRING (GET_LONGJMP_TARGET_P ()));
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1611 GET_LONGJMP_TARGET_P ());
1613 #ifdef GET_LONGJMP_TARGET
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: %s # %s\n",
1616 "GET_LONGJMP_TARGET(pc)",
1617 XSTRING (GET_LONGJMP_TARGET (pc)));
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1620 (long) current_gdbarch->get_longjmp_target
1621 /*GET_LONGJMP_TARGET ()*/);
1623 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1624 fprintf_unfiltered (file,
1625 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1626 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1629 HAVE_NONSTEPPABLE_WATCHPOINT);
1632 fprintf_unfiltered (file,
1633 "gdbarch_dump: %s # %s\n",
1634 "INNER_THAN(lhs, rhs)",
1635 XSTRING (INNER_THAN (lhs, rhs)));
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1638 (long) current_gdbarch->inner_than
1641 #ifdef INTEGER_TO_ADDRESS_P
1642 fprintf_unfiltered (file,
1643 "gdbarch_dump: %s # %s\n",
1644 "INTEGER_TO_ADDRESS_P()",
1645 XSTRING (INTEGER_TO_ADDRESS_P ()));
1646 fprintf_unfiltered (file,
1647 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1648 INTEGER_TO_ADDRESS_P ());
1650 #ifdef INTEGER_TO_ADDRESS
1651 fprintf_unfiltered (file,
1652 "gdbarch_dump: %s # %s\n",
1653 "INTEGER_TO_ADDRESS(type, buf)",
1654 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1657 (long) current_gdbarch->integer_to_address
1658 /*INTEGER_TO_ADDRESS ()*/);
1660 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: %s # %s\n",
1663 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1664 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1665 fprintf_unfiltered (file,
1666 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1667 (long) current_gdbarch->in_solib_call_trampoline
1668 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1670 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1671 fprintf_unfiltered (file,
1672 "gdbarch_dump: %s # %s\n",
1673 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1674 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1677 (long) current_gdbarch->in_solib_return_trampoline
1678 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1680 #ifdef MEMORY_INSERT_BREAKPOINT
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: %s # %s\n",
1683 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1684 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1687 (long) current_gdbarch->memory_insert_breakpoint
1688 /*MEMORY_INSERT_BREAKPOINT ()*/);
1690 #ifdef MEMORY_REMOVE_BREAKPOINT
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: %s # %s\n",
1693 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1694 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1697 (long) current_gdbarch->memory_remove_breakpoint
1698 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1700 #ifdef NAME_OF_MALLOC
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1703 XSTRING (NAME_OF_MALLOC));
1704 fprintf_unfiltered (file,
1705 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1708 #ifdef NUM_PSEUDO_REGS
1709 fprintf_unfiltered (file,
1710 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1711 XSTRING (NUM_PSEUDO_REGS));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: NUM_REGS # %s\n",
1719 XSTRING (NUM_REGS));
1720 fprintf_unfiltered (file,
1721 "gdbarch_dump: NUM_REGS = %d\n",
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: PC_REGNUM # %s\n",
1727 XSTRING (PC_REGNUM));
1728 fprintf_unfiltered (file,
1729 "gdbarch_dump: PC_REGNUM = %d\n",
1732 #ifdef POINTER_TO_ADDRESS
1733 fprintf_unfiltered (file,
1734 "gdbarch_dump: %s # %s\n",
1735 "POINTER_TO_ADDRESS(type, buf)",
1736 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1739 (long) current_gdbarch->pointer_to_address
1740 /*POINTER_TO_ADDRESS ()*/);
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1744 gdbarch_print_float_info_p (current_gdbarch));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: print_float_info = 0x%08lx\n",
1747 (long) current_gdbarch->print_float_info);
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1750 (long) current_gdbarch->print_registers_info);
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1753 gdbarch_print_vector_info_p (current_gdbarch));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1756 (long) current_gdbarch->print_vector_info);
1758 fprintf_unfiltered (file,
1759 "gdbarch_dump: PS_REGNUM # %s\n",
1760 XSTRING (PS_REGNUM));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: PS_REGNUM = %d\n",
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1767 gdbarch_push_dummy_call_p (current_gdbarch));
1768 fprintf_unfiltered (file,
1769 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1770 (long) current_gdbarch->push_dummy_call);
1771 fprintf_unfiltered (file,
1772 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1773 gdbarch_push_dummy_code_p (current_gdbarch));
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1776 (long) current_gdbarch->push_dummy_code);
1777 #ifdef REGISTER_BYTES_OK_P
1778 fprintf_unfiltered (file,
1779 "gdbarch_dump: %s # %s\n",
1780 "REGISTER_BYTES_OK_P()",
1781 XSTRING (REGISTER_BYTES_OK_P ()));
1782 fprintf_unfiltered (file,
1783 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1784 REGISTER_BYTES_OK_P ());
1786 #ifdef REGISTER_BYTES_OK
1787 fprintf_unfiltered (file,
1788 "gdbarch_dump: %s # %s\n",
1789 "REGISTER_BYTES_OK(nr_bytes)",
1790 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1791 fprintf_unfiltered (file,
1792 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1793 (long) current_gdbarch->register_bytes_ok
1794 /*REGISTER_BYTES_OK ()*/);
1796 #ifdef REGISTER_NAME
1797 fprintf_unfiltered (file,
1798 "gdbarch_dump: %s # %s\n",
1799 "REGISTER_NAME(regnr)",
1800 XSTRING (REGISTER_NAME (regnr)));
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1803 (long) current_gdbarch->register_name
1804 /*REGISTER_NAME ()*/);
1806 #ifdef REGISTER_SIM_REGNO
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: %s # %s\n",
1809 "REGISTER_SIM_REGNO(reg_nr)",
1810 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1813 (long) current_gdbarch->register_sim_regno
1814 /*REGISTER_SIM_REGNO ()*/);
1816 #ifdef REGISTER_TO_VALUE
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: %s # %s\n",
1819 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1820 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1821 fprintf_unfiltered (file,
1822 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1823 (long) current_gdbarch->register_to_value
1824 /*REGISTER_TO_VALUE ()*/);
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1828 gdbarch_register_type_p (current_gdbarch));
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: register_type = 0x%08lx\n",
1831 (long) current_gdbarch->register_type);
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1834 (long) current_gdbarch->remote_translate_xfer_address);
1835 #ifdef RETURN_VALUE_ON_STACK
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: %s # %s\n",
1838 "RETURN_VALUE_ON_STACK(type)",
1839 XSTRING (RETURN_VALUE_ON_STACK (type)));
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1842 (long) current_gdbarch->return_value_on_stack
1843 /*RETURN_VALUE_ON_STACK ()*/);
1845 #ifdef SDB_REG_TO_REGNUM
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: %s # %s\n",
1848 "SDB_REG_TO_REGNUM(sdb_regnr)",
1849 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1852 (long) current_gdbarch->sdb_reg_to_regnum
1853 /*SDB_REG_TO_REGNUM ()*/);
1855 #ifdef SKIP_PROLOGUE
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: %s # %s\n",
1858 "SKIP_PROLOGUE(ip)",
1859 XSTRING (SKIP_PROLOGUE (ip)));
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1862 (long) current_gdbarch->skip_prologue
1863 /*SKIP_PROLOGUE ()*/);
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1867 (long) current_gdbarch->skip_solib_resolver);
1868 #ifdef SKIP_TRAMPOLINE_CODE
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: %s # %s\n",
1871 "SKIP_TRAMPOLINE_CODE(pc)",
1872 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1875 (long) current_gdbarch->skip_trampoline_code
1876 /*SKIP_TRAMPOLINE_CODE ()*/);
1878 #ifdef SMASH_TEXT_ADDRESS
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: %s # %s\n",
1881 "SMASH_TEXT_ADDRESS(addr)",
1882 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1885 (long) current_gdbarch->smash_text_address
1886 /*SMASH_TEXT_ADDRESS ()*/);
1888 #ifdef SOFTWARE_SINGLE_STEP_P
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: %s # %s\n",
1891 "SOFTWARE_SINGLE_STEP_P()",
1892 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1895 SOFTWARE_SINGLE_STEP_P ());
1897 #ifdef SOFTWARE_SINGLE_STEP
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: %s # %s\n",
1900 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1901 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1904 (long) current_gdbarch->software_single_step
1905 /*SOFTWARE_SINGLE_STEP ()*/);
1908 fprintf_unfiltered (file,
1909 "gdbarch_dump: SP_REGNUM # %s\n",
1910 XSTRING (SP_REGNUM));
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: SP_REGNUM = %d\n",
1915 #ifdef STAB_REG_TO_REGNUM
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: %s # %s\n",
1918 "STAB_REG_TO_REGNUM(stab_regnr)",
1919 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1920 fprintf_unfiltered (file,
1921 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1922 (long) current_gdbarch->stab_reg_to_regnum
1923 /*STAB_REG_TO_REGNUM ()*/);
1925 #ifdef STORE_RETURN_VALUE
1926 fprintf_unfiltered (file,
1927 "gdbarch_dump: %s # %s\n",
1928 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1929 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1932 (long) current_gdbarch->store_return_value
1933 /*STORE_RETURN_VALUE ()*/);
1935 #ifdef TARGET_ADDR_BIT
1936 fprintf_unfiltered (file,
1937 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1938 XSTRING (TARGET_ADDR_BIT));
1939 fprintf_unfiltered (file,
1940 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1943 #ifdef TARGET_ARCHITECTURE
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1946 XSTRING (TARGET_ARCHITECTURE));
1947 if (TARGET_ARCHITECTURE != NULL)
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1950 TARGET_ARCHITECTURE->printable_name);
1952 #ifdef TARGET_BFD_VMA_BIT
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1955 XSTRING (TARGET_BFD_VMA_BIT));
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1958 TARGET_BFD_VMA_BIT);
1960 #ifdef TARGET_BYTE_ORDER
1961 fprintf_unfiltered (file,
1962 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1963 XSTRING (TARGET_BYTE_ORDER));
1964 fprintf_unfiltered (file,
1965 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1966 (long) TARGET_BYTE_ORDER);
1968 #ifdef TARGET_CHAR_SIGNED
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1971 XSTRING (TARGET_CHAR_SIGNED));
1972 fprintf_unfiltered (file,
1973 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1974 TARGET_CHAR_SIGNED);
1976 #ifdef TARGET_DOUBLE_BIT
1977 fprintf_unfiltered (file,
1978 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1979 XSTRING (TARGET_DOUBLE_BIT));
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1984 #ifdef TARGET_DOUBLE_FORMAT
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1987 XSTRING (TARGET_DOUBLE_FORMAT));
1988 fprintf_unfiltered (file,
1989 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
1990 (TARGET_DOUBLE_FORMAT)->name);
1992 #ifdef TARGET_FLOAT_BIT
1993 fprintf_unfiltered (file,
1994 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1995 XSTRING (TARGET_FLOAT_BIT));
1996 fprintf_unfiltered (file,
1997 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2000 #ifdef TARGET_FLOAT_FORMAT
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2003 XSTRING (TARGET_FLOAT_FORMAT));
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2006 (TARGET_FLOAT_FORMAT)->name);
2008 #ifdef TARGET_INT_BIT
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2011 XSTRING (TARGET_INT_BIT));
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2016 #ifdef TARGET_LONG_BIT
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2019 XSTRING (TARGET_LONG_BIT));
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2024 #ifdef TARGET_LONG_DOUBLE_BIT
2025 fprintf_unfiltered (file,
2026 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2027 XSTRING (TARGET_LONG_DOUBLE_BIT));
2028 fprintf_unfiltered (file,
2029 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2030 TARGET_LONG_DOUBLE_BIT);
2032 #ifdef TARGET_LONG_DOUBLE_FORMAT
2033 fprintf_unfiltered (file,
2034 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2035 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2036 fprintf_unfiltered (file,
2037 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2038 (TARGET_LONG_DOUBLE_FORMAT)->name);
2040 #ifdef TARGET_LONG_LONG_BIT
2041 fprintf_unfiltered (file,
2042 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2043 XSTRING (TARGET_LONG_LONG_BIT));
2044 fprintf_unfiltered (file,
2045 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2046 TARGET_LONG_LONG_BIT);
2049 fprintf_unfiltered (file,
2050 "gdbarch_dump: TARGET_OSABI # %s\n",
2051 XSTRING (TARGET_OSABI));
2052 fprintf_unfiltered (file,
2053 "gdbarch_dump: TARGET_OSABI = %ld\n",
2054 (long) TARGET_OSABI);
2056 #ifdef TARGET_PRINT_INSN
2057 fprintf_unfiltered (file,
2058 "gdbarch_dump: %s # %s\n",
2059 "TARGET_PRINT_INSN(vma, info)",
2060 XSTRING (TARGET_PRINT_INSN (vma, info)));
2061 fprintf_unfiltered (file,
2062 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2063 (long) current_gdbarch->print_insn
2064 /*TARGET_PRINT_INSN ()*/);
2066 #ifdef TARGET_PTR_BIT
2067 fprintf_unfiltered (file,
2068 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2069 XSTRING (TARGET_PTR_BIT));
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2074 #ifdef TARGET_READ_PC_P
2075 fprintf_unfiltered (file,
2076 "gdbarch_dump: %s # %s\n",
2077 "TARGET_READ_PC_P()",
2078 XSTRING (TARGET_READ_PC_P ()));
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2081 TARGET_READ_PC_P ());
2083 #ifdef TARGET_READ_PC
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: %s # %s\n",
2086 "TARGET_READ_PC(ptid)",
2087 XSTRING (TARGET_READ_PC (ptid)));
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2090 (long) current_gdbarch->read_pc
2091 /*TARGET_READ_PC ()*/);
2093 #ifdef TARGET_READ_SP_P
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: %s # %s\n",
2096 "TARGET_READ_SP_P()",
2097 XSTRING (TARGET_READ_SP_P ()));
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2100 TARGET_READ_SP_P ());
2102 #ifdef TARGET_READ_SP
2103 fprintf_unfiltered (file,
2104 "gdbarch_dump: %s # %s\n",
2106 XSTRING (TARGET_READ_SP ()));
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2109 (long) current_gdbarch->read_sp
2110 /*TARGET_READ_SP ()*/);
2112 #ifdef TARGET_SHORT_BIT
2113 fprintf_unfiltered (file,
2114 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2115 XSTRING (TARGET_SHORT_BIT));
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2120 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2121 fprintf_unfiltered (file,
2122 "gdbarch_dump: %s # %s\n",
2123 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2124 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2125 fprintf_unfiltered (file,
2126 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2127 (long) current_gdbarch->virtual_frame_pointer
2128 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2130 #ifdef TARGET_WRITE_PC
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: %s # %s\n",
2133 "TARGET_WRITE_PC(val, ptid)",
2134 XSTRING (TARGET_WRITE_PC (val, ptid)));
2135 fprintf_unfiltered (file,
2136 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2137 (long) current_gdbarch->write_pc
2138 /*TARGET_WRITE_PC ()*/);
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2142 gdbarch_unwind_dummy_id_p (current_gdbarch));
2143 fprintf_unfiltered (file,
2144 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2145 (long) current_gdbarch->unwind_dummy_id);
2146 fprintf_unfiltered (file,
2147 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2148 gdbarch_unwind_pc_p (current_gdbarch));
2149 fprintf_unfiltered (file,
2150 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2151 (long) current_gdbarch->unwind_pc);
2152 fprintf_unfiltered (file,
2153 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2154 gdbarch_unwind_sp_p (current_gdbarch));
2155 fprintf_unfiltered (file,
2156 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2157 (long) current_gdbarch->unwind_sp);
2158 #ifdef USE_STRUCT_CONVENTION
2159 fprintf_unfiltered (file,
2160 "gdbarch_dump: %s # %s\n",
2161 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2162 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2165 (long) current_gdbarch->use_struct_convention
2166 /*USE_STRUCT_CONVENTION ()*/);
2168 #ifdef VALUE_TO_REGISTER
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: %s # %s\n",
2171 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2172 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2173 fprintf_unfiltered (file,
2174 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2175 (long) current_gdbarch->value_to_register
2176 /*VALUE_TO_REGISTER ()*/);
2178 if (current_gdbarch->dump_tdep != NULL)
2179 current_gdbarch->dump_tdep (current_gdbarch, file);
2182 struct gdbarch_tdep *
2183 gdbarch_tdep (struct gdbarch *gdbarch)
2185 if (gdbarch_debug >= 2)
2186 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2187 return gdbarch->tdep;
2191 const struct bfd_arch_info *
2192 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2194 gdb_assert (gdbarch != NULL);
2195 if (gdbarch_debug >= 2)
2196 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2197 return gdbarch->bfd_arch_info;
2201 gdbarch_byte_order (struct gdbarch *gdbarch)
2203 gdb_assert (gdbarch != NULL);
2204 if (gdbarch_debug >= 2)
2205 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2206 return gdbarch->byte_order;
2210 gdbarch_osabi (struct gdbarch *gdbarch)
2212 gdb_assert (gdbarch != NULL);
2213 if (gdbarch_debug >= 2)
2214 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2215 return gdbarch->osabi;
2219 gdbarch_short_bit (struct gdbarch *gdbarch)
2221 gdb_assert (gdbarch != NULL);
2222 /* Skip verify of short_bit, invalid_p == 0 */
2223 if (gdbarch_debug >= 2)
2224 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2225 return gdbarch->short_bit;
2229 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2232 gdbarch->short_bit = short_bit;
2236 gdbarch_int_bit (struct gdbarch *gdbarch)
2238 gdb_assert (gdbarch != NULL);
2239 /* Skip verify of int_bit, invalid_p == 0 */
2240 if (gdbarch_debug >= 2)
2241 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2242 return gdbarch->int_bit;
2246 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2249 gdbarch->int_bit = int_bit;
2253 gdbarch_long_bit (struct gdbarch *gdbarch)
2255 gdb_assert (gdbarch != NULL);
2256 /* Skip verify of long_bit, invalid_p == 0 */
2257 if (gdbarch_debug >= 2)
2258 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2259 return gdbarch->long_bit;
2263 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2266 gdbarch->long_bit = long_bit;
2270 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2272 gdb_assert (gdbarch != NULL);
2273 /* Skip verify of long_long_bit, invalid_p == 0 */
2274 if (gdbarch_debug >= 2)
2275 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2276 return gdbarch->long_long_bit;
2280 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2283 gdbarch->long_long_bit = long_long_bit;
2287 gdbarch_float_bit (struct gdbarch *gdbarch)
2289 gdb_assert (gdbarch != NULL);
2290 /* Skip verify of float_bit, invalid_p == 0 */
2291 if (gdbarch_debug >= 2)
2292 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2293 return gdbarch->float_bit;
2297 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2300 gdbarch->float_bit = float_bit;
2304 gdbarch_double_bit (struct gdbarch *gdbarch)
2306 gdb_assert (gdbarch != NULL);
2307 /* Skip verify of double_bit, invalid_p == 0 */
2308 if (gdbarch_debug >= 2)
2309 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2310 return gdbarch->double_bit;
2314 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2317 gdbarch->double_bit = double_bit;
2321 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2323 gdb_assert (gdbarch != NULL);
2324 /* Skip verify of long_double_bit, invalid_p == 0 */
2325 if (gdbarch_debug >= 2)
2326 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2327 return gdbarch->long_double_bit;
2331 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2332 int long_double_bit)
2334 gdbarch->long_double_bit = long_double_bit;
2338 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2340 gdb_assert (gdbarch != NULL);
2341 /* Skip verify of ptr_bit, invalid_p == 0 */
2342 if (gdbarch_debug >= 2)
2343 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2344 return gdbarch->ptr_bit;
2348 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2351 gdbarch->ptr_bit = ptr_bit;
2355 gdbarch_addr_bit (struct gdbarch *gdbarch)
2357 gdb_assert (gdbarch != NULL);
2358 /* Check variable changed from pre-default. */
2359 gdb_assert (gdbarch->addr_bit != 0);
2360 if (gdbarch_debug >= 2)
2361 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2362 return gdbarch->addr_bit;
2366 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2369 gdbarch->addr_bit = addr_bit;
2373 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2375 gdb_assert (gdbarch != NULL);
2376 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2377 if (gdbarch_debug >= 2)
2378 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2379 return gdbarch->bfd_vma_bit;
2383 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2386 gdbarch->bfd_vma_bit = bfd_vma_bit;
2390 gdbarch_char_signed (struct gdbarch *gdbarch)
2392 gdb_assert (gdbarch != NULL);
2393 /* Check variable changed from pre-default. */
2394 gdb_assert (gdbarch->char_signed != -1);
2395 if (gdbarch_debug >= 2)
2396 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2397 return gdbarch->char_signed;
2401 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2404 gdbarch->char_signed = char_signed;
2408 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2410 gdb_assert (gdbarch != NULL);
2411 return gdbarch->read_pc != NULL;
2415 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2417 gdb_assert (gdbarch != NULL);
2418 gdb_assert (gdbarch->read_pc != NULL);
2419 if (gdbarch_debug >= 2)
2420 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2421 return gdbarch->read_pc (ptid);
2425 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2426 gdbarch_read_pc_ftype read_pc)
2428 gdbarch->read_pc = read_pc;
2432 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2434 gdb_assert (gdbarch != NULL);
2435 gdb_assert (gdbarch->write_pc != NULL);
2436 if (gdbarch_debug >= 2)
2437 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2438 gdbarch->write_pc (val, ptid);
2442 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2443 gdbarch_write_pc_ftype write_pc)
2445 gdbarch->write_pc = write_pc;
2449 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2451 gdb_assert (gdbarch != NULL);
2452 return gdbarch->read_sp != NULL;
2456 gdbarch_read_sp (struct gdbarch *gdbarch)
2458 gdb_assert (gdbarch != NULL);
2459 gdb_assert (gdbarch->read_sp != NULL);
2460 if (gdbarch_debug >= 2)
2461 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2462 return gdbarch->read_sp ();
2466 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2467 gdbarch_read_sp_ftype read_sp)
2469 gdbarch->read_sp = read_sp;
2473 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2475 gdb_assert (gdbarch != NULL);
2476 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2477 if (gdbarch_debug >= 2)
2478 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2479 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2483 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2484 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2486 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2490 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2492 gdb_assert (gdbarch != NULL);
2493 return gdbarch->pseudo_register_read != NULL;
2497 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2499 gdb_assert (gdbarch != NULL);
2500 gdb_assert (gdbarch->pseudo_register_read != NULL);
2501 if (gdbarch_debug >= 2)
2502 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2503 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2507 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2508 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2510 gdbarch->pseudo_register_read = pseudo_register_read;
2514 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2516 gdb_assert (gdbarch != NULL);
2517 return gdbarch->pseudo_register_write != NULL;
2521 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2523 gdb_assert (gdbarch != NULL);
2524 gdb_assert (gdbarch->pseudo_register_write != NULL);
2525 if (gdbarch_debug >= 2)
2526 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2527 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2531 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2532 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2534 gdbarch->pseudo_register_write = pseudo_register_write;
2538 gdbarch_num_regs (struct gdbarch *gdbarch)
2540 gdb_assert (gdbarch != NULL);
2541 /* Check variable changed from pre-default. */
2542 gdb_assert (gdbarch->num_regs != -1);
2543 if (gdbarch_debug >= 2)
2544 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2545 return gdbarch->num_regs;
2549 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2552 gdbarch->num_regs = num_regs;
2556 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2558 gdb_assert (gdbarch != NULL);
2559 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2560 if (gdbarch_debug >= 2)
2561 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2562 return gdbarch->num_pseudo_regs;
2566 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2567 int num_pseudo_regs)
2569 gdbarch->num_pseudo_regs = num_pseudo_regs;
2573 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2575 gdb_assert (gdbarch != NULL);
2576 /* Skip verify of sp_regnum, invalid_p == 0 */
2577 if (gdbarch_debug >= 2)
2578 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2579 return gdbarch->sp_regnum;
2583 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2586 gdbarch->sp_regnum = sp_regnum;
2590 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2592 gdb_assert (gdbarch != NULL);
2593 /* Skip verify of pc_regnum, invalid_p == 0 */
2594 if (gdbarch_debug >= 2)
2595 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2596 return gdbarch->pc_regnum;
2600 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2603 gdbarch->pc_regnum = pc_regnum;
2607 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2609 gdb_assert (gdbarch != NULL);
2610 /* Skip verify of ps_regnum, invalid_p == 0 */
2611 if (gdbarch_debug >= 2)
2612 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2613 return gdbarch->ps_regnum;
2617 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2620 gdbarch->ps_regnum = ps_regnum;
2624 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2626 gdb_assert (gdbarch != NULL);
2627 /* Skip verify of fp0_regnum, invalid_p == 0 */
2628 if (gdbarch_debug >= 2)
2629 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2630 return gdbarch->fp0_regnum;
2634 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2637 gdbarch->fp0_regnum = fp0_regnum;
2641 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2643 gdb_assert (gdbarch != NULL);
2644 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2645 if (gdbarch_debug >= 2)
2646 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2647 return gdbarch->stab_reg_to_regnum (stab_regnr);
2651 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2652 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2654 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2658 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2660 gdb_assert (gdbarch != NULL);
2661 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2662 if (gdbarch_debug >= 2)
2663 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2664 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2668 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2669 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2671 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2675 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2677 gdb_assert (gdbarch != NULL);
2678 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2679 if (gdbarch_debug >= 2)
2680 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2681 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2685 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2686 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2688 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2692 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2694 gdb_assert (gdbarch != NULL);
2695 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2696 if (gdbarch_debug >= 2)
2697 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2698 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2702 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2703 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2705 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2709 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2711 gdb_assert (gdbarch != NULL);
2712 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2713 if (gdbarch_debug >= 2)
2714 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2715 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2719 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2720 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2722 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2726 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2728 gdb_assert (gdbarch != NULL);
2729 gdb_assert (gdbarch->register_name != NULL);
2730 if (gdbarch_debug >= 2)
2731 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2732 return gdbarch->register_name (regnr);
2736 set_gdbarch_register_name (struct gdbarch *gdbarch,
2737 gdbarch_register_name_ftype register_name)
2739 gdbarch->register_name = register_name;
2743 gdbarch_register_type_p (struct gdbarch *gdbarch)
2745 gdb_assert (gdbarch != NULL);
2746 return gdbarch->register_type != NULL;
2750 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2752 gdb_assert (gdbarch != NULL);
2753 gdb_assert (gdbarch->register_type != NULL);
2754 if (gdbarch_debug >= 2)
2755 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2756 return gdbarch->register_type (gdbarch, reg_nr);
2760 set_gdbarch_register_type (struct gdbarch *gdbarch,
2761 gdbarch_register_type_ftype register_type)
2763 gdbarch->register_type = register_type;
2767 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2769 gdb_assert (gdbarch != NULL);
2770 return gdbarch->deprecated_register_virtual_type != NULL;
2774 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2776 gdb_assert (gdbarch != NULL);
2777 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2778 if (gdbarch_debug >= 2)
2779 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2780 return gdbarch->deprecated_register_virtual_type (reg_nr);
2784 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2785 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2787 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2791 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2793 gdb_assert (gdbarch != NULL);
2794 if (gdbarch_debug >= 2)
2795 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2796 return gdbarch->deprecated_register_bytes;
2800 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2801 int deprecated_register_bytes)
2803 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2807 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2809 gdb_assert (gdbarch != NULL);
2810 return gdbarch->deprecated_register_byte != generic_register_byte;
2814 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2816 gdb_assert (gdbarch != NULL);
2817 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2818 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2819 if (gdbarch_debug >= 2)
2820 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2821 return gdbarch->deprecated_register_byte (reg_nr);
2825 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2826 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2828 gdbarch->deprecated_register_byte = deprecated_register_byte;
2832 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2834 gdb_assert (gdbarch != NULL);
2835 return gdbarch->deprecated_register_raw_size != generic_register_size;
2839 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2841 gdb_assert (gdbarch != NULL);
2842 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2843 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2844 if (gdbarch_debug >= 2)
2845 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2846 return gdbarch->deprecated_register_raw_size (reg_nr);
2850 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2851 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2853 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2857 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2859 gdb_assert (gdbarch != NULL);
2860 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2864 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2866 gdb_assert (gdbarch != NULL);
2867 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2868 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2869 if (gdbarch_debug >= 2)
2870 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2871 return gdbarch->deprecated_register_virtual_size (reg_nr);
2875 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2876 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2878 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2882 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
2884 gdb_assert (gdbarch != NULL);
2885 return gdbarch->deprecated_max_register_raw_size != 0;
2889 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
2891 gdb_assert (gdbarch != NULL);
2892 if (gdbarch_debug >= 2)
2893 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
2894 return gdbarch->deprecated_max_register_raw_size;
2898 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
2899 int deprecated_max_register_raw_size)
2901 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
2905 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
2907 gdb_assert (gdbarch != NULL);
2908 return gdbarch->deprecated_max_register_virtual_size != 0;
2912 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
2914 gdb_assert (gdbarch != NULL);
2915 if (gdbarch_debug >= 2)
2916 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
2917 return gdbarch->deprecated_max_register_virtual_size;
2921 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
2922 int deprecated_max_register_virtual_size)
2924 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
2928 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2930 gdb_assert (gdbarch != NULL);
2931 return gdbarch->unwind_dummy_id != NULL;
2935 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2937 gdb_assert (gdbarch != NULL);
2938 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2939 if (gdbarch_debug >= 2)
2940 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2941 return gdbarch->unwind_dummy_id (gdbarch, info);
2945 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2946 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2948 gdbarch->unwind_dummy_id = unwind_dummy_id;
2952 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2954 gdb_assert (gdbarch != NULL);
2955 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2959 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2961 gdb_assert (gdbarch != NULL);
2962 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2963 if (gdbarch_debug >= 2)
2964 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2965 gdbarch->deprecated_save_dummy_frame_tos (sp);
2969 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2970 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2972 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2976 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2978 gdb_assert (gdbarch != NULL);
2979 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2980 if (gdbarch_debug >= 2)
2981 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2982 return gdbarch->deprecated_fp_regnum;
2986 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2987 int deprecated_fp_regnum)
2989 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2993 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2995 gdb_assert (gdbarch != NULL);
2996 return gdbarch->deprecated_target_read_fp != NULL;
3000 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3002 gdb_assert (gdbarch != NULL);
3003 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
3004 if (gdbarch_debug >= 2)
3005 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3006 return gdbarch->deprecated_target_read_fp ();
3010 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3011 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3013 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3017 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3019 gdb_assert (gdbarch != NULL);
3020 return gdbarch->push_dummy_call != NULL;
3024 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)
3026 gdb_assert (gdbarch != NULL);
3027 gdb_assert (gdbarch->push_dummy_call != NULL);
3028 if (gdbarch_debug >= 2)
3029 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3030 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3034 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3035 gdbarch_push_dummy_call_ftype push_dummy_call)
3037 gdbarch->push_dummy_call = push_dummy_call;
3041 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3043 gdb_assert (gdbarch != NULL);
3044 return gdbarch->deprecated_push_arguments != NULL;
3048 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3050 gdb_assert (gdbarch != NULL);
3051 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3052 if (gdbarch_debug >= 2)
3053 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3054 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3058 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3059 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3061 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3065 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3067 gdb_assert (gdbarch != NULL);
3068 return gdbarch->deprecated_push_return_address != NULL;
3072 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3074 gdb_assert (gdbarch != NULL);
3075 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3076 if (gdbarch_debug >= 2)
3077 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3078 return gdbarch->deprecated_push_return_address (pc, sp);
3082 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3083 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3085 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3089 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3091 gdb_assert (gdbarch != NULL);
3092 return gdbarch->deprecated_dummy_write_sp != NULL;
3096 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3098 gdb_assert (gdbarch != NULL);
3099 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3102 gdbarch->deprecated_dummy_write_sp (val);
3106 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3107 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3109 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3113 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3115 gdb_assert (gdbarch != NULL);
3116 if (gdbarch_debug >= 2)
3117 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3118 return gdbarch->deprecated_register_size;
3122 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3123 int deprecated_register_size)
3125 gdbarch->deprecated_register_size = deprecated_register_size;
3129 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3131 gdb_assert (gdbarch != NULL);
3132 /* Skip verify of call_dummy_location, invalid_p == 0 */
3133 if (gdbarch_debug >= 2)
3134 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3135 return gdbarch->call_dummy_location;
3139 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3140 int call_dummy_location)
3142 gdbarch->call_dummy_location = call_dummy_location;
3146 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3148 gdb_assert (gdbarch != NULL);
3149 return gdbarch->push_dummy_code != NULL;
3153 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)
3155 gdb_assert (gdbarch != NULL);
3156 gdb_assert (gdbarch->push_dummy_code != NULL);
3157 if (gdbarch_debug >= 2)
3158 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3159 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3163 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3164 gdbarch_push_dummy_code_ftype push_dummy_code)
3166 gdbarch->push_dummy_code = push_dummy_code;
3170 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3172 gdb_assert (gdbarch != NULL);
3173 return gdbarch->deprecated_do_registers_info != NULL;
3177 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3179 gdb_assert (gdbarch != NULL);
3180 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3181 if (gdbarch_debug >= 2)
3182 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3183 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3187 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3188 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3190 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3194 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3196 gdb_assert (gdbarch != NULL);
3197 gdb_assert (gdbarch->print_registers_info != NULL);
3198 if (gdbarch_debug >= 2)
3199 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3200 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3204 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3205 gdbarch_print_registers_info_ftype print_registers_info)
3207 gdbarch->print_registers_info = print_registers_info;
3211 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3213 gdb_assert (gdbarch != NULL);
3214 return gdbarch->print_float_info != NULL;
3218 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3220 gdb_assert (gdbarch != NULL);
3221 gdb_assert (gdbarch->print_float_info != NULL);
3222 if (gdbarch_debug >= 2)
3223 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3224 gdbarch->print_float_info (gdbarch, file, frame, args);
3228 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3229 gdbarch_print_float_info_ftype print_float_info)
3231 gdbarch->print_float_info = print_float_info;
3235 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3237 gdb_assert (gdbarch != NULL);
3238 return gdbarch->print_vector_info != NULL;
3242 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3244 gdb_assert (gdbarch != NULL);
3245 gdb_assert (gdbarch->print_vector_info != NULL);
3246 if (gdbarch_debug >= 2)
3247 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3248 gdbarch->print_vector_info (gdbarch, file, frame, args);
3252 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3253 gdbarch_print_vector_info_ftype print_vector_info)
3255 gdbarch->print_vector_info = print_vector_info;
3259 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3261 gdb_assert (gdbarch != NULL);
3262 gdb_assert (gdbarch->register_sim_regno != NULL);
3263 if (gdbarch_debug >= 2)
3264 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3265 return gdbarch->register_sim_regno (reg_nr);
3269 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3270 gdbarch_register_sim_regno_ftype register_sim_regno)
3272 gdbarch->register_sim_regno = register_sim_regno;
3276 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3278 gdb_assert (gdbarch != NULL);
3279 return gdbarch->register_bytes_ok != NULL;
3283 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3285 gdb_assert (gdbarch != NULL);
3286 gdb_assert (gdbarch->register_bytes_ok != NULL);
3287 if (gdbarch_debug >= 2)
3288 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3289 return gdbarch->register_bytes_ok (nr_bytes);
3293 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3294 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3296 gdbarch->register_bytes_ok = register_bytes_ok;
3300 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3302 gdb_assert (gdbarch != NULL);
3303 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3304 if (gdbarch_debug >= 2)
3305 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3306 return gdbarch->cannot_fetch_register (regnum);
3310 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3311 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3313 gdbarch->cannot_fetch_register = cannot_fetch_register;
3317 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3319 gdb_assert (gdbarch != NULL);
3320 gdb_assert (gdbarch->cannot_store_register != NULL);
3321 if (gdbarch_debug >= 2)
3322 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3323 return gdbarch->cannot_store_register (regnum);
3327 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3328 gdbarch_cannot_store_register_ftype cannot_store_register)
3330 gdbarch->cannot_store_register = cannot_store_register;
3334 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3336 gdb_assert (gdbarch != NULL);
3337 return gdbarch->get_longjmp_target != NULL;
3341 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3343 gdb_assert (gdbarch != NULL);
3344 gdb_assert (gdbarch->get_longjmp_target != NULL);
3345 if (gdbarch_debug >= 2)
3346 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3347 return gdbarch->get_longjmp_target (pc);
3351 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3352 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3354 gdbarch->get_longjmp_target = get_longjmp_target;
3358 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3360 gdb_assert (gdbarch != NULL);
3361 return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy;
3365 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3367 gdb_assert (gdbarch != NULL);
3368 gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
3369 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3370 if (gdbarch_debug >= 2)
3371 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3372 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3376 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3377 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3379 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3383 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3385 gdb_assert (gdbarch != NULL);
3386 return gdbarch->deprecated_init_frame_pc != NULL;
3390 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3392 gdb_assert (gdbarch != NULL);
3393 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3394 if (gdbarch_debug >= 2)
3395 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3396 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3400 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3401 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3403 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3407 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3409 gdb_assert (gdbarch != NULL);
3410 if (gdbarch_debug >= 2)
3411 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3412 return gdbarch->believe_pcc_promotion;
3416 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3417 int believe_pcc_promotion)
3419 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3423 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3425 gdb_assert (gdbarch != NULL);
3426 return gdbarch->deprecated_get_saved_register != NULL;
3430 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)
3432 gdb_assert (gdbarch != NULL);
3433 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3434 if (gdbarch_debug >= 2)
3435 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3436 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3440 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3441 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3443 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3447 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3449 gdb_assert (gdbarch != NULL);
3450 gdb_assert (gdbarch->convert_register_p != NULL);
3451 if (gdbarch_debug >= 2)
3452 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3453 return gdbarch->convert_register_p (regnum, type);
3457 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3458 gdbarch_convert_register_p_ftype convert_register_p)
3460 gdbarch->convert_register_p = convert_register_p;
3464 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3466 gdb_assert (gdbarch != NULL);
3467 gdb_assert (gdbarch->register_to_value != NULL);
3468 if (gdbarch_debug >= 2)
3469 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3470 gdbarch->register_to_value (frame, regnum, type, buf);
3474 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3475 gdbarch_register_to_value_ftype register_to_value)
3477 gdbarch->register_to_value = register_to_value;
3481 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3483 gdb_assert (gdbarch != NULL);
3484 gdb_assert (gdbarch->value_to_register != NULL);
3485 if (gdbarch_debug >= 2)
3486 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3487 gdbarch->value_to_register (frame, regnum, type, buf);
3491 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3492 gdbarch_value_to_register_ftype value_to_register)
3494 gdbarch->value_to_register = value_to_register;
3498 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3500 gdb_assert (gdbarch != NULL);
3501 gdb_assert (gdbarch->pointer_to_address != NULL);
3502 if (gdbarch_debug >= 2)
3503 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3504 return gdbarch->pointer_to_address (type, buf);
3508 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3509 gdbarch_pointer_to_address_ftype pointer_to_address)
3511 gdbarch->pointer_to_address = pointer_to_address;
3515 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3517 gdb_assert (gdbarch != NULL);
3518 gdb_assert (gdbarch->address_to_pointer != NULL);
3519 if (gdbarch_debug >= 2)
3520 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3521 gdbarch->address_to_pointer (type, buf, addr);
3525 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3526 gdbarch_address_to_pointer_ftype address_to_pointer)
3528 gdbarch->address_to_pointer = address_to_pointer;
3532 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3534 gdb_assert (gdbarch != NULL);
3535 return gdbarch->integer_to_address != NULL;
3539 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3541 gdb_assert (gdbarch != NULL);
3542 gdb_assert (gdbarch->integer_to_address != NULL);
3543 if (gdbarch_debug >= 2)
3544 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3545 return gdbarch->integer_to_address (type, buf);
3549 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3550 gdbarch_integer_to_address_ftype integer_to_address)
3552 gdbarch->integer_to_address = integer_to_address;
3556 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3558 gdb_assert (gdbarch != NULL);
3559 return gdbarch->deprecated_pop_frame != NULL;
3563 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3565 gdb_assert (gdbarch != NULL);
3566 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3567 if (gdbarch_debug >= 2)
3568 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3569 gdbarch->deprecated_pop_frame ();
3573 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3574 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3576 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3580 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3582 gdb_assert (gdbarch != NULL);
3583 return gdbarch->deprecated_store_struct_return != NULL;
3587 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3589 gdb_assert (gdbarch != NULL);
3590 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3591 if (gdbarch_debug >= 2)
3592 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3593 gdbarch->deprecated_store_struct_return (addr, sp);
3597 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3598 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3600 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3604 gdbarch_return_value_p (struct gdbarch *gdbarch)
3606 gdb_assert (gdbarch != NULL);
3607 return gdbarch->return_value != NULL;
3610 enum return_value_convention
3611 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3613 gdb_assert (gdbarch != NULL);
3614 gdb_assert (gdbarch->return_value != NULL);
3615 if (gdbarch_debug >= 2)
3616 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3617 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3621 set_gdbarch_return_value (struct gdbarch *gdbarch,
3622 gdbarch_return_value_ftype return_value)
3624 gdbarch->return_value = return_value;
3628 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3630 gdb_assert (gdbarch != NULL);
3631 gdb_assert (gdbarch->return_value_on_stack != NULL);
3632 if (gdbarch_debug >= 2)
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3634 return gdbarch->return_value_on_stack (type);
3638 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3639 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3641 gdbarch->return_value_on_stack = return_value_on_stack;
3645 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3647 gdb_assert (gdbarch != NULL);
3648 gdb_assert (gdbarch->extract_return_value != NULL);
3649 if (gdbarch_debug >= 2)
3650 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3651 gdbarch->extract_return_value (type, regcache, valbuf);
3655 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3656 gdbarch_extract_return_value_ftype extract_return_value)
3658 gdbarch->extract_return_value = extract_return_value;
3662 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3664 gdb_assert (gdbarch != NULL);
3665 gdb_assert (gdbarch->store_return_value != NULL);
3666 if (gdbarch_debug >= 2)
3667 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3668 gdbarch->store_return_value (type, regcache, valbuf);
3672 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3673 gdbarch_store_return_value_ftype store_return_value)
3675 gdbarch->store_return_value = store_return_value;
3679 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3681 gdb_assert (gdbarch != NULL);
3682 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3683 if (gdbarch_debug >= 2)
3684 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3685 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3689 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3690 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3692 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3696 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3698 gdb_assert (gdbarch != NULL);
3699 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3700 if (gdbarch_debug >= 2)
3701 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3702 gdbarch->deprecated_store_return_value (type, valbuf);
3706 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3707 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3709 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3713 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3715 gdb_assert (gdbarch != NULL);
3716 gdb_assert (gdbarch->use_struct_convention != NULL);
3717 if (gdbarch_debug >= 2)
3718 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3719 return gdbarch->use_struct_convention (gcc_p, value_type);
3723 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3724 gdbarch_use_struct_convention_ftype use_struct_convention)
3726 gdbarch->use_struct_convention = use_struct_convention;
3730 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3732 gdb_assert (gdbarch != NULL);
3733 return gdbarch->deprecated_extract_struct_value_address != NULL;
3737 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3739 gdb_assert (gdbarch != NULL);
3740 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3741 if (gdbarch_debug >= 2)
3742 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3743 return gdbarch->deprecated_extract_struct_value_address (regcache);
3747 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3748 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3750 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3754 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3756 gdb_assert (gdbarch != NULL);
3757 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3761 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3763 gdb_assert (gdbarch != NULL);
3764 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3765 if (gdbarch_debug >= 2)
3766 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3767 gdbarch->deprecated_frame_init_saved_regs (frame);
3771 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3772 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3774 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3778 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3780 gdb_assert (gdbarch != NULL);
3781 return gdbarch->deprecated_init_extra_frame_info != NULL;
3785 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3787 gdb_assert (gdbarch != NULL);
3788 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3789 if (gdbarch_debug >= 2)
3790 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3791 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3795 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3796 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3798 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3802 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3804 gdb_assert (gdbarch != NULL);
3805 gdb_assert (gdbarch->skip_prologue != NULL);
3806 if (gdbarch_debug >= 2)
3807 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3808 return gdbarch->skip_prologue (ip);
3812 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3813 gdbarch_skip_prologue_ftype skip_prologue)
3815 gdbarch->skip_prologue = skip_prologue;
3819 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3821 gdb_assert (gdbarch != NULL);
3822 gdb_assert (gdbarch->inner_than != NULL);
3823 if (gdbarch_debug >= 2)
3824 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3825 return gdbarch->inner_than (lhs, rhs);
3829 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3830 gdbarch_inner_than_ftype inner_than)
3832 gdbarch->inner_than = inner_than;
3835 const unsigned char *
3836 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3838 gdb_assert (gdbarch != NULL);
3839 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3840 if (gdbarch_debug >= 2)
3841 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3842 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3846 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3847 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3849 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3853 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3855 gdb_assert (gdbarch != NULL);
3856 return gdbarch->adjust_breakpoint_address != NULL;
3860 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3862 gdb_assert (gdbarch != NULL);
3863 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3864 if (gdbarch_debug >= 2)
3865 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3866 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3870 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3871 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3873 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3877 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3879 gdb_assert (gdbarch != NULL);
3880 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3881 if (gdbarch_debug >= 2)
3882 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3883 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3887 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3888 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3890 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3894 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3896 gdb_assert (gdbarch != NULL);
3897 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3898 if (gdbarch_debug >= 2)
3899 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3900 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3904 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3905 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3907 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3911 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3913 gdb_assert (gdbarch != NULL);
3914 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3915 if (gdbarch_debug >= 2)
3916 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3917 return gdbarch->decr_pc_after_break;
3921 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3922 CORE_ADDR decr_pc_after_break)
3924 gdbarch->decr_pc_after_break = decr_pc_after_break;
3928 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3930 gdb_assert (gdbarch != NULL);
3931 /* Skip verify of function_start_offset, invalid_p == 0 */
3932 if (gdbarch_debug >= 2)
3933 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3934 return gdbarch->function_start_offset;
3938 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3939 CORE_ADDR function_start_offset)
3941 gdbarch->function_start_offset = function_start_offset;
3945 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)
3947 gdb_assert (gdbarch != NULL);
3948 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3949 if (gdbarch_debug >= 2)
3950 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3951 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3955 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3956 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3958 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3962 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3964 gdb_assert (gdbarch != NULL);
3965 /* Skip verify of frame_args_skip, invalid_p == 0 */
3966 if (gdbarch_debug >= 2)
3967 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3968 return gdbarch->frame_args_skip;
3972 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3973 CORE_ADDR frame_args_skip)
3975 gdbarch->frame_args_skip = frame_args_skip;
3979 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
3981 gdb_assert (gdbarch != NULL);
3982 return gdbarch->deprecated_frameless_function_invocation != NULL;
3986 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3988 gdb_assert (gdbarch != NULL);
3989 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
3990 if (gdbarch_debug >= 2)
3991 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
3992 return gdbarch->deprecated_frameless_function_invocation (fi);
3996 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
3997 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
3999 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
4003 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4005 gdb_assert (gdbarch != NULL);
4006 return gdbarch->deprecated_frame_chain != NULL;
4010 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4012 gdb_assert (gdbarch != NULL);
4013 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
4014 if (gdbarch_debug >= 2)
4015 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4016 return gdbarch->deprecated_frame_chain (frame);
4020 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4021 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4023 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4027 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4029 gdb_assert (gdbarch != NULL);
4030 return gdbarch->deprecated_frame_chain_valid != NULL;
4034 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4036 gdb_assert (gdbarch != NULL);
4037 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
4038 if (gdbarch_debug >= 2)
4039 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4040 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4044 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4045 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4047 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4051 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4053 gdb_assert (gdbarch != NULL);
4054 return gdbarch->deprecated_frame_saved_pc != NULL;
4058 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4060 gdb_assert (gdbarch != NULL);
4061 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4064 return gdbarch->deprecated_frame_saved_pc (fi);
4068 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4069 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4071 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4075 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4077 gdb_assert (gdbarch != NULL);
4078 return gdbarch->unwind_pc != NULL;
4082 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4084 gdb_assert (gdbarch != NULL);
4085 gdb_assert (gdbarch->unwind_pc != NULL);
4086 if (gdbarch_debug >= 2)
4087 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4088 return gdbarch->unwind_pc (gdbarch, next_frame);
4092 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4093 gdbarch_unwind_pc_ftype unwind_pc)
4095 gdbarch->unwind_pc = unwind_pc;
4099 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4101 gdb_assert (gdbarch != NULL);
4102 return gdbarch->unwind_sp != NULL;
4106 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4108 gdb_assert (gdbarch != NULL);
4109 gdb_assert (gdbarch->unwind_sp != NULL);
4110 if (gdbarch_debug >= 2)
4111 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4112 return gdbarch->unwind_sp (gdbarch, next_frame);
4116 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4117 gdbarch_unwind_sp_ftype unwind_sp)
4119 gdbarch->unwind_sp = unwind_sp;
4123 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4125 gdb_assert (gdbarch != NULL);
4126 return gdbarch->deprecated_frame_args_address != get_frame_base;
4130 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4132 gdb_assert (gdbarch != NULL);
4133 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4134 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4135 if (gdbarch_debug >= 2)
4136 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4137 return gdbarch->deprecated_frame_args_address (fi);
4141 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4142 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4144 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4148 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4150 gdb_assert (gdbarch != NULL);
4151 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4155 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4157 gdb_assert (gdbarch != NULL);
4158 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4159 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4160 if (gdbarch_debug >= 2)
4161 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4162 return gdbarch->deprecated_frame_locals_address (fi);
4166 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4167 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4169 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4173 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4175 gdb_assert (gdbarch != NULL);
4176 return gdbarch->deprecated_saved_pc_after_call != NULL;
4180 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4182 gdb_assert (gdbarch != NULL);
4183 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4184 if (gdbarch_debug >= 2)
4185 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4186 return gdbarch->deprecated_saved_pc_after_call (frame);
4190 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4191 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4193 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4197 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4199 gdb_assert (gdbarch != NULL);
4200 return gdbarch->frame_num_args != NULL;
4204 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4206 gdb_assert (gdbarch != NULL);
4207 gdb_assert (gdbarch->frame_num_args != NULL);
4208 if (gdbarch_debug >= 2)
4209 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4210 return gdbarch->frame_num_args (frame);
4214 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4215 gdbarch_frame_num_args_ftype frame_num_args)
4217 gdbarch->frame_num_args = frame_num_args;
4221 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4223 gdb_assert (gdbarch != NULL);
4224 return gdbarch->deprecated_stack_align != NULL;
4228 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4230 gdb_assert (gdbarch != NULL);
4231 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4232 if (gdbarch_debug >= 2)
4233 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4234 return gdbarch->deprecated_stack_align (sp);
4238 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4239 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4241 gdbarch->deprecated_stack_align = deprecated_stack_align;
4245 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4247 gdb_assert (gdbarch != NULL);
4248 return gdbarch->frame_align != NULL;
4252 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4254 gdb_assert (gdbarch != NULL);
4255 gdb_assert (gdbarch->frame_align != NULL);
4256 if (gdbarch_debug >= 2)
4257 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4258 return gdbarch->frame_align (gdbarch, address);
4262 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4263 gdbarch_frame_align_ftype frame_align)
4265 gdbarch->frame_align = frame_align;
4269 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4271 gdb_assert (gdbarch != NULL);
4272 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4276 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4278 gdb_assert (gdbarch != NULL);
4279 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4280 if (gdbarch_debug >= 2)
4281 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4282 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4286 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4287 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4289 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4293 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4295 gdb_assert (gdbarch != NULL);
4296 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4297 if (gdbarch_debug >= 2)
4298 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4299 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4303 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4304 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4306 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4310 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4312 gdb_assert (gdbarch != NULL);
4313 if (gdbarch_debug >= 2)
4314 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4315 return gdbarch->frame_red_zone_size;
4319 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4320 int frame_red_zone_size)
4322 gdbarch->frame_red_zone_size = frame_red_zone_size;
4325 const struct floatformat *
4326 gdbarch_float_format (struct gdbarch *gdbarch)
4328 gdb_assert (gdbarch != NULL);
4329 if (gdbarch_debug >= 2)
4330 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4331 return gdbarch->float_format;
4335 set_gdbarch_float_format (struct gdbarch *gdbarch,
4336 const struct floatformat * float_format)
4338 gdbarch->float_format = float_format;
4341 const struct floatformat *
4342 gdbarch_double_format (struct gdbarch *gdbarch)
4344 gdb_assert (gdbarch != NULL);
4345 if (gdbarch_debug >= 2)
4346 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4347 return gdbarch->double_format;
4351 set_gdbarch_double_format (struct gdbarch *gdbarch,
4352 const struct floatformat * double_format)
4354 gdbarch->double_format = double_format;
4357 const struct floatformat *
4358 gdbarch_long_double_format (struct gdbarch *gdbarch)
4360 gdb_assert (gdbarch != NULL);
4361 if (gdbarch_debug >= 2)
4362 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4363 return gdbarch->long_double_format;
4367 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4368 const struct floatformat * long_double_format)
4370 gdbarch->long_double_format = long_double_format;
4374 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4376 gdb_assert (gdbarch != NULL);
4377 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4378 if (gdbarch_debug >= 2)
4379 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4380 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4384 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4385 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4387 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4391 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4393 gdb_assert (gdbarch != NULL);
4394 gdb_assert (gdbarch->addr_bits_remove != NULL);
4395 if (gdbarch_debug >= 2)
4396 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4397 return gdbarch->addr_bits_remove (addr);
4401 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4402 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4404 gdbarch->addr_bits_remove = addr_bits_remove;
4408 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4410 gdb_assert (gdbarch != NULL);
4411 gdb_assert (gdbarch->smash_text_address != NULL);
4412 if (gdbarch_debug >= 2)
4413 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4414 return gdbarch->smash_text_address (addr);
4418 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4419 gdbarch_smash_text_address_ftype smash_text_address)
4421 gdbarch->smash_text_address = smash_text_address;
4425 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4427 gdb_assert (gdbarch != NULL);
4428 return gdbarch->software_single_step != NULL;
4432 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4434 gdb_assert (gdbarch != NULL);
4435 gdb_assert (gdbarch->software_single_step != NULL);
4436 if (gdbarch_debug >= 2)
4437 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4438 gdbarch->software_single_step (sig, insert_breakpoints_p);
4442 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4443 gdbarch_software_single_step_ftype software_single_step)
4445 gdbarch->software_single_step = software_single_step;
4449 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4451 gdb_assert (gdbarch != NULL);
4452 gdb_assert (gdbarch->print_insn != NULL);
4453 if (gdbarch_debug >= 2)
4454 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4455 return gdbarch->print_insn (vma, info);
4459 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4460 gdbarch_print_insn_ftype print_insn)
4462 gdbarch->print_insn = print_insn;
4466 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4468 gdb_assert (gdbarch != NULL);
4469 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4470 if (gdbarch_debug >= 2)
4471 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4472 return gdbarch->skip_trampoline_code (pc);
4476 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4477 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4479 gdbarch->skip_trampoline_code = skip_trampoline_code;
4483 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4485 gdb_assert (gdbarch != NULL);
4486 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4487 if (gdbarch_debug >= 2)
4488 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4489 return gdbarch->skip_solib_resolver (gdbarch, pc);
4493 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4494 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4496 gdbarch->skip_solib_resolver = skip_solib_resolver;
4500 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4502 gdb_assert (gdbarch != NULL);
4503 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4504 if (gdbarch_debug >= 2)
4505 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4506 return gdbarch->in_solib_call_trampoline (pc, name);
4510 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4511 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4513 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4517 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4519 gdb_assert (gdbarch != NULL);
4520 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4521 if (gdbarch_debug >= 2)
4522 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4523 return gdbarch->in_solib_return_trampoline (pc, name);
4527 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4528 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4530 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4534 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4536 gdb_assert (gdbarch != NULL);
4537 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4538 if (gdbarch_debug >= 2)
4539 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4540 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4544 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4545 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4547 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4551 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4553 gdb_assert (gdbarch != NULL);
4554 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4555 if (gdbarch_debug >= 2)
4556 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4557 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4561 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4562 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4564 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4568 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4570 gdb_assert (gdbarch != NULL);
4571 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4572 if (gdbarch_debug >= 2)
4573 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4574 gdbarch->elf_make_msymbol_special (sym, msym);
4578 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4579 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4581 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4585 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4587 gdb_assert (gdbarch != NULL);
4588 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4589 if (gdbarch_debug >= 2)
4590 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4591 gdbarch->coff_make_msymbol_special (val, msym);
4595 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4596 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4598 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4602 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4604 gdb_assert (gdbarch != NULL);
4605 /* Skip verify of name_of_malloc, invalid_p == 0 */
4606 if (gdbarch_debug >= 2)
4607 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4608 return gdbarch->name_of_malloc;
4612 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4613 const char * name_of_malloc)
4615 gdbarch->name_of_malloc = name_of_malloc;
4619 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4621 gdb_assert (gdbarch != NULL);
4622 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4623 if (gdbarch_debug >= 2)
4624 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4625 return gdbarch->cannot_step_breakpoint;
4629 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4630 int cannot_step_breakpoint)
4632 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4636 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4638 gdb_assert (gdbarch != NULL);
4639 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4640 if (gdbarch_debug >= 2)
4641 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4642 return gdbarch->have_nonsteppable_watchpoint;
4646 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4647 int have_nonsteppable_watchpoint)
4649 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4653 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4655 gdb_assert (gdbarch != NULL);
4656 return gdbarch->address_class_type_flags != NULL;
4660 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4662 gdb_assert (gdbarch != NULL);
4663 gdb_assert (gdbarch->address_class_type_flags != NULL);
4664 if (gdbarch_debug >= 2)
4665 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4666 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4670 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4671 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4673 gdbarch->address_class_type_flags = address_class_type_flags;
4677 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4679 gdb_assert (gdbarch != NULL);
4680 return gdbarch->address_class_type_flags_to_name != NULL;
4684 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4686 gdb_assert (gdbarch != NULL);
4687 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4688 if (gdbarch_debug >= 2)
4689 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4690 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4694 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4695 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4697 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4701 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4703 gdb_assert (gdbarch != NULL);
4704 return gdbarch->address_class_name_to_type_flags != NULL;
4708 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4710 gdb_assert (gdbarch != NULL);
4711 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4712 if (gdbarch_debug >= 2)
4713 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4714 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4718 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4719 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4721 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4725 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4727 gdb_assert (gdbarch != NULL);
4728 gdb_assert (gdbarch->register_reggroup_p != NULL);
4729 if (gdbarch_debug >= 2)
4730 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4731 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4735 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4736 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4738 gdbarch->register_reggroup_p = register_reggroup_p;
4742 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4744 gdb_assert (gdbarch != NULL);
4745 return gdbarch->fetch_pointer_argument != NULL;
4749 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4751 gdb_assert (gdbarch != NULL);
4752 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4753 if (gdbarch_debug >= 2)
4754 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4755 return gdbarch->fetch_pointer_argument (frame, argi, type);
4759 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4760 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4762 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4766 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4768 gdb_assert (gdbarch != NULL);
4769 return gdbarch->regset_from_core_section != NULL;
4772 const struct regset *
4773 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4775 gdb_assert (gdbarch != NULL);
4776 gdb_assert (gdbarch->regset_from_core_section != NULL);
4777 if (gdbarch_debug >= 2)
4778 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4779 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4783 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4784 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4786 gdbarch->regset_from_core_section = regset_from_core_section;
4790 /* Keep a registry of per-architecture data-pointers required by GDB
4797 gdbarch_data_pre_init_ftype *pre_init;
4798 gdbarch_data_post_init_ftype *post_init;
4801 struct gdbarch_data_registration
4803 struct gdbarch_data *data;
4804 struct gdbarch_data_registration *next;
4807 struct gdbarch_data_registry
4810 struct gdbarch_data_registration *registrations;
4813 struct gdbarch_data_registry gdbarch_data_registry =
4818 static struct gdbarch_data *
4819 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4820 gdbarch_data_post_init_ftype *post_init)
4822 struct gdbarch_data_registration **curr;
4823 /* Append the new registraration. */
4824 for (curr = &gdbarch_data_registry.registrations;
4826 curr = &(*curr)->next);
4827 (*curr) = XMALLOC (struct gdbarch_data_registration);
4828 (*curr)->next = NULL;
4829 (*curr)->data = XMALLOC (struct gdbarch_data);
4830 (*curr)->data->index = gdbarch_data_registry.nr++;
4831 (*curr)->data->pre_init = pre_init;
4832 (*curr)->data->post_init = post_init;
4833 (*curr)->data->init_p = 1;
4834 return (*curr)->data;
4837 struct gdbarch_data *
4838 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4840 return gdbarch_data_register (pre_init, NULL);
4843 struct gdbarch_data *
4844 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4846 return gdbarch_data_register (NULL, post_init);
4849 /* Create/delete the gdbarch data vector. */
4852 alloc_gdbarch_data (struct gdbarch *gdbarch)
4854 gdb_assert (gdbarch->data == NULL);
4855 gdbarch->nr_data = gdbarch_data_registry.nr;
4856 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4859 /* Initialize the current value of the specified per-architecture
4863 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4864 struct gdbarch_data *data,
4867 gdb_assert (data->index < gdbarch->nr_data);
4868 gdb_assert (gdbarch->data[data->index] == NULL);
4869 gdb_assert (data->pre_init == NULL);
4870 gdbarch->data[data->index] = pointer;
4873 /* Return the current value of the specified per-architecture
4877 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4879 gdb_assert (data->index < gdbarch->nr_data);
4880 if (gdbarch->data[data->index] == NULL)
4882 /* The data-pointer isn't initialized, call init() to get a
4884 if (data->pre_init != NULL)
4885 /* Mid architecture creation: pass just the obstack, and not
4886 the entire architecture, as that way it isn't possible for
4887 pre-init code to refer to undefined architecture
4889 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4890 else if (gdbarch->initialized_p
4891 && data->post_init != NULL)
4892 /* Post architecture creation: pass the entire architecture
4893 (as all fields are valid), but be careful to also detect
4894 recursive references. */
4896 gdb_assert (data->init_p);
4898 gdbarch->data[data->index] = data->post_init (gdbarch);
4902 /* The architecture initialization hasn't completed - punt -
4903 hope that the caller knows what they are doing. Once
4904 deprecated_set_gdbarch_data has been initialized, this can be
4905 changed to an internal error. */
4907 gdb_assert (gdbarch->data[data->index] != NULL);
4909 return gdbarch->data[data->index];
4914 /* Keep a registry of swapped data required by GDB modules. */
4919 struct gdbarch_swap_registration *source;
4920 struct gdbarch_swap *next;
4923 struct gdbarch_swap_registration
4926 unsigned long sizeof_data;
4927 gdbarch_swap_ftype *init;
4928 struct gdbarch_swap_registration *next;
4931 struct gdbarch_swap_registry
4934 struct gdbarch_swap_registration *registrations;
4937 struct gdbarch_swap_registry gdbarch_swap_registry =
4943 deprecated_register_gdbarch_swap (void *data,
4944 unsigned long sizeof_data,
4945 gdbarch_swap_ftype *init)
4947 struct gdbarch_swap_registration **rego;
4948 for (rego = &gdbarch_swap_registry.registrations;
4950 rego = &(*rego)->next);
4951 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4952 (*rego)->next = NULL;
4953 (*rego)->init = init;
4954 (*rego)->data = data;
4955 (*rego)->sizeof_data = sizeof_data;
4959 current_gdbarch_swap_init_hack (void)
4961 struct gdbarch_swap_registration *rego;
4962 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4963 for (rego = gdbarch_swap_registry.registrations;
4967 if (rego->data != NULL)
4969 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4970 struct gdbarch_swap);
4971 (*curr)->source = rego;
4972 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4974 (*curr)->next = NULL;
4975 curr = &(*curr)->next;
4977 if (rego->init != NULL)
4982 static struct gdbarch *
4983 current_gdbarch_swap_out_hack (void)
4985 struct gdbarch *old_gdbarch = current_gdbarch;
4986 struct gdbarch_swap *curr;
4988 gdb_assert (old_gdbarch != NULL);
4989 for (curr = old_gdbarch->swap;
4993 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4994 memset (curr->source->data, 0, curr->source->sizeof_data);
4996 current_gdbarch = NULL;
5001 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
5003 struct gdbarch_swap *curr;
5005 gdb_assert (current_gdbarch == NULL);
5006 for (curr = new_gdbarch->swap;
5009 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5010 current_gdbarch = new_gdbarch;
5014 /* Keep a registry of the architectures known by GDB. */
5016 struct gdbarch_registration
5018 enum bfd_architecture bfd_architecture;
5019 gdbarch_init_ftype *init;
5020 gdbarch_dump_tdep_ftype *dump_tdep;
5021 struct gdbarch_list *arches;
5022 struct gdbarch_registration *next;
5025 static struct gdbarch_registration *gdbarch_registry = NULL;
5028 append_name (const char ***buf, int *nr, const char *name)
5030 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5036 gdbarch_printable_names (void)
5038 /* Accumulate a list of names based on the registed list of
5040 enum bfd_architecture a;
5042 const char **arches = NULL;
5043 struct gdbarch_registration *rego;
5044 for (rego = gdbarch_registry;
5048 const struct bfd_arch_info *ap;
5049 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5051 internal_error (__FILE__, __LINE__,
5052 "gdbarch_architecture_names: multi-arch unknown");
5055 append_name (&arches, &nr_arches, ap->printable_name);
5060 append_name (&arches, &nr_arches, NULL);
5066 gdbarch_register (enum bfd_architecture bfd_architecture,
5067 gdbarch_init_ftype *init,
5068 gdbarch_dump_tdep_ftype *dump_tdep)
5070 struct gdbarch_registration **curr;
5071 const struct bfd_arch_info *bfd_arch_info;
5072 /* Check that BFD recognizes this architecture */
5073 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5074 if (bfd_arch_info == NULL)
5076 internal_error (__FILE__, __LINE__,
5077 "gdbarch: Attempt to register unknown architecture (%d)",
5080 /* Check that we haven't seen this architecture before */
5081 for (curr = &gdbarch_registry;
5083 curr = &(*curr)->next)
5085 if (bfd_architecture == (*curr)->bfd_architecture)
5086 internal_error (__FILE__, __LINE__,
5087 "gdbarch: Duplicate registraration of architecture (%s)",
5088 bfd_arch_info->printable_name);
5092 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5093 bfd_arch_info->printable_name,
5096 (*curr) = XMALLOC (struct gdbarch_registration);
5097 (*curr)->bfd_architecture = bfd_architecture;
5098 (*curr)->init = init;
5099 (*curr)->dump_tdep = dump_tdep;
5100 (*curr)->arches = NULL;
5101 (*curr)->next = NULL;
5105 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5106 gdbarch_init_ftype *init)
5108 gdbarch_register (bfd_architecture, init, NULL);
5112 /* Look for an architecture using gdbarch_info. Base search on only
5113 BFD_ARCH_INFO and BYTE_ORDER. */
5115 struct gdbarch_list *
5116 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5117 const struct gdbarch_info *info)
5119 for (; arches != NULL; arches = arches->next)
5121 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5123 if (info->byte_order != arches->gdbarch->byte_order)
5125 if (info->osabi != arches->gdbarch->osabi)
5133 /* Find an architecture that matches the specified INFO. Create a new
5134 architecture if needed. Return that new architecture. Assumes
5135 that there is no current architecture. */
5137 static struct gdbarch *
5138 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
5140 struct gdbarch *new_gdbarch;
5141 struct gdbarch_registration *rego;
5143 /* The existing architecture has been swapped out - all this code
5144 works from a clean slate. */
5145 gdb_assert (current_gdbarch == NULL);
5147 /* Fill in missing parts of the INFO struct using a number of
5148 sources: "set ..."; INFOabfd supplied; and the existing
5150 gdbarch_info_fill (old_gdbarch, &info);
5152 /* Must have found some sort of architecture. */
5153 gdb_assert (info.bfd_arch_info != NULL);
5157 fprintf_unfiltered (gdb_stdlog,
5158 "find_arch_by_info: info.bfd_arch_info %s\n",
5159 (info.bfd_arch_info != NULL
5160 ? info.bfd_arch_info->printable_name
5162 fprintf_unfiltered (gdb_stdlog,
5163 "find_arch_by_info: info.byte_order %d (%s)\n",
5165 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5166 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5168 fprintf_unfiltered (gdb_stdlog,
5169 "find_arch_by_info: info.osabi %d (%s)\n",
5170 info.osabi, gdbarch_osabi_name (info.osabi));
5171 fprintf_unfiltered (gdb_stdlog,
5172 "find_arch_by_info: info.abfd 0x%lx\n",
5174 fprintf_unfiltered (gdb_stdlog,
5175 "find_arch_by_info: info.tdep_info 0x%lx\n",
5176 (long) info.tdep_info);
5179 /* Find the tdep code that knows about this architecture. */
5180 for (rego = gdbarch_registry;
5183 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5188 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5189 "No matching architecture\n");
5193 /* Ask the tdep code for an architecture that matches "info". */
5194 new_gdbarch = rego->init (info, rego->arches);
5196 /* Did the tdep code like it? No. Reject the change and revert to
5197 the old architecture. */
5198 if (new_gdbarch == NULL)
5201 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5202 "Target rejected architecture\n");
5206 /* Is this a pre-existing architecture (as determined by already
5207 being initialized)? Move it to the front of the architecture
5208 list (keeping the list sorted Most Recently Used). */
5209 if (new_gdbarch->initialized_p)
5211 struct gdbarch_list **list;
5212 struct gdbarch_list *this;
5214 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5215 "Previous architecture 0x%08lx (%s) selected\n",
5217 new_gdbarch->bfd_arch_info->printable_name);
5218 /* Find the existing arch in the list. */
5219 for (list = ®o->arches;
5220 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5221 list = &(*list)->next);
5222 /* It had better be in the list of architectures. */
5223 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5226 (*list) = this->next;
5227 /* Insert THIS at the front. */
5228 this->next = rego->arches;
5229 rego->arches = this;
5234 /* It's a new architecture. */
5236 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5237 "New architecture 0x%08lx (%s) selected\n",
5239 new_gdbarch->bfd_arch_info->printable_name);
5241 /* Insert the new architecture into the front of the architecture
5242 list (keep the list sorted Most Recently Used). */
5244 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5245 this->next = rego->arches;
5246 this->gdbarch = new_gdbarch;
5247 rego->arches = this;
5250 /* Check that the newly installed architecture is valid. Plug in
5251 any post init values. */
5252 new_gdbarch->dump_tdep = rego->dump_tdep;
5253 verify_gdbarch (new_gdbarch);
5254 new_gdbarch->initialized_p = 1;
5256 /* Initialize any per-architecture swap areas. This phase requires
5257 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5258 swap the entire architecture out. */
5259 current_gdbarch = new_gdbarch;
5260 current_gdbarch_swap_init_hack ();
5261 current_gdbarch_swap_out_hack ();
5264 gdbarch_dump (new_gdbarch, gdb_stdlog);
5270 gdbarch_find_by_info (struct gdbarch_info info)
5272 /* Save the previously selected architecture, setting the global to
5273 NULL. This stops things like gdbarch->init() trying to use the
5274 previous architecture's configuration. The previous architecture
5275 may not even be of the same architecture family. The most recent
5276 architecture of the same family is found at the head of the
5277 rego->arches list. */
5278 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5280 /* Find the specified architecture. */
5281 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5283 /* Restore the existing architecture. */
5284 gdb_assert (current_gdbarch == NULL);
5285 current_gdbarch_swap_in_hack (old_gdbarch);
5290 /* Make the specified architecture current, swapping the existing one
5294 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5296 gdb_assert (new_gdbarch != NULL);
5297 gdb_assert (current_gdbarch != NULL);
5298 gdb_assert (new_gdbarch->initialized_p);
5299 current_gdbarch_swap_out_hack ();
5300 current_gdbarch_swap_in_hack (new_gdbarch);
5301 architecture_changed_event ();
5304 extern void _initialize_gdbarch (void);
5307 _initialize_gdbarch (void)
5309 struct cmd_list_element *c;
5311 add_show_from_set (add_set_cmd ("arch",
5314 (char *)&gdbarch_debug,
5315 "Set architecture debugging.\n\
5316 When non-zero, architecture debugging is enabled.", &setdebuglist),
5318 c = add_set_cmd ("archdebug",
5321 (char *)&gdbarch_debug,
5322 "Set architecture debugging.\n\
5323 When non-zero, architecture debugging is enabled.", &setlist);
5325 deprecate_cmd (c, "set debug arch");
5326 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");