1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, 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;
65 show_gdbarch_debug (struct ui_file *file, int from_tty,
66 struct cmd_list_element *c, const char *value)
68 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
72 pformat (const struct floatformat *format)
81 /* Maintain the struct gdbarch object */
85 /* Has this architecture been fully initialized? */
88 /* An obstack bound to the lifetime of the architecture. */
89 struct obstack *obstack;
91 /* basic architectural information */
92 const struct bfd_arch_info * bfd_arch_info;
96 /* target specific vector. */
97 struct gdbarch_tdep *tdep;
98 gdbarch_dump_tdep_ftype *dump_tdep;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap *swap;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
138 const struct floatformat * float_format;
140 const struct floatformat * double_format;
142 const struct floatformat * long_double_format;
147 gdbarch_read_pc_ftype *read_pc;
148 gdbarch_write_pc_ftype *write_pc;
149 gdbarch_read_sp_ftype *read_sp;
150 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
151 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
152 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
159 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
160 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
161 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
162 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
163 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
164 gdbarch_register_name_ftype *register_name;
165 gdbarch_register_type_ftype *register_type;
166 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
167 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
168 int deprecated_fp_regnum;
169 gdbarch_push_dummy_call_ftype *push_dummy_call;
170 int deprecated_register_size;
171 int call_dummy_location;
172 gdbarch_push_dummy_code_ftype *push_dummy_code;
173 gdbarch_print_registers_info_ftype *print_registers_info;
174 gdbarch_print_float_info_ftype *print_float_info;
175 gdbarch_print_vector_info_ftype *print_vector_info;
176 gdbarch_register_sim_regno_ftype *register_sim_regno;
177 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
178 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
179 gdbarch_cannot_store_register_ftype *cannot_store_register;
180 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
181 int believe_pcc_promotion;
182 gdbarch_convert_register_p_ftype *convert_register_p;
183 gdbarch_register_to_value_ftype *register_to_value;
184 gdbarch_value_to_register_ftype *value_to_register;
185 gdbarch_pointer_to_address_ftype *pointer_to_address;
186 gdbarch_address_to_pointer_ftype *address_to_pointer;
187 gdbarch_integer_to_address_ftype *integer_to_address;
188 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
189 gdbarch_return_value_ftype *return_value;
190 gdbarch_extract_return_value_ftype *extract_return_value;
191 gdbarch_store_return_value_ftype *store_return_value;
192 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
193 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
194 gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
195 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
196 gdbarch_skip_prologue_ftype *skip_prologue;
197 gdbarch_inner_than_ftype *inner_than;
198 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
199 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
200 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
201 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
202 CORE_ADDR decr_pc_after_break;
203 CORE_ADDR deprecated_function_start_offset;
204 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
205 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
206 CORE_ADDR frame_args_skip;
207 gdbarch_unwind_pc_ftype *unwind_pc;
208 gdbarch_unwind_sp_ftype *unwind_sp;
209 gdbarch_frame_num_args_ftype *frame_num_args;
210 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
211 gdbarch_frame_align_ftype *frame_align;
212 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
213 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
214 int frame_red_zone_size;
215 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
216 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
217 gdbarch_smash_text_address_ftype *smash_text_address;
218 gdbarch_software_single_step_ftype *software_single_step;
219 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
220 gdbarch_print_insn_ftype *print_insn;
221 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
222 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
223 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
224 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
225 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
226 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
227 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
228 const char * name_of_malloc;
229 int cannot_step_breakpoint;
230 int have_nonsteppable_watchpoint;
231 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
232 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
233 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
234 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
235 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
236 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
240 /* The default architecture uses host values (for want of a better
243 extern const struct bfd_arch_info bfd_default_arch_struct;
245 struct gdbarch startup_gdbarch =
247 1, /* Always initialized. */
248 NULL, /* The obstack. */
249 /* basic architecture information */
250 &bfd_default_arch_struct, /* bfd_arch_info */
251 BFD_ENDIAN_BIG, /* byte_order */
252 GDB_OSABI_UNKNOWN, /* osabi */
253 /* target specific vector and its dump routine */
255 /*per-architecture data-pointers and swap regions */
257 /* Multi-arch values */
258 8 * sizeof (short), /* short_bit */
259 8 * sizeof (int), /* int_bit */
260 8 * sizeof (long), /* long_bit */
261 8 * sizeof (LONGEST), /* long_long_bit */
262 8 * sizeof (float), /* float_bit */
263 0, /* float_format */
264 8 * sizeof (double), /* double_bit */
265 0, /* double_format */
266 8 * sizeof (long double), /* long_double_bit */
267 0, /* long_double_format */
268 8 * sizeof (void*), /* ptr_bit */
269 8 * sizeof (void*), /* addr_bit */
270 8 * sizeof (void*), /* bfd_vma_bit */
275 0, /* virtual_frame_pointer */
276 0, /* pseudo_register_read */
277 0, /* pseudo_register_write */
279 0, /* num_pseudo_regs */
284 0, /* stab_reg_to_regnum */
285 0, /* ecoff_reg_to_regnum */
286 0, /* dwarf_reg_to_regnum */
287 0, /* sdb_reg_to_regnum */
288 0, /* dwarf2_reg_to_regnum */
289 0, /* register_name */
290 0, /* register_type */
291 generic_register_byte, /* deprecated_register_byte */
292 0, /* unwind_dummy_id */
293 -1, /* deprecated_fp_regnum */
294 0, /* push_dummy_call */
295 0, /* deprecated_register_size */
296 0, /* call_dummy_location */
297 0, /* push_dummy_code */
298 default_print_registers_info, /* print_registers_info */
299 0, /* print_float_info */
300 0, /* print_vector_info */
301 0, /* register_sim_regno */
302 0, /* register_bytes_ok */
303 0, /* cannot_fetch_register */
304 0, /* cannot_store_register */
305 0, /* get_longjmp_target */
306 0, /* believe_pcc_promotion */
307 0, /* convert_register_p */
308 0, /* register_to_value */
309 0, /* value_to_register */
310 0, /* pointer_to_address */
311 0, /* address_to_pointer */
312 0, /* integer_to_address */
313 0, /* deprecated_store_struct_return */
314 0, /* return_value */
315 0, /* extract_return_value */
316 0, /* store_return_value */
317 0, /* deprecated_extract_return_value */
318 0, /* deprecated_store_return_value */
319 0, /* deprecated_use_struct_convention */
320 0, /* deprecated_extract_struct_value_address */
321 0, /* skip_prologue */
323 0, /* breakpoint_from_pc */
324 0, /* adjust_breakpoint_address */
325 0, /* memory_insert_breakpoint */
326 0, /* memory_remove_breakpoint */
327 0, /* decr_pc_after_break */
328 0, /* deprecated_function_start_offset */
329 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
330 0, /* fetch_tls_load_module_address */
331 0, /* frame_args_skip */
334 0, /* frame_num_args */
335 0, /* deprecated_stack_align */
337 0, /* deprecated_reg_struct_has_addr */
338 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
339 0, /* frame_red_zone_size */
340 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
341 0, /* addr_bits_remove */
342 0, /* smash_text_address */
343 0, /* software_single_step */
344 0, /* single_step_through_delay */
346 0, /* skip_trampoline_code */
347 generic_skip_solib_resolver, /* skip_solib_resolver */
348 0, /* in_solib_return_trampoline */
349 generic_in_function_epilogue_p, /* in_function_epilogue_p */
350 construct_inferior_arguments, /* construct_inferior_arguments */
351 0, /* elf_make_msymbol_special */
352 0, /* coff_make_msymbol_special */
353 "malloc", /* name_of_malloc */
354 0, /* cannot_step_breakpoint */
355 0, /* have_nonsteppable_watchpoint */
356 0, /* address_class_type_flags */
357 0, /* address_class_type_flags_to_name */
358 0, /* address_class_name_to_type_flags */
359 default_register_reggroup_p, /* register_reggroup_p */
360 0, /* fetch_pointer_argument */
361 0, /* regset_from_core_section */
362 /* startup_gdbarch() */
365 struct gdbarch *current_gdbarch = &startup_gdbarch;
367 /* Create a new ``struct gdbarch'' based on information provided by
368 ``struct gdbarch_info''. */
371 gdbarch_alloc (const struct gdbarch_info *info,
372 struct gdbarch_tdep *tdep)
374 /* NOTE: The new architecture variable is named ``current_gdbarch''
375 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
376 the current local architecture and not the previous global
377 architecture. This ensures that the new architectures initial
378 values are not influenced by the previous architecture. Once
379 everything is parameterised with gdbarch, this will go away. */
380 struct gdbarch *current_gdbarch;
382 /* Create an obstack for allocating all the per-architecture memory,
383 then use that to allocate the architecture vector. */
384 struct obstack *obstack = XMALLOC (struct obstack);
385 obstack_init (obstack);
386 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
387 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
388 current_gdbarch->obstack = obstack;
390 alloc_gdbarch_data (current_gdbarch);
392 current_gdbarch->tdep = tdep;
394 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
395 current_gdbarch->byte_order = info->byte_order;
396 current_gdbarch->osabi = info->osabi;
398 /* Force the explicit initialization of these. */
399 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
400 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
401 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
402 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
403 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
404 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
405 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
406 current_gdbarch->ptr_bit = TARGET_INT_BIT;
407 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
408 current_gdbarch->char_signed = -1;
409 current_gdbarch->write_pc = generic_target_write_pc;
410 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
411 current_gdbarch->num_regs = -1;
412 current_gdbarch->sp_regnum = -1;
413 current_gdbarch->pc_regnum = -1;
414 current_gdbarch->ps_regnum = -1;
415 current_gdbarch->fp0_regnum = -1;
416 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
417 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
418 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
419 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
420 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
421 current_gdbarch->deprecated_register_byte = generic_register_byte;
422 current_gdbarch->deprecated_fp_regnum = -1;
423 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
424 current_gdbarch->print_registers_info = default_print_registers_info;
425 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
426 current_gdbarch->cannot_fetch_register = cannot_register_not;
427 current_gdbarch->cannot_store_register = cannot_register_not;
428 current_gdbarch->convert_register_p = generic_convert_register_p;
429 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
430 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
431 current_gdbarch->return_value = legacy_return_value;
432 current_gdbarch->extract_return_value = legacy_extract_return_value;
433 current_gdbarch->store_return_value = legacy_store_return_value;
434 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
435 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
436 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
437 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
438 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
439 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
440 current_gdbarch->addr_bits_remove = core_addr_identity;
441 current_gdbarch->smash_text_address = core_addr_identity;
442 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
443 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
444 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
445 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
446 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
447 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
448 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
449 current_gdbarch->name_of_malloc = "malloc";
450 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
451 /* gdbarch_alloc() */
453 return current_gdbarch;
457 /* Allocate extra space using the per-architecture obstack. */
460 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
462 void *data = obstack_alloc (arch->obstack, size);
463 memset (data, 0, size);
468 /* Free a gdbarch struct. This should never happen in normal
469 operation --- once you've created a gdbarch, you keep it around.
470 However, if an architecture's init function encounters an error
471 building the structure, it may need to clean up a partially
472 constructed gdbarch. */
475 gdbarch_free (struct gdbarch *arch)
477 struct obstack *obstack;
478 gdb_assert (arch != NULL);
479 gdb_assert (!arch->initialized_p);
480 obstack = arch->obstack;
481 obstack_free (obstack, 0); /* Includes the ARCH. */
486 /* Ensure that all values in a GDBARCH are reasonable. */
488 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
489 just happens to match the global variable ``current_gdbarch''. That
490 way macros refering to that variable get the local and not the global
491 version - ulgh. Once everything is parameterised with gdbarch, this
495 verify_gdbarch (struct gdbarch *current_gdbarch)
498 struct cleanup *cleanups;
501 log = mem_fileopen ();
502 cleanups = make_cleanup_ui_file_delete (log);
504 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
505 fprintf_unfiltered (log, "\n\tbyte-order");
506 if (current_gdbarch->bfd_arch_info == NULL)
507 fprintf_unfiltered (log, "\n\tbfd_arch_info");
508 /* Check those that need to be defined for the given multi-arch level. */
509 /* Skip verify of short_bit, invalid_p == 0 */
510 /* Skip verify of int_bit, invalid_p == 0 */
511 /* Skip verify of long_bit, invalid_p == 0 */
512 /* Skip verify of long_long_bit, invalid_p == 0 */
513 /* Skip verify of float_bit, invalid_p == 0 */
514 if (current_gdbarch->float_format == 0)
515 current_gdbarch->float_format = default_float_format (current_gdbarch);
516 /* Skip verify of double_bit, invalid_p == 0 */
517 if (current_gdbarch->double_format == 0)
518 current_gdbarch->double_format = default_double_format (current_gdbarch);
519 /* Skip verify of long_double_bit, invalid_p == 0 */
520 if (current_gdbarch->long_double_format == 0)
521 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
522 /* Skip verify of ptr_bit, invalid_p == 0 */
523 if (current_gdbarch->addr_bit == 0)
524 current_gdbarch->addr_bit = TARGET_PTR_BIT;
525 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
526 if (current_gdbarch->char_signed == -1)
527 current_gdbarch->char_signed = 1;
528 /* Skip verify of read_pc, has predicate */
529 /* Skip verify of write_pc, invalid_p == 0 */
530 /* Skip verify of read_sp, has predicate */
531 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
532 /* Skip verify of pseudo_register_read, has predicate */
533 /* Skip verify of pseudo_register_write, has predicate */
534 if (current_gdbarch->num_regs == -1)
535 fprintf_unfiltered (log, "\n\tnum_regs");
536 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
537 /* Skip verify of sp_regnum, invalid_p == 0 */
538 /* Skip verify of pc_regnum, invalid_p == 0 */
539 /* Skip verify of ps_regnum, invalid_p == 0 */
540 /* Skip verify of fp0_regnum, invalid_p == 0 */
541 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
542 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
543 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
544 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
545 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
546 /* Skip verify of register_type, has predicate */
547 /* Skip verify of deprecated_register_byte, has predicate */
548 /* Skip verify of unwind_dummy_id, has predicate */
549 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
550 /* Skip verify of push_dummy_call, has predicate */
551 /* Skip verify of call_dummy_location, invalid_p == 0 */
552 /* Skip verify of push_dummy_code, has predicate */
553 /* Skip verify of print_registers_info, invalid_p == 0 */
554 /* Skip verify of print_float_info, has predicate */
555 /* Skip verify of print_vector_info, has predicate */
556 /* Skip verify of register_sim_regno, invalid_p == 0 */
557 /* Skip verify of register_bytes_ok, has predicate */
558 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
559 /* Skip verify of cannot_store_register, invalid_p == 0 */
560 /* Skip verify of get_longjmp_target, has predicate */
561 /* Skip verify of convert_register_p, invalid_p == 0 */
562 /* Skip verify of pointer_to_address, invalid_p == 0 */
563 /* Skip verify of address_to_pointer, invalid_p == 0 */
564 /* Skip verify of integer_to_address, has predicate */
565 /* Skip verify of deprecated_store_struct_return, has predicate */
566 /* Skip verify of return_value, has predicate */
567 /* Skip verify of extract_return_value, invalid_p == 0 */
568 /* Skip verify of store_return_value, invalid_p == 0 */
569 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
570 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
571 if (current_gdbarch->skip_prologue == 0)
572 fprintf_unfiltered (log, "\n\tskip_prologue");
573 if (current_gdbarch->inner_than == 0)
574 fprintf_unfiltered (log, "\n\tinner_than");
575 if (current_gdbarch->breakpoint_from_pc == 0)
576 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
577 /* Skip verify of adjust_breakpoint_address, has predicate */
578 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
579 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
580 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
581 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
582 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
583 /* Skip verify of fetch_tls_load_module_address, has predicate */
584 /* Skip verify of frame_args_skip, invalid_p == 0 */
585 /* Skip verify of unwind_pc, has predicate */
586 /* Skip verify of unwind_sp, has predicate */
587 /* Skip verify of frame_num_args, has predicate */
588 /* Skip verify of deprecated_stack_align, has predicate */
589 /* Skip verify of frame_align, has predicate */
590 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
591 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
592 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
593 /* Skip verify of addr_bits_remove, invalid_p == 0 */
594 /* Skip verify of smash_text_address, invalid_p == 0 */
595 /* Skip verify of software_single_step, has predicate */
596 /* Skip verify of single_step_through_delay, has predicate */
597 if (current_gdbarch->print_insn == 0)
598 fprintf_unfiltered (log, "\n\tprint_insn");
599 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
600 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
601 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
602 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
603 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
604 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
605 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
606 /* Skip verify of name_of_malloc, invalid_p == 0 */
607 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
608 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
609 /* Skip verify of address_class_type_flags, has predicate */
610 /* Skip verify of address_class_type_flags_to_name, has predicate */
611 /* Skip verify of address_class_name_to_type_flags, has predicate */
612 /* Skip verify of register_reggroup_p, invalid_p == 0 */
613 /* Skip verify of fetch_pointer_argument, has predicate */
614 /* Skip verify of regset_from_core_section, has predicate */
615 buf = ui_file_xstrdup (log, &dummy);
616 make_cleanup (xfree, buf);
617 if (strlen (buf) > 0)
618 internal_error (__FILE__, __LINE__,
619 _("verify_gdbarch: the following are invalid ...%s"),
621 do_cleanups (cleanups);
625 /* Print out the details of the current architecture. */
627 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
628 just happens to match the global variable ``current_gdbarch''. That
629 way macros refering to that variable get the local and not the global
630 version - ulgh. Once everything is parameterised with gdbarch, this
634 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
636 const char *gdb_xm_file = "<not-defined>";
637 const char *gdb_nm_file = "<not-defined>";
638 const char *gdb_tm_file = "<not-defined>";
639 #if defined (GDB_XM_FILE)
640 gdb_xm_file = GDB_XM_FILE;
642 fprintf_unfiltered (file,
643 "gdbarch_dump: GDB_XM_FILE = %s\n",
645 #if defined (GDB_NM_FILE)
646 gdb_nm_file = GDB_NM_FILE;
648 fprintf_unfiltered (file,
649 "gdbarch_dump: GDB_NM_FILE = %s\n",
651 #if defined (GDB_TM_FILE)
652 gdb_tm_file = GDB_TM_FILE;
654 fprintf_unfiltered (file,
655 "gdbarch_dump: GDB_TM_FILE = %s\n",
657 #ifdef TARGET_ADDR_BIT
658 fprintf_unfiltered (file,
659 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
660 XSTRING (TARGET_ADDR_BIT));
662 fprintf_unfiltered (file,
663 "gdbarch_dump: addr_bit = %s\n",
664 paddr_d (current_gdbarch->addr_bit));
665 #ifdef ADDR_BITS_REMOVE
666 fprintf_unfiltered (file,
667 "gdbarch_dump: %s # %s\n",
668 "ADDR_BITS_REMOVE(addr)",
669 XSTRING (ADDR_BITS_REMOVE (addr)));
671 fprintf_unfiltered (file,
672 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
673 (long) current_gdbarch->addr_bits_remove);
674 fprintf_unfiltered (file,
675 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
676 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
677 fprintf_unfiltered (file,
678 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
679 (long) current_gdbarch->address_class_name_to_type_flags);
680 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
681 fprintf_unfiltered (file,
682 "gdbarch_dump: %s # %s\n",
683 "ADDRESS_CLASS_TYPE_FLAGS_P()",
684 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
686 fprintf_unfiltered (file,
687 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
688 gdbarch_address_class_type_flags_p (current_gdbarch));
689 #ifdef ADDRESS_CLASS_TYPE_FLAGS
690 fprintf_unfiltered (file,
691 "gdbarch_dump: %s # %s\n",
692 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
693 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
695 fprintf_unfiltered (file,
696 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
697 (long) current_gdbarch->address_class_type_flags);
698 fprintf_unfiltered (file,
699 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
700 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
701 fprintf_unfiltered (file,
702 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
703 (long) current_gdbarch->address_class_type_flags_to_name);
704 #ifdef ADDRESS_TO_POINTER
705 fprintf_unfiltered (file,
706 "gdbarch_dump: %s # %s\n",
707 "ADDRESS_TO_POINTER(type, buf, addr)",
708 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
710 fprintf_unfiltered (file,
711 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
712 (long) current_gdbarch->address_to_pointer);
713 fprintf_unfiltered (file,
714 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
715 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
716 fprintf_unfiltered (file,
717 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
718 (long) current_gdbarch->adjust_breakpoint_address);
719 #ifdef BELIEVE_PCC_PROMOTION
720 fprintf_unfiltered (file,
721 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
722 XSTRING (BELIEVE_PCC_PROMOTION));
724 fprintf_unfiltered (file,
725 "gdbarch_dump: believe_pcc_promotion = %s\n",
726 paddr_d (current_gdbarch->believe_pcc_promotion));
727 #ifdef TARGET_ARCHITECTURE
728 fprintf_unfiltered (file,
729 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
730 XSTRING (TARGET_ARCHITECTURE));
732 fprintf_unfiltered (file,
733 "gdbarch_dump: bfd_arch_info = %s\n",
734 TARGET_ARCHITECTURE->printable_name);
735 #ifdef TARGET_BFD_VMA_BIT
736 fprintf_unfiltered (file,
737 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
738 XSTRING (TARGET_BFD_VMA_BIT));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: bfd_vma_bit = %s\n",
742 paddr_d (current_gdbarch->bfd_vma_bit));
743 #ifdef BREAKPOINT_FROM_PC
744 fprintf_unfiltered (file,
745 "gdbarch_dump: %s # %s\n",
746 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
747 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
751 (long) current_gdbarch->breakpoint_from_pc);
752 #ifdef TARGET_BYTE_ORDER
753 fprintf_unfiltered (file,
754 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
755 XSTRING (TARGET_BYTE_ORDER));
757 fprintf_unfiltered (file,
758 "gdbarch_dump: byte_order = %s\n",
759 paddr_d (current_gdbarch->byte_order));
760 #ifdef CALL_DUMMY_LOCATION
761 fprintf_unfiltered (file,
762 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
763 XSTRING (CALL_DUMMY_LOCATION));
765 fprintf_unfiltered (file,
766 "gdbarch_dump: call_dummy_location = %s\n",
767 paddr_d (current_gdbarch->call_dummy_location));
768 #ifdef CANNOT_FETCH_REGISTER
769 fprintf_unfiltered (file,
770 "gdbarch_dump: %s # %s\n",
771 "CANNOT_FETCH_REGISTER(regnum)",
772 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
774 fprintf_unfiltered (file,
775 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
776 (long) current_gdbarch->cannot_fetch_register);
777 #ifdef CANNOT_STEP_BREAKPOINT
778 fprintf_unfiltered (file,
779 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
780 XSTRING (CANNOT_STEP_BREAKPOINT));
782 fprintf_unfiltered (file,
783 "gdbarch_dump: cannot_step_breakpoint = %s\n",
784 paddr_d (current_gdbarch->cannot_step_breakpoint));
785 #ifdef CANNOT_STORE_REGISTER
786 fprintf_unfiltered (file,
787 "gdbarch_dump: %s # %s\n",
788 "CANNOT_STORE_REGISTER(regnum)",
789 XSTRING (CANNOT_STORE_REGISTER (regnum)));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
793 (long) current_gdbarch->cannot_store_register);
794 #ifdef TARGET_CHAR_SIGNED
795 fprintf_unfiltered (file,
796 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
797 XSTRING (TARGET_CHAR_SIGNED));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: char_signed = %s\n",
801 paddr_d (current_gdbarch->char_signed));
802 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
803 fprintf_unfiltered (file,
804 "gdbarch_dump: %s # %s\n",
805 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
806 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
810 (long) current_gdbarch->coff_make_msymbol_special);
811 fprintf_unfiltered (file,
812 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
813 (long) current_gdbarch->construct_inferior_arguments);
814 fprintf_unfiltered (file,
815 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
816 (long) current_gdbarch->convert_from_func_ptr_addr);
817 #ifdef CONVERT_REGISTER_P
818 fprintf_unfiltered (file,
819 "gdbarch_dump: %s # %s\n",
820 "CONVERT_REGISTER_P(regnum, type)",
821 XSTRING (CONVERT_REGISTER_P (regnum, type)));
823 fprintf_unfiltered (file,
824 "gdbarch_dump: convert_register_p = <0x%lx>\n",
825 (long) current_gdbarch->convert_register_p);
826 #ifdef DECR_PC_AFTER_BREAK
827 fprintf_unfiltered (file,
828 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
829 XSTRING (DECR_PC_AFTER_BREAK));
831 fprintf_unfiltered (file,
832 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
833 paddr_nz (current_gdbarch->decr_pc_after_break));
834 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
835 fprintf_unfiltered (file,
836 "gdbarch_dump: %s # %s\n",
837 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
838 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
840 fprintf_unfiltered (file,
841 "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
842 (long) current_gdbarch->deprecated_extract_return_value);
843 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
844 fprintf_unfiltered (file,
845 "gdbarch_dump: %s # %s\n",
846 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
847 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
851 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
852 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
853 fprintf_unfiltered (file,
854 "gdbarch_dump: %s # %s\n",
855 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
856 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
858 fprintf_unfiltered (file,
859 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
860 (long) current_gdbarch->deprecated_extract_struct_value_address);
861 #ifdef DEPRECATED_FP_REGNUM
862 fprintf_unfiltered (file,
863 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
864 XSTRING (DEPRECATED_FP_REGNUM));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: deprecated_fp_regnum = %s\n",
868 paddr_d (current_gdbarch->deprecated_fp_regnum));
869 #ifdef DEPRECATED_FUNCTION_START_OFFSET
870 fprintf_unfiltered (file,
871 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
872 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
874 fprintf_unfiltered (file,
875 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
876 paddr_nz (current_gdbarch->deprecated_function_start_offset));
877 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
878 fprintf_unfiltered (file,
879 "gdbarch_dump: %s # %s\n",
880 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
881 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
885 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
886 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
887 fprintf_unfiltered (file,
888 "gdbarch_dump: %s # %s\n",
889 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
890 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
894 (long) current_gdbarch->deprecated_reg_struct_has_addr);
895 #ifdef DEPRECATED_REGISTER_BYTE_P
896 fprintf_unfiltered (file,
897 "gdbarch_dump: %s # %s\n",
898 "DEPRECATED_REGISTER_BYTE_P()",
899 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
901 fprintf_unfiltered (file,
902 "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
903 gdbarch_deprecated_register_byte_p (current_gdbarch));
904 #ifdef DEPRECATED_REGISTER_BYTE
905 fprintf_unfiltered (file,
906 "gdbarch_dump: %s # %s\n",
907 "DEPRECATED_REGISTER_BYTE(reg_nr)",
908 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
910 fprintf_unfiltered (file,
911 "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
912 (long) current_gdbarch->deprecated_register_byte);
913 #ifdef DEPRECATED_REGISTER_SIZE
914 fprintf_unfiltered (file,
915 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
916 XSTRING (DEPRECATED_REGISTER_SIZE));
918 fprintf_unfiltered (file,
919 "gdbarch_dump: deprecated_register_size = %s\n",
920 paddr_d (current_gdbarch->deprecated_register_size));
921 #ifdef DEPRECATED_STACK_ALIGN_P
922 fprintf_unfiltered (file,
923 "gdbarch_dump: %s # %s\n",
924 "DEPRECATED_STACK_ALIGN_P()",
925 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
927 fprintf_unfiltered (file,
928 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
929 gdbarch_deprecated_stack_align_p (current_gdbarch));
930 #ifdef DEPRECATED_STACK_ALIGN
931 fprintf_unfiltered (file,
932 "gdbarch_dump: %s # %s\n",
933 "DEPRECATED_STACK_ALIGN(sp)",
934 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
938 (long) current_gdbarch->deprecated_stack_align);
939 #ifdef DEPRECATED_STORE_RETURN_VALUE
940 fprintf_unfiltered (file,
941 "gdbarch_dump: %s # %s\n",
942 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
943 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
947 (long) current_gdbarch->deprecated_store_return_value);
948 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
949 fprintf_unfiltered (file,
950 "gdbarch_dump: %s # %s\n",
951 "DEPRECATED_STORE_STRUCT_RETURN_P()",
952 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
954 fprintf_unfiltered (file,
955 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
956 gdbarch_deprecated_store_struct_return_p (current_gdbarch));
957 #ifdef DEPRECATED_STORE_STRUCT_RETURN
958 fprintf_unfiltered (file,
959 "gdbarch_dump: %s # %s\n",
960 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
961 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
963 fprintf_unfiltered (file,
964 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
965 (long) current_gdbarch->deprecated_store_struct_return);
966 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
967 fprintf_unfiltered (file,
968 "gdbarch_dump: %s # %s\n",
969 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
970 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
972 fprintf_unfiltered (file,
973 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
974 (long) current_gdbarch->deprecated_use_struct_convention);
975 #ifdef TARGET_DOUBLE_BIT
976 fprintf_unfiltered (file,
977 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
978 XSTRING (TARGET_DOUBLE_BIT));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: double_bit = %s\n",
982 paddr_d (current_gdbarch->double_bit));
983 #ifdef TARGET_DOUBLE_FORMAT
984 fprintf_unfiltered (file,
985 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
986 XSTRING (TARGET_DOUBLE_FORMAT));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: double_format = %s\n",
990 pformat (current_gdbarch->double_format));
991 #ifdef DWARF2_REG_TO_REGNUM
992 fprintf_unfiltered (file,
993 "gdbarch_dump: %s # %s\n",
994 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
995 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
999 (long) current_gdbarch->dwarf2_reg_to_regnum);
1000 #ifdef DWARF_REG_TO_REGNUM
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: %s # %s\n",
1003 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1004 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
1008 (long) current_gdbarch->dwarf_reg_to_regnum);
1009 #ifdef ECOFF_REG_TO_REGNUM
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: %s # %s\n",
1012 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1013 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
1017 (long) current_gdbarch->ecoff_reg_to_regnum);
1018 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: %s # %s\n",
1021 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1022 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
1026 (long) current_gdbarch->elf_make_msymbol_special);
1027 #ifdef EXTRACT_RETURN_VALUE
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: %s # %s\n",
1030 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1031 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1035 (long) current_gdbarch->extract_return_value);
1036 #ifdef FETCH_POINTER_ARGUMENT_P
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: %s # %s\n",
1039 "FETCH_POINTER_ARGUMENT_P()",
1040 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1044 gdbarch_fetch_pointer_argument_p (current_gdbarch));
1045 #ifdef FETCH_POINTER_ARGUMENT
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: %s # %s\n",
1048 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1049 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1053 (long) current_gdbarch->fetch_pointer_argument);
1054 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS_P
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: %s # %s\n",
1057 "FETCH_TLS_LOAD_MODULE_ADDRESS_P()",
1058 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS_P ()));
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1062 gdbarch_fetch_tls_load_module_address_p (current_gdbarch));
1063 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: %s # %s\n",
1066 "FETCH_TLS_LOAD_MODULE_ADDRESS(objfile)",
1067 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS (objfile)));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
1071 (long) current_gdbarch->fetch_tls_load_module_address);
1072 #ifdef TARGET_FLOAT_BIT
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1075 XSTRING (TARGET_FLOAT_BIT));
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: float_bit = %s\n",
1079 paddr_d (current_gdbarch->float_bit));
1080 #ifdef TARGET_FLOAT_FORMAT
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1083 XSTRING (TARGET_FLOAT_FORMAT));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: float_format = %s\n",
1087 pformat (current_gdbarch->float_format));
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: FP0_REGNUM # %s\n",
1091 XSTRING (FP0_REGNUM));
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: fp0_regnum = %s\n",
1095 paddr_d (current_gdbarch->fp0_regnum));
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1098 gdbarch_frame_align_p (current_gdbarch));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: frame_align = <0x%lx>\n",
1101 (long) current_gdbarch->frame_align);
1102 #ifdef FRAME_ARGS_SKIP
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1105 XSTRING (FRAME_ARGS_SKIP));
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: frame_args_skip = 0x%s\n",
1109 paddr_nz (current_gdbarch->frame_args_skip));
1110 #ifdef FRAME_NUM_ARGS_P
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: %s # %s\n",
1113 "FRAME_NUM_ARGS_P()",
1114 XSTRING (FRAME_NUM_ARGS_P ()));
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1118 gdbarch_frame_num_args_p (current_gdbarch));
1119 #ifdef FRAME_NUM_ARGS
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: %s # %s\n",
1122 "FRAME_NUM_ARGS(frame)",
1123 XSTRING (FRAME_NUM_ARGS (frame)));
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1127 (long) current_gdbarch->frame_num_args);
1128 #ifdef FRAME_RED_ZONE_SIZE
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1131 XSTRING (FRAME_RED_ZONE_SIZE));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: frame_red_zone_size = %s\n",
1135 paddr_d (current_gdbarch->frame_red_zone_size));
1136 #ifdef GET_LONGJMP_TARGET_P
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: %s # %s\n",
1139 "GET_LONGJMP_TARGET_P()",
1140 XSTRING (GET_LONGJMP_TARGET_P ()));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1144 gdbarch_get_longjmp_target_p (current_gdbarch));
1145 #ifdef GET_LONGJMP_TARGET
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: %s # %s\n",
1148 "GET_LONGJMP_TARGET(pc)",
1149 XSTRING (GET_LONGJMP_TARGET (pc)));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1153 (long) current_gdbarch->get_longjmp_target);
1154 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1157 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1161 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1164 (long) current_gdbarch->in_function_epilogue_p);
1165 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: %s # %s\n",
1168 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1169 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1173 (long) current_gdbarch->in_solib_return_trampoline);
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: %s # %s\n",
1177 "INNER_THAN(lhs, rhs)",
1178 XSTRING (INNER_THAN (lhs, rhs)));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: inner_than = <0x%lx>\n",
1182 (long) current_gdbarch->inner_than);
1183 #ifdef TARGET_INT_BIT
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1186 XSTRING (TARGET_INT_BIT));
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: int_bit = %s\n",
1190 paddr_d (current_gdbarch->int_bit));
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1193 gdbarch_integer_to_address_p (current_gdbarch));
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1196 (long) current_gdbarch->integer_to_address);
1197 #ifdef TARGET_LONG_BIT
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1200 XSTRING (TARGET_LONG_BIT));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: long_bit = %s\n",
1204 paddr_d (current_gdbarch->long_bit));
1205 #ifdef TARGET_LONG_DOUBLE_BIT
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1208 XSTRING (TARGET_LONG_DOUBLE_BIT));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: long_double_bit = %s\n",
1212 paddr_d (current_gdbarch->long_double_bit));
1213 #ifdef TARGET_LONG_DOUBLE_FORMAT
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1216 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: long_double_format = %s\n",
1220 pformat (current_gdbarch->long_double_format));
1221 #ifdef TARGET_LONG_LONG_BIT
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1224 XSTRING (TARGET_LONG_LONG_BIT));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: long_long_bit = %s\n",
1228 paddr_d (current_gdbarch->long_long_bit));
1229 #ifdef MEMORY_INSERT_BREAKPOINT
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: %s # %s\n",
1232 "MEMORY_INSERT_BREAKPOINT(bp_tgt)",
1233 XSTRING (MEMORY_INSERT_BREAKPOINT (bp_tgt)));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1237 (long) current_gdbarch->memory_insert_breakpoint);
1238 #ifdef MEMORY_REMOVE_BREAKPOINT
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: %s # %s\n",
1241 "MEMORY_REMOVE_BREAKPOINT(bp_tgt)",
1242 XSTRING (MEMORY_REMOVE_BREAKPOINT (bp_tgt)));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1246 (long) current_gdbarch->memory_remove_breakpoint);
1247 #ifdef NAME_OF_MALLOC
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1250 XSTRING (NAME_OF_MALLOC));
1252 fprintf_unfiltered (file,
1253 "gdbarch_dump: name_of_malloc = %s\n",
1255 #ifdef NUM_PSEUDO_REGS
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1258 XSTRING (NUM_PSEUDO_REGS));
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: num_pseudo_regs = %s\n",
1262 paddr_d (current_gdbarch->num_pseudo_regs));
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: NUM_REGS # %s\n",
1266 XSTRING (NUM_REGS));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: num_regs = %s\n",
1270 paddr_d (current_gdbarch->num_regs));
1272 fprintf_unfiltered (file,
1273 "gdbarch_dump: TARGET_OSABI # %s\n",
1274 XSTRING (TARGET_OSABI));
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: osabi = %s\n",
1278 paddr_d (current_gdbarch->osabi));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: PC_REGNUM # %s\n",
1282 XSTRING (PC_REGNUM));
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: pc_regnum = %s\n",
1286 paddr_d (current_gdbarch->pc_regnum));
1287 #ifdef POINTER_TO_ADDRESS
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: %s # %s\n",
1290 "POINTER_TO_ADDRESS(type, buf)",
1291 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1295 (long) current_gdbarch->pointer_to_address);
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1298 gdbarch_print_float_info_p (current_gdbarch));
1299 fprintf_unfiltered (file,
1300 "gdbarch_dump: print_float_info = <0x%lx>\n",
1301 (long) current_gdbarch->print_float_info);
1302 #ifdef TARGET_PRINT_INSN
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "TARGET_PRINT_INSN(vma, info)",
1306 XSTRING (TARGET_PRINT_INSN (vma, info)));
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: print_insn = <0x%lx>\n",
1310 (long) current_gdbarch->print_insn);
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1313 (long) current_gdbarch->print_registers_info);
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1316 gdbarch_print_vector_info_p (current_gdbarch));
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1319 (long) current_gdbarch->print_vector_info);
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: PS_REGNUM # %s\n",
1323 XSTRING (PS_REGNUM));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: ps_regnum = %s\n",
1327 paddr_d (current_gdbarch->ps_regnum));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1330 gdbarch_pseudo_register_read_p (current_gdbarch));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1333 (long) current_gdbarch->pseudo_register_read);
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1336 gdbarch_pseudo_register_write_p (current_gdbarch));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1339 (long) current_gdbarch->pseudo_register_write);
1340 #ifdef TARGET_PTR_BIT
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1343 XSTRING (TARGET_PTR_BIT));
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: ptr_bit = %s\n",
1347 paddr_d (current_gdbarch->ptr_bit));
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1350 gdbarch_push_dummy_call_p (current_gdbarch));
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1353 (long) current_gdbarch->push_dummy_call);
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1356 gdbarch_push_dummy_code_p (current_gdbarch));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1359 (long) current_gdbarch->push_dummy_code);
1360 #ifdef TARGET_READ_PC_P
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1363 "TARGET_READ_PC_P()",
1364 XSTRING (TARGET_READ_PC_P ()));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1368 gdbarch_read_pc_p (current_gdbarch));
1369 #ifdef TARGET_READ_PC
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: %s # %s\n",
1372 "TARGET_READ_PC(ptid)",
1373 XSTRING (TARGET_READ_PC (ptid)));
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: read_pc = <0x%lx>\n",
1377 (long) current_gdbarch->read_pc);
1378 #ifdef TARGET_READ_SP_P
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "TARGET_READ_SP_P()",
1382 XSTRING (TARGET_READ_SP_P ()));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1386 gdbarch_read_sp_p (current_gdbarch));
1387 #ifdef TARGET_READ_SP
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: %s # %s\n",
1391 XSTRING (TARGET_READ_SP ()));
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: read_sp = <0x%lx>\n",
1395 (long) current_gdbarch->read_sp);
1396 #ifdef REGISTER_BYTES_OK_P
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: %s # %s\n",
1399 "REGISTER_BYTES_OK_P()",
1400 XSTRING (REGISTER_BYTES_OK_P ()));
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1404 gdbarch_register_bytes_ok_p (current_gdbarch));
1405 #ifdef REGISTER_BYTES_OK
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: %s # %s\n",
1408 "REGISTER_BYTES_OK(nr_bytes)",
1409 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1413 (long) current_gdbarch->register_bytes_ok);
1414 #ifdef REGISTER_NAME
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: %s # %s\n",
1417 "REGISTER_NAME(regnr)",
1418 XSTRING (REGISTER_NAME (regnr)));
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: register_name = <0x%lx>\n",
1422 (long) current_gdbarch->register_name);
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1425 (long) current_gdbarch->register_reggroup_p);
1426 #ifdef REGISTER_SIM_REGNO
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: %s # %s\n",
1429 "REGISTER_SIM_REGNO(reg_nr)",
1430 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1434 (long) current_gdbarch->register_sim_regno);
1435 #ifdef REGISTER_TO_VALUE
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: %s # %s\n",
1438 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1439 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: register_to_value = <0x%lx>\n",
1443 (long) current_gdbarch->register_to_value);
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1446 gdbarch_register_type_p (current_gdbarch));
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: register_type = <0x%lx>\n",
1449 (long) current_gdbarch->register_type);
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1452 gdbarch_regset_from_core_section_p (current_gdbarch));
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1455 (long) current_gdbarch->regset_from_core_section);
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1458 (long) current_gdbarch->remote_translate_xfer_address);
1459 fprintf_unfiltered (file,
1460 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1461 gdbarch_return_value_p (current_gdbarch));
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: return_value = <0x%lx>\n",
1464 (long) current_gdbarch->return_value);
1465 #ifdef SDB_REG_TO_REGNUM
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "SDB_REG_TO_REGNUM(sdb_regnr)",
1469 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1473 (long) current_gdbarch->sdb_reg_to_regnum);
1474 #ifdef TARGET_SHORT_BIT
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1477 XSTRING (TARGET_SHORT_BIT));
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: short_bit = %s\n",
1481 paddr_d (current_gdbarch->short_bit));
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1484 gdbarch_single_step_through_delay_p (current_gdbarch));
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
1487 (long) current_gdbarch->single_step_through_delay);
1488 #ifdef SKIP_PROLOGUE
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: %s # %s\n",
1491 "SKIP_PROLOGUE(ip)",
1492 XSTRING (SKIP_PROLOGUE (ip)));
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1496 (long) current_gdbarch->skip_prologue);
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1499 (long) current_gdbarch->skip_solib_resolver);
1500 #ifdef SKIP_TRAMPOLINE_CODE
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
1503 "SKIP_TRAMPOLINE_CODE(pc)",
1504 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1508 (long) current_gdbarch->skip_trampoline_code);
1509 #ifdef SMASH_TEXT_ADDRESS
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: %s # %s\n",
1512 "SMASH_TEXT_ADDRESS(addr)",
1513 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1517 (long) current_gdbarch->smash_text_address);
1518 #ifdef SOFTWARE_SINGLE_STEP_P
1519 fprintf_unfiltered (file,
1520 "gdbarch_dump: %s # %s\n",
1521 "SOFTWARE_SINGLE_STEP_P()",
1522 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1524 fprintf_unfiltered (file,
1525 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1526 gdbarch_software_single_step_p (current_gdbarch));
1527 #ifdef SOFTWARE_SINGLE_STEP
1528 fprintf_unfiltered (file,
1529 "gdbarch_dump: %s # %s\n",
1530 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1531 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1533 fprintf_unfiltered (file,
1534 "gdbarch_dump: software_single_step = <0x%lx>\n",
1535 (long) current_gdbarch->software_single_step);
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: SP_REGNUM # %s\n",
1539 XSTRING (SP_REGNUM));
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: sp_regnum = %s\n",
1543 paddr_d (current_gdbarch->sp_regnum));
1544 #ifdef STAB_REG_TO_REGNUM
1545 fprintf_unfiltered (file,
1546 "gdbarch_dump: %s # %s\n",
1547 "STAB_REG_TO_REGNUM(stab_regnr)",
1548 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1552 (long) current_gdbarch->stab_reg_to_regnum);
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1555 (long) current_gdbarch->stabs_argument_has_addr);
1556 #ifdef STORE_RETURN_VALUE
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1560 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: store_return_value = <0x%lx>\n",
1564 (long) current_gdbarch->store_return_value);
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1567 gdbarch_unwind_dummy_id_p (current_gdbarch));
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1570 (long) current_gdbarch->unwind_dummy_id);
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1573 gdbarch_unwind_pc_p (current_gdbarch));
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1576 (long) current_gdbarch->unwind_pc);
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1579 gdbarch_unwind_sp_p (current_gdbarch));
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1582 (long) current_gdbarch->unwind_sp);
1583 #ifdef VALUE_TO_REGISTER
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: %s # %s\n",
1586 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1587 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: value_to_register = <0x%lx>\n",
1591 (long) current_gdbarch->value_to_register);
1592 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: %s # %s\n",
1595 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1596 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1600 (long) current_gdbarch->virtual_frame_pointer);
1601 #ifdef TARGET_WRITE_PC
1602 fprintf_unfiltered (file,
1603 "gdbarch_dump: %s # %s\n",
1604 "TARGET_WRITE_PC(val, ptid)",
1605 XSTRING (TARGET_WRITE_PC (val, ptid)));
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: write_pc = <0x%lx>\n",
1609 (long) current_gdbarch->write_pc);
1610 if (current_gdbarch->dump_tdep != NULL)
1611 current_gdbarch->dump_tdep (current_gdbarch, file);
1614 struct gdbarch_tdep *
1615 gdbarch_tdep (struct gdbarch *gdbarch)
1617 if (gdbarch_debug >= 2)
1618 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1619 return gdbarch->tdep;
1623 const struct bfd_arch_info *
1624 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1626 gdb_assert (gdbarch != NULL);
1627 if (gdbarch_debug >= 2)
1628 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1629 return gdbarch->bfd_arch_info;
1633 gdbarch_byte_order (struct gdbarch *gdbarch)
1635 gdb_assert (gdbarch != NULL);
1636 if (gdbarch_debug >= 2)
1637 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1638 return gdbarch->byte_order;
1642 gdbarch_osabi (struct gdbarch *gdbarch)
1644 gdb_assert (gdbarch != NULL);
1645 if (gdbarch_debug >= 2)
1646 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1647 return gdbarch->osabi;
1651 gdbarch_short_bit (struct gdbarch *gdbarch)
1653 gdb_assert (gdbarch != NULL);
1654 /* Skip verify of short_bit, invalid_p == 0 */
1655 if (gdbarch_debug >= 2)
1656 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1657 return gdbarch->short_bit;
1661 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1664 gdbarch->short_bit = short_bit;
1668 gdbarch_int_bit (struct gdbarch *gdbarch)
1670 gdb_assert (gdbarch != NULL);
1671 /* Skip verify of int_bit, invalid_p == 0 */
1672 if (gdbarch_debug >= 2)
1673 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1674 return gdbarch->int_bit;
1678 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1681 gdbarch->int_bit = int_bit;
1685 gdbarch_long_bit (struct gdbarch *gdbarch)
1687 gdb_assert (gdbarch != NULL);
1688 /* Skip verify of long_bit, invalid_p == 0 */
1689 if (gdbarch_debug >= 2)
1690 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1691 return gdbarch->long_bit;
1695 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1698 gdbarch->long_bit = long_bit;
1702 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1704 gdb_assert (gdbarch != NULL);
1705 /* Skip verify of long_long_bit, invalid_p == 0 */
1706 if (gdbarch_debug >= 2)
1707 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1708 return gdbarch->long_long_bit;
1712 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1715 gdbarch->long_long_bit = long_long_bit;
1719 gdbarch_float_bit (struct gdbarch *gdbarch)
1721 gdb_assert (gdbarch != NULL);
1722 /* Skip verify of float_bit, invalid_p == 0 */
1723 if (gdbarch_debug >= 2)
1724 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1725 return gdbarch->float_bit;
1729 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1732 gdbarch->float_bit = float_bit;
1735 const struct floatformat *
1736 gdbarch_float_format (struct gdbarch *gdbarch)
1738 gdb_assert (gdbarch != NULL);
1739 if (gdbarch_debug >= 2)
1740 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1741 return gdbarch->float_format;
1745 set_gdbarch_float_format (struct gdbarch *gdbarch,
1746 const struct floatformat * float_format)
1748 gdbarch->float_format = float_format;
1752 gdbarch_double_bit (struct gdbarch *gdbarch)
1754 gdb_assert (gdbarch != NULL);
1755 /* Skip verify of double_bit, invalid_p == 0 */
1756 if (gdbarch_debug >= 2)
1757 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1758 return gdbarch->double_bit;
1762 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1765 gdbarch->double_bit = double_bit;
1768 const struct floatformat *
1769 gdbarch_double_format (struct gdbarch *gdbarch)
1771 gdb_assert (gdbarch != NULL);
1772 if (gdbarch_debug >= 2)
1773 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1774 return gdbarch->double_format;
1778 set_gdbarch_double_format (struct gdbarch *gdbarch,
1779 const struct floatformat * double_format)
1781 gdbarch->double_format = double_format;
1785 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1787 gdb_assert (gdbarch != NULL);
1788 /* Skip verify of long_double_bit, invalid_p == 0 */
1789 if (gdbarch_debug >= 2)
1790 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1791 return gdbarch->long_double_bit;
1795 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1796 int long_double_bit)
1798 gdbarch->long_double_bit = long_double_bit;
1801 const struct floatformat *
1802 gdbarch_long_double_format (struct gdbarch *gdbarch)
1804 gdb_assert (gdbarch != NULL);
1805 if (gdbarch_debug >= 2)
1806 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1807 return gdbarch->long_double_format;
1811 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1812 const struct floatformat * long_double_format)
1814 gdbarch->long_double_format = long_double_format;
1818 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1820 gdb_assert (gdbarch != NULL);
1821 /* Skip verify of ptr_bit, invalid_p == 0 */
1822 if (gdbarch_debug >= 2)
1823 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1824 return gdbarch->ptr_bit;
1828 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1831 gdbarch->ptr_bit = ptr_bit;
1835 gdbarch_addr_bit (struct gdbarch *gdbarch)
1837 gdb_assert (gdbarch != NULL);
1838 /* Check variable changed from pre-default. */
1839 gdb_assert (gdbarch->addr_bit != 0);
1840 if (gdbarch_debug >= 2)
1841 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1842 return gdbarch->addr_bit;
1846 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1849 gdbarch->addr_bit = addr_bit;
1853 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1855 gdb_assert (gdbarch != NULL);
1856 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1857 if (gdbarch_debug >= 2)
1858 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1859 return gdbarch->bfd_vma_bit;
1863 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1866 gdbarch->bfd_vma_bit = bfd_vma_bit;
1870 gdbarch_char_signed (struct gdbarch *gdbarch)
1872 gdb_assert (gdbarch != NULL);
1873 /* Check variable changed from pre-default. */
1874 gdb_assert (gdbarch->char_signed != -1);
1875 if (gdbarch_debug >= 2)
1876 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1877 return gdbarch->char_signed;
1881 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1884 gdbarch->char_signed = char_signed;
1888 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1890 gdb_assert (gdbarch != NULL);
1891 return gdbarch->read_pc != NULL;
1895 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
1897 gdb_assert (gdbarch != NULL);
1898 gdb_assert (gdbarch->read_pc != NULL);
1899 if (gdbarch_debug >= 2)
1900 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1901 return gdbarch->read_pc (ptid);
1905 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1906 gdbarch_read_pc_ftype read_pc)
1908 gdbarch->read_pc = read_pc;
1912 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
1914 gdb_assert (gdbarch != NULL);
1915 gdb_assert (gdbarch->write_pc != NULL);
1916 if (gdbarch_debug >= 2)
1917 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1918 gdbarch->write_pc (val, ptid);
1922 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1923 gdbarch_write_pc_ftype write_pc)
1925 gdbarch->write_pc = write_pc;
1929 gdbarch_read_sp_p (struct gdbarch *gdbarch)
1931 gdb_assert (gdbarch != NULL);
1932 return gdbarch->read_sp != NULL;
1936 gdbarch_read_sp (struct gdbarch *gdbarch)
1938 gdb_assert (gdbarch != NULL);
1939 gdb_assert (gdbarch->read_sp != NULL);
1940 if (gdbarch_debug >= 2)
1941 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1942 return gdbarch->read_sp ();
1946 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1947 gdbarch_read_sp_ftype read_sp)
1949 gdbarch->read_sp = read_sp;
1953 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1955 gdb_assert (gdbarch != NULL);
1956 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1957 if (gdbarch_debug >= 2)
1958 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1959 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
1963 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1964 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1966 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1970 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1972 gdb_assert (gdbarch != NULL);
1973 return gdbarch->pseudo_register_read != NULL;
1977 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1979 gdb_assert (gdbarch != NULL);
1980 gdb_assert (gdbarch->pseudo_register_read != NULL);
1981 if (gdbarch_debug >= 2)
1982 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1983 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1987 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1988 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1990 gdbarch->pseudo_register_read = pseudo_register_read;
1994 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1996 gdb_assert (gdbarch != NULL);
1997 return gdbarch->pseudo_register_write != NULL;
2001 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
2003 gdb_assert (gdbarch != NULL);
2004 gdb_assert (gdbarch->pseudo_register_write != NULL);
2005 if (gdbarch_debug >= 2)
2006 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2007 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2011 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2012 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2014 gdbarch->pseudo_register_write = pseudo_register_write;
2018 gdbarch_num_regs (struct gdbarch *gdbarch)
2020 gdb_assert (gdbarch != NULL);
2021 /* Check variable changed from pre-default. */
2022 gdb_assert (gdbarch->num_regs != -1);
2023 if (gdbarch_debug >= 2)
2024 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2025 return gdbarch->num_regs;
2029 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2032 gdbarch->num_regs = num_regs;
2036 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2038 gdb_assert (gdbarch != NULL);
2039 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2040 if (gdbarch_debug >= 2)
2041 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2042 return gdbarch->num_pseudo_regs;
2046 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2047 int num_pseudo_regs)
2049 gdbarch->num_pseudo_regs = num_pseudo_regs;
2053 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2055 gdb_assert (gdbarch != NULL);
2056 /* Skip verify of sp_regnum, invalid_p == 0 */
2057 if (gdbarch_debug >= 2)
2058 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2059 return gdbarch->sp_regnum;
2063 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2066 gdbarch->sp_regnum = sp_regnum;
2070 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2072 gdb_assert (gdbarch != NULL);
2073 /* Skip verify of pc_regnum, invalid_p == 0 */
2074 if (gdbarch_debug >= 2)
2075 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2076 return gdbarch->pc_regnum;
2080 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2083 gdbarch->pc_regnum = pc_regnum;
2087 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2089 gdb_assert (gdbarch != NULL);
2090 /* Skip verify of ps_regnum, invalid_p == 0 */
2091 if (gdbarch_debug >= 2)
2092 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2093 return gdbarch->ps_regnum;
2097 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2100 gdbarch->ps_regnum = ps_regnum;
2104 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2106 gdb_assert (gdbarch != NULL);
2107 /* Skip verify of fp0_regnum, invalid_p == 0 */
2108 if (gdbarch_debug >= 2)
2109 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2110 return gdbarch->fp0_regnum;
2114 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2117 gdbarch->fp0_regnum = fp0_regnum;
2121 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2123 gdb_assert (gdbarch != NULL);
2124 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2125 if (gdbarch_debug >= 2)
2126 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2127 return gdbarch->stab_reg_to_regnum (stab_regnr);
2131 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2132 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2134 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2138 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2140 gdb_assert (gdbarch != NULL);
2141 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2142 if (gdbarch_debug >= 2)
2143 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2144 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2148 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2149 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2151 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2155 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2157 gdb_assert (gdbarch != NULL);
2158 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2159 if (gdbarch_debug >= 2)
2160 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2161 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2165 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2166 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2168 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2172 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2174 gdb_assert (gdbarch != NULL);
2175 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2176 if (gdbarch_debug >= 2)
2177 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2178 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2182 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2183 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2185 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2189 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2191 gdb_assert (gdbarch != NULL);
2192 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2193 if (gdbarch_debug >= 2)
2194 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2195 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2199 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2200 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2202 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2206 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2208 gdb_assert (gdbarch != NULL);
2209 gdb_assert (gdbarch->register_name != NULL);
2210 if (gdbarch_debug >= 2)
2211 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2212 return gdbarch->register_name (regnr);
2216 set_gdbarch_register_name (struct gdbarch *gdbarch,
2217 gdbarch_register_name_ftype register_name)
2219 gdbarch->register_name = register_name;
2223 gdbarch_register_type_p (struct gdbarch *gdbarch)
2225 gdb_assert (gdbarch != NULL);
2226 return gdbarch->register_type != NULL;
2230 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2232 gdb_assert (gdbarch != NULL);
2233 gdb_assert (gdbarch->register_type != NULL);
2234 if (gdbarch_debug >= 2)
2235 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2236 return gdbarch->register_type (gdbarch, reg_nr);
2240 set_gdbarch_register_type (struct gdbarch *gdbarch,
2241 gdbarch_register_type_ftype register_type)
2243 gdbarch->register_type = register_type;
2247 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2249 gdb_assert (gdbarch != NULL);
2250 return gdbarch->deprecated_register_byte != generic_register_byte;
2254 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2256 gdb_assert (gdbarch != NULL);
2257 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2258 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2259 if (gdbarch_debug >= 2)
2260 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2261 return gdbarch->deprecated_register_byte (reg_nr);
2265 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2266 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2268 gdbarch->deprecated_register_byte = deprecated_register_byte;
2272 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2274 gdb_assert (gdbarch != NULL);
2275 return gdbarch->unwind_dummy_id != NULL;
2279 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2281 gdb_assert (gdbarch != NULL);
2282 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2283 if (gdbarch_debug >= 2)
2284 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2285 return gdbarch->unwind_dummy_id (gdbarch, info);
2289 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2290 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2292 gdbarch->unwind_dummy_id = unwind_dummy_id;
2296 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2298 gdb_assert (gdbarch != NULL);
2299 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2300 if (gdbarch_debug >= 2)
2301 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2302 return gdbarch->deprecated_fp_regnum;
2306 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2307 int deprecated_fp_regnum)
2309 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2313 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2315 gdb_assert (gdbarch != NULL);
2316 return gdbarch->push_dummy_call != NULL;
2320 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)
2322 gdb_assert (gdbarch != NULL);
2323 gdb_assert (gdbarch->push_dummy_call != NULL);
2324 if (gdbarch_debug >= 2)
2325 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2326 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2330 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2331 gdbarch_push_dummy_call_ftype push_dummy_call)
2333 gdbarch->push_dummy_call = push_dummy_call;
2337 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2339 gdb_assert (gdbarch != NULL);
2340 if (gdbarch_debug >= 2)
2341 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2342 return gdbarch->deprecated_register_size;
2346 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2347 int deprecated_register_size)
2349 gdbarch->deprecated_register_size = deprecated_register_size;
2353 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2355 gdb_assert (gdbarch != NULL);
2356 /* Skip verify of call_dummy_location, invalid_p == 0 */
2357 if (gdbarch_debug >= 2)
2358 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2359 return gdbarch->call_dummy_location;
2363 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2364 int call_dummy_location)
2366 gdbarch->call_dummy_location = call_dummy_location;
2370 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2372 gdb_assert (gdbarch != NULL);
2373 return gdbarch->push_dummy_code != NULL;
2377 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)
2379 gdb_assert (gdbarch != NULL);
2380 gdb_assert (gdbarch->push_dummy_code != NULL);
2381 if (gdbarch_debug >= 2)
2382 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2383 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2387 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2388 gdbarch_push_dummy_code_ftype push_dummy_code)
2390 gdbarch->push_dummy_code = push_dummy_code;
2394 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2396 gdb_assert (gdbarch != NULL);
2397 gdb_assert (gdbarch->print_registers_info != NULL);
2398 if (gdbarch_debug >= 2)
2399 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2400 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2404 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2405 gdbarch_print_registers_info_ftype print_registers_info)
2407 gdbarch->print_registers_info = print_registers_info;
2411 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2413 gdb_assert (gdbarch != NULL);
2414 return gdbarch->print_float_info != NULL;
2418 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2420 gdb_assert (gdbarch != NULL);
2421 gdb_assert (gdbarch->print_float_info != NULL);
2422 if (gdbarch_debug >= 2)
2423 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2424 gdbarch->print_float_info (gdbarch, file, frame, args);
2428 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2429 gdbarch_print_float_info_ftype print_float_info)
2431 gdbarch->print_float_info = print_float_info;
2435 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2437 gdb_assert (gdbarch != NULL);
2438 return gdbarch->print_vector_info != NULL;
2442 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2444 gdb_assert (gdbarch != NULL);
2445 gdb_assert (gdbarch->print_vector_info != NULL);
2446 if (gdbarch_debug >= 2)
2447 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2448 gdbarch->print_vector_info (gdbarch, file, frame, args);
2452 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2453 gdbarch_print_vector_info_ftype print_vector_info)
2455 gdbarch->print_vector_info = print_vector_info;
2459 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2461 gdb_assert (gdbarch != NULL);
2462 gdb_assert (gdbarch->register_sim_regno != NULL);
2463 if (gdbarch_debug >= 2)
2464 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2465 return gdbarch->register_sim_regno (reg_nr);
2469 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2470 gdbarch_register_sim_regno_ftype register_sim_regno)
2472 gdbarch->register_sim_regno = register_sim_regno;
2476 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2478 gdb_assert (gdbarch != NULL);
2479 return gdbarch->register_bytes_ok != NULL;
2483 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2485 gdb_assert (gdbarch != NULL);
2486 gdb_assert (gdbarch->register_bytes_ok != NULL);
2487 if (gdbarch_debug >= 2)
2488 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2489 return gdbarch->register_bytes_ok (nr_bytes);
2493 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2494 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2496 gdbarch->register_bytes_ok = register_bytes_ok;
2500 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2502 gdb_assert (gdbarch != NULL);
2503 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2506 return gdbarch->cannot_fetch_register (regnum);
2510 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2511 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2513 gdbarch->cannot_fetch_register = cannot_fetch_register;
2517 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2519 gdb_assert (gdbarch != NULL);
2520 gdb_assert (gdbarch->cannot_store_register != NULL);
2521 if (gdbarch_debug >= 2)
2522 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2523 return gdbarch->cannot_store_register (regnum);
2527 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2528 gdbarch_cannot_store_register_ftype cannot_store_register)
2530 gdbarch->cannot_store_register = cannot_store_register;
2534 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2536 gdb_assert (gdbarch != NULL);
2537 return gdbarch->get_longjmp_target != NULL;
2541 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
2543 gdb_assert (gdbarch != NULL);
2544 gdb_assert (gdbarch->get_longjmp_target != NULL);
2545 if (gdbarch_debug >= 2)
2546 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2547 return gdbarch->get_longjmp_target (pc);
2551 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2552 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2554 gdbarch->get_longjmp_target = get_longjmp_target;
2558 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2560 gdb_assert (gdbarch != NULL);
2561 if (gdbarch_debug >= 2)
2562 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2563 return gdbarch->believe_pcc_promotion;
2567 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2568 int believe_pcc_promotion)
2570 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2574 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2576 gdb_assert (gdbarch != NULL);
2577 gdb_assert (gdbarch->convert_register_p != NULL);
2578 if (gdbarch_debug >= 2)
2579 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2580 return gdbarch->convert_register_p (regnum, type);
2584 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2585 gdbarch_convert_register_p_ftype convert_register_p)
2587 gdbarch->convert_register_p = convert_register_p;
2591 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
2593 gdb_assert (gdbarch != NULL);
2594 gdb_assert (gdbarch->register_to_value != NULL);
2595 if (gdbarch_debug >= 2)
2596 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2597 gdbarch->register_to_value (frame, regnum, type, buf);
2601 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2602 gdbarch_register_to_value_ftype register_to_value)
2604 gdbarch->register_to_value = register_to_value;
2608 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2610 gdb_assert (gdbarch != NULL);
2611 gdb_assert (gdbarch->value_to_register != NULL);
2612 if (gdbarch_debug >= 2)
2613 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2614 gdbarch->value_to_register (frame, regnum, type, buf);
2618 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2619 gdbarch_value_to_register_ftype value_to_register)
2621 gdbarch->value_to_register = value_to_register;
2625 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2627 gdb_assert (gdbarch != NULL);
2628 gdb_assert (gdbarch->pointer_to_address != NULL);
2629 if (gdbarch_debug >= 2)
2630 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2631 return gdbarch->pointer_to_address (type, buf);
2635 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2636 gdbarch_pointer_to_address_ftype pointer_to_address)
2638 gdbarch->pointer_to_address = pointer_to_address;
2642 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2644 gdb_assert (gdbarch != NULL);
2645 gdb_assert (gdbarch->address_to_pointer != NULL);
2646 if (gdbarch_debug >= 2)
2647 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2648 gdbarch->address_to_pointer (type, buf, addr);
2652 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2653 gdbarch_address_to_pointer_ftype address_to_pointer)
2655 gdbarch->address_to_pointer = address_to_pointer;
2659 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2661 gdb_assert (gdbarch != NULL);
2662 return gdbarch->integer_to_address != NULL;
2666 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2668 gdb_assert (gdbarch != NULL);
2669 gdb_assert (gdbarch->integer_to_address != NULL);
2670 if (gdbarch_debug >= 2)
2671 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2672 return gdbarch->integer_to_address (gdbarch, type, buf);
2676 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2677 gdbarch_integer_to_address_ftype integer_to_address)
2679 gdbarch->integer_to_address = integer_to_address;
2683 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
2685 gdb_assert (gdbarch != NULL);
2686 return gdbarch->deprecated_store_struct_return != NULL;
2690 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2692 gdb_assert (gdbarch != NULL);
2693 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
2694 if (gdbarch_debug >= 2)
2695 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
2696 gdbarch->deprecated_store_struct_return (addr, sp);
2700 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
2701 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
2703 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
2707 gdbarch_return_value_p (struct gdbarch *gdbarch)
2709 gdb_assert (gdbarch != NULL);
2710 return gdbarch->return_value != legacy_return_value;
2713 enum return_value_convention
2714 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2716 gdb_assert (gdbarch != NULL);
2717 gdb_assert (gdbarch->return_value != NULL);
2718 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
2719 if (gdbarch_debug >= 2)
2720 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2721 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
2725 set_gdbarch_return_value (struct gdbarch *gdbarch,
2726 gdbarch_return_value_ftype return_value)
2728 gdbarch->return_value = return_value;
2732 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
2734 gdb_assert (gdbarch != NULL);
2735 gdb_assert (gdbarch->extract_return_value != NULL);
2736 if (gdbarch_debug >= 2)
2737 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2738 gdbarch->extract_return_value (type, regcache, valbuf);
2742 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2743 gdbarch_extract_return_value_ftype extract_return_value)
2745 gdbarch->extract_return_value = extract_return_value;
2749 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
2751 gdb_assert (gdbarch != NULL);
2752 gdb_assert (gdbarch->store_return_value != NULL);
2753 if (gdbarch_debug >= 2)
2754 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2755 gdbarch->store_return_value (type, regcache, valbuf);
2759 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2760 gdbarch_store_return_value_ftype store_return_value)
2762 gdbarch->store_return_value = store_return_value;
2766 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf)
2768 gdb_assert (gdbarch != NULL);
2769 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
2770 if (gdbarch_debug >= 2)
2771 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
2772 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
2776 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
2777 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
2779 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
2783 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf)
2785 gdb_assert (gdbarch != NULL);
2786 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
2787 if (gdbarch_debug >= 2)
2788 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
2789 gdbarch->deprecated_store_return_value (type, valbuf);
2793 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
2794 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
2796 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
2800 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2802 gdb_assert (gdbarch != NULL);
2803 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
2804 if (gdbarch_debug >= 2)
2805 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
2806 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
2810 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
2811 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
2813 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
2817 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
2819 gdb_assert (gdbarch != NULL);
2820 return gdbarch->deprecated_extract_struct_value_address != NULL;
2824 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
2826 gdb_assert (gdbarch != NULL);
2827 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
2828 if (gdbarch_debug >= 2)
2829 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
2830 return gdbarch->deprecated_extract_struct_value_address (regcache);
2834 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
2835 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
2837 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
2841 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2843 gdb_assert (gdbarch != NULL);
2844 gdb_assert (gdbarch->skip_prologue != NULL);
2845 if (gdbarch_debug >= 2)
2846 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2847 return gdbarch->skip_prologue (ip);
2851 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2852 gdbarch_skip_prologue_ftype skip_prologue)
2854 gdbarch->skip_prologue = skip_prologue;
2858 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2860 gdb_assert (gdbarch != NULL);
2861 gdb_assert (gdbarch->inner_than != NULL);
2862 if (gdbarch_debug >= 2)
2863 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2864 return gdbarch->inner_than (lhs, rhs);
2868 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2869 gdbarch_inner_than_ftype inner_than)
2871 gdbarch->inner_than = inner_than;
2875 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2877 gdb_assert (gdbarch != NULL);
2878 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2879 if (gdbarch_debug >= 2)
2880 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2881 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2885 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2886 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2888 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2892 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2894 gdb_assert (gdbarch != NULL);
2895 return gdbarch->adjust_breakpoint_address != NULL;
2899 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2901 gdb_assert (gdbarch != NULL);
2902 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2903 if (gdbarch_debug >= 2)
2904 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2905 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2909 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2910 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2912 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2916 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2918 gdb_assert (gdbarch != NULL);
2919 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2920 if (gdbarch_debug >= 2)
2921 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2922 return gdbarch->memory_insert_breakpoint (bp_tgt);
2926 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2927 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2929 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2933 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2935 gdb_assert (gdbarch != NULL);
2936 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2937 if (gdbarch_debug >= 2)
2938 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2939 return gdbarch->memory_remove_breakpoint (bp_tgt);
2943 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2944 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2946 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2950 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2952 gdb_assert (gdbarch != NULL);
2953 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2954 if (gdbarch_debug >= 2)
2955 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2956 return gdbarch->decr_pc_after_break;
2960 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2961 CORE_ADDR decr_pc_after_break)
2963 gdbarch->decr_pc_after_break = decr_pc_after_break;
2967 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2969 gdb_assert (gdbarch != NULL);
2970 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2971 if (gdbarch_debug >= 2)
2972 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2973 return gdbarch->deprecated_function_start_offset;
2977 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2978 CORE_ADDR deprecated_function_start_offset)
2980 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2984 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)
2986 gdb_assert (gdbarch != NULL);
2987 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
2988 if (gdbarch_debug >= 2)
2989 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2990 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
2994 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2995 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
2997 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3001 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
3003 gdb_assert (gdbarch != NULL);
3004 return gdbarch->fetch_tls_load_module_address != NULL;
3008 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
3010 gdb_assert (gdbarch != NULL);
3011 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
3012 if (gdbarch_debug >= 2)
3013 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
3014 return gdbarch->fetch_tls_load_module_address (objfile);
3018 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
3019 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
3021 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
3025 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3027 gdb_assert (gdbarch != NULL);
3028 /* Skip verify of frame_args_skip, invalid_p == 0 */
3029 if (gdbarch_debug >= 2)
3030 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3031 return gdbarch->frame_args_skip;
3035 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3036 CORE_ADDR frame_args_skip)
3038 gdbarch->frame_args_skip = frame_args_skip;
3042 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3044 gdb_assert (gdbarch != NULL);
3045 return gdbarch->unwind_pc != NULL;
3049 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3051 gdb_assert (gdbarch != NULL);
3052 gdb_assert (gdbarch->unwind_pc != NULL);
3053 if (gdbarch_debug >= 2)
3054 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3055 return gdbarch->unwind_pc (gdbarch, next_frame);
3059 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3060 gdbarch_unwind_pc_ftype unwind_pc)
3062 gdbarch->unwind_pc = unwind_pc;
3066 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3068 gdb_assert (gdbarch != NULL);
3069 return gdbarch->unwind_sp != NULL;
3073 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3075 gdb_assert (gdbarch != NULL);
3076 gdb_assert (gdbarch->unwind_sp != NULL);
3077 if (gdbarch_debug >= 2)
3078 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3079 return gdbarch->unwind_sp (gdbarch, next_frame);
3083 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3084 gdbarch_unwind_sp_ftype unwind_sp)
3086 gdbarch->unwind_sp = unwind_sp;
3090 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3092 gdb_assert (gdbarch != NULL);
3093 return gdbarch->frame_num_args != NULL;
3097 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3099 gdb_assert (gdbarch != NULL);
3100 gdb_assert (gdbarch->frame_num_args != NULL);
3101 if (gdbarch_debug >= 2)
3102 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3103 return gdbarch->frame_num_args (frame);
3107 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3108 gdbarch_frame_num_args_ftype frame_num_args)
3110 gdbarch->frame_num_args = frame_num_args;
3114 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3116 gdb_assert (gdbarch != NULL);
3117 return gdbarch->deprecated_stack_align != NULL;
3121 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3123 gdb_assert (gdbarch != NULL);
3124 gdb_assert (gdbarch->deprecated_stack_align != NULL);
3125 if (gdbarch_debug >= 2)
3126 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3127 return gdbarch->deprecated_stack_align (sp);
3131 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3132 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3134 gdbarch->deprecated_stack_align = deprecated_stack_align;
3138 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3140 gdb_assert (gdbarch != NULL);
3141 return gdbarch->frame_align != NULL;
3145 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3147 gdb_assert (gdbarch != NULL);
3148 gdb_assert (gdbarch->frame_align != NULL);
3149 if (gdbarch_debug >= 2)
3150 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3151 return gdbarch->frame_align (gdbarch, address);
3155 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3156 gdbarch_frame_align_ftype frame_align)
3158 gdbarch->frame_align = frame_align;
3162 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3164 gdb_assert (gdbarch != NULL);
3165 return gdbarch->deprecated_reg_struct_has_addr != NULL;
3169 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3171 gdb_assert (gdbarch != NULL);
3172 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3173 if (gdbarch_debug >= 2)
3174 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3175 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3179 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3180 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3182 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3186 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3188 gdb_assert (gdbarch != NULL);
3189 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3192 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3196 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3197 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3199 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3203 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3205 gdb_assert (gdbarch != NULL);
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3208 return gdbarch->frame_red_zone_size;
3212 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3213 int frame_red_zone_size)
3215 gdbarch->frame_red_zone_size = frame_red_zone_size;
3219 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3225 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3229 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3230 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3232 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3236 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3238 gdb_assert (gdbarch != NULL);
3239 gdb_assert (gdbarch->addr_bits_remove != NULL);
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3242 return gdbarch->addr_bits_remove (addr);
3246 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3247 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3249 gdbarch->addr_bits_remove = addr_bits_remove;
3253 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3255 gdb_assert (gdbarch != NULL);
3256 gdb_assert (gdbarch->smash_text_address != NULL);
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3259 return gdbarch->smash_text_address (addr);
3263 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3264 gdbarch_smash_text_address_ftype smash_text_address)
3266 gdbarch->smash_text_address = smash_text_address;
3270 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3272 gdb_assert (gdbarch != NULL);
3273 return gdbarch->software_single_step != NULL;
3277 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
3279 gdb_assert (gdbarch != NULL);
3280 gdb_assert (gdbarch->software_single_step != NULL);
3281 if (gdbarch_debug >= 2)
3282 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3283 gdbarch->software_single_step (sig, insert_breakpoints_p);
3287 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3288 gdbarch_software_single_step_ftype software_single_step)
3290 gdbarch->software_single_step = software_single_step;
3294 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3296 gdb_assert (gdbarch != NULL);
3297 return gdbarch->single_step_through_delay != NULL;
3301 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3303 gdb_assert (gdbarch != NULL);
3304 gdb_assert (gdbarch->single_step_through_delay != NULL);
3305 if (gdbarch_debug >= 2)
3306 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3307 return gdbarch->single_step_through_delay (gdbarch, frame);
3311 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3312 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3314 gdbarch->single_step_through_delay = single_step_through_delay;
3318 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3320 gdb_assert (gdbarch != NULL);
3321 gdb_assert (gdbarch->print_insn != NULL);
3322 if (gdbarch_debug >= 2)
3323 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3324 return gdbarch->print_insn (vma, info);
3328 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3329 gdbarch_print_insn_ftype print_insn)
3331 gdbarch->print_insn = print_insn;
3335 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3337 gdb_assert (gdbarch != NULL);
3338 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3339 if (gdbarch_debug >= 2)
3340 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3341 return gdbarch->skip_trampoline_code (pc);
3345 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3346 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3348 gdbarch->skip_trampoline_code = skip_trampoline_code;
3352 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3354 gdb_assert (gdbarch != NULL);
3355 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3356 if (gdbarch_debug >= 2)
3357 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3358 return gdbarch->skip_solib_resolver (gdbarch, pc);
3362 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3363 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3365 gdbarch->skip_solib_resolver = skip_solib_resolver;
3369 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3371 gdb_assert (gdbarch != NULL);
3372 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3373 if (gdbarch_debug >= 2)
3374 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3375 return gdbarch->in_solib_return_trampoline (pc, name);
3379 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3380 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3382 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3386 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3388 gdb_assert (gdbarch != NULL);
3389 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3390 if (gdbarch_debug >= 2)
3391 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3392 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3396 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3397 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3399 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3403 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
3405 gdb_assert (gdbarch != NULL);
3406 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
3407 if (gdbarch_debug >= 2)
3408 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
3409 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
3413 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
3414 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
3416 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
3420 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3422 gdb_assert (gdbarch != NULL);
3423 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3424 if (gdbarch_debug >= 2)
3425 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3426 gdbarch->elf_make_msymbol_special (sym, msym);
3430 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3431 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3433 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3437 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3439 gdb_assert (gdbarch != NULL);
3440 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3441 if (gdbarch_debug >= 2)
3442 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3443 gdbarch->coff_make_msymbol_special (val, msym);
3447 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3448 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3450 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3454 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
3456 gdb_assert (gdbarch != NULL);
3457 /* Skip verify of name_of_malloc, invalid_p == 0 */
3458 if (gdbarch_debug >= 2)
3459 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
3460 return gdbarch->name_of_malloc;
3464 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
3465 const char * name_of_malloc)
3467 gdbarch->name_of_malloc = name_of_malloc;
3471 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3473 gdb_assert (gdbarch != NULL);
3474 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3475 if (gdbarch_debug >= 2)
3476 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3477 return gdbarch->cannot_step_breakpoint;
3481 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3482 int cannot_step_breakpoint)
3484 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3488 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3490 gdb_assert (gdbarch != NULL);
3491 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3492 if (gdbarch_debug >= 2)
3493 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3494 return gdbarch->have_nonsteppable_watchpoint;
3498 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3499 int have_nonsteppable_watchpoint)
3501 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3505 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3507 gdb_assert (gdbarch != NULL);
3508 return gdbarch->address_class_type_flags != NULL;
3512 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3514 gdb_assert (gdbarch != NULL);
3515 gdb_assert (gdbarch->address_class_type_flags != NULL);
3516 if (gdbarch_debug >= 2)
3517 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3518 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3522 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3523 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3525 gdbarch->address_class_type_flags = address_class_type_flags;
3529 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3531 gdb_assert (gdbarch != NULL);
3532 return gdbarch->address_class_type_flags_to_name != NULL;
3536 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3538 gdb_assert (gdbarch != NULL);
3539 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3540 if (gdbarch_debug >= 2)
3541 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3542 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3546 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3547 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3549 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3553 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3555 gdb_assert (gdbarch != NULL);
3556 return gdbarch->address_class_name_to_type_flags != NULL;
3560 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3562 gdb_assert (gdbarch != NULL);
3563 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3564 if (gdbarch_debug >= 2)
3565 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3566 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3570 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3571 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3573 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3577 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3579 gdb_assert (gdbarch != NULL);
3580 gdb_assert (gdbarch->register_reggroup_p != NULL);
3581 if (gdbarch_debug >= 2)
3582 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3583 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3587 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3588 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3590 gdbarch->register_reggroup_p = register_reggroup_p;
3594 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3596 gdb_assert (gdbarch != NULL);
3597 return gdbarch->fetch_pointer_argument != NULL;
3601 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3603 gdb_assert (gdbarch != NULL);
3604 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3605 if (gdbarch_debug >= 2)
3606 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3607 return gdbarch->fetch_pointer_argument (frame, argi, type);
3611 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3612 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3614 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3618 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3620 gdb_assert (gdbarch != NULL);
3621 return gdbarch->regset_from_core_section != NULL;
3624 const struct regset *
3625 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3627 gdb_assert (gdbarch != NULL);
3628 gdb_assert (gdbarch->regset_from_core_section != NULL);
3629 if (gdbarch_debug >= 2)
3630 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3631 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3635 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3636 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3638 gdbarch->regset_from_core_section = regset_from_core_section;
3642 /* Keep a registry of per-architecture data-pointers required by GDB
3649 gdbarch_data_pre_init_ftype *pre_init;
3650 gdbarch_data_post_init_ftype *post_init;
3653 struct gdbarch_data_registration
3655 struct gdbarch_data *data;
3656 struct gdbarch_data_registration *next;
3659 struct gdbarch_data_registry
3662 struct gdbarch_data_registration *registrations;
3665 struct gdbarch_data_registry gdbarch_data_registry =
3670 static struct gdbarch_data *
3671 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3672 gdbarch_data_post_init_ftype *post_init)
3674 struct gdbarch_data_registration **curr;
3675 /* Append the new registraration. */
3676 for (curr = &gdbarch_data_registry.registrations;
3678 curr = &(*curr)->next);
3679 (*curr) = XMALLOC (struct gdbarch_data_registration);
3680 (*curr)->next = NULL;
3681 (*curr)->data = XMALLOC (struct gdbarch_data);
3682 (*curr)->data->index = gdbarch_data_registry.nr++;
3683 (*curr)->data->pre_init = pre_init;
3684 (*curr)->data->post_init = post_init;
3685 (*curr)->data->init_p = 1;
3686 return (*curr)->data;
3689 struct gdbarch_data *
3690 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3692 return gdbarch_data_register (pre_init, NULL);
3695 struct gdbarch_data *
3696 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3698 return gdbarch_data_register (NULL, post_init);
3701 /* Create/delete the gdbarch data vector. */
3704 alloc_gdbarch_data (struct gdbarch *gdbarch)
3706 gdb_assert (gdbarch->data == NULL);
3707 gdbarch->nr_data = gdbarch_data_registry.nr;
3708 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3711 /* Initialize the current value of the specified per-architecture
3715 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3716 struct gdbarch_data *data,
3719 gdb_assert (data->index < gdbarch->nr_data);
3720 gdb_assert (gdbarch->data[data->index] == NULL);
3721 gdb_assert (data->pre_init == NULL);
3722 gdbarch->data[data->index] = pointer;
3725 /* Return the current value of the specified per-architecture
3729 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3731 gdb_assert (data->index < gdbarch->nr_data);
3732 if (gdbarch->data[data->index] == NULL)
3734 /* The data-pointer isn't initialized, call init() to get a
3736 if (data->pre_init != NULL)
3737 /* Mid architecture creation: pass just the obstack, and not
3738 the entire architecture, as that way it isn't possible for
3739 pre-init code to refer to undefined architecture
3741 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3742 else if (gdbarch->initialized_p
3743 && data->post_init != NULL)
3744 /* Post architecture creation: pass the entire architecture
3745 (as all fields are valid), but be careful to also detect
3746 recursive references. */
3748 gdb_assert (data->init_p);
3750 gdbarch->data[data->index] = data->post_init (gdbarch);
3754 /* The architecture initialization hasn't completed - punt -
3755 hope that the caller knows what they are doing. Once
3756 deprecated_set_gdbarch_data has been initialized, this can be
3757 changed to an internal error. */
3759 gdb_assert (gdbarch->data[data->index] != NULL);
3761 return gdbarch->data[data->index];
3766 /* Keep a registry of swapped data required by GDB modules. */
3771 struct gdbarch_swap_registration *source;
3772 struct gdbarch_swap *next;
3775 struct gdbarch_swap_registration
3778 unsigned long sizeof_data;
3779 gdbarch_swap_ftype *init;
3780 struct gdbarch_swap_registration *next;
3783 struct gdbarch_swap_registry
3786 struct gdbarch_swap_registration *registrations;
3789 struct gdbarch_swap_registry gdbarch_swap_registry =
3795 deprecated_register_gdbarch_swap (void *data,
3796 unsigned long sizeof_data,
3797 gdbarch_swap_ftype *init)
3799 struct gdbarch_swap_registration **rego;
3800 for (rego = &gdbarch_swap_registry.registrations;
3802 rego = &(*rego)->next);
3803 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3804 (*rego)->next = NULL;
3805 (*rego)->init = init;
3806 (*rego)->data = data;
3807 (*rego)->sizeof_data = sizeof_data;
3811 current_gdbarch_swap_init_hack (void)
3813 struct gdbarch_swap_registration *rego;
3814 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
3815 for (rego = gdbarch_swap_registry.registrations;
3819 if (rego->data != NULL)
3821 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
3822 struct gdbarch_swap);
3823 (*curr)->source = rego;
3824 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
3826 (*curr)->next = NULL;
3827 curr = &(*curr)->next;
3829 if (rego->init != NULL)
3834 static struct gdbarch *
3835 current_gdbarch_swap_out_hack (void)
3837 struct gdbarch *old_gdbarch = current_gdbarch;
3838 struct gdbarch_swap *curr;
3840 gdb_assert (old_gdbarch != NULL);
3841 for (curr = old_gdbarch->swap;
3845 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3846 memset (curr->source->data, 0, curr->source->sizeof_data);
3848 current_gdbarch = NULL;
3853 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
3855 struct gdbarch_swap *curr;
3857 gdb_assert (current_gdbarch == NULL);
3858 for (curr = new_gdbarch->swap;
3861 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3862 current_gdbarch = new_gdbarch;
3866 /* Keep a registry of the architectures known by GDB. */
3868 struct gdbarch_registration
3870 enum bfd_architecture bfd_architecture;
3871 gdbarch_init_ftype *init;
3872 gdbarch_dump_tdep_ftype *dump_tdep;
3873 struct gdbarch_list *arches;
3874 struct gdbarch_registration *next;
3877 static struct gdbarch_registration *gdbarch_registry = NULL;
3880 append_name (const char ***buf, int *nr, const char *name)
3882 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3888 gdbarch_printable_names (void)
3890 /* Accumulate a list of names based on the registed list of
3892 enum bfd_architecture a;
3894 const char **arches = NULL;
3895 struct gdbarch_registration *rego;
3896 for (rego = gdbarch_registry;
3900 const struct bfd_arch_info *ap;
3901 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3903 internal_error (__FILE__, __LINE__,
3904 _("gdbarch_architecture_names: multi-arch unknown"));
3907 append_name (&arches, &nr_arches, ap->printable_name);
3912 append_name (&arches, &nr_arches, NULL);
3918 gdbarch_register (enum bfd_architecture bfd_architecture,
3919 gdbarch_init_ftype *init,
3920 gdbarch_dump_tdep_ftype *dump_tdep)
3922 struct gdbarch_registration **curr;
3923 const struct bfd_arch_info *bfd_arch_info;
3924 /* Check that BFD recognizes this architecture */
3925 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3926 if (bfd_arch_info == NULL)
3928 internal_error (__FILE__, __LINE__,
3929 _("gdbarch: Attempt to register unknown architecture (%d)"),
3932 /* Check that we haven't seen this architecture before */
3933 for (curr = &gdbarch_registry;
3935 curr = &(*curr)->next)
3937 if (bfd_architecture == (*curr)->bfd_architecture)
3938 internal_error (__FILE__, __LINE__,
3939 _("gdbarch: Duplicate registraration of architecture (%s)"),
3940 bfd_arch_info->printable_name);
3944 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3945 bfd_arch_info->printable_name,
3948 (*curr) = XMALLOC (struct gdbarch_registration);
3949 (*curr)->bfd_architecture = bfd_architecture;
3950 (*curr)->init = init;
3951 (*curr)->dump_tdep = dump_tdep;
3952 (*curr)->arches = NULL;
3953 (*curr)->next = NULL;
3957 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3958 gdbarch_init_ftype *init)
3960 gdbarch_register (bfd_architecture, init, NULL);
3964 /* Look for an architecture using gdbarch_info. Base search on only
3965 BFD_ARCH_INFO and BYTE_ORDER. */
3967 struct gdbarch_list *
3968 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3969 const struct gdbarch_info *info)
3971 for (; arches != NULL; arches = arches->next)
3973 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3975 if (info->byte_order != arches->gdbarch->byte_order)
3977 if (info->osabi != arches->gdbarch->osabi)
3985 /* Find an architecture that matches the specified INFO. Create a new
3986 architecture if needed. Return that new architecture. Assumes
3987 that there is no current architecture. */
3989 static struct gdbarch *
3990 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
3992 struct gdbarch *new_gdbarch;
3993 struct gdbarch_registration *rego;
3995 /* The existing architecture has been swapped out - all this code
3996 works from a clean slate. */
3997 gdb_assert (current_gdbarch == NULL);
3999 /* Fill in missing parts of the INFO struct using a number of
4000 sources: "set ..."; INFOabfd supplied; and the existing
4002 gdbarch_info_fill (old_gdbarch, &info);
4004 /* Must have found some sort of architecture. */
4005 gdb_assert (info.bfd_arch_info != NULL);
4009 fprintf_unfiltered (gdb_stdlog,
4010 "find_arch_by_info: info.bfd_arch_info %s\n",
4011 (info.bfd_arch_info != NULL
4012 ? info.bfd_arch_info->printable_name
4014 fprintf_unfiltered (gdb_stdlog,
4015 "find_arch_by_info: info.byte_order %d (%s)\n",
4017 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4018 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4020 fprintf_unfiltered (gdb_stdlog,
4021 "find_arch_by_info: info.osabi %d (%s)\n",
4022 info.osabi, gdbarch_osabi_name (info.osabi));
4023 fprintf_unfiltered (gdb_stdlog,
4024 "find_arch_by_info: info.abfd 0x%lx\n",
4026 fprintf_unfiltered (gdb_stdlog,
4027 "find_arch_by_info: info.tdep_info 0x%lx\n",
4028 (long) info.tdep_info);
4031 /* Find the tdep code that knows about this architecture. */
4032 for (rego = gdbarch_registry;
4035 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4040 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4041 "No matching architecture\n");
4045 /* Ask the tdep code for an architecture that matches "info". */
4046 new_gdbarch = rego->init (info, rego->arches);
4048 /* Did the tdep code like it? No. Reject the change and revert to
4049 the old architecture. */
4050 if (new_gdbarch == NULL)
4053 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4054 "Target rejected architecture\n");
4058 /* Is this a pre-existing architecture (as determined by already
4059 being initialized)? Move it to the front of the architecture
4060 list (keeping the list sorted Most Recently Used). */
4061 if (new_gdbarch->initialized_p)
4063 struct gdbarch_list **list;
4064 struct gdbarch_list *this;
4066 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4067 "Previous architecture 0x%08lx (%s) selected\n",
4069 new_gdbarch->bfd_arch_info->printable_name);
4070 /* Find the existing arch in the list. */
4071 for (list = ®o->arches;
4072 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4073 list = &(*list)->next);
4074 /* It had better be in the list of architectures. */
4075 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4078 (*list) = this->next;
4079 /* Insert THIS at the front. */
4080 this->next = rego->arches;
4081 rego->arches = this;
4086 /* It's a new architecture. */
4088 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4089 "New architecture 0x%08lx (%s) selected\n",
4091 new_gdbarch->bfd_arch_info->printable_name);
4093 /* Insert the new architecture into the front of the architecture
4094 list (keep the list sorted Most Recently Used). */
4096 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4097 this->next = rego->arches;
4098 this->gdbarch = new_gdbarch;
4099 rego->arches = this;
4102 /* Check that the newly installed architecture is valid. Plug in
4103 any post init values. */
4104 new_gdbarch->dump_tdep = rego->dump_tdep;
4105 verify_gdbarch (new_gdbarch);
4106 new_gdbarch->initialized_p = 1;
4108 /* Initialize any per-architecture swap areas. This phase requires
4109 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4110 swap the entire architecture out. */
4111 current_gdbarch = new_gdbarch;
4112 current_gdbarch_swap_init_hack ();
4113 current_gdbarch_swap_out_hack ();
4116 gdbarch_dump (new_gdbarch, gdb_stdlog);
4122 gdbarch_find_by_info (struct gdbarch_info info)
4124 /* Save the previously selected architecture, setting the global to
4125 NULL. This stops things like gdbarch->init() trying to use the
4126 previous architecture's configuration. The previous architecture
4127 may not even be of the same architecture family. The most recent
4128 architecture of the same family is found at the head of the
4129 rego->arches list. */
4130 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4132 /* Find the specified architecture. */
4133 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
4135 /* Restore the existing architecture. */
4136 gdb_assert (current_gdbarch == NULL);
4137 current_gdbarch_swap_in_hack (old_gdbarch);
4142 /* Make the specified architecture current, swapping the existing one
4146 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4148 gdb_assert (new_gdbarch != NULL);
4149 gdb_assert (current_gdbarch != NULL);
4150 gdb_assert (new_gdbarch->initialized_p);
4151 current_gdbarch_swap_out_hack ();
4152 current_gdbarch_swap_in_hack (new_gdbarch);
4153 architecture_changed_event ();
4154 flush_cached_frames ();
4157 extern void _initialize_gdbarch (void);
4160 _initialize_gdbarch (void)
4162 struct cmd_list_element *c;
4164 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4165 Set architecture debugging."), _("\
4166 Show architecture debugging."), _("\
4167 When non-zero, architecture debugging is enabled."),
4170 &setdebuglist, &showdebuglist);