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, 2006
6 Free 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)
77 /* Just print out one of them - this is only for diagnostics. */
78 return format[0]->name;
82 /* Maintain the struct gdbarch object */
86 /* Has this architecture been fully initialized? */
89 /* An obstack bound to the lifetime of the architecture. */
90 struct obstack *obstack;
92 /* basic architectural information */
93 const struct bfd_arch_info * bfd_arch_info;
96 const struct target_desc * target_desc;
98 /* target specific vector. */
99 struct gdbarch_tdep *tdep;
100 gdbarch_dump_tdep_ftype *dump_tdep;
102 /* per-architecture data-pointers */
106 /* per-architecture swap-regions */
107 struct gdbarch_swap *swap;
109 /* Multi-arch values.
111 When extending this structure you must:
115 Declare set/get functions and define the corresponding
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
121 verify_gdbarch(): Confirm that the target updated the field
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
140 const struct floatformat ** float_format;
142 const struct floatformat ** double_format;
144 const struct floatformat ** long_double_format;
149 gdbarch_read_pc_ftype *read_pc;
150 gdbarch_write_pc_ftype *write_pc;
151 gdbarch_read_sp_ftype *read_sp;
152 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
153 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
154 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
161 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
162 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
163 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
164 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
165 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
166 gdbarch_register_name_ftype *register_name;
167 gdbarch_register_type_ftype *register_type;
168 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
169 int deprecated_fp_regnum;
170 gdbarch_push_dummy_call_ftype *push_dummy_call;
171 int deprecated_register_size;
172 int call_dummy_location;
173 gdbarch_push_dummy_code_ftype *push_dummy_code;
174 gdbarch_print_registers_info_ftype *print_registers_info;
175 gdbarch_print_float_info_ftype *print_float_info;
176 gdbarch_print_vector_info_ftype *print_vector_info;
177 gdbarch_register_sim_regno_ftype *register_sim_regno;
178 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
179 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
180 gdbarch_cannot_store_register_ftype *cannot_store_register;
181 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
182 int believe_pcc_promotion;
183 gdbarch_convert_register_p_ftype *convert_register_p;
184 gdbarch_register_to_value_ftype *register_to_value;
185 gdbarch_value_to_register_ftype *value_to_register;
186 gdbarch_value_from_register_ftype *value_from_register;
187 gdbarch_pointer_to_address_ftype *pointer_to_address;
188 gdbarch_address_to_pointer_ftype *address_to_pointer;
189 gdbarch_integer_to_address_ftype *integer_to_address;
190 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
191 gdbarch_return_value_ftype *return_value;
192 gdbarch_extract_return_value_ftype *extract_return_value;
193 gdbarch_store_return_value_ftype *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_remote_register_number_ftype *remote_register_number;
206 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
207 CORE_ADDR frame_args_skip;
208 gdbarch_unwind_pc_ftype *unwind_pc;
209 gdbarch_unwind_sp_ftype *unwind_sp;
210 gdbarch_frame_num_args_ftype *frame_num_args;
211 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
212 gdbarch_frame_align_ftype *frame_align;
213 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
214 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
215 int frame_red_zone_size;
216 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
217 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
218 gdbarch_smash_text_address_ftype *smash_text_address;
219 gdbarch_software_single_step_ftype *software_single_step;
220 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
221 gdbarch_print_insn_ftype *print_insn;
222 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
223 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
224 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
225 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
226 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
227 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
228 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
229 const char * name_of_malloc;
230 int cannot_step_breakpoint;
231 int have_nonsteppable_watchpoint;
232 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
233 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
234 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
235 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
236 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
237 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
238 int vtable_function_descriptors;
243 /* The default architecture uses host values (for want of a better
246 extern const struct bfd_arch_info bfd_default_arch_struct;
248 struct gdbarch startup_gdbarch =
250 1, /* Always initialized. */
251 NULL, /* The obstack. */
252 /* basic architecture information */
253 &bfd_default_arch_struct, /* bfd_arch_info */
254 BFD_ENDIAN_BIG, /* byte_order */
255 GDB_OSABI_UNKNOWN, /* osabi */
257 /* target specific vector and its dump routine */
259 /*per-architecture data-pointers and swap regions */
261 /* Multi-arch values */
262 8 * sizeof (short), /* short_bit */
263 8 * sizeof (int), /* int_bit */
264 8 * sizeof (long), /* long_bit */
265 8 * sizeof (LONGEST), /* long_long_bit */
266 8 * sizeof (float), /* float_bit */
267 0, /* float_format */
268 8 * sizeof (double), /* double_bit */
269 0, /* double_format */
270 8 * sizeof (long double), /* long_double_bit */
271 0, /* long_double_format */
272 8 * sizeof (void*), /* ptr_bit */
273 8 * sizeof (void*), /* addr_bit */
274 8 * sizeof (void*), /* bfd_vma_bit */
279 0, /* virtual_frame_pointer */
280 0, /* pseudo_register_read */
281 0, /* pseudo_register_write */
283 0, /* num_pseudo_regs */
288 0, /* stab_reg_to_regnum */
289 0, /* ecoff_reg_to_regnum */
290 0, /* dwarf_reg_to_regnum */
291 0, /* sdb_reg_to_regnum */
292 0, /* dwarf2_reg_to_regnum */
293 0, /* register_name */
294 0, /* register_type */
295 0, /* unwind_dummy_id */
296 -1, /* deprecated_fp_regnum */
297 0, /* push_dummy_call */
298 0, /* deprecated_register_size */
299 0, /* call_dummy_location */
300 0, /* push_dummy_code */
301 default_print_registers_info, /* print_registers_info */
302 0, /* print_float_info */
303 0, /* print_vector_info */
304 0, /* register_sim_regno */
305 0, /* register_bytes_ok */
306 0, /* cannot_fetch_register */
307 0, /* cannot_store_register */
308 0, /* get_longjmp_target */
309 0, /* believe_pcc_promotion */
310 0, /* convert_register_p */
311 0, /* register_to_value */
312 0, /* value_to_register */
313 0, /* value_from_register */
314 0, /* pointer_to_address */
315 0, /* address_to_pointer */
316 0, /* integer_to_address */
317 0, /* deprecated_store_struct_return */
318 0, /* return_value */
319 0, /* extract_return_value */
320 0, /* store_return_value */
321 0, /* deprecated_use_struct_convention */
322 0, /* deprecated_extract_struct_value_address */
323 0, /* skip_prologue */
325 0, /* breakpoint_from_pc */
326 0, /* adjust_breakpoint_address */
327 0, /* memory_insert_breakpoint */
328 0, /* memory_remove_breakpoint */
329 0, /* decr_pc_after_break */
330 0, /* deprecated_function_start_offset */
331 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
332 default_remote_register_number, /* remote_register_number */
333 0, /* fetch_tls_load_module_address */
334 0, /* frame_args_skip */
337 0, /* frame_num_args */
338 0, /* deprecated_stack_align */
340 0, /* deprecated_reg_struct_has_addr */
341 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
342 0, /* frame_red_zone_size */
343 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
344 0, /* addr_bits_remove */
345 0, /* smash_text_address */
346 0, /* software_single_step */
347 0, /* single_step_through_delay */
349 0, /* skip_trampoline_code */
350 generic_skip_solib_resolver, /* skip_solib_resolver */
351 0, /* in_solib_return_trampoline */
352 generic_in_function_epilogue_p, /* in_function_epilogue_p */
353 construct_inferior_arguments, /* construct_inferior_arguments */
354 0, /* elf_make_msymbol_special */
355 0, /* coff_make_msymbol_special */
356 "malloc", /* name_of_malloc */
357 0, /* cannot_step_breakpoint */
358 0, /* have_nonsteppable_watchpoint */
359 0, /* address_class_type_flags */
360 0, /* address_class_type_flags_to_name */
361 0, /* address_class_name_to_type_flags */
362 default_register_reggroup_p, /* register_reggroup_p */
363 0, /* fetch_pointer_argument */
364 0, /* regset_from_core_section */
365 0, /* vtable_function_descriptors */
366 0, /* vbit_in_delta */
367 /* startup_gdbarch() */
370 struct gdbarch *current_gdbarch = &startup_gdbarch;
372 /* Create a new ``struct gdbarch'' based on information provided by
373 ``struct gdbarch_info''. */
376 gdbarch_alloc (const struct gdbarch_info *info,
377 struct gdbarch_tdep *tdep)
379 /* NOTE: The new architecture variable is named ``current_gdbarch''
380 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
381 the current local architecture and not the previous global
382 architecture. This ensures that the new architectures initial
383 values are not influenced by the previous architecture. Once
384 everything is parameterised with gdbarch, this will go away. */
385 struct gdbarch *current_gdbarch;
387 /* Create an obstack for allocating all the per-architecture memory,
388 then use that to allocate the architecture vector. */
389 struct obstack *obstack = XMALLOC (struct obstack);
390 obstack_init (obstack);
391 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
392 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
393 current_gdbarch->obstack = obstack;
395 alloc_gdbarch_data (current_gdbarch);
397 current_gdbarch->tdep = tdep;
399 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
400 current_gdbarch->byte_order = info->byte_order;
401 current_gdbarch->osabi = info->osabi;
402 current_gdbarch->target_desc = info->target_desc;
404 /* Force the explicit initialization of these. */
405 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
406 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
407 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
408 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
409 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
410 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
411 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
412 current_gdbarch->ptr_bit = TARGET_INT_BIT;
413 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
414 current_gdbarch->char_signed = -1;
415 current_gdbarch->write_pc = generic_target_write_pc;
416 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
417 current_gdbarch->num_regs = -1;
418 current_gdbarch->sp_regnum = -1;
419 current_gdbarch->pc_regnum = -1;
420 current_gdbarch->ps_regnum = -1;
421 current_gdbarch->fp0_regnum = -1;
422 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
423 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
424 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
425 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
426 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
427 current_gdbarch->deprecated_fp_regnum = -1;
428 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
429 current_gdbarch->print_registers_info = default_print_registers_info;
430 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
431 current_gdbarch->cannot_fetch_register = cannot_register_not;
432 current_gdbarch->cannot_store_register = cannot_register_not;
433 current_gdbarch->convert_register_p = generic_convert_register_p;
434 current_gdbarch->value_from_register = default_value_from_register;
435 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
436 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
437 current_gdbarch->return_value = legacy_return_value;
438 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
439 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
440 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
441 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
442 current_gdbarch->remote_register_number = default_remote_register_number;
443 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
444 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
445 current_gdbarch->addr_bits_remove = core_addr_identity;
446 current_gdbarch->smash_text_address = core_addr_identity;
447 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
448 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
449 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
450 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
451 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
452 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
453 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
454 current_gdbarch->name_of_malloc = "malloc";
455 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
456 /* gdbarch_alloc() */
458 return current_gdbarch;
462 /* Allocate extra space using the per-architecture obstack. */
465 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
467 void *data = obstack_alloc (arch->obstack, size);
468 memset (data, 0, size);
473 /* Free a gdbarch struct. This should never happen in normal
474 operation --- once you've created a gdbarch, you keep it around.
475 However, if an architecture's init function encounters an error
476 building the structure, it may need to clean up a partially
477 constructed gdbarch. */
480 gdbarch_free (struct gdbarch *arch)
482 struct obstack *obstack;
483 gdb_assert (arch != NULL);
484 gdb_assert (!arch->initialized_p);
485 obstack = arch->obstack;
486 obstack_free (obstack, 0); /* Includes the ARCH. */
491 /* Ensure that all values in a GDBARCH are reasonable. */
493 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
494 just happens to match the global variable ``current_gdbarch''. That
495 way macros refering to that variable get the local and not the global
496 version - ulgh. Once everything is parameterised with gdbarch, this
500 verify_gdbarch (struct gdbarch *current_gdbarch)
503 struct cleanup *cleanups;
506 log = mem_fileopen ();
507 cleanups = make_cleanup_ui_file_delete (log);
509 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
510 fprintf_unfiltered (log, "\n\tbyte-order");
511 if (current_gdbarch->bfd_arch_info == NULL)
512 fprintf_unfiltered (log, "\n\tbfd_arch_info");
513 /* Check those that need to be defined for the given multi-arch level. */
514 /* Skip verify of short_bit, invalid_p == 0 */
515 /* Skip verify of int_bit, invalid_p == 0 */
516 /* Skip verify of long_bit, invalid_p == 0 */
517 /* Skip verify of long_long_bit, invalid_p == 0 */
518 /* Skip verify of float_bit, invalid_p == 0 */
519 if (current_gdbarch->float_format == 0)
520 current_gdbarch->float_format = floatformats_ieee_single;
521 /* Skip verify of double_bit, invalid_p == 0 */
522 if (current_gdbarch->double_format == 0)
523 current_gdbarch->double_format = floatformats_ieee_double;
524 /* Skip verify of long_double_bit, invalid_p == 0 */
525 if (current_gdbarch->long_double_format == 0)
526 current_gdbarch->long_double_format = floatformats_ieee_double;
527 /* Skip verify of ptr_bit, invalid_p == 0 */
528 if (current_gdbarch->addr_bit == 0)
529 current_gdbarch->addr_bit = TARGET_PTR_BIT;
530 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
531 if (current_gdbarch->char_signed == -1)
532 current_gdbarch->char_signed = 1;
533 /* Skip verify of read_pc, has predicate */
534 /* Skip verify of write_pc, invalid_p == 0 */
535 /* Skip verify of read_sp, has predicate */
536 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
537 /* Skip verify of pseudo_register_read, has predicate */
538 /* Skip verify of pseudo_register_write, has predicate */
539 if (current_gdbarch->num_regs == -1)
540 fprintf_unfiltered (log, "\n\tnum_regs");
541 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
542 /* Skip verify of sp_regnum, invalid_p == 0 */
543 /* Skip verify of pc_regnum, invalid_p == 0 */
544 /* Skip verify of ps_regnum, invalid_p == 0 */
545 /* Skip verify of fp0_regnum, invalid_p == 0 */
546 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
547 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
548 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
549 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
550 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
551 /* Skip verify of register_type, has predicate */
552 /* Skip verify of unwind_dummy_id, has predicate */
553 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
554 /* Skip verify of push_dummy_call, has predicate */
555 /* Skip verify of call_dummy_location, invalid_p == 0 */
556 /* Skip verify of push_dummy_code, has predicate */
557 /* Skip verify of print_registers_info, invalid_p == 0 */
558 /* Skip verify of print_float_info, has predicate */
559 /* Skip verify of print_vector_info, has predicate */
560 /* Skip verify of register_sim_regno, invalid_p == 0 */
561 /* Skip verify of register_bytes_ok, has predicate */
562 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
563 /* Skip verify of cannot_store_register, invalid_p == 0 */
564 /* Skip verify of get_longjmp_target, has predicate */
565 /* Skip verify of convert_register_p, invalid_p == 0 */
566 /* Skip verify of value_from_register, invalid_p == 0 */
567 /* Skip verify of pointer_to_address, invalid_p == 0 */
568 /* Skip verify of address_to_pointer, invalid_p == 0 */
569 /* Skip verify of integer_to_address, has predicate */
570 /* Skip verify of deprecated_store_struct_return, has predicate */
571 /* Skip verify of return_value, has predicate */
572 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
573 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
574 if (current_gdbarch->skip_prologue == 0)
575 fprintf_unfiltered (log, "\n\tskip_prologue");
576 if (current_gdbarch->inner_than == 0)
577 fprintf_unfiltered (log, "\n\tinner_than");
578 if (current_gdbarch->breakpoint_from_pc == 0)
579 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
580 /* Skip verify of adjust_breakpoint_address, has predicate */
581 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
582 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
583 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
584 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
585 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
586 /* Skip verify of remote_register_number, invalid_p == 0 */
587 /* Skip verify of fetch_tls_load_module_address, has predicate */
588 /* Skip verify of frame_args_skip, invalid_p == 0 */
589 /* Skip verify of unwind_pc, has predicate */
590 /* Skip verify of unwind_sp, has predicate */
591 /* Skip verify of frame_num_args, has predicate */
592 /* Skip verify of deprecated_stack_align, has predicate */
593 /* Skip verify of frame_align, has predicate */
594 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
595 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
596 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
597 /* Skip verify of addr_bits_remove, invalid_p == 0 */
598 /* Skip verify of smash_text_address, invalid_p == 0 */
599 /* Skip verify of software_single_step, has predicate */
600 /* Skip verify of single_step_through_delay, has predicate */
601 if (current_gdbarch->print_insn == 0)
602 fprintf_unfiltered (log, "\n\tprint_insn");
603 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
604 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
605 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
606 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
607 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
608 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
609 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
610 /* Skip verify of name_of_malloc, invalid_p == 0 */
611 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
612 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
613 /* Skip verify of address_class_type_flags, has predicate */
614 /* Skip verify of address_class_type_flags_to_name, has predicate */
615 /* Skip verify of address_class_name_to_type_flags, has predicate */
616 /* Skip verify of register_reggroup_p, invalid_p == 0 */
617 /* Skip verify of fetch_pointer_argument, has predicate */
618 /* Skip verify of regset_from_core_section, has predicate */
619 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
620 /* Skip verify of vbit_in_delta, invalid_p == 0 */
621 buf = ui_file_xstrdup (log, &dummy);
622 make_cleanup (xfree, buf);
623 if (strlen (buf) > 0)
624 internal_error (__FILE__, __LINE__,
625 _("verify_gdbarch: the following are invalid ...%s"),
627 do_cleanups (cleanups);
631 /* Print out the details of the current architecture. */
633 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
634 just happens to match the global variable ``current_gdbarch''. That
635 way macros refering to that variable get the local and not the global
636 version - ulgh. Once everything is parameterised with gdbarch, this
640 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
642 const char *gdb_xm_file = "<not-defined>";
643 const char *gdb_nm_file = "<not-defined>";
644 const char *gdb_tm_file = "<not-defined>";
645 #if defined (GDB_XM_FILE)
646 gdb_xm_file = GDB_XM_FILE;
648 fprintf_unfiltered (file,
649 "gdbarch_dump: GDB_XM_FILE = %s\n",
651 #if defined (GDB_NM_FILE)
652 gdb_nm_file = GDB_NM_FILE;
654 fprintf_unfiltered (file,
655 "gdbarch_dump: GDB_NM_FILE = %s\n",
657 #if defined (GDB_TM_FILE)
658 gdb_tm_file = GDB_TM_FILE;
660 fprintf_unfiltered (file,
661 "gdbarch_dump: GDB_TM_FILE = %s\n",
663 #ifdef TARGET_ADDR_BIT
664 fprintf_unfiltered (file,
665 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
666 XSTRING (TARGET_ADDR_BIT));
668 fprintf_unfiltered (file,
669 "gdbarch_dump: addr_bit = %s\n",
670 paddr_d (current_gdbarch->addr_bit));
671 #ifdef ADDR_BITS_REMOVE
672 fprintf_unfiltered (file,
673 "gdbarch_dump: %s # %s\n",
674 "ADDR_BITS_REMOVE(addr)",
675 XSTRING (ADDR_BITS_REMOVE (addr)));
677 fprintf_unfiltered (file,
678 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
679 (long) current_gdbarch->addr_bits_remove);
680 fprintf_unfiltered (file,
681 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
682 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
683 fprintf_unfiltered (file,
684 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
685 (long) current_gdbarch->address_class_name_to_type_flags);
686 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
687 fprintf_unfiltered (file,
688 "gdbarch_dump: %s # %s\n",
689 "ADDRESS_CLASS_TYPE_FLAGS_P()",
690 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
692 fprintf_unfiltered (file,
693 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
694 gdbarch_address_class_type_flags_p (current_gdbarch));
695 #ifdef ADDRESS_CLASS_TYPE_FLAGS
696 fprintf_unfiltered (file,
697 "gdbarch_dump: %s # %s\n",
698 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
699 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
701 fprintf_unfiltered (file,
702 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
703 (long) current_gdbarch->address_class_type_flags);
704 fprintf_unfiltered (file,
705 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
706 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
707 fprintf_unfiltered (file,
708 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
709 (long) current_gdbarch->address_class_type_flags_to_name);
710 #ifdef ADDRESS_TO_POINTER
711 fprintf_unfiltered (file,
712 "gdbarch_dump: %s # %s\n",
713 "ADDRESS_TO_POINTER(type, buf, addr)",
714 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
716 fprintf_unfiltered (file,
717 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
718 (long) current_gdbarch->address_to_pointer);
719 fprintf_unfiltered (file,
720 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
721 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
722 fprintf_unfiltered (file,
723 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
724 (long) current_gdbarch->adjust_breakpoint_address);
725 #ifdef BELIEVE_PCC_PROMOTION
726 fprintf_unfiltered (file,
727 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
728 XSTRING (BELIEVE_PCC_PROMOTION));
730 fprintf_unfiltered (file,
731 "gdbarch_dump: believe_pcc_promotion = %s\n",
732 paddr_d (current_gdbarch->believe_pcc_promotion));
733 #ifdef TARGET_ARCHITECTURE
734 fprintf_unfiltered (file,
735 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
736 XSTRING (TARGET_ARCHITECTURE));
738 fprintf_unfiltered (file,
739 "gdbarch_dump: bfd_arch_info = %s\n",
740 TARGET_ARCHITECTURE->printable_name);
741 #ifdef TARGET_BFD_VMA_BIT
742 fprintf_unfiltered (file,
743 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
744 XSTRING (TARGET_BFD_VMA_BIT));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: bfd_vma_bit = %s\n",
748 paddr_d (current_gdbarch->bfd_vma_bit));
749 #ifdef BREAKPOINT_FROM_PC
750 fprintf_unfiltered (file,
751 "gdbarch_dump: %s # %s\n",
752 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
753 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
755 fprintf_unfiltered (file,
756 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
757 (long) current_gdbarch->breakpoint_from_pc);
758 #ifdef TARGET_BYTE_ORDER
759 fprintf_unfiltered (file,
760 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
761 XSTRING (TARGET_BYTE_ORDER));
763 fprintf_unfiltered (file,
764 "gdbarch_dump: byte_order = %s\n",
765 paddr_d (current_gdbarch->byte_order));
766 #ifdef CALL_DUMMY_LOCATION
767 fprintf_unfiltered (file,
768 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
769 XSTRING (CALL_DUMMY_LOCATION));
771 fprintf_unfiltered (file,
772 "gdbarch_dump: call_dummy_location = %s\n",
773 paddr_d (current_gdbarch->call_dummy_location));
774 #ifdef CANNOT_FETCH_REGISTER
775 fprintf_unfiltered (file,
776 "gdbarch_dump: %s # %s\n",
777 "CANNOT_FETCH_REGISTER(regnum)",
778 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
780 fprintf_unfiltered (file,
781 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
782 (long) current_gdbarch->cannot_fetch_register);
783 #ifdef CANNOT_STEP_BREAKPOINT
784 fprintf_unfiltered (file,
785 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
786 XSTRING (CANNOT_STEP_BREAKPOINT));
788 fprintf_unfiltered (file,
789 "gdbarch_dump: cannot_step_breakpoint = %s\n",
790 paddr_d (current_gdbarch->cannot_step_breakpoint));
791 #ifdef CANNOT_STORE_REGISTER
792 fprintf_unfiltered (file,
793 "gdbarch_dump: %s # %s\n",
794 "CANNOT_STORE_REGISTER(regnum)",
795 XSTRING (CANNOT_STORE_REGISTER (regnum)));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
799 (long) current_gdbarch->cannot_store_register);
800 #ifdef TARGET_CHAR_SIGNED
801 fprintf_unfiltered (file,
802 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
803 XSTRING (TARGET_CHAR_SIGNED));
805 fprintf_unfiltered (file,
806 "gdbarch_dump: char_signed = %s\n",
807 paddr_d (current_gdbarch->char_signed));
808 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
809 fprintf_unfiltered (file,
810 "gdbarch_dump: %s # %s\n",
811 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
812 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
816 (long) current_gdbarch->coff_make_msymbol_special);
817 fprintf_unfiltered (file,
818 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
819 (long) current_gdbarch->construct_inferior_arguments);
820 fprintf_unfiltered (file,
821 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
822 (long) current_gdbarch->convert_from_func_ptr_addr);
823 #ifdef CONVERT_REGISTER_P
824 fprintf_unfiltered (file,
825 "gdbarch_dump: %s # %s\n",
826 "CONVERT_REGISTER_P(regnum, type)",
827 XSTRING (CONVERT_REGISTER_P (regnum, type)));
829 fprintf_unfiltered (file,
830 "gdbarch_dump: convert_register_p = <0x%lx>\n",
831 (long) current_gdbarch->convert_register_p);
832 #ifdef DECR_PC_AFTER_BREAK
833 fprintf_unfiltered (file,
834 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
835 XSTRING (DECR_PC_AFTER_BREAK));
837 fprintf_unfiltered (file,
838 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
839 paddr_nz (current_gdbarch->decr_pc_after_break));
840 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
841 fprintf_unfiltered (file,
842 "gdbarch_dump: %s # %s\n",
843 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
844 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
846 fprintf_unfiltered (file,
847 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
848 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
849 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
850 fprintf_unfiltered (file,
851 "gdbarch_dump: %s # %s\n",
852 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
853 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
855 fprintf_unfiltered (file,
856 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
857 (long) current_gdbarch->deprecated_extract_struct_value_address);
858 #ifdef DEPRECATED_FP_REGNUM
859 fprintf_unfiltered (file,
860 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
861 XSTRING (DEPRECATED_FP_REGNUM));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: deprecated_fp_regnum = %s\n",
865 paddr_d (current_gdbarch->deprecated_fp_regnum));
866 #ifdef DEPRECATED_FUNCTION_START_OFFSET
867 fprintf_unfiltered (file,
868 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
869 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
873 paddr_nz (current_gdbarch->deprecated_function_start_offset));
874 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
875 fprintf_unfiltered (file,
876 "gdbarch_dump: %s # %s\n",
877 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
878 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
882 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
883 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
884 fprintf_unfiltered (file,
885 "gdbarch_dump: %s # %s\n",
886 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
887 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
889 fprintf_unfiltered (file,
890 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
891 (long) current_gdbarch->deprecated_reg_struct_has_addr);
892 #ifdef DEPRECATED_REGISTER_SIZE
893 fprintf_unfiltered (file,
894 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
895 XSTRING (DEPRECATED_REGISTER_SIZE));
897 fprintf_unfiltered (file,
898 "gdbarch_dump: deprecated_register_size = %s\n",
899 paddr_d (current_gdbarch->deprecated_register_size));
900 #ifdef DEPRECATED_STACK_ALIGN_P
901 fprintf_unfiltered (file,
902 "gdbarch_dump: %s # %s\n",
903 "DEPRECATED_STACK_ALIGN_P()",
904 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
906 fprintf_unfiltered (file,
907 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
908 gdbarch_deprecated_stack_align_p (current_gdbarch));
909 #ifdef DEPRECATED_STACK_ALIGN
910 fprintf_unfiltered (file,
911 "gdbarch_dump: %s # %s\n",
912 "DEPRECATED_STACK_ALIGN(sp)",
913 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
917 (long) current_gdbarch->deprecated_stack_align);
918 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
919 fprintf_unfiltered (file,
920 "gdbarch_dump: %s # %s\n",
921 "DEPRECATED_STORE_STRUCT_RETURN_P()",
922 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
924 fprintf_unfiltered (file,
925 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
926 gdbarch_deprecated_store_struct_return_p (current_gdbarch));
927 #ifdef DEPRECATED_STORE_STRUCT_RETURN
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
930 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
931 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
935 (long) current_gdbarch->deprecated_store_struct_return);
936 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
937 fprintf_unfiltered (file,
938 "gdbarch_dump: %s # %s\n",
939 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
940 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
944 (long) current_gdbarch->deprecated_use_struct_convention);
945 #ifdef TARGET_DOUBLE_BIT
946 fprintf_unfiltered (file,
947 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
948 XSTRING (TARGET_DOUBLE_BIT));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: double_bit = %s\n",
952 paddr_d (current_gdbarch->double_bit));
953 #ifdef TARGET_DOUBLE_FORMAT
954 fprintf_unfiltered (file,
955 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
956 XSTRING (TARGET_DOUBLE_FORMAT));
958 fprintf_unfiltered (file,
959 "gdbarch_dump: double_format = %s\n",
960 pformat (current_gdbarch->double_format));
961 #ifdef DWARF2_REG_TO_REGNUM
962 fprintf_unfiltered (file,
963 "gdbarch_dump: %s # %s\n",
964 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
965 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
967 fprintf_unfiltered (file,
968 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
969 (long) current_gdbarch->dwarf2_reg_to_regnum);
970 #ifdef DWARF_REG_TO_REGNUM
971 fprintf_unfiltered (file,
972 "gdbarch_dump: %s # %s\n",
973 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
974 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
976 fprintf_unfiltered (file,
977 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
978 (long) current_gdbarch->dwarf_reg_to_regnum);
979 #ifdef ECOFF_REG_TO_REGNUM
980 fprintf_unfiltered (file,
981 "gdbarch_dump: %s # %s\n",
982 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
983 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
985 fprintf_unfiltered (file,
986 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
987 (long) current_gdbarch->ecoff_reg_to_regnum);
988 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
989 fprintf_unfiltered (file,
990 "gdbarch_dump: %s # %s\n",
991 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
992 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
994 fprintf_unfiltered (file,
995 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
996 (long) current_gdbarch->elf_make_msymbol_special);
997 #ifdef EXTRACT_RETURN_VALUE
998 fprintf_unfiltered (file,
999 "gdbarch_dump: %s # %s\n",
1000 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1001 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1005 (long) current_gdbarch->extract_return_value);
1006 #ifdef FETCH_POINTER_ARGUMENT_P
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: %s # %s\n",
1009 "FETCH_POINTER_ARGUMENT_P()",
1010 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1014 gdbarch_fetch_pointer_argument_p (current_gdbarch));
1015 #ifdef FETCH_POINTER_ARGUMENT
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: %s # %s\n",
1018 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1019 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1023 (long) current_gdbarch->fetch_pointer_argument);
1024 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS_P
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: %s # %s\n",
1027 "FETCH_TLS_LOAD_MODULE_ADDRESS_P()",
1028 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS_P ()));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1032 gdbarch_fetch_tls_load_module_address_p (current_gdbarch));
1033 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: %s # %s\n",
1036 "FETCH_TLS_LOAD_MODULE_ADDRESS(objfile)",
1037 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS (objfile)));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
1041 (long) current_gdbarch->fetch_tls_load_module_address);
1042 #ifdef TARGET_FLOAT_BIT
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1045 XSTRING (TARGET_FLOAT_BIT));
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: float_bit = %s\n",
1049 paddr_d (current_gdbarch->float_bit));
1050 #ifdef TARGET_FLOAT_FORMAT
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1053 XSTRING (TARGET_FLOAT_FORMAT));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: float_format = %s\n",
1057 pformat (current_gdbarch->float_format));
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: FP0_REGNUM # %s\n",
1061 XSTRING (FP0_REGNUM));
1063 fprintf_unfiltered (file,
1064 "gdbarch_dump: fp0_regnum = %s\n",
1065 paddr_d (current_gdbarch->fp0_regnum));
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1068 gdbarch_frame_align_p (current_gdbarch));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: frame_align = <0x%lx>\n",
1071 (long) current_gdbarch->frame_align);
1072 #ifdef FRAME_ARGS_SKIP
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1075 XSTRING (FRAME_ARGS_SKIP));
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: frame_args_skip = 0x%s\n",
1079 paddr_nz (current_gdbarch->frame_args_skip));
1080 #ifdef FRAME_NUM_ARGS_P
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: %s # %s\n",
1083 "FRAME_NUM_ARGS_P()",
1084 XSTRING (FRAME_NUM_ARGS_P ()));
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1088 gdbarch_frame_num_args_p (current_gdbarch));
1089 #ifdef FRAME_NUM_ARGS
1090 fprintf_unfiltered (file,
1091 "gdbarch_dump: %s # %s\n",
1092 "FRAME_NUM_ARGS(frame)",
1093 XSTRING (FRAME_NUM_ARGS (frame)));
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1097 (long) current_gdbarch->frame_num_args);
1098 #ifdef FRAME_RED_ZONE_SIZE
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1101 XSTRING (FRAME_RED_ZONE_SIZE));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: frame_red_zone_size = %s\n",
1105 paddr_d (current_gdbarch->frame_red_zone_size));
1106 #ifdef GET_LONGJMP_TARGET_P
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: %s # %s\n",
1109 "GET_LONGJMP_TARGET_P()",
1110 XSTRING (GET_LONGJMP_TARGET_P ()));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1114 gdbarch_get_longjmp_target_p (current_gdbarch));
1115 #ifdef GET_LONGJMP_TARGET
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: %s # %s\n",
1118 "GET_LONGJMP_TARGET(pc)",
1119 XSTRING (GET_LONGJMP_TARGET (pc)));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1123 (long) current_gdbarch->get_longjmp_target);
1124 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1127 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1131 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1134 (long) current_gdbarch->in_function_epilogue_p);
1135 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: %s # %s\n",
1138 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1139 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1143 (long) current_gdbarch->in_solib_return_trampoline);
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: %s # %s\n",
1147 "INNER_THAN(lhs, rhs)",
1148 XSTRING (INNER_THAN (lhs, rhs)));
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: inner_than = <0x%lx>\n",
1152 (long) current_gdbarch->inner_than);
1153 #ifdef TARGET_INT_BIT
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1156 XSTRING (TARGET_INT_BIT));
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: int_bit = %s\n",
1160 paddr_d (current_gdbarch->int_bit));
1161 fprintf_unfiltered (file,
1162 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1163 gdbarch_integer_to_address_p (current_gdbarch));
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1166 (long) current_gdbarch->integer_to_address);
1167 #ifdef TARGET_LONG_BIT
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1170 XSTRING (TARGET_LONG_BIT));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: long_bit = %s\n",
1174 paddr_d (current_gdbarch->long_bit));
1175 #ifdef TARGET_LONG_DOUBLE_BIT
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1178 XSTRING (TARGET_LONG_DOUBLE_BIT));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: long_double_bit = %s\n",
1182 paddr_d (current_gdbarch->long_double_bit));
1183 #ifdef TARGET_LONG_DOUBLE_FORMAT
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1186 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: long_double_format = %s\n",
1190 pformat (current_gdbarch->long_double_format));
1191 #ifdef TARGET_LONG_LONG_BIT
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1194 XSTRING (TARGET_LONG_LONG_BIT));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: long_long_bit = %s\n",
1198 paddr_d (current_gdbarch->long_long_bit));
1199 #ifdef MEMORY_INSERT_BREAKPOINT
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "MEMORY_INSERT_BREAKPOINT(bp_tgt)",
1203 XSTRING (MEMORY_INSERT_BREAKPOINT (bp_tgt)));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1207 (long) current_gdbarch->memory_insert_breakpoint);
1208 #ifdef MEMORY_REMOVE_BREAKPOINT
1209 fprintf_unfiltered (file,
1210 "gdbarch_dump: %s # %s\n",
1211 "MEMORY_REMOVE_BREAKPOINT(bp_tgt)",
1212 XSTRING (MEMORY_REMOVE_BREAKPOINT (bp_tgt)));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1216 (long) current_gdbarch->memory_remove_breakpoint);
1217 #ifdef NAME_OF_MALLOC
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1220 XSTRING (NAME_OF_MALLOC));
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: name_of_malloc = %s\n",
1225 #ifdef NUM_PSEUDO_REGS
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1228 XSTRING (NUM_PSEUDO_REGS));
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: num_pseudo_regs = %s\n",
1232 paddr_d (current_gdbarch->num_pseudo_regs));
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: NUM_REGS # %s\n",
1236 XSTRING (NUM_REGS));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: num_regs = %s\n",
1240 paddr_d (current_gdbarch->num_regs));
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: TARGET_OSABI # %s\n",
1244 XSTRING (TARGET_OSABI));
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: osabi = %s\n",
1248 paddr_d (current_gdbarch->osabi));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: PC_REGNUM # %s\n",
1252 XSTRING (PC_REGNUM));
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: pc_regnum = %s\n",
1256 paddr_d (current_gdbarch->pc_regnum));
1257 #ifdef POINTER_TO_ADDRESS
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: %s # %s\n",
1260 "POINTER_TO_ADDRESS(type, buf)",
1261 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1263 fprintf_unfiltered (file,
1264 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1265 (long) current_gdbarch->pointer_to_address);
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1268 gdbarch_print_float_info_p (current_gdbarch));
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: print_float_info = <0x%lx>\n",
1271 (long) current_gdbarch->print_float_info);
1272 #ifdef TARGET_PRINT_INSN
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "TARGET_PRINT_INSN(vma, info)",
1276 XSTRING (TARGET_PRINT_INSN (vma, info)));
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: print_insn = <0x%lx>\n",
1280 (long) current_gdbarch->print_insn);
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1283 (long) current_gdbarch->print_registers_info);
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1286 gdbarch_print_vector_info_p (current_gdbarch));
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1289 (long) current_gdbarch->print_vector_info);
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: PS_REGNUM # %s\n",
1293 XSTRING (PS_REGNUM));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: ps_regnum = %s\n",
1297 paddr_d (current_gdbarch->ps_regnum));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1300 gdbarch_pseudo_register_read_p (current_gdbarch));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1303 (long) current_gdbarch->pseudo_register_read);
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1306 gdbarch_pseudo_register_write_p (current_gdbarch));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1309 (long) current_gdbarch->pseudo_register_write);
1310 #ifdef TARGET_PTR_BIT
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1313 XSTRING (TARGET_PTR_BIT));
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: ptr_bit = %s\n",
1317 paddr_d (current_gdbarch->ptr_bit));
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1320 gdbarch_push_dummy_call_p (current_gdbarch));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1323 (long) current_gdbarch->push_dummy_call);
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1326 gdbarch_push_dummy_code_p (current_gdbarch));
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1329 (long) current_gdbarch->push_dummy_code);
1330 #ifdef TARGET_READ_PC_P
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: %s # %s\n",
1333 "TARGET_READ_PC_P()",
1334 XSTRING (TARGET_READ_PC_P ()));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1338 gdbarch_read_pc_p (current_gdbarch));
1339 #ifdef TARGET_READ_PC
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: %s # %s\n",
1342 "TARGET_READ_PC(ptid)",
1343 XSTRING (TARGET_READ_PC (ptid)));
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: read_pc = <0x%lx>\n",
1347 (long) current_gdbarch->read_pc);
1348 #ifdef TARGET_READ_SP_P
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: %s # %s\n",
1351 "TARGET_READ_SP_P()",
1352 XSTRING (TARGET_READ_SP_P ()));
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1356 gdbarch_read_sp_p (current_gdbarch));
1357 #ifdef TARGET_READ_SP
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: %s # %s\n",
1361 XSTRING (TARGET_READ_SP ()));
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: read_sp = <0x%lx>\n",
1365 (long) current_gdbarch->read_sp);
1366 #ifdef REGISTER_BYTES_OK_P
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: %s # %s\n",
1369 "REGISTER_BYTES_OK_P()",
1370 XSTRING (REGISTER_BYTES_OK_P ()));
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1374 gdbarch_register_bytes_ok_p (current_gdbarch));
1375 #ifdef REGISTER_BYTES_OK
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: %s # %s\n",
1378 "REGISTER_BYTES_OK(nr_bytes)",
1379 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1383 (long) current_gdbarch->register_bytes_ok);
1384 #ifdef REGISTER_NAME
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: %s # %s\n",
1387 "REGISTER_NAME(regnr)",
1388 XSTRING (REGISTER_NAME (regnr)));
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: register_name = <0x%lx>\n",
1392 (long) current_gdbarch->register_name);
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1395 (long) current_gdbarch->register_reggroup_p);
1396 #ifdef REGISTER_SIM_REGNO
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: %s # %s\n",
1399 "REGISTER_SIM_REGNO(reg_nr)",
1400 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1404 (long) current_gdbarch->register_sim_regno);
1405 #ifdef REGISTER_TO_VALUE
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: %s # %s\n",
1408 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1409 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: register_to_value = <0x%lx>\n",
1413 (long) current_gdbarch->register_to_value);
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1416 gdbarch_register_type_p (current_gdbarch));
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: register_type = <0x%lx>\n",
1419 (long) current_gdbarch->register_type);
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1422 gdbarch_regset_from_core_section_p (current_gdbarch));
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1425 (long) current_gdbarch->regset_from_core_section);
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: remote_register_number = <0x%lx>\n",
1428 (long) current_gdbarch->remote_register_number);
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1431 (long) current_gdbarch->remote_translate_xfer_address);
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1434 gdbarch_return_value_p (current_gdbarch));
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: return_value = <0x%lx>\n",
1437 (long) current_gdbarch->return_value);
1438 #ifdef SDB_REG_TO_REGNUM
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: %s # %s\n",
1441 "SDB_REG_TO_REGNUM(sdb_regnr)",
1442 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1446 (long) current_gdbarch->sdb_reg_to_regnum);
1447 #ifdef TARGET_SHORT_BIT
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1450 XSTRING (TARGET_SHORT_BIT));
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: short_bit = %s\n",
1454 paddr_d (current_gdbarch->short_bit));
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1457 gdbarch_single_step_through_delay_p (current_gdbarch));
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
1460 (long) current_gdbarch->single_step_through_delay);
1461 #ifdef SKIP_PROLOGUE
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: %s # %s\n",
1464 "SKIP_PROLOGUE(ip)",
1465 XSTRING (SKIP_PROLOGUE (ip)));
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1469 (long) current_gdbarch->skip_prologue);
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1472 (long) current_gdbarch->skip_solib_resolver);
1473 #ifdef SKIP_TRAMPOLINE_CODE
1474 fprintf_unfiltered (file,
1475 "gdbarch_dump: %s # %s\n",
1476 "SKIP_TRAMPOLINE_CODE(pc)",
1477 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1481 (long) current_gdbarch->skip_trampoline_code);
1482 #ifdef SMASH_TEXT_ADDRESS
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: %s # %s\n",
1485 "SMASH_TEXT_ADDRESS(addr)",
1486 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1490 (long) current_gdbarch->smash_text_address);
1491 #ifdef SOFTWARE_SINGLE_STEP_P
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "SOFTWARE_SINGLE_STEP_P()",
1495 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1499 gdbarch_software_single_step_p (current_gdbarch));
1500 #ifdef SOFTWARE_SINGLE_STEP
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
1503 "SOFTWARE_SINGLE_STEP(regcache)",
1504 XSTRING (SOFTWARE_SINGLE_STEP (regcache)));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: software_single_step = <0x%lx>\n",
1508 (long) current_gdbarch->software_single_step);
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: SP_REGNUM # %s\n",
1512 XSTRING (SP_REGNUM));
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: sp_regnum = %s\n",
1516 paddr_d (current_gdbarch->sp_regnum));
1517 #ifdef STAB_REG_TO_REGNUM
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: %s # %s\n",
1520 "STAB_REG_TO_REGNUM(stab_regnr)",
1521 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1525 (long) current_gdbarch->stab_reg_to_regnum);
1526 fprintf_unfiltered (file,
1527 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1528 (long) current_gdbarch->stabs_argument_has_addr);
1529 #ifdef STORE_RETURN_VALUE
1530 fprintf_unfiltered (file,
1531 "gdbarch_dump: %s # %s\n",
1532 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1533 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: store_return_value = <0x%lx>\n",
1537 (long) current_gdbarch->store_return_value);
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: target_desc = %s\n",
1540 paddr_d ((long) current_gdbarch->target_desc));
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1543 gdbarch_unwind_dummy_id_p (current_gdbarch));
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1546 (long) current_gdbarch->unwind_dummy_id);
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1549 gdbarch_unwind_pc_p (current_gdbarch));
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1552 (long) current_gdbarch->unwind_pc);
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1555 gdbarch_unwind_sp_p (current_gdbarch));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1558 (long) current_gdbarch->unwind_sp);
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: value_from_register = <0x%lx>\n",
1561 (long) current_gdbarch->value_from_register);
1562 #ifdef VALUE_TO_REGISTER
1563 fprintf_unfiltered (file,
1564 "gdbarch_dump: %s # %s\n",
1565 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1566 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: value_to_register = <0x%lx>\n",
1570 (long) current_gdbarch->value_to_register);
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: vbit_in_delta = %s\n",
1573 paddr_d (current_gdbarch->vbit_in_delta));
1574 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1575 fprintf_unfiltered (file,
1576 "gdbarch_dump: %s # %s\n",
1577 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1578 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1582 (long) current_gdbarch->virtual_frame_pointer);
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: vtable_function_descriptors = %s\n",
1585 paddr_d (current_gdbarch->vtable_function_descriptors));
1586 #ifdef TARGET_WRITE_PC
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: %s # %s\n",
1589 "TARGET_WRITE_PC(val, ptid)",
1590 XSTRING (TARGET_WRITE_PC (val, ptid)));
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: write_pc = <0x%lx>\n",
1594 (long) current_gdbarch->write_pc);
1595 if (current_gdbarch->dump_tdep != NULL)
1596 current_gdbarch->dump_tdep (current_gdbarch, file);
1599 struct gdbarch_tdep *
1600 gdbarch_tdep (struct gdbarch *gdbarch)
1602 if (gdbarch_debug >= 2)
1603 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1604 return gdbarch->tdep;
1608 const struct bfd_arch_info *
1609 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1611 gdb_assert (gdbarch != NULL);
1612 if (gdbarch_debug >= 2)
1613 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1614 return gdbarch->bfd_arch_info;
1618 gdbarch_byte_order (struct gdbarch *gdbarch)
1620 gdb_assert (gdbarch != NULL);
1621 if (gdbarch_debug >= 2)
1622 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1623 return gdbarch->byte_order;
1627 gdbarch_osabi (struct gdbarch *gdbarch)
1629 gdb_assert (gdbarch != NULL);
1630 if (gdbarch_debug >= 2)
1631 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1632 return gdbarch->osabi;
1635 const struct target_desc *
1636 gdbarch_target_desc (struct gdbarch *gdbarch)
1638 gdb_assert (gdbarch != NULL);
1639 if (gdbarch_debug >= 2)
1640 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1641 return gdbarch->target_desc;
1645 gdbarch_short_bit (struct gdbarch *gdbarch)
1647 gdb_assert (gdbarch != NULL);
1648 /* Skip verify of short_bit, invalid_p == 0 */
1649 if (gdbarch_debug >= 2)
1650 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1651 return gdbarch->short_bit;
1655 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1658 gdbarch->short_bit = short_bit;
1662 gdbarch_int_bit (struct gdbarch *gdbarch)
1664 gdb_assert (gdbarch != NULL);
1665 /* Skip verify of int_bit, invalid_p == 0 */
1666 if (gdbarch_debug >= 2)
1667 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1668 return gdbarch->int_bit;
1672 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1675 gdbarch->int_bit = int_bit;
1679 gdbarch_long_bit (struct gdbarch *gdbarch)
1681 gdb_assert (gdbarch != NULL);
1682 /* Skip verify of long_bit, invalid_p == 0 */
1683 if (gdbarch_debug >= 2)
1684 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1685 return gdbarch->long_bit;
1689 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1692 gdbarch->long_bit = long_bit;
1696 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1698 gdb_assert (gdbarch != NULL);
1699 /* Skip verify of long_long_bit, invalid_p == 0 */
1700 if (gdbarch_debug >= 2)
1701 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1702 return gdbarch->long_long_bit;
1706 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1709 gdbarch->long_long_bit = long_long_bit;
1713 gdbarch_float_bit (struct gdbarch *gdbarch)
1715 gdb_assert (gdbarch != NULL);
1716 /* Skip verify of float_bit, invalid_p == 0 */
1717 if (gdbarch_debug >= 2)
1718 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1719 return gdbarch->float_bit;
1723 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1726 gdbarch->float_bit = float_bit;
1729 const struct floatformat **
1730 gdbarch_float_format (struct gdbarch *gdbarch)
1732 gdb_assert (gdbarch != NULL);
1733 if (gdbarch_debug >= 2)
1734 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1735 return gdbarch->float_format;
1739 set_gdbarch_float_format (struct gdbarch *gdbarch,
1740 const struct floatformat ** float_format)
1742 gdbarch->float_format = float_format;
1746 gdbarch_double_bit (struct gdbarch *gdbarch)
1748 gdb_assert (gdbarch != NULL);
1749 /* Skip verify of double_bit, invalid_p == 0 */
1750 if (gdbarch_debug >= 2)
1751 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1752 return gdbarch->double_bit;
1756 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1759 gdbarch->double_bit = double_bit;
1762 const struct floatformat **
1763 gdbarch_double_format (struct gdbarch *gdbarch)
1765 gdb_assert (gdbarch != NULL);
1766 if (gdbarch_debug >= 2)
1767 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1768 return gdbarch->double_format;
1772 set_gdbarch_double_format (struct gdbarch *gdbarch,
1773 const struct floatformat ** double_format)
1775 gdbarch->double_format = double_format;
1779 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1781 gdb_assert (gdbarch != NULL);
1782 /* Skip verify of long_double_bit, invalid_p == 0 */
1783 if (gdbarch_debug >= 2)
1784 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1785 return gdbarch->long_double_bit;
1789 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1790 int long_double_bit)
1792 gdbarch->long_double_bit = long_double_bit;
1795 const struct floatformat **
1796 gdbarch_long_double_format (struct gdbarch *gdbarch)
1798 gdb_assert (gdbarch != NULL);
1799 if (gdbarch_debug >= 2)
1800 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1801 return gdbarch->long_double_format;
1805 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1806 const struct floatformat ** long_double_format)
1808 gdbarch->long_double_format = long_double_format;
1812 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1814 gdb_assert (gdbarch != NULL);
1815 /* Skip verify of ptr_bit, invalid_p == 0 */
1816 if (gdbarch_debug >= 2)
1817 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1818 return gdbarch->ptr_bit;
1822 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1825 gdbarch->ptr_bit = ptr_bit;
1829 gdbarch_addr_bit (struct gdbarch *gdbarch)
1831 gdb_assert (gdbarch != NULL);
1832 /* Check variable changed from pre-default. */
1833 gdb_assert (gdbarch->addr_bit != 0);
1834 if (gdbarch_debug >= 2)
1835 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1836 return gdbarch->addr_bit;
1840 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1843 gdbarch->addr_bit = addr_bit;
1847 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1849 gdb_assert (gdbarch != NULL);
1850 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1851 if (gdbarch_debug >= 2)
1852 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1853 return gdbarch->bfd_vma_bit;
1857 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1860 gdbarch->bfd_vma_bit = bfd_vma_bit;
1864 gdbarch_char_signed (struct gdbarch *gdbarch)
1866 gdb_assert (gdbarch != NULL);
1867 /* Check variable changed from pre-default. */
1868 gdb_assert (gdbarch->char_signed != -1);
1869 if (gdbarch_debug >= 2)
1870 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1871 return gdbarch->char_signed;
1875 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1878 gdbarch->char_signed = char_signed;
1882 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1884 gdb_assert (gdbarch != NULL);
1885 return gdbarch->read_pc != NULL;
1889 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
1891 gdb_assert (gdbarch != NULL);
1892 gdb_assert (gdbarch->read_pc != NULL);
1893 if (gdbarch_debug >= 2)
1894 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1895 return gdbarch->read_pc (ptid);
1899 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1900 gdbarch_read_pc_ftype read_pc)
1902 gdbarch->read_pc = read_pc;
1906 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
1908 gdb_assert (gdbarch != NULL);
1909 gdb_assert (gdbarch->write_pc != NULL);
1910 if (gdbarch_debug >= 2)
1911 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1912 gdbarch->write_pc (val, ptid);
1916 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1917 gdbarch_write_pc_ftype write_pc)
1919 gdbarch->write_pc = write_pc;
1923 gdbarch_read_sp_p (struct gdbarch *gdbarch)
1925 gdb_assert (gdbarch != NULL);
1926 return gdbarch->read_sp != NULL;
1930 gdbarch_read_sp (struct gdbarch *gdbarch)
1932 gdb_assert (gdbarch != NULL);
1933 gdb_assert (gdbarch->read_sp != NULL);
1934 if (gdbarch_debug >= 2)
1935 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1936 return gdbarch->read_sp ();
1940 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1941 gdbarch_read_sp_ftype read_sp)
1943 gdbarch->read_sp = read_sp;
1947 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1949 gdb_assert (gdbarch != NULL);
1950 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1951 if (gdbarch_debug >= 2)
1952 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1953 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
1957 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1958 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1960 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1964 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1966 gdb_assert (gdbarch != NULL);
1967 return gdbarch->pseudo_register_read != NULL;
1971 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1973 gdb_assert (gdbarch != NULL);
1974 gdb_assert (gdbarch->pseudo_register_read != NULL);
1975 if (gdbarch_debug >= 2)
1976 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1977 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1981 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1982 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1984 gdbarch->pseudo_register_read = pseudo_register_read;
1988 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1990 gdb_assert (gdbarch != NULL);
1991 return gdbarch->pseudo_register_write != NULL;
1995 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1997 gdb_assert (gdbarch != NULL);
1998 gdb_assert (gdbarch->pseudo_register_write != NULL);
1999 if (gdbarch_debug >= 2)
2000 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2001 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2005 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2006 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2008 gdbarch->pseudo_register_write = pseudo_register_write;
2012 gdbarch_num_regs (struct gdbarch *gdbarch)
2014 gdb_assert (gdbarch != NULL);
2015 /* Check variable changed from pre-default. */
2016 gdb_assert (gdbarch->num_regs != -1);
2017 if (gdbarch_debug >= 2)
2018 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2019 return gdbarch->num_regs;
2023 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2026 gdbarch->num_regs = num_regs;
2030 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2032 gdb_assert (gdbarch != NULL);
2033 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2034 if (gdbarch_debug >= 2)
2035 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2036 return gdbarch->num_pseudo_regs;
2040 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2041 int num_pseudo_regs)
2043 gdbarch->num_pseudo_regs = num_pseudo_regs;
2047 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2049 gdb_assert (gdbarch != NULL);
2050 /* Skip verify of sp_regnum, invalid_p == 0 */
2051 if (gdbarch_debug >= 2)
2052 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2053 return gdbarch->sp_regnum;
2057 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2060 gdbarch->sp_regnum = sp_regnum;
2064 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2066 gdb_assert (gdbarch != NULL);
2067 /* Skip verify of pc_regnum, invalid_p == 0 */
2068 if (gdbarch_debug >= 2)
2069 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2070 return gdbarch->pc_regnum;
2074 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2077 gdbarch->pc_regnum = pc_regnum;
2081 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2083 gdb_assert (gdbarch != NULL);
2084 /* Skip verify of ps_regnum, invalid_p == 0 */
2085 if (gdbarch_debug >= 2)
2086 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2087 return gdbarch->ps_regnum;
2091 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2094 gdbarch->ps_regnum = ps_regnum;
2098 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2100 gdb_assert (gdbarch != NULL);
2101 /* Skip verify of fp0_regnum, invalid_p == 0 */
2102 if (gdbarch_debug >= 2)
2103 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2104 return gdbarch->fp0_regnum;
2108 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2111 gdbarch->fp0_regnum = fp0_regnum;
2115 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2117 gdb_assert (gdbarch != NULL);
2118 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2119 if (gdbarch_debug >= 2)
2120 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2121 return gdbarch->stab_reg_to_regnum (stab_regnr);
2125 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2126 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2128 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2132 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2134 gdb_assert (gdbarch != NULL);
2135 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2136 if (gdbarch_debug >= 2)
2137 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2138 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2142 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2143 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2145 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2149 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2151 gdb_assert (gdbarch != NULL);
2152 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2153 if (gdbarch_debug >= 2)
2154 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2155 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2159 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2160 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2162 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2166 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2168 gdb_assert (gdbarch != NULL);
2169 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2170 if (gdbarch_debug >= 2)
2171 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2172 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2176 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2177 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2179 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2183 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2185 gdb_assert (gdbarch != NULL);
2186 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2187 if (gdbarch_debug >= 2)
2188 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2189 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2193 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2194 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2196 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2200 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2202 gdb_assert (gdbarch != NULL);
2203 gdb_assert (gdbarch->register_name != NULL);
2204 if (gdbarch_debug >= 2)
2205 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2206 return gdbarch->register_name (regnr);
2210 set_gdbarch_register_name (struct gdbarch *gdbarch,
2211 gdbarch_register_name_ftype register_name)
2213 gdbarch->register_name = register_name;
2217 gdbarch_register_type_p (struct gdbarch *gdbarch)
2219 gdb_assert (gdbarch != NULL);
2220 return gdbarch->register_type != NULL;
2224 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2226 gdb_assert (gdbarch != NULL);
2227 gdb_assert (gdbarch->register_type != NULL);
2228 if (gdbarch_debug >= 2)
2229 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2230 return gdbarch->register_type (gdbarch, reg_nr);
2234 set_gdbarch_register_type (struct gdbarch *gdbarch,
2235 gdbarch_register_type_ftype register_type)
2237 gdbarch->register_type = register_type;
2241 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2243 gdb_assert (gdbarch != NULL);
2244 return gdbarch->unwind_dummy_id != NULL;
2248 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2250 gdb_assert (gdbarch != NULL);
2251 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2252 if (gdbarch_debug >= 2)
2253 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2254 return gdbarch->unwind_dummy_id (gdbarch, info);
2258 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2259 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2261 gdbarch->unwind_dummy_id = unwind_dummy_id;
2265 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2267 gdb_assert (gdbarch != NULL);
2268 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2269 if (gdbarch_debug >= 2)
2270 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2271 return gdbarch->deprecated_fp_regnum;
2275 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2276 int deprecated_fp_regnum)
2278 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2282 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2284 gdb_assert (gdbarch != NULL);
2285 return gdbarch->push_dummy_call != NULL;
2289 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)
2291 gdb_assert (gdbarch != NULL);
2292 gdb_assert (gdbarch->push_dummy_call != NULL);
2293 if (gdbarch_debug >= 2)
2294 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2295 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2299 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2300 gdbarch_push_dummy_call_ftype push_dummy_call)
2302 gdbarch->push_dummy_call = push_dummy_call;
2306 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2308 gdb_assert (gdbarch != NULL);
2309 if (gdbarch_debug >= 2)
2310 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2311 return gdbarch->deprecated_register_size;
2315 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2316 int deprecated_register_size)
2318 gdbarch->deprecated_register_size = deprecated_register_size;
2322 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2324 gdb_assert (gdbarch != NULL);
2325 /* Skip verify of call_dummy_location, invalid_p == 0 */
2326 if (gdbarch_debug >= 2)
2327 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2328 return gdbarch->call_dummy_location;
2332 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2333 int call_dummy_location)
2335 gdbarch->call_dummy_location = call_dummy_location;
2339 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2341 gdb_assert (gdbarch != NULL);
2342 return gdbarch->push_dummy_code != NULL;
2346 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)
2348 gdb_assert (gdbarch != NULL);
2349 gdb_assert (gdbarch->push_dummy_code != NULL);
2350 if (gdbarch_debug >= 2)
2351 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2352 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2356 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2357 gdbarch_push_dummy_code_ftype push_dummy_code)
2359 gdbarch->push_dummy_code = push_dummy_code;
2363 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2365 gdb_assert (gdbarch != NULL);
2366 gdb_assert (gdbarch->print_registers_info != NULL);
2367 if (gdbarch_debug >= 2)
2368 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2369 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2373 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2374 gdbarch_print_registers_info_ftype print_registers_info)
2376 gdbarch->print_registers_info = print_registers_info;
2380 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2382 gdb_assert (gdbarch != NULL);
2383 return gdbarch->print_float_info != NULL;
2387 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2389 gdb_assert (gdbarch != NULL);
2390 gdb_assert (gdbarch->print_float_info != NULL);
2391 if (gdbarch_debug >= 2)
2392 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2393 gdbarch->print_float_info (gdbarch, file, frame, args);
2397 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2398 gdbarch_print_float_info_ftype print_float_info)
2400 gdbarch->print_float_info = print_float_info;
2404 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2406 gdb_assert (gdbarch != NULL);
2407 return gdbarch->print_vector_info != NULL;
2411 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2413 gdb_assert (gdbarch != NULL);
2414 gdb_assert (gdbarch->print_vector_info != NULL);
2415 if (gdbarch_debug >= 2)
2416 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2417 gdbarch->print_vector_info (gdbarch, file, frame, args);
2421 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2422 gdbarch_print_vector_info_ftype print_vector_info)
2424 gdbarch->print_vector_info = print_vector_info;
2428 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2430 gdb_assert (gdbarch != NULL);
2431 gdb_assert (gdbarch->register_sim_regno != NULL);
2432 if (gdbarch_debug >= 2)
2433 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2434 return gdbarch->register_sim_regno (reg_nr);
2438 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2439 gdbarch_register_sim_regno_ftype register_sim_regno)
2441 gdbarch->register_sim_regno = register_sim_regno;
2445 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2447 gdb_assert (gdbarch != NULL);
2448 return gdbarch->register_bytes_ok != NULL;
2452 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2454 gdb_assert (gdbarch != NULL);
2455 gdb_assert (gdbarch->register_bytes_ok != NULL);
2456 if (gdbarch_debug >= 2)
2457 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2458 return gdbarch->register_bytes_ok (nr_bytes);
2462 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2463 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2465 gdbarch->register_bytes_ok = register_bytes_ok;
2469 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2471 gdb_assert (gdbarch != NULL);
2472 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2473 if (gdbarch_debug >= 2)
2474 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2475 return gdbarch->cannot_fetch_register (regnum);
2479 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2480 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2482 gdbarch->cannot_fetch_register = cannot_fetch_register;
2486 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2488 gdb_assert (gdbarch != NULL);
2489 gdb_assert (gdbarch->cannot_store_register != NULL);
2490 if (gdbarch_debug >= 2)
2491 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2492 return gdbarch->cannot_store_register (regnum);
2496 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2497 gdbarch_cannot_store_register_ftype cannot_store_register)
2499 gdbarch->cannot_store_register = cannot_store_register;
2503 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2505 gdb_assert (gdbarch != NULL);
2506 return gdbarch->get_longjmp_target != NULL;
2510 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
2512 gdb_assert (gdbarch != NULL);
2513 gdb_assert (gdbarch->get_longjmp_target != NULL);
2514 if (gdbarch_debug >= 2)
2515 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2516 return gdbarch->get_longjmp_target (pc);
2520 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2521 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2523 gdbarch->get_longjmp_target = get_longjmp_target;
2527 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2529 gdb_assert (gdbarch != NULL);
2530 if (gdbarch_debug >= 2)
2531 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2532 return gdbarch->believe_pcc_promotion;
2536 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2537 int believe_pcc_promotion)
2539 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2543 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2545 gdb_assert (gdbarch != NULL);
2546 gdb_assert (gdbarch->convert_register_p != NULL);
2547 if (gdbarch_debug >= 2)
2548 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2549 return gdbarch->convert_register_p (regnum, type);
2553 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2554 gdbarch_convert_register_p_ftype convert_register_p)
2556 gdbarch->convert_register_p = convert_register_p;
2560 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
2562 gdb_assert (gdbarch != NULL);
2563 gdb_assert (gdbarch->register_to_value != NULL);
2564 if (gdbarch_debug >= 2)
2565 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2566 gdbarch->register_to_value (frame, regnum, type, buf);
2570 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2571 gdbarch_register_to_value_ftype register_to_value)
2573 gdbarch->register_to_value = register_to_value;
2577 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2579 gdb_assert (gdbarch != NULL);
2580 gdb_assert (gdbarch->value_to_register != NULL);
2581 if (gdbarch_debug >= 2)
2582 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2583 gdbarch->value_to_register (frame, regnum, type, buf);
2587 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2588 gdbarch_value_to_register_ftype value_to_register)
2590 gdbarch->value_to_register = value_to_register;
2594 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2596 gdb_assert (gdbarch != NULL);
2597 gdb_assert (gdbarch->value_from_register != NULL);
2598 if (gdbarch_debug >= 2)
2599 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2600 return gdbarch->value_from_register (type, regnum, frame);
2604 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2605 gdbarch_value_from_register_ftype value_from_register)
2607 gdbarch->value_from_register = value_from_register;
2611 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2613 gdb_assert (gdbarch != NULL);
2614 gdb_assert (gdbarch->pointer_to_address != NULL);
2615 if (gdbarch_debug >= 2)
2616 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2617 return gdbarch->pointer_to_address (type, buf);
2621 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2622 gdbarch_pointer_to_address_ftype pointer_to_address)
2624 gdbarch->pointer_to_address = pointer_to_address;
2628 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2630 gdb_assert (gdbarch != NULL);
2631 gdb_assert (gdbarch->address_to_pointer != NULL);
2632 if (gdbarch_debug >= 2)
2633 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2634 gdbarch->address_to_pointer (type, buf, addr);
2638 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2639 gdbarch_address_to_pointer_ftype address_to_pointer)
2641 gdbarch->address_to_pointer = address_to_pointer;
2645 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2647 gdb_assert (gdbarch != NULL);
2648 return gdbarch->integer_to_address != NULL;
2652 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2654 gdb_assert (gdbarch != NULL);
2655 gdb_assert (gdbarch->integer_to_address != NULL);
2656 if (gdbarch_debug >= 2)
2657 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2658 return gdbarch->integer_to_address (gdbarch, type, buf);
2662 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2663 gdbarch_integer_to_address_ftype integer_to_address)
2665 gdbarch->integer_to_address = integer_to_address;
2669 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
2671 gdb_assert (gdbarch != NULL);
2672 return gdbarch->deprecated_store_struct_return != NULL;
2676 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2678 gdb_assert (gdbarch != NULL);
2679 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
2680 if (gdbarch_debug >= 2)
2681 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
2682 gdbarch->deprecated_store_struct_return (addr, sp);
2686 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
2687 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
2689 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
2693 gdbarch_return_value_p (struct gdbarch *gdbarch)
2695 gdb_assert (gdbarch != NULL);
2696 return gdbarch->return_value != legacy_return_value;
2699 enum return_value_convention
2700 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2702 gdb_assert (gdbarch != NULL);
2703 gdb_assert (gdbarch->return_value != NULL);
2704 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
2705 if (gdbarch_debug >= 2)
2706 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2707 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
2711 set_gdbarch_return_value (struct gdbarch *gdbarch,
2712 gdbarch_return_value_ftype return_value)
2714 gdbarch->return_value = return_value;
2718 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
2720 gdb_assert (gdbarch != NULL);
2721 gdb_assert (gdbarch->extract_return_value != NULL);
2722 if (gdbarch_debug >= 2)
2723 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2724 gdbarch->extract_return_value (type, regcache, valbuf);
2728 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2729 gdbarch_extract_return_value_ftype extract_return_value)
2731 gdbarch->extract_return_value = extract_return_value;
2735 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
2737 gdb_assert (gdbarch != NULL);
2738 gdb_assert (gdbarch->store_return_value != NULL);
2739 if (gdbarch_debug >= 2)
2740 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2741 gdbarch->store_return_value (type, regcache, valbuf);
2745 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2746 gdbarch_store_return_value_ftype store_return_value)
2748 gdbarch->store_return_value = store_return_value;
2752 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2754 gdb_assert (gdbarch != NULL);
2755 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
2756 if (gdbarch_debug >= 2)
2757 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
2758 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
2762 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
2763 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
2765 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
2769 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
2771 gdb_assert (gdbarch != NULL);
2772 return gdbarch->deprecated_extract_struct_value_address != NULL;
2776 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
2778 gdb_assert (gdbarch != NULL);
2779 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
2780 if (gdbarch_debug >= 2)
2781 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
2782 return gdbarch->deprecated_extract_struct_value_address (regcache);
2786 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
2787 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
2789 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
2793 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2795 gdb_assert (gdbarch != NULL);
2796 gdb_assert (gdbarch->skip_prologue != NULL);
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2799 return gdbarch->skip_prologue (ip);
2803 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2804 gdbarch_skip_prologue_ftype skip_prologue)
2806 gdbarch->skip_prologue = skip_prologue;
2810 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2812 gdb_assert (gdbarch != NULL);
2813 gdb_assert (gdbarch->inner_than != NULL);
2814 if (gdbarch_debug >= 2)
2815 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2816 return gdbarch->inner_than (lhs, rhs);
2820 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2821 gdbarch_inner_than_ftype inner_than)
2823 gdbarch->inner_than = inner_than;
2827 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2829 gdb_assert (gdbarch != NULL);
2830 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2831 if (gdbarch_debug >= 2)
2832 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2833 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2837 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2838 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2840 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2844 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2846 gdb_assert (gdbarch != NULL);
2847 return gdbarch->adjust_breakpoint_address != NULL;
2851 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2853 gdb_assert (gdbarch != NULL);
2854 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2855 if (gdbarch_debug >= 2)
2856 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2857 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2861 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2862 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2864 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2868 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2870 gdb_assert (gdbarch != NULL);
2871 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2872 if (gdbarch_debug >= 2)
2873 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2874 return gdbarch->memory_insert_breakpoint (bp_tgt);
2878 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2879 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2881 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2885 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2887 gdb_assert (gdbarch != NULL);
2888 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2889 if (gdbarch_debug >= 2)
2890 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2891 return gdbarch->memory_remove_breakpoint (bp_tgt);
2895 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2896 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2898 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2902 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2904 gdb_assert (gdbarch != NULL);
2905 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2906 if (gdbarch_debug >= 2)
2907 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2908 return gdbarch->decr_pc_after_break;
2912 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2913 CORE_ADDR decr_pc_after_break)
2915 gdbarch->decr_pc_after_break = decr_pc_after_break;
2919 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2921 gdb_assert (gdbarch != NULL);
2922 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2923 if (gdbarch_debug >= 2)
2924 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2925 return gdbarch->deprecated_function_start_offset;
2929 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2930 CORE_ADDR deprecated_function_start_offset)
2932 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2936 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)
2938 gdb_assert (gdbarch != NULL);
2939 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
2940 if (gdbarch_debug >= 2)
2941 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2942 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
2946 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2947 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
2949 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2953 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2955 gdb_assert (gdbarch != NULL);
2956 gdb_assert (gdbarch->remote_register_number != NULL);
2957 if (gdbarch_debug >= 2)
2958 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2959 return gdbarch->remote_register_number (gdbarch, regno);
2963 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2964 gdbarch_remote_register_number_ftype remote_register_number)
2966 gdbarch->remote_register_number = remote_register_number;
2970 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2972 gdb_assert (gdbarch != NULL);
2973 return gdbarch->fetch_tls_load_module_address != NULL;
2977 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2979 gdb_assert (gdbarch != NULL);
2980 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2981 if (gdbarch_debug >= 2)
2982 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2983 return gdbarch->fetch_tls_load_module_address (objfile);
2987 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2988 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2990 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2994 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2996 gdb_assert (gdbarch != NULL);
2997 /* Skip verify of frame_args_skip, invalid_p == 0 */
2998 if (gdbarch_debug >= 2)
2999 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3000 return gdbarch->frame_args_skip;
3004 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3005 CORE_ADDR frame_args_skip)
3007 gdbarch->frame_args_skip = frame_args_skip;
3011 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3013 gdb_assert (gdbarch != NULL);
3014 return gdbarch->unwind_pc != NULL;
3018 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3020 gdb_assert (gdbarch != NULL);
3021 gdb_assert (gdbarch->unwind_pc != NULL);
3022 if (gdbarch_debug >= 2)
3023 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3024 return gdbarch->unwind_pc (gdbarch, next_frame);
3028 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3029 gdbarch_unwind_pc_ftype unwind_pc)
3031 gdbarch->unwind_pc = unwind_pc;
3035 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3037 gdb_assert (gdbarch != NULL);
3038 return gdbarch->unwind_sp != NULL;
3042 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3044 gdb_assert (gdbarch != NULL);
3045 gdb_assert (gdbarch->unwind_sp != NULL);
3046 if (gdbarch_debug >= 2)
3047 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3048 return gdbarch->unwind_sp (gdbarch, next_frame);
3052 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3053 gdbarch_unwind_sp_ftype unwind_sp)
3055 gdbarch->unwind_sp = unwind_sp;
3059 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3061 gdb_assert (gdbarch != NULL);
3062 return gdbarch->frame_num_args != NULL;
3066 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3068 gdb_assert (gdbarch != NULL);
3069 gdb_assert (gdbarch->frame_num_args != NULL);
3070 if (gdbarch_debug >= 2)
3071 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3072 return gdbarch->frame_num_args (frame);
3076 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3077 gdbarch_frame_num_args_ftype frame_num_args)
3079 gdbarch->frame_num_args = frame_num_args;
3083 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3085 gdb_assert (gdbarch != NULL);
3086 return gdbarch->deprecated_stack_align != NULL;
3090 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3092 gdb_assert (gdbarch != NULL);
3093 gdb_assert (gdbarch->deprecated_stack_align != NULL);
3094 if (gdbarch_debug >= 2)
3095 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3096 return gdbarch->deprecated_stack_align (sp);
3100 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3101 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3103 gdbarch->deprecated_stack_align = deprecated_stack_align;
3107 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3109 gdb_assert (gdbarch != NULL);
3110 return gdbarch->frame_align != NULL;
3114 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3116 gdb_assert (gdbarch != NULL);
3117 gdb_assert (gdbarch->frame_align != NULL);
3118 if (gdbarch_debug >= 2)
3119 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3120 return gdbarch->frame_align (gdbarch, address);
3124 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3125 gdbarch_frame_align_ftype frame_align)
3127 gdbarch->frame_align = frame_align;
3131 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3133 gdb_assert (gdbarch != NULL);
3134 return gdbarch->deprecated_reg_struct_has_addr != NULL;
3138 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3140 gdb_assert (gdbarch != NULL);
3141 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3142 if (gdbarch_debug >= 2)
3143 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3144 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3148 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3149 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3151 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3155 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3157 gdb_assert (gdbarch != NULL);
3158 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3159 if (gdbarch_debug >= 2)
3160 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3161 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3165 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3166 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3168 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3172 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3174 gdb_assert (gdbarch != NULL);
3175 if (gdbarch_debug >= 2)
3176 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3177 return gdbarch->frame_red_zone_size;
3181 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3182 int frame_red_zone_size)
3184 gdbarch->frame_red_zone_size = frame_red_zone_size;
3188 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3190 gdb_assert (gdbarch != NULL);
3191 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3192 if (gdbarch_debug >= 2)
3193 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3194 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3198 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3199 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3201 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3205 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3207 gdb_assert (gdbarch != NULL);
3208 gdb_assert (gdbarch->addr_bits_remove != NULL);
3209 if (gdbarch_debug >= 2)
3210 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3211 return gdbarch->addr_bits_remove (addr);
3215 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3216 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3218 gdbarch->addr_bits_remove = addr_bits_remove;
3222 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3224 gdb_assert (gdbarch != NULL);
3225 gdb_assert (gdbarch->smash_text_address != NULL);
3226 if (gdbarch_debug >= 2)
3227 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3228 return gdbarch->smash_text_address (addr);
3232 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3233 gdbarch_smash_text_address_ftype smash_text_address)
3235 gdbarch->smash_text_address = smash_text_address;
3239 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3241 gdb_assert (gdbarch != NULL);
3242 return gdbarch->software_single_step != NULL;
3246 gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
3248 gdb_assert (gdbarch != NULL);
3249 gdb_assert (gdbarch->software_single_step != NULL);
3250 if (gdbarch_debug >= 2)
3251 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3252 return gdbarch->software_single_step (regcache);
3256 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3257 gdbarch_software_single_step_ftype software_single_step)
3259 gdbarch->software_single_step = software_single_step;
3263 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3265 gdb_assert (gdbarch != NULL);
3266 return gdbarch->single_step_through_delay != NULL;
3270 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3272 gdb_assert (gdbarch != NULL);
3273 gdb_assert (gdbarch->single_step_through_delay != NULL);
3274 if (gdbarch_debug >= 2)
3275 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3276 return gdbarch->single_step_through_delay (gdbarch, frame);
3280 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3281 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3283 gdbarch->single_step_through_delay = single_step_through_delay;
3287 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3289 gdb_assert (gdbarch != NULL);
3290 gdb_assert (gdbarch->print_insn != NULL);
3291 if (gdbarch_debug >= 2)
3292 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3293 return gdbarch->print_insn (vma, info);
3297 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3298 gdbarch_print_insn_ftype print_insn)
3300 gdbarch->print_insn = print_insn;
3304 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3306 gdb_assert (gdbarch != NULL);
3307 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3308 if (gdbarch_debug >= 2)
3309 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3310 return gdbarch->skip_trampoline_code (pc);
3314 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3315 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3317 gdbarch->skip_trampoline_code = skip_trampoline_code;
3321 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3323 gdb_assert (gdbarch != NULL);
3324 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3325 if (gdbarch_debug >= 2)
3326 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3327 return gdbarch->skip_solib_resolver (gdbarch, pc);
3331 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3332 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3334 gdbarch->skip_solib_resolver = skip_solib_resolver;
3338 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3340 gdb_assert (gdbarch != NULL);
3341 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3342 if (gdbarch_debug >= 2)
3343 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3344 return gdbarch->in_solib_return_trampoline (pc, name);
3348 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3349 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3351 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3355 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3357 gdb_assert (gdbarch != NULL);
3358 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3359 if (gdbarch_debug >= 2)
3360 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3361 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3365 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3366 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3368 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3372 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
3374 gdb_assert (gdbarch != NULL);
3375 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
3376 if (gdbarch_debug >= 2)
3377 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
3378 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
3382 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
3383 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
3385 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
3389 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3391 gdb_assert (gdbarch != NULL);
3392 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3393 if (gdbarch_debug >= 2)
3394 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3395 gdbarch->elf_make_msymbol_special (sym, msym);
3399 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3400 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3402 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3406 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3408 gdb_assert (gdbarch != NULL);
3409 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3410 if (gdbarch_debug >= 2)
3411 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3412 gdbarch->coff_make_msymbol_special (val, msym);
3416 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3417 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3419 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3423 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
3425 gdb_assert (gdbarch != NULL);
3426 /* Skip verify of name_of_malloc, invalid_p == 0 */
3427 if (gdbarch_debug >= 2)
3428 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
3429 return gdbarch->name_of_malloc;
3433 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
3434 const char * name_of_malloc)
3436 gdbarch->name_of_malloc = name_of_malloc;
3440 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3442 gdb_assert (gdbarch != NULL);
3443 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3444 if (gdbarch_debug >= 2)
3445 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3446 return gdbarch->cannot_step_breakpoint;
3450 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3451 int cannot_step_breakpoint)
3453 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3457 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3459 gdb_assert (gdbarch != NULL);
3460 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3461 if (gdbarch_debug >= 2)
3462 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3463 return gdbarch->have_nonsteppable_watchpoint;
3467 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3468 int have_nonsteppable_watchpoint)
3470 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3474 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3476 gdb_assert (gdbarch != NULL);
3477 return gdbarch->address_class_type_flags != NULL;
3481 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3483 gdb_assert (gdbarch != NULL);
3484 gdb_assert (gdbarch->address_class_type_flags != NULL);
3485 if (gdbarch_debug >= 2)
3486 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3487 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3491 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3492 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3494 gdbarch->address_class_type_flags = address_class_type_flags;
3498 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3500 gdb_assert (gdbarch != NULL);
3501 return gdbarch->address_class_type_flags_to_name != NULL;
3505 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3507 gdb_assert (gdbarch != NULL);
3508 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3509 if (gdbarch_debug >= 2)
3510 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3511 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3515 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3516 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3518 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3522 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3524 gdb_assert (gdbarch != NULL);
3525 return gdbarch->address_class_name_to_type_flags != NULL;
3529 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3531 gdb_assert (gdbarch != NULL);
3532 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3533 if (gdbarch_debug >= 2)
3534 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3535 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3539 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3540 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3542 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3546 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3548 gdb_assert (gdbarch != NULL);
3549 gdb_assert (gdbarch->register_reggroup_p != NULL);
3550 if (gdbarch_debug >= 2)
3551 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3552 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3556 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3557 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3559 gdbarch->register_reggroup_p = register_reggroup_p;
3563 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3565 gdb_assert (gdbarch != NULL);
3566 return gdbarch->fetch_pointer_argument != NULL;
3570 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3572 gdb_assert (gdbarch != NULL);
3573 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3574 if (gdbarch_debug >= 2)
3575 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3576 return gdbarch->fetch_pointer_argument (frame, argi, type);
3580 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3581 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3583 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3587 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3589 gdb_assert (gdbarch != NULL);
3590 return gdbarch->regset_from_core_section != NULL;
3593 const struct regset *
3594 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3596 gdb_assert (gdbarch != NULL);
3597 gdb_assert (gdbarch->regset_from_core_section != NULL);
3598 if (gdbarch_debug >= 2)
3599 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3600 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3604 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3605 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3607 gdbarch->regset_from_core_section = regset_from_core_section;
3611 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3613 gdb_assert (gdbarch != NULL);
3614 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3615 if (gdbarch_debug >= 2)
3616 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3617 return gdbarch->vtable_function_descriptors;
3621 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3622 int vtable_function_descriptors)
3624 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3628 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3630 gdb_assert (gdbarch != NULL);
3631 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3632 if (gdbarch_debug >= 2)
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3634 return gdbarch->vbit_in_delta;
3638 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3641 gdbarch->vbit_in_delta = vbit_in_delta;
3645 /* Keep a registry of per-architecture data-pointers required by GDB
3652 gdbarch_data_pre_init_ftype *pre_init;
3653 gdbarch_data_post_init_ftype *post_init;
3656 struct gdbarch_data_registration
3658 struct gdbarch_data *data;
3659 struct gdbarch_data_registration *next;
3662 struct gdbarch_data_registry
3665 struct gdbarch_data_registration *registrations;
3668 struct gdbarch_data_registry gdbarch_data_registry =
3673 static struct gdbarch_data *
3674 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3675 gdbarch_data_post_init_ftype *post_init)
3677 struct gdbarch_data_registration **curr;
3678 /* Append the new registraration. */
3679 for (curr = &gdbarch_data_registry.registrations;
3681 curr = &(*curr)->next);
3682 (*curr) = XMALLOC (struct gdbarch_data_registration);
3683 (*curr)->next = NULL;
3684 (*curr)->data = XMALLOC (struct gdbarch_data);
3685 (*curr)->data->index = gdbarch_data_registry.nr++;
3686 (*curr)->data->pre_init = pre_init;
3687 (*curr)->data->post_init = post_init;
3688 (*curr)->data->init_p = 1;
3689 return (*curr)->data;
3692 struct gdbarch_data *
3693 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3695 return gdbarch_data_register (pre_init, NULL);
3698 struct gdbarch_data *
3699 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3701 return gdbarch_data_register (NULL, post_init);
3704 /* Create/delete the gdbarch data vector. */
3707 alloc_gdbarch_data (struct gdbarch *gdbarch)
3709 gdb_assert (gdbarch->data == NULL);
3710 gdbarch->nr_data = gdbarch_data_registry.nr;
3711 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3714 /* Initialize the current value of the specified per-architecture
3718 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3719 struct gdbarch_data *data,
3722 gdb_assert (data->index < gdbarch->nr_data);
3723 gdb_assert (gdbarch->data[data->index] == NULL);
3724 gdb_assert (data->pre_init == NULL);
3725 gdbarch->data[data->index] = pointer;
3728 /* Return the current value of the specified per-architecture
3732 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3734 gdb_assert (data->index < gdbarch->nr_data);
3735 if (gdbarch->data[data->index] == NULL)
3737 /* The data-pointer isn't initialized, call init() to get a
3739 if (data->pre_init != NULL)
3740 /* Mid architecture creation: pass just the obstack, and not
3741 the entire architecture, as that way it isn't possible for
3742 pre-init code to refer to undefined architecture
3744 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3745 else if (gdbarch->initialized_p
3746 && data->post_init != NULL)
3747 /* Post architecture creation: pass the entire architecture
3748 (as all fields are valid), but be careful to also detect
3749 recursive references. */
3751 gdb_assert (data->init_p);
3753 gdbarch->data[data->index] = data->post_init (gdbarch);
3757 /* The architecture initialization hasn't completed - punt -
3758 hope that the caller knows what they are doing. Once
3759 deprecated_set_gdbarch_data has been initialized, this can be
3760 changed to an internal error. */
3762 gdb_assert (gdbarch->data[data->index] != NULL);
3764 return gdbarch->data[data->index];
3769 /* Keep a registry of swapped data required by GDB modules. */
3774 struct gdbarch_swap_registration *source;
3775 struct gdbarch_swap *next;
3778 struct gdbarch_swap_registration
3781 unsigned long sizeof_data;
3782 gdbarch_swap_ftype *init;
3783 struct gdbarch_swap_registration *next;
3786 struct gdbarch_swap_registry
3789 struct gdbarch_swap_registration *registrations;
3792 struct gdbarch_swap_registry gdbarch_swap_registry =
3798 deprecated_register_gdbarch_swap (void *data,
3799 unsigned long sizeof_data,
3800 gdbarch_swap_ftype *init)
3802 struct gdbarch_swap_registration **rego;
3803 for (rego = &gdbarch_swap_registry.registrations;
3805 rego = &(*rego)->next);
3806 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3807 (*rego)->next = NULL;
3808 (*rego)->init = init;
3809 (*rego)->data = data;
3810 (*rego)->sizeof_data = sizeof_data;
3814 current_gdbarch_swap_init_hack (void)
3816 struct gdbarch_swap_registration *rego;
3817 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
3818 for (rego = gdbarch_swap_registry.registrations;
3822 if (rego->data != NULL)
3824 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
3825 struct gdbarch_swap);
3826 (*curr)->source = rego;
3827 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
3829 (*curr)->next = NULL;
3830 curr = &(*curr)->next;
3832 if (rego->init != NULL)
3837 static struct gdbarch *
3838 current_gdbarch_swap_out_hack (void)
3840 struct gdbarch *old_gdbarch = current_gdbarch;
3841 struct gdbarch_swap *curr;
3843 gdb_assert (old_gdbarch != NULL);
3844 for (curr = old_gdbarch->swap;
3848 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3849 memset (curr->source->data, 0, curr->source->sizeof_data);
3851 current_gdbarch = NULL;
3856 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
3858 struct gdbarch_swap *curr;
3860 gdb_assert (current_gdbarch == NULL);
3861 for (curr = new_gdbarch->swap;
3864 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3865 current_gdbarch = new_gdbarch;
3869 /* Keep a registry of the architectures known by GDB. */
3871 struct gdbarch_registration
3873 enum bfd_architecture bfd_architecture;
3874 gdbarch_init_ftype *init;
3875 gdbarch_dump_tdep_ftype *dump_tdep;
3876 struct gdbarch_list *arches;
3877 struct gdbarch_registration *next;
3880 static struct gdbarch_registration *gdbarch_registry = NULL;
3883 append_name (const char ***buf, int *nr, const char *name)
3885 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3891 gdbarch_printable_names (void)
3893 /* Accumulate a list of names based on the registed list of
3895 enum bfd_architecture a;
3897 const char **arches = NULL;
3898 struct gdbarch_registration *rego;
3899 for (rego = gdbarch_registry;
3903 const struct bfd_arch_info *ap;
3904 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3906 internal_error (__FILE__, __LINE__,
3907 _("gdbarch_architecture_names: multi-arch unknown"));
3910 append_name (&arches, &nr_arches, ap->printable_name);
3915 append_name (&arches, &nr_arches, NULL);
3921 gdbarch_register (enum bfd_architecture bfd_architecture,
3922 gdbarch_init_ftype *init,
3923 gdbarch_dump_tdep_ftype *dump_tdep)
3925 struct gdbarch_registration **curr;
3926 const struct bfd_arch_info *bfd_arch_info;
3927 /* Check that BFD recognizes this architecture */
3928 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3929 if (bfd_arch_info == NULL)
3931 internal_error (__FILE__, __LINE__,
3932 _("gdbarch: Attempt to register unknown architecture (%d)"),
3935 /* Check that we haven't seen this architecture before */
3936 for (curr = &gdbarch_registry;
3938 curr = &(*curr)->next)
3940 if (bfd_architecture == (*curr)->bfd_architecture)
3941 internal_error (__FILE__, __LINE__,
3942 _("gdbarch: Duplicate registraration of architecture (%s)"),
3943 bfd_arch_info->printable_name);
3947 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3948 bfd_arch_info->printable_name,
3951 (*curr) = XMALLOC (struct gdbarch_registration);
3952 (*curr)->bfd_architecture = bfd_architecture;
3953 (*curr)->init = init;
3954 (*curr)->dump_tdep = dump_tdep;
3955 (*curr)->arches = NULL;
3956 (*curr)->next = NULL;
3960 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3961 gdbarch_init_ftype *init)
3963 gdbarch_register (bfd_architecture, init, NULL);
3967 /* Look for an architecture using gdbarch_info. */
3969 struct gdbarch_list *
3970 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3971 const struct gdbarch_info *info)
3973 for (; arches != NULL; arches = arches->next)
3975 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3977 if (info->byte_order != arches->gdbarch->byte_order)
3979 if (info->osabi != arches->gdbarch->osabi)
3981 if (info->target_desc != arches->gdbarch->target_desc)
3989 /* Find an architecture that matches the specified INFO. Create a new
3990 architecture if needed. Return that new architecture. Assumes
3991 that there is no current architecture. */
3993 static struct gdbarch *
3994 find_arch_by_info (struct gdbarch_info info)
3996 struct gdbarch *new_gdbarch;
3997 struct gdbarch_registration *rego;
3999 /* The existing architecture has been swapped out - all this code
4000 works from a clean slate. */
4001 gdb_assert (current_gdbarch == NULL);
4003 /* Fill in missing parts of the INFO struct using a number of
4004 sources: "set ..."; INFOabfd supplied; and the global
4006 gdbarch_info_fill (&info);
4008 /* Must have found some sort of architecture. */
4009 gdb_assert (info.bfd_arch_info != NULL);
4013 fprintf_unfiltered (gdb_stdlog,
4014 "find_arch_by_info: info.bfd_arch_info %s\n",
4015 (info.bfd_arch_info != NULL
4016 ? info.bfd_arch_info->printable_name
4018 fprintf_unfiltered (gdb_stdlog,
4019 "find_arch_by_info: info.byte_order %d (%s)\n",
4021 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4022 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4024 fprintf_unfiltered (gdb_stdlog,
4025 "find_arch_by_info: info.osabi %d (%s)\n",
4026 info.osabi, gdbarch_osabi_name (info.osabi));
4027 fprintf_unfiltered (gdb_stdlog,
4028 "find_arch_by_info: info.abfd 0x%lx\n",
4030 fprintf_unfiltered (gdb_stdlog,
4031 "find_arch_by_info: info.tdep_info 0x%lx\n",
4032 (long) info.tdep_info);
4035 /* Find the tdep code that knows about this architecture. */
4036 for (rego = gdbarch_registry;
4039 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4044 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4045 "No matching architecture\n");
4049 /* Ask the tdep code for an architecture that matches "info". */
4050 new_gdbarch = rego->init (info, rego->arches);
4052 /* Did the tdep code like it? No. Reject the change and revert to
4053 the old architecture. */
4054 if (new_gdbarch == NULL)
4057 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4058 "Target rejected architecture\n");
4062 /* Is this a pre-existing architecture (as determined by already
4063 being initialized)? Move it to the front of the architecture
4064 list (keeping the list sorted Most Recently Used). */
4065 if (new_gdbarch->initialized_p)
4067 struct gdbarch_list **list;
4068 struct gdbarch_list *this;
4070 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4071 "Previous architecture 0x%08lx (%s) selected\n",
4073 new_gdbarch->bfd_arch_info->printable_name);
4074 /* Find the existing arch in the list. */
4075 for (list = ®o->arches;
4076 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4077 list = &(*list)->next);
4078 /* It had better be in the list of architectures. */
4079 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4082 (*list) = this->next;
4083 /* Insert THIS at the front. */
4084 this->next = rego->arches;
4085 rego->arches = this;
4090 /* It's a new architecture. */
4092 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4093 "New architecture 0x%08lx (%s) selected\n",
4095 new_gdbarch->bfd_arch_info->printable_name);
4097 /* Insert the new architecture into the front of the architecture
4098 list (keep the list sorted Most Recently Used). */
4100 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4101 this->next = rego->arches;
4102 this->gdbarch = new_gdbarch;
4103 rego->arches = this;
4106 /* Check that the newly installed architecture is valid. Plug in
4107 any post init values. */
4108 new_gdbarch->dump_tdep = rego->dump_tdep;
4109 verify_gdbarch (new_gdbarch);
4110 new_gdbarch->initialized_p = 1;
4112 /* Initialize any per-architecture swap areas. This phase requires
4113 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4114 swap the entire architecture out. */
4115 current_gdbarch = new_gdbarch;
4116 current_gdbarch_swap_init_hack ();
4117 current_gdbarch_swap_out_hack ();
4120 gdbarch_dump (new_gdbarch, gdb_stdlog);
4126 gdbarch_find_by_info (struct gdbarch_info info)
4128 /* Save the previously selected architecture, setting the global to
4129 NULL. This stops things like gdbarch->init() trying to use the
4130 previous architecture's configuration. The previous architecture
4131 may not even be of the same architecture family. The most recent
4132 architecture of the same family is found at the head of the
4133 rego->arches list. */
4134 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4136 /* Find the specified architecture. */
4137 struct gdbarch *new_gdbarch = find_arch_by_info (info);
4139 /* Restore the existing architecture. */
4140 gdb_assert (current_gdbarch == NULL);
4141 current_gdbarch_swap_in_hack (old_gdbarch);
4146 /* Make the specified architecture current, swapping the existing one
4150 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4152 gdb_assert (new_gdbarch != NULL);
4153 gdb_assert (current_gdbarch != NULL);
4154 gdb_assert (new_gdbarch->initialized_p);
4155 current_gdbarch_swap_out_hack ();
4156 current_gdbarch_swap_in_hack (new_gdbarch);
4157 architecture_changed_event ();
4158 reinit_frame_cache ();
4161 extern void _initialize_gdbarch (void);
4164 _initialize_gdbarch (void)
4166 struct cmd_list_element *c;
4168 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4169 Set architecture debugging."), _("\
4170 Show architecture debugging."), _("\
4171 When non-zero, architecture debugging is enabled."),
4174 &setdebuglist, &showdebuglist);