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;
240 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
244 /* The default architecture uses host values (for want of a better
247 extern const struct bfd_arch_info bfd_default_arch_struct;
249 struct gdbarch startup_gdbarch =
251 1, /* Always initialized. */
252 NULL, /* The obstack. */
253 /* basic architecture information */
254 &bfd_default_arch_struct, /* bfd_arch_info */
255 BFD_ENDIAN_BIG, /* byte_order */
256 GDB_OSABI_UNKNOWN, /* osabi */
258 /* target specific vector and its dump routine */
260 /*per-architecture data-pointers and swap regions */
262 /* Multi-arch values */
263 8 * sizeof (short), /* short_bit */
264 8 * sizeof (int), /* int_bit */
265 8 * sizeof (long), /* long_bit */
266 8 * sizeof (LONGEST), /* long_long_bit */
267 8 * sizeof (float), /* float_bit */
268 0, /* float_format */
269 8 * sizeof (double), /* double_bit */
270 0, /* double_format */
271 8 * sizeof (long double), /* long_double_bit */
272 0, /* long_double_format */
273 8 * sizeof (void*), /* ptr_bit */
274 8 * sizeof (void*), /* addr_bit */
275 8 * sizeof (void*), /* bfd_vma_bit */
280 0, /* virtual_frame_pointer */
281 0, /* pseudo_register_read */
282 0, /* pseudo_register_write */
284 0, /* num_pseudo_regs */
289 0, /* stab_reg_to_regnum */
290 0, /* ecoff_reg_to_regnum */
291 0, /* dwarf_reg_to_regnum */
292 0, /* sdb_reg_to_regnum */
293 0, /* dwarf2_reg_to_regnum */
294 0, /* register_name */
295 0, /* register_type */
296 0, /* unwind_dummy_id */
297 -1, /* deprecated_fp_regnum */
298 0, /* push_dummy_call */
299 0, /* deprecated_register_size */
300 0, /* call_dummy_location */
301 0, /* push_dummy_code */
302 default_print_registers_info, /* print_registers_info */
303 0, /* print_float_info */
304 0, /* print_vector_info */
305 0, /* register_sim_regno */
306 0, /* register_bytes_ok */
307 0, /* cannot_fetch_register */
308 0, /* cannot_store_register */
309 0, /* get_longjmp_target */
310 0, /* believe_pcc_promotion */
311 0, /* convert_register_p */
312 0, /* register_to_value */
313 0, /* value_to_register */
314 0, /* value_from_register */
315 0, /* pointer_to_address */
316 0, /* address_to_pointer */
317 0, /* integer_to_address */
318 0, /* deprecated_store_struct_return */
319 0, /* return_value */
320 0, /* extract_return_value */
321 0, /* store_return_value */
322 0, /* deprecated_use_struct_convention */
323 0, /* deprecated_extract_struct_value_address */
324 0, /* skip_prologue */
326 0, /* breakpoint_from_pc */
327 0, /* adjust_breakpoint_address */
328 0, /* memory_insert_breakpoint */
329 0, /* memory_remove_breakpoint */
330 0, /* decr_pc_after_break */
331 0, /* deprecated_function_start_offset */
332 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
333 default_remote_register_number, /* remote_register_number */
334 0, /* fetch_tls_load_module_address */
335 0, /* frame_args_skip */
338 0, /* frame_num_args */
339 0, /* deprecated_stack_align */
341 0, /* deprecated_reg_struct_has_addr */
342 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
343 0, /* frame_red_zone_size */
344 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
345 0, /* addr_bits_remove */
346 0, /* smash_text_address */
347 0, /* software_single_step */
348 0, /* single_step_through_delay */
350 0, /* skip_trampoline_code */
351 generic_skip_solib_resolver, /* skip_solib_resolver */
352 0, /* in_solib_return_trampoline */
353 generic_in_function_epilogue_p, /* in_function_epilogue_p */
354 construct_inferior_arguments, /* construct_inferior_arguments */
355 0, /* elf_make_msymbol_special */
356 0, /* coff_make_msymbol_special */
357 "malloc", /* name_of_malloc */
358 0, /* cannot_step_breakpoint */
359 0, /* have_nonsteppable_watchpoint */
360 0, /* address_class_type_flags */
361 0, /* address_class_type_flags_to_name */
362 0, /* address_class_name_to_type_flags */
363 default_register_reggroup_p, /* register_reggroup_p */
364 0, /* fetch_pointer_argument */
365 0, /* regset_from_core_section */
366 0, /* vtable_function_descriptors */
367 0, /* vbit_in_delta */
368 0, /* skip_permanent_breakpoint */
369 /* startup_gdbarch() */
372 struct gdbarch *current_gdbarch = &startup_gdbarch;
374 /* Create a new ``struct gdbarch'' based on information provided by
375 ``struct gdbarch_info''. */
378 gdbarch_alloc (const struct gdbarch_info *info,
379 struct gdbarch_tdep *tdep)
381 /* NOTE: The new architecture variable is named ``current_gdbarch''
382 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
383 the current local architecture and not the previous global
384 architecture. This ensures that the new architectures initial
385 values are not influenced by the previous architecture. Once
386 everything is parameterised with gdbarch, this will go away. */
387 struct gdbarch *current_gdbarch;
389 /* Create an obstack for allocating all the per-architecture memory,
390 then use that to allocate the architecture vector. */
391 struct obstack *obstack = XMALLOC (struct obstack);
392 obstack_init (obstack);
393 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
394 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
395 current_gdbarch->obstack = obstack;
397 alloc_gdbarch_data (current_gdbarch);
399 current_gdbarch->tdep = tdep;
401 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
402 current_gdbarch->byte_order = info->byte_order;
403 current_gdbarch->osabi = info->osabi;
404 current_gdbarch->target_desc = info->target_desc;
406 /* Force the explicit initialization of these. */
407 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
408 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
409 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
410 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
411 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
412 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
413 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
414 current_gdbarch->ptr_bit = TARGET_INT_BIT;
415 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
416 current_gdbarch->char_signed = -1;
417 current_gdbarch->write_pc = generic_target_write_pc;
418 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
419 current_gdbarch->num_regs = -1;
420 current_gdbarch->sp_regnum = -1;
421 current_gdbarch->pc_regnum = -1;
422 current_gdbarch->ps_regnum = -1;
423 current_gdbarch->fp0_regnum = -1;
424 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
425 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
426 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
427 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
428 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
429 current_gdbarch->deprecated_fp_regnum = -1;
430 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
431 current_gdbarch->print_registers_info = default_print_registers_info;
432 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
433 current_gdbarch->cannot_fetch_register = cannot_register_not;
434 current_gdbarch->cannot_store_register = cannot_register_not;
435 current_gdbarch->convert_register_p = generic_convert_register_p;
436 current_gdbarch->value_from_register = default_value_from_register;
437 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
438 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
439 current_gdbarch->return_value = legacy_return_value;
440 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
441 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
442 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
443 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
444 current_gdbarch->remote_register_number = default_remote_register_number;
445 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
446 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
447 current_gdbarch->addr_bits_remove = core_addr_identity;
448 current_gdbarch->smash_text_address = core_addr_identity;
449 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
450 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
451 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
452 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
453 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
454 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
455 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
456 current_gdbarch->name_of_malloc = "malloc";
457 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
458 /* gdbarch_alloc() */
460 return current_gdbarch;
464 /* Allocate extra space using the per-architecture obstack. */
467 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
469 void *data = obstack_alloc (arch->obstack, size);
470 memset (data, 0, size);
475 /* Free a gdbarch struct. This should never happen in normal
476 operation --- once you've created a gdbarch, you keep it around.
477 However, if an architecture's init function encounters an error
478 building the structure, it may need to clean up a partially
479 constructed gdbarch. */
482 gdbarch_free (struct gdbarch *arch)
484 struct obstack *obstack;
485 gdb_assert (arch != NULL);
486 gdb_assert (!arch->initialized_p);
487 obstack = arch->obstack;
488 obstack_free (obstack, 0); /* Includes the ARCH. */
493 /* Ensure that all values in a GDBARCH are reasonable. */
495 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
496 just happens to match the global variable ``current_gdbarch''. That
497 way macros refering to that variable get the local and not the global
498 version - ulgh. Once everything is parameterised with gdbarch, this
502 verify_gdbarch (struct gdbarch *current_gdbarch)
505 struct cleanup *cleanups;
508 log = mem_fileopen ();
509 cleanups = make_cleanup_ui_file_delete (log);
511 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
512 fprintf_unfiltered (log, "\n\tbyte-order");
513 if (current_gdbarch->bfd_arch_info == NULL)
514 fprintf_unfiltered (log, "\n\tbfd_arch_info");
515 /* Check those that need to be defined for the given multi-arch level. */
516 /* Skip verify of short_bit, invalid_p == 0 */
517 /* Skip verify of int_bit, invalid_p == 0 */
518 /* Skip verify of long_bit, invalid_p == 0 */
519 /* Skip verify of long_long_bit, invalid_p == 0 */
520 /* Skip verify of float_bit, invalid_p == 0 */
521 if (current_gdbarch->float_format == 0)
522 current_gdbarch->float_format = floatformats_ieee_single;
523 /* Skip verify of double_bit, invalid_p == 0 */
524 if (current_gdbarch->double_format == 0)
525 current_gdbarch->double_format = floatformats_ieee_double;
526 /* Skip verify of long_double_bit, invalid_p == 0 */
527 if (current_gdbarch->long_double_format == 0)
528 current_gdbarch->long_double_format = floatformats_ieee_double;
529 /* Skip verify of ptr_bit, invalid_p == 0 */
530 if (current_gdbarch->addr_bit == 0)
531 current_gdbarch->addr_bit = TARGET_PTR_BIT;
532 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
533 if (current_gdbarch->char_signed == -1)
534 current_gdbarch->char_signed = 1;
535 /* Skip verify of read_pc, has predicate */
536 /* Skip verify of write_pc, invalid_p == 0 */
537 /* Skip verify of read_sp, has predicate */
538 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
539 /* Skip verify of pseudo_register_read, has predicate */
540 /* Skip verify of pseudo_register_write, has predicate */
541 if (current_gdbarch->num_regs == -1)
542 fprintf_unfiltered (log, "\n\tnum_regs");
543 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
544 /* Skip verify of sp_regnum, invalid_p == 0 */
545 /* Skip verify of pc_regnum, invalid_p == 0 */
546 /* Skip verify of ps_regnum, invalid_p == 0 */
547 /* Skip verify of fp0_regnum, invalid_p == 0 */
548 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
549 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
550 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
551 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
552 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
553 /* Skip verify of register_type, has predicate */
554 /* Skip verify of unwind_dummy_id, has predicate */
555 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
556 /* Skip verify of push_dummy_call, has predicate */
557 /* Skip verify of call_dummy_location, invalid_p == 0 */
558 /* Skip verify of push_dummy_code, has predicate */
559 /* Skip verify of print_registers_info, invalid_p == 0 */
560 /* Skip verify of print_float_info, has predicate */
561 /* Skip verify of print_vector_info, has predicate */
562 /* Skip verify of register_sim_regno, invalid_p == 0 */
563 /* Skip verify of register_bytes_ok, has predicate */
564 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
565 /* Skip verify of cannot_store_register, invalid_p == 0 */
566 /* Skip verify of get_longjmp_target, has predicate */
567 /* Skip verify of convert_register_p, invalid_p == 0 */
568 /* Skip verify of value_from_register, invalid_p == 0 */
569 /* Skip verify of pointer_to_address, invalid_p == 0 */
570 /* Skip verify of address_to_pointer, invalid_p == 0 */
571 /* Skip verify of integer_to_address, has predicate */
572 /* Skip verify of deprecated_store_struct_return, has predicate */
573 /* Skip verify of return_value, has predicate */
574 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
575 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
576 if (current_gdbarch->skip_prologue == 0)
577 fprintf_unfiltered (log, "\n\tskip_prologue");
578 if (current_gdbarch->inner_than == 0)
579 fprintf_unfiltered (log, "\n\tinner_than");
580 if (current_gdbarch->breakpoint_from_pc == 0)
581 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
582 /* Skip verify of adjust_breakpoint_address, has predicate */
583 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
584 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
585 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
586 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
587 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
588 /* Skip verify of remote_register_number, invalid_p == 0 */
589 /* Skip verify of fetch_tls_load_module_address, has predicate */
590 /* Skip verify of frame_args_skip, invalid_p == 0 */
591 /* Skip verify of unwind_pc, has predicate */
592 /* Skip verify of unwind_sp, has predicate */
593 /* Skip verify of frame_num_args, has predicate */
594 /* Skip verify of deprecated_stack_align, has predicate */
595 /* Skip verify of frame_align, has predicate */
596 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
597 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
598 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
599 /* Skip verify of addr_bits_remove, invalid_p == 0 */
600 /* Skip verify of smash_text_address, invalid_p == 0 */
601 /* Skip verify of software_single_step, has predicate */
602 /* Skip verify of single_step_through_delay, has predicate */
603 if (current_gdbarch->print_insn == 0)
604 fprintf_unfiltered (log, "\n\tprint_insn");
605 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
606 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
607 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
608 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
609 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
610 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
611 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
612 /* Skip verify of name_of_malloc, invalid_p == 0 */
613 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
614 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
615 /* Skip verify of address_class_type_flags, has predicate */
616 /* Skip verify of address_class_type_flags_to_name, has predicate */
617 /* Skip verify of address_class_name_to_type_flags, has predicate */
618 /* Skip verify of register_reggroup_p, invalid_p == 0 */
619 /* Skip verify of fetch_pointer_argument, has predicate */
620 /* Skip verify of regset_from_core_section, has predicate */
621 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
622 /* Skip verify of vbit_in_delta, invalid_p == 0 */
623 /* Skip verify of skip_permanent_breakpoint, has predicate */
624 buf = ui_file_xstrdup (log, &dummy);
625 make_cleanup (xfree, buf);
626 if (strlen (buf) > 0)
627 internal_error (__FILE__, __LINE__,
628 _("verify_gdbarch: the following are invalid ...%s"),
630 do_cleanups (cleanups);
634 /* Print out the details of the current architecture. */
636 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
637 just happens to match the global variable ``current_gdbarch''. That
638 way macros refering to that variable get the local and not the global
639 version - ulgh. Once everything is parameterised with gdbarch, this
643 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
645 const char *gdb_xm_file = "<not-defined>";
646 const char *gdb_nm_file = "<not-defined>";
647 const char *gdb_tm_file = "<not-defined>";
648 #if defined (GDB_XM_FILE)
649 gdb_xm_file = GDB_XM_FILE;
651 fprintf_unfiltered (file,
652 "gdbarch_dump: GDB_XM_FILE = %s\n",
654 #if defined (GDB_NM_FILE)
655 gdb_nm_file = GDB_NM_FILE;
657 fprintf_unfiltered (file,
658 "gdbarch_dump: GDB_NM_FILE = %s\n",
660 #if defined (GDB_TM_FILE)
661 gdb_tm_file = GDB_TM_FILE;
663 fprintf_unfiltered (file,
664 "gdbarch_dump: GDB_TM_FILE = %s\n",
666 #ifdef TARGET_ADDR_BIT
667 fprintf_unfiltered (file,
668 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
669 XSTRING (TARGET_ADDR_BIT));
671 fprintf_unfiltered (file,
672 "gdbarch_dump: addr_bit = %s\n",
673 paddr_d (current_gdbarch->addr_bit));
674 #ifdef ADDR_BITS_REMOVE
675 fprintf_unfiltered (file,
676 "gdbarch_dump: %s # %s\n",
677 "ADDR_BITS_REMOVE(addr)",
678 XSTRING (ADDR_BITS_REMOVE (addr)));
680 fprintf_unfiltered (file,
681 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
682 (long) current_gdbarch->addr_bits_remove);
683 fprintf_unfiltered (file,
684 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
685 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
686 fprintf_unfiltered (file,
687 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
688 (long) current_gdbarch->address_class_name_to_type_flags);
689 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
690 fprintf_unfiltered (file,
691 "gdbarch_dump: %s # %s\n",
692 "ADDRESS_CLASS_TYPE_FLAGS_P()",
693 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
695 fprintf_unfiltered (file,
696 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
697 gdbarch_address_class_type_flags_p (current_gdbarch));
698 #ifdef ADDRESS_CLASS_TYPE_FLAGS
699 fprintf_unfiltered (file,
700 "gdbarch_dump: %s # %s\n",
701 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
702 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
704 fprintf_unfiltered (file,
705 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
706 (long) current_gdbarch->address_class_type_flags);
707 fprintf_unfiltered (file,
708 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
709 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
710 fprintf_unfiltered (file,
711 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
712 (long) current_gdbarch->address_class_type_flags_to_name);
713 #ifdef ADDRESS_TO_POINTER
714 fprintf_unfiltered (file,
715 "gdbarch_dump: %s # %s\n",
716 "ADDRESS_TO_POINTER(type, buf, addr)",
717 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
719 fprintf_unfiltered (file,
720 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
721 (long) current_gdbarch->address_to_pointer);
722 fprintf_unfiltered (file,
723 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
724 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
727 (long) current_gdbarch->adjust_breakpoint_address);
728 #ifdef BELIEVE_PCC_PROMOTION
729 fprintf_unfiltered (file,
730 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
731 XSTRING (BELIEVE_PCC_PROMOTION));
733 fprintf_unfiltered (file,
734 "gdbarch_dump: believe_pcc_promotion = %s\n",
735 paddr_d (current_gdbarch->believe_pcc_promotion));
736 #ifdef TARGET_ARCHITECTURE
737 fprintf_unfiltered (file,
738 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
739 XSTRING (TARGET_ARCHITECTURE));
741 fprintf_unfiltered (file,
742 "gdbarch_dump: bfd_arch_info = %s\n",
743 TARGET_ARCHITECTURE->printable_name);
744 #ifdef TARGET_BFD_VMA_BIT
745 fprintf_unfiltered (file,
746 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
747 XSTRING (TARGET_BFD_VMA_BIT));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: bfd_vma_bit = %s\n",
751 paddr_d (current_gdbarch->bfd_vma_bit));
752 #ifdef BREAKPOINT_FROM_PC
753 fprintf_unfiltered (file,
754 "gdbarch_dump: %s # %s\n",
755 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
756 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
760 (long) current_gdbarch->breakpoint_from_pc);
761 #ifdef TARGET_BYTE_ORDER
762 fprintf_unfiltered (file,
763 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
764 XSTRING (TARGET_BYTE_ORDER));
766 fprintf_unfiltered (file,
767 "gdbarch_dump: byte_order = %s\n",
768 paddr_d (current_gdbarch->byte_order));
769 #ifdef CALL_DUMMY_LOCATION
770 fprintf_unfiltered (file,
771 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
772 XSTRING (CALL_DUMMY_LOCATION));
774 fprintf_unfiltered (file,
775 "gdbarch_dump: call_dummy_location = %s\n",
776 paddr_d (current_gdbarch->call_dummy_location));
777 #ifdef CANNOT_FETCH_REGISTER
778 fprintf_unfiltered (file,
779 "gdbarch_dump: %s # %s\n",
780 "CANNOT_FETCH_REGISTER(regnum)",
781 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
785 (long) current_gdbarch->cannot_fetch_register);
786 #ifdef CANNOT_STEP_BREAKPOINT
787 fprintf_unfiltered (file,
788 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
789 XSTRING (CANNOT_STEP_BREAKPOINT));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: cannot_step_breakpoint = %s\n",
793 paddr_d (current_gdbarch->cannot_step_breakpoint));
794 #ifdef CANNOT_STORE_REGISTER
795 fprintf_unfiltered (file,
796 "gdbarch_dump: %s # %s\n",
797 "CANNOT_STORE_REGISTER(regnum)",
798 XSTRING (CANNOT_STORE_REGISTER (regnum)));
800 fprintf_unfiltered (file,
801 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
802 (long) current_gdbarch->cannot_store_register);
803 #ifdef TARGET_CHAR_SIGNED
804 fprintf_unfiltered (file,
805 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
806 XSTRING (TARGET_CHAR_SIGNED));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: char_signed = %s\n",
810 paddr_d (current_gdbarch->char_signed));
811 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
812 fprintf_unfiltered (file,
813 "gdbarch_dump: %s # %s\n",
814 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
815 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
817 fprintf_unfiltered (file,
818 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
819 (long) current_gdbarch->coff_make_msymbol_special);
820 fprintf_unfiltered (file,
821 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
822 (long) current_gdbarch->construct_inferior_arguments);
823 fprintf_unfiltered (file,
824 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
825 (long) current_gdbarch->convert_from_func_ptr_addr);
826 #ifdef CONVERT_REGISTER_P
827 fprintf_unfiltered (file,
828 "gdbarch_dump: %s # %s\n",
829 "CONVERT_REGISTER_P(regnum, type)",
830 XSTRING (CONVERT_REGISTER_P (regnum, type)));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: convert_register_p = <0x%lx>\n",
834 (long) current_gdbarch->convert_register_p);
835 #ifdef DECR_PC_AFTER_BREAK
836 fprintf_unfiltered (file,
837 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
838 XSTRING (DECR_PC_AFTER_BREAK));
840 fprintf_unfiltered (file,
841 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
842 paddr_nz (current_gdbarch->decr_pc_after_break));
843 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
844 fprintf_unfiltered (file,
845 "gdbarch_dump: %s # %s\n",
846 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
847 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
851 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
852 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
853 fprintf_unfiltered (file,
854 "gdbarch_dump: %s # %s\n",
855 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
856 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
858 fprintf_unfiltered (file,
859 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
860 (long) current_gdbarch->deprecated_extract_struct_value_address);
861 #ifdef DEPRECATED_FP_REGNUM
862 fprintf_unfiltered (file,
863 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
864 XSTRING (DEPRECATED_FP_REGNUM));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: deprecated_fp_regnum = %s\n",
868 paddr_d (current_gdbarch->deprecated_fp_regnum));
869 #ifdef DEPRECATED_FUNCTION_START_OFFSET
870 fprintf_unfiltered (file,
871 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
872 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
874 fprintf_unfiltered (file,
875 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
876 paddr_nz (current_gdbarch->deprecated_function_start_offset));
877 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
878 fprintf_unfiltered (file,
879 "gdbarch_dump: %s # %s\n",
880 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
881 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
885 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
886 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
887 fprintf_unfiltered (file,
888 "gdbarch_dump: %s # %s\n",
889 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
890 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
894 (long) current_gdbarch->deprecated_reg_struct_has_addr);
895 #ifdef DEPRECATED_REGISTER_SIZE
896 fprintf_unfiltered (file,
897 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
898 XSTRING (DEPRECATED_REGISTER_SIZE));
900 fprintf_unfiltered (file,
901 "gdbarch_dump: deprecated_register_size = %s\n",
902 paddr_d (current_gdbarch->deprecated_register_size));
903 #ifdef DEPRECATED_STACK_ALIGN_P
904 fprintf_unfiltered (file,
905 "gdbarch_dump: %s # %s\n",
906 "DEPRECATED_STACK_ALIGN_P()",
907 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
909 fprintf_unfiltered (file,
910 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
911 gdbarch_deprecated_stack_align_p (current_gdbarch));
912 #ifdef DEPRECATED_STACK_ALIGN
913 fprintf_unfiltered (file,
914 "gdbarch_dump: %s # %s\n",
915 "DEPRECATED_STACK_ALIGN(sp)",
916 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
918 fprintf_unfiltered (file,
919 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
920 (long) current_gdbarch->deprecated_stack_align);
921 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
922 fprintf_unfiltered (file,
923 "gdbarch_dump: %s # %s\n",
924 "DEPRECATED_STORE_STRUCT_RETURN_P()",
925 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
927 fprintf_unfiltered (file,
928 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
929 gdbarch_deprecated_store_struct_return_p (current_gdbarch));
930 #ifdef DEPRECATED_STORE_STRUCT_RETURN
931 fprintf_unfiltered (file,
932 "gdbarch_dump: %s # %s\n",
933 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
934 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
938 (long) current_gdbarch->deprecated_store_struct_return);
939 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
940 fprintf_unfiltered (file,
941 "gdbarch_dump: %s # %s\n",
942 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
943 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
947 (long) current_gdbarch->deprecated_use_struct_convention);
948 #ifdef TARGET_DOUBLE_BIT
949 fprintf_unfiltered (file,
950 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
951 XSTRING (TARGET_DOUBLE_BIT));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: double_bit = %s\n",
955 paddr_d (current_gdbarch->double_bit));
956 #ifdef TARGET_DOUBLE_FORMAT
957 fprintf_unfiltered (file,
958 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
959 XSTRING (TARGET_DOUBLE_FORMAT));
961 fprintf_unfiltered (file,
962 "gdbarch_dump: double_format = %s\n",
963 pformat (current_gdbarch->double_format));
964 #ifdef DWARF2_REG_TO_REGNUM
965 fprintf_unfiltered (file,
966 "gdbarch_dump: %s # %s\n",
967 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
968 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
970 fprintf_unfiltered (file,
971 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
972 (long) current_gdbarch->dwarf2_reg_to_regnum);
973 #ifdef DWARF_REG_TO_REGNUM
974 fprintf_unfiltered (file,
975 "gdbarch_dump: %s # %s\n",
976 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
977 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
979 fprintf_unfiltered (file,
980 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
981 (long) current_gdbarch->dwarf_reg_to_regnum);
982 #ifdef ECOFF_REG_TO_REGNUM
983 fprintf_unfiltered (file,
984 "gdbarch_dump: %s # %s\n",
985 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
986 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
990 (long) current_gdbarch->ecoff_reg_to_regnum);
991 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
992 fprintf_unfiltered (file,
993 "gdbarch_dump: %s # %s\n",
994 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
995 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
999 (long) current_gdbarch->elf_make_msymbol_special);
1000 #ifdef EXTRACT_RETURN_VALUE
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: %s # %s\n",
1003 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1004 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1008 (long) current_gdbarch->extract_return_value);
1009 #ifdef FETCH_POINTER_ARGUMENT_P
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: %s # %s\n",
1012 "FETCH_POINTER_ARGUMENT_P()",
1013 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1017 gdbarch_fetch_pointer_argument_p (current_gdbarch));
1018 #ifdef FETCH_POINTER_ARGUMENT
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: %s # %s\n",
1021 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1022 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1026 (long) current_gdbarch->fetch_pointer_argument);
1027 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS_P
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: %s # %s\n",
1030 "FETCH_TLS_LOAD_MODULE_ADDRESS_P()",
1031 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS_P ()));
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1035 gdbarch_fetch_tls_load_module_address_p (current_gdbarch));
1036 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: %s # %s\n",
1039 "FETCH_TLS_LOAD_MODULE_ADDRESS(objfile)",
1040 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS (objfile)));
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
1044 (long) current_gdbarch->fetch_tls_load_module_address);
1045 #ifdef TARGET_FLOAT_BIT
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1048 XSTRING (TARGET_FLOAT_BIT));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: float_bit = %s\n",
1052 paddr_d (current_gdbarch->float_bit));
1053 #ifdef TARGET_FLOAT_FORMAT
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1056 XSTRING (TARGET_FLOAT_FORMAT));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: float_format = %s\n",
1060 pformat (current_gdbarch->float_format));
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: FP0_REGNUM # %s\n",
1064 XSTRING (FP0_REGNUM));
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: fp0_regnum = %s\n",
1068 paddr_d (current_gdbarch->fp0_regnum));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1071 gdbarch_frame_align_p (current_gdbarch));
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: frame_align = <0x%lx>\n",
1074 (long) current_gdbarch->frame_align);
1075 #ifdef FRAME_ARGS_SKIP
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1078 XSTRING (FRAME_ARGS_SKIP));
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: frame_args_skip = 0x%s\n",
1082 paddr_nz (current_gdbarch->frame_args_skip));
1083 #ifdef FRAME_NUM_ARGS_P
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: %s # %s\n",
1086 "FRAME_NUM_ARGS_P()",
1087 XSTRING (FRAME_NUM_ARGS_P ()));
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1091 gdbarch_frame_num_args_p (current_gdbarch));
1092 #ifdef FRAME_NUM_ARGS
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: %s # %s\n",
1095 "FRAME_NUM_ARGS(frame)",
1096 XSTRING (FRAME_NUM_ARGS (frame)));
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1100 (long) current_gdbarch->frame_num_args);
1101 #ifdef FRAME_RED_ZONE_SIZE
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1104 XSTRING (FRAME_RED_ZONE_SIZE));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: frame_red_zone_size = %s\n",
1108 paddr_d (current_gdbarch->frame_red_zone_size));
1109 #ifdef GET_LONGJMP_TARGET_P
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: %s # %s\n",
1112 "GET_LONGJMP_TARGET_P()",
1113 XSTRING (GET_LONGJMP_TARGET_P ()));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1117 gdbarch_get_longjmp_target_p (current_gdbarch));
1118 #ifdef GET_LONGJMP_TARGET
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: %s # %s\n",
1121 "GET_LONGJMP_TARGET(pc)",
1122 XSTRING (GET_LONGJMP_TARGET (pc)));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1126 (long) current_gdbarch->get_longjmp_target);
1127 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1128 fprintf_unfiltered (file,
1129 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1130 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1134 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1137 (long) current_gdbarch->in_function_epilogue_p);
1138 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: %s # %s\n",
1141 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1142 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1146 (long) current_gdbarch->in_solib_return_trampoline);
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: %s # %s\n",
1150 "INNER_THAN(lhs, rhs)",
1151 XSTRING (INNER_THAN (lhs, rhs)));
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: inner_than = <0x%lx>\n",
1155 (long) current_gdbarch->inner_than);
1156 #ifdef TARGET_INT_BIT
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1159 XSTRING (TARGET_INT_BIT));
1161 fprintf_unfiltered (file,
1162 "gdbarch_dump: int_bit = %s\n",
1163 paddr_d (current_gdbarch->int_bit));
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1166 gdbarch_integer_to_address_p (current_gdbarch));
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1169 (long) current_gdbarch->integer_to_address);
1170 #ifdef TARGET_LONG_BIT
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1173 XSTRING (TARGET_LONG_BIT));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: long_bit = %s\n",
1177 paddr_d (current_gdbarch->long_bit));
1178 #ifdef TARGET_LONG_DOUBLE_BIT
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1181 XSTRING (TARGET_LONG_DOUBLE_BIT));
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: long_double_bit = %s\n",
1185 paddr_d (current_gdbarch->long_double_bit));
1186 #ifdef TARGET_LONG_DOUBLE_FORMAT
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1189 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: long_double_format = %s\n",
1193 pformat (current_gdbarch->long_double_format));
1194 #ifdef TARGET_LONG_LONG_BIT
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1197 XSTRING (TARGET_LONG_LONG_BIT));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: long_long_bit = %s\n",
1201 paddr_d (current_gdbarch->long_long_bit));
1202 #ifdef MEMORY_INSERT_BREAKPOINT
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: %s # %s\n",
1205 "MEMORY_INSERT_BREAKPOINT(bp_tgt)",
1206 XSTRING (MEMORY_INSERT_BREAKPOINT (bp_tgt)));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1210 (long) current_gdbarch->memory_insert_breakpoint);
1211 #ifdef MEMORY_REMOVE_BREAKPOINT
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: %s # %s\n",
1214 "MEMORY_REMOVE_BREAKPOINT(bp_tgt)",
1215 XSTRING (MEMORY_REMOVE_BREAKPOINT (bp_tgt)));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1219 (long) current_gdbarch->memory_remove_breakpoint);
1220 #ifdef NAME_OF_MALLOC
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1223 XSTRING (NAME_OF_MALLOC));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: name_of_malloc = %s\n",
1228 #ifdef NUM_PSEUDO_REGS
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1231 XSTRING (NUM_PSEUDO_REGS));
1233 fprintf_unfiltered (file,
1234 "gdbarch_dump: num_pseudo_regs = %s\n",
1235 paddr_d (current_gdbarch->num_pseudo_regs));
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: NUM_REGS # %s\n",
1239 XSTRING (NUM_REGS));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: num_regs = %s\n",
1243 paddr_d (current_gdbarch->num_regs));
1245 fprintf_unfiltered (file,
1246 "gdbarch_dump: TARGET_OSABI # %s\n",
1247 XSTRING (TARGET_OSABI));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: osabi = %s\n",
1251 paddr_d (current_gdbarch->osabi));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: PC_REGNUM # %s\n",
1255 XSTRING (PC_REGNUM));
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: pc_regnum = %s\n",
1259 paddr_d (current_gdbarch->pc_regnum));
1260 #ifdef POINTER_TO_ADDRESS
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: %s # %s\n",
1263 "POINTER_TO_ADDRESS(type, buf)",
1264 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1268 (long) current_gdbarch->pointer_to_address);
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1271 gdbarch_print_float_info_p (current_gdbarch));
1272 fprintf_unfiltered (file,
1273 "gdbarch_dump: print_float_info = <0x%lx>\n",
1274 (long) current_gdbarch->print_float_info);
1275 #ifdef TARGET_PRINT_INSN
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: %s # %s\n",
1278 "TARGET_PRINT_INSN(vma, info)",
1279 XSTRING (TARGET_PRINT_INSN (vma, info)));
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: print_insn = <0x%lx>\n",
1283 (long) current_gdbarch->print_insn);
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1286 (long) current_gdbarch->print_registers_info);
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1289 gdbarch_print_vector_info_p (current_gdbarch));
1290 fprintf_unfiltered (file,
1291 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1292 (long) current_gdbarch->print_vector_info);
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: PS_REGNUM # %s\n",
1296 XSTRING (PS_REGNUM));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: ps_regnum = %s\n",
1300 paddr_d (current_gdbarch->ps_regnum));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1303 gdbarch_pseudo_register_read_p (current_gdbarch));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1306 (long) current_gdbarch->pseudo_register_read);
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1309 gdbarch_pseudo_register_write_p (current_gdbarch));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1312 (long) current_gdbarch->pseudo_register_write);
1313 #ifdef TARGET_PTR_BIT
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1316 XSTRING (TARGET_PTR_BIT));
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: ptr_bit = %s\n",
1320 paddr_d (current_gdbarch->ptr_bit));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1323 gdbarch_push_dummy_call_p (current_gdbarch));
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1326 (long) current_gdbarch->push_dummy_call);
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1329 gdbarch_push_dummy_code_p (current_gdbarch));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1332 (long) current_gdbarch->push_dummy_code);
1333 #ifdef TARGET_READ_PC_P
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: %s # %s\n",
1336 "TARGET_READ_PC_P()",
1337 XSTRING (TARGET_READ_PC_P ()));
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1341 gdbarch_read_pc_p (current_gdbarch));
1342 #ifdef TARGET_READ_PC
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: %s # %s\n",
1345 "TARGET_READ_PC(ptid)",
1346 XSTRING (TARGET_READ_PC (ptid)));
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: read_pc = <0x%lx>\n",
1350 (long) current_gdbarch->read_pc);
1351 #ifdef TARGET_READ_SP_P
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: %s # %s\n",
1354 "TARGET_READ_SP_P()",
1355 XSTRING (TARGET_READ_SP_P ()));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1359 gdbarch_read_sp_p (current_gdbarch));
1360 #ifdef TARGET_READ_SP
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1364 XSTRING (TARGET_READ_SP ()));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: read_sp = <0x%lx>\n",
1368 (long) current_gdbarch->read_sp);
1369 #ifdef REGISTER_BYTES_OK_P
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: %s # %s\n",
1372 "REGISTER_BYTES_OK_P()",
1373 XSTRING (REGISTER_BYTES_OK_P ()));
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1377 gdbarch_register_bytes_ok_p (current_gdbarch));
1378 #ifdef REGISTER_BYTES_OK
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "REGISTER_BYTES_OK(nr_bytes)",
1382 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1386 (long) current_gdbarch->register_bytes_ok);
1387 #ifdef REGISTER_NAME
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: %s # %s\n",
1390 "REGISTER_NAME(regnr)",
1391 XSTRING (REGISTER_NAME (regnr)));
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: register_name = <0x%lx>\n",
1395 (long) current_gdbarch->register_name);
1396 fprintf_unfiltered (file,
1397 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1398 (long) current_gdbarch->register_reggroup_p);
1399 #ifdef REGISTER_SIM_REGNO
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: %s # %s\n",
1402 "REGISTER_SIM_REGNO(reg_nr)",
1403 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1405 fprintf_unfiltered (file,
1406 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1407 (long) current_gdbarch->register_sim_regno);
1408 #ifdef REGISTER_TO_VALUE
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: %s # %s\n",
1411 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1412 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1414 fprintf_unfiltered (file,
1415 "gdbarch_dump: register_to_value = <0x%lx>\n",
1416 (long) current_gdbarch->register_to_value);
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1419 gdbarch_register_type_p (current_gdbarch));
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: register_type = <0x%lx>\n",
1422 (long) current_gdbarch->register_type);
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1425 gdbarch_regset_from_core_section_p (current_gdbarch));
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1428 (long) current_gdbarch->regset_from_core_section);
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: remote_register_number = <0x%lx>\n",
1431 (long) current_gdbarch->remote_register_number);
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1434 (long) current_gdbarch->remote_translate_xfer_address);
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1437 gdbarch_return_value_p (current_gdbarch));
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: return_value = <0x%lx>\n",
1440 (long) current_gdbarch->return_value);
1441 #ifdef SDB_REG_TO_REGNUM
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: %s # %s\n",
1444 "SDB_REG_TO_REGNUM(sdb_regnr)",
1445 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1449 (long) current_gdbarch->sdb_reg_to_regnum);
1450 #ifdef TARGET_SHORT_BIT
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1453 XSTRING (TARGET_SHORT_BIT));
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: short_bit = %s\n",
1457 paddr_d (current_gdbarch->short_bit));
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1460 gdbarch_single_step_through_delay_p (current_gdbarch));
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
1463 (long) current_gdbarch->single_step_through_delay);
1464 fprintf_unfiltered (file,
1465 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1466 gdbarch_skip_permanent_breakpoint_p (current_gdbarch));
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: skip_permanent_breakpoint = <0x%lx>\n",
1469 (long) current_gdbarch->skip_permanent_breakpoint);
1470 #ifdef SKIP_PROLOGUE
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: %s # %s\n",
1473 "SKIP_PROLOGUE(ip)",
1474 XSTRING (SKIP_PROLOGUE (ip)));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1478 (long) current_gdbarch->skip_prologue);
1479 fprintf_unfiltered (file,
1480 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1481 (long) current_gdbarch->skip_solib_resolver);
1482 #ifdef SKIP_TRAMPOLINE_CODE
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: %s # %s\n",
1485 "SKIP_TRAMPOLINE_CODE(pc)",
1486 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1490 (long) current_gdbarch->skip_trampoline_code);
1491 #ifdef SMASH_TEXT_ADDRESS
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "SMASH_TEXT_ADDRESS(addr)",
1495 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1499 (long) current_gdbarch->smash_text_address);
1500 #ifdef SOFTWARE_SINGLE_STEP_P
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
1503 "SOFTWARE_SINGLE_STEP_P()",
1504 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1508 gdbarch_software_single_step_p (current_gdbarch));
1509 #ifdef SOFTWARE_SINGLE_STEP
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: %s # %s\n",
1512 "SOFTWARE_SINGLE_STEP(regcache)",
1513 XSTRING (SOFTWARE_SINGLE_STEP (regcache)));
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: software_single_step = <0x%lx>\n",
1517 (long) current_gdbarch->software_single_step);
1519 fprintf_unfiltered (file,
1520 "gdbarch_dump: SP_REGNUM # %s\n",
1521 XSTRING (SP_REGNUM));
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: sp_regnum = %s\n",
1525 paddr_d (current_gdbarch->sp_regnum));
1526 #ifdef STAB_REG_TO_REGNUM
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: %s # %s\n",
1529 "STAB_REG_TO_REGNUM(stab_regnr)",
1530 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1532 fprintf_unfiltered (file,
1533 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1534 (long) current_gdbarch->stab_reg_to_regnum);
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1537 (long) current_gdbarch->stabs_argument_has_addr);
1538 #ifdef STORE_RETURN_VALUE
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: %s # %s\n",
1541 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1542 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: store_return_value = <0x%lx>\n",
1546 (long) current_gdbarch->store_return_value);
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: target_desc = %s\n",
1549 paddr_d ((long) current_gdbarch->target_desc));
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1552 gdbarch_unwind_dummy_id_p (current_gdbarch));
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1555 (long) current_gdbarch->unwind_dummy_id);
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1558 gdbarch_unwind_pc_p (current_gdbarch));
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1561 (long) current_gdbarch->unwind_pc);
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1564 gdbarch_unwind_sp_p (current_gdbarch));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1567 (long) current_gdbarch->unwind_sp);
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: value_from_register = <0x%lx>\n",
1570 (long) current_gdbarch->value_from_register);
1571 #ifdef VALUE_TO_REGISTER
1572 fprintf_unfiltered (file,
1573 "gdbarch_dump: %s # %s\n",
1574 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1575 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: value_to_register = <0x%lx>\n",
1579 (long) current_gdbarch->value_to_register);
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: vbit_in_delta = %s\n",
1582 paddr_d (current_gdbarch->vbit_in_delta));
1583 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: %s # %s\n",
1586 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1587 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1591 (long) current_gdbarch->virtual_frame_pointer);
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: vtable_function_descriptors = %s\n",
1594 paddr_d (current_gdbarch->vtable_function_descriptors));
1595 #ifdef TARGET_WRITE_PC
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: %s # %s\n",
1598 "TARGET_WRITE_PC(val, ptid)",
1599 XSTRING (TARGET_WRITE_PC (val, ptid)));
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: write_pc = <0x%lx>\n",
1603 (long) current_gdbarch->write_pc);
1604 if (current_gdbarch->dump_tdep != NULL)
1605 current_gdbarch->dump_tdep (current_gdbarch, file);
1608 struct gdbarch_tdep *
1609 gdbarch_tdep (struct gdbarch *gdbarch)
1611 if (gdbarch_debug >= 2)
1612 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1613 return gdbarch->tdep;
1617 const struct bfd_arch_info *
1618 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1620 gdb_assert (gdbarch != NULL);
1621 if (gdbarch_debug >= 2)
1622 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1623 return gdbarch->bfd_arch_info;
1627 gdbarch_byte_order (struct gdbarch *gdbarch)
1629 gdb_assert (gdbarch != NULL);
1630 if (gdbarch_debug >= 2)
1631 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1632 return gdbarch->byte_order;
1636 gdbarch_osabi (struct gdbarch *gdbarch)
1638 gdb_assert (gdbarch != NULL);
1639 if (gdbarch_debug >= 2)
1640 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1641 return gdbarch->osabi;
1644 const struct target_desc *
1645 gdbarch_target_desc (struct gdbarch *gdbarch)
1647 gdb_assert (gdbarch != NULL);
1648 if (gdbarch_debug >= 2)
1649 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1650 return gdbarch->target_desc;
1654 gdbarch_short_bit (struct gdbarch *gdbarch)
1656 gdb_assert (gdbarch != NULL);
1657 /* Skip verify of short_bit, invalid_p == 0 */
1658 if (gdbarch_debug >= 2)
1659 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1660 return gdbarch->short_bit;
1664 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1667 gdbarch->short_bit = short_bit;
1671 gdbarch_int_bit (struct gdbarch *gdbarch)
1673 gdb_assert (gdbarch != NULL);
1674 /* Skip verify of int_bit, invalid_p == 0 */
1675 if (gdbarch_debug >= 2)
1676 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1677 return gdbarch->int_bit;
1681 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1684 gdbarch->int_bit = int_bit;
1688 gdbarch_long_bit (struct gdbarch *gdbarch)
1690 gdb_assert (gdbarch != NULL);
1691 /* Skip verify of long_bit, invalid_p == 0 */
1692 if (gdbarch_debug >= 2)
1693 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1694 return gdbarch->long_bit;
1698 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1701 gdbarch->long_bit = long_bit;
1705 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1707 gdb_assert (gdbarch != NULL);
1708 /* Skip verify of long_long_bit, invalid_p == 0 */
1709 if (gdbarch_debug >= 2)
1710 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1711 return gdbarch->long_long_bit;
1715 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1718 gdbarch->long_long_bit = long_long_bit;
1722 gdbarch_float_bit (struct gdbarch *gdbarch)
1724 gdb_assert (gdbarch != NULL);
1725 /* Skip verify of float_bit, invalid_p == 0 */
1726 if (gdbarch_debug >= 2)
1727 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1728 return gdbarch->float_bit;
1732 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1735 gdbarch->float_bit = float_bit;
1738 const struct floatformat **
1739 gdbarch_float_format (struct gdbarch *gdbarch)
1741 gdb_assert (gdbarch != NULL);
1742 if (gdbarch_debug >= 2)
1743 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1744 return gdbarch->float_format;
1748 set_gdbarch_float_format (struct gdbarch *gdbarch,
1749 const struct floatformat ** float_format)
1751 gdbarch->float_format = float_format;
1755 gdbarch_double_bit (struct gdbarch *gdbarch)
1757 gdb_assert (gdbarch != NULL);
1758 /* Skip verify of double_bit, invalid_p == 0 */
1759 if (gdbarch_debug >= 2)
1760 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1761 return gdbarch->double_bit;
1765 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1768 gdbarch->double_bit = double_bit;
1771 const struct floatformat **
1772 gdbarch_double_format (struct gdbarch *gdbarch)
1774 gdb_assert (gdbarch != NULL);
1775 if (gdbarch_debug >= 2)
1776 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1777 return gdbarch->double_format;
1781 set_gdbarch_double_format (struct gdbarch *gdbarch,
1782 const struct floatformat ** double_format)
1784 gdbarch->double_format = double_format;
1788 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1790 gdb_assert (gdbarch != NULL);
1791 /* Skip verify of long_double_bit, invalid_p == 0 */
1792 if (gdbarch_debug >= 2)
1793 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1794 return gdbarch->long_double_bit;
1798 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1799 int long_double_bit)
1801 gdbarch->long_double_bit = long_double_bit;
1804 const struct floatformat **
1805 gdbarch_long_double_format (struct gdbarch *gdbarch)
1807 gdb_assert (gdbarch != NULL);
1808 if (gdbarch_debug >= 2)
1809 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1810 return gdbarch->long_double_format;
1814 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1815 const struct floatformat ** long_double_format)
1817 gdbarch->long_double_format = long_double_format;
1821 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1823 gdb_assert (gdbarch != NULL);
1824 /* Skip verify of ptr_bit, invalid_p == 0 */
1825 if (gdbarch_debug >= 2)
1826 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1827 return gdbarch->ptr_bit;
1831 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1834 gdbarch->ptr_bit = ptr_bit;
1838 gdbarch_addr_bit (struct gdbarch *gdbarch)
1840 gdb_assert (gdbarch != NULL);
1841 /* Check variable changed from pre-default. */
1842 gdb_assert (gdbarch->addr_bit != 0);
1843 if (gdbarch_debug >= 2)
1844 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1845 return gdbarch->addr_bit;
1849 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1852 gdbarch->addr_bit = addr_bit;
1856 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1858 gdb_assert (gdbarch != NULL);
1859 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1860 if (gdbarch_debug >= 2)
1861 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1862 return gdbarch->bfd_vma_bit;
1866 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1869 gdbarch->bfd_vma_bit = bfd_vma_bit;
1873 gdbarch_char_signed (struct gdbarch *gdbarch)
1875 gdb_assert (gdbarch != NULL);
1876 /* Check variable changed from pre-default. */
1877 gdb_assert (gdbarch->char_signed != -1);
1878 if (gdbarch_debug >= 2)
1879 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1880 return gdbarch->char_signed;
1884 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1887 gdbarch->char_signed = char_signed;
1891 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1893 gdb_assert (gdbarch != NULL);
1894 return gdbarch->read_pc != NULL;
1898 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
1900 gdb_assert (gdbarch != NULL);
1901 gdb_assert (gdbarch->read_pc != NULL);
1902 if (gdbarch_debug >= 2)
1903 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1904 return gdbarch->read_pc (ptid);
1908 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1909 gdbarch_read_pc_ftype read_pc)
1911 gdbarch->read_pc = read_pc;
1915 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
1917 gdb_assert (gdbarch != NULL);
1918 gdb_assert (gdbarch->write_pc != NULL);
1919 if (gdbarch_debug >= 2)
1920 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1921 gdbarch->write_pc (val, ptid);
1925 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1926 gdbarch_write_pc_ftype write_pc)
1928 gdbarch->write_pc = write_pc;
1932 gdbarch_read_sp_p (struct gdbarch *gdbarch)
1934 gdb_assert (gdbarch != NULL);
1935 return gdbarch->read_sp != NULL;
1939 gdbarch_read_sp (struct gdbarch *gdbarch)
1941 gdb_assert (gdbarch != NULL);
1942 gdb_assert (gdbarch->read_sp != NULL);
1943 if (gdbarch_debug >= 2)
1944 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1945 return gdbarch->read_sp ();
1949 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1950 gdbarch_read_sp_ftype read_sp)
1952 gdbarch->read_sp = read_sp;
1956 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1958 gdb_assert (gdbarch != NULL);
1959 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1960 if (gdbarch_debug >= 2)
1961 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1962 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
1966 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1967 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1969 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1973 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1975 gdb_assert (gdbarch != NULL);
1976 return gdbarch->pseudo_register_read != NULL;
1980 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1982 gdb_assert (gdbarch != NULL);
1983 gdb_assert (gdbarch->pseudo_register_read != NULL);
1984 if (gdbarch_debug >= 2)
1985 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1986 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1990 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1991 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1993 gdbarch->pseudo_register_read = pseudo_register_read;
1997 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1999 gdb_assert (gdbarch != NULL);
2000 return gdbarch->pseudo_register_write != NULL;
2004 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
2006 gdb_assert (gdbarch != NULL);
2007 gdb_assert (gdbarch->pseudo_register_write != NULL);
2008 if (gdbarch_debug >= 2)
2009 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2010 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2014 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2015 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2017 gdbarch->pseudo_register_write = pseudo_register_write;
2021 gdbarch_num_regs (struct gdbarch *gdbarch)
2023 gdb_assert (gdbarch != NULL);
2024 /* Check variable changed from pre-default. */
2025 gdb_assert (gdbarch->num_regs != -1);
2026 if (gdbarch_debug >= 2)
2027 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2028 return gdbarch->num_regs;
2032 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2035 gdbarch->num_regs = num_regs;
2039 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2041 gdb_assert (gdbarch != NULL);
2042 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2043 if (gdbarch_debug >= 2)
2044 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2045 return gdbarch->num_pseudo_regs;
2049 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2050 int num_pseudo_regs)
2052 gdbarch->num_pseudo_regs = num_pseudo_regs;
2056 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2058 gdb_assert (gdbarch != NULL);
2059 /* Skip verify of sp_regnum, invalid_p == 0 */
2060 if (gdbarch_debug >= 2)
2061 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2062 return gdbarch->sp_regnum;
2066 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2069 gdbarch->sp_regnum = sp_regnum;
2073 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2075 gdb_assert (gdbarch != NULL);
2076 /* Skip verify of pc_regnum, invalid_p == 0 */
2077 if (gdbarch_debug >= 2)
2078 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2079 return gdbarch->pc_regnum;
2083 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2086 gdbarch->pc_regnum = pc_regnum;
2090 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2092 gdb_assert (gdbarch != NULL);
2093 /* Skip verify of ps_regnum, invalid_p == 0 */
2094 if (gdbarch_debug >= 2)
2095 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2096 return gdbarch->ps_regnum;
2100 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2103 gdbarch->ps_regnum = ps_regnum;
2107 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2109 gdb_assert (gdbarch != NULL);
2110 /* Skip verify of fp0_regnum, invalid_p == 0 */
2111 if (gdbarch_debug >= 2)
2112 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2113 return gdbarch->fp0_regnum;
2117 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2120 gdbarch->fp0_regnum = fp0_regnum;
2124 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2126 gdb_assert (gdbarch != NULL);
2127 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2128 if (gdbarch_debug >= 2)
2129 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2130 return gdbarch->stab_reg_to_regnum (stab_regnr);
2134 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2135 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2137 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2141 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2143 gdb_assert (gdbarch != NULL);
2144 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2145 if (gdbarch_debug >= 2)
2146 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2147 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2151 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2152 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2154 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2158 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2160 gdb_assert (gdbarch != NULL);
2161 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2162 if (gdbarch_debug >= 2)
2163 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2164 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2168 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2169 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2171 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2175 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2177 gdb_assert (gdbarch != NULL);
2178 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2179 if (gdbarch_debug >= 2)
2180 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2181 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2185 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2186 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2188 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2192 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2194 gdb_assert (gdbarch != NULL);
2195 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2196 if (gdbarch_debug >= 2)
2197 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2198 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2202 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2203 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2205 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2209 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2211 gdb_assert (gdbarch != NULL);
2212 gdb_assert (gdbarch->register_name != NULL);
2213 if (gdbarch_debug >= 2)
2214 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2215 return gdbarch->register_name (regnr);
2219 set_gdbarch_register_name (struct gdbarch *gdbarch,
2220 gdbarch_register_name_ftype register_name)
2222 gdbarch->register_name = register_name;
2226 gdbarch_register_type_p (struct gdbarch *gdbarch)
2228 gdb_assert (gdbarch != NULL);
2229 return gdbarch->register_type != NULL;
2233 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2235 gdb_assert (gdbarch != NULL);
2236 gdb_assert (gdbarch->register_type != NULL);
2237 if (gdbarch_debug >= 2)
2238 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2239 return gdbarch->register_type (gdbarch, reg_nr);
2243 set_gdbarch_register_type (struct gdbarch *gdbarch,
2244 gdbarch_register_type_ftype register_type)
2246 gdbarch->register_type = register_type;
2250 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2252 gdb_assert (gdbarch != NULL);
2253 return gdbarch->unwind_dummy_id != NULL;
2257 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2259 gdb_assert (gdbarch != NULL);
2260 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2261 if (gdbarch_debug >= 2)
2262 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2263 return gdbarch->unwind_dummy_id (gdbarch, info);
2267 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2268 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2270 gdbarch->unwind_dummy_id = unwind_dummy_id;
2274 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2276 gdb_assert (gdbarch != NULL);
2277 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2278 if (gdbarch_debug >= 2)
2279 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2280 return gdbarch->deprecated_fp_regnum;
2284 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2285 int deprecated_fp_regnum)
2287 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2291 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2293 gdb_assert (gdbarch != NULL);
2294 return gdbarch->push_dummy_call != NULL;
2298 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)
2300 gdb_assert (gdbarch != NULL);
2301 gdb_assert (gdbarch->push_dummy_call != NULL);
2302 if (gdbarch_debug >= 2)
2303 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2304 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2308 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2309 gdbarch_push_dummy_call_ftype push_dummy_call)
2311 gdbarch->push_dummy_call = push_dummy_call;
2315 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2317 gdb_assert (gdbarch != NULL);
2318 if (gdbarch_debug >= 2)
2319 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2320 return gdbarch->deprecated_register_size;
2324 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2325 int deprecated_register_size)
2327 gdbarch->deprecated_register_size = deprecated_register_size;
2331 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2333 gdb_assert (gdbarch != NULL);
2334 /* Skip verify of call_dummy_location, invalid_p == 0 */
2335 if (gdbarch_debug >= 2)
2336 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2337 return gdbarch->call_dummy_location;
2341 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2342 int call_dummy_location)
2344 gdbarch->call_dummy_location = call_dummy_location;
2348 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2350 gdb_assert (gdbarch != NULL);
2351 return gdbarch->push_dummy_code != NULL;
2355 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)
2357 gdb_assert (gdbarch != NULL);
2358 gdb_assert (gdbarch->push_dummy_code != NULL);
2359 if (gdbarch_debug >= 2)
2360 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2361 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2365 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2366 gdbarch_push_dummy_code_ftype push_dummy_code)
2368 gdbarch->push_dummy_code = push_dummy_code;
2372 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2374 gdb_assert (gdbarch != NULL);
2375 gdb_assert (gdbarch->print_registers_info != NULL);
2376 if (gdbarch_debug >= 2)
2377 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2378 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2382 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2383 gdbarch_print_registers_info_ftype print_registers_info)
2385 gdbarch->print_registers_info = print_registers_info;
2389 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2391 gdb_assert (gdbarch != NULL);
2392 return gdbarch->print_float_info != NULL;
2396 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2398 gdb_assert (gdbarch != NULL);
2399 gdb_assert (gdbarch->print_float_info != NULL);
2400 if (gdbarch_debug >= 2)
2401 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2402 gdbarch->print_float_info (gdbarch, file, frame, args);
2406 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2407 gdbarch_print_float_info_ftype print_float_info)
2409 gdbarch->print_float_info = print_float_info;
2413 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2415 gdb_assert (gdbarch != NULL);
2416 return gdbarch->print_vector_info != NULL;
2420 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2422 gdb_assert (gdbarch != NULL);
2423 gdb_assert (gdbarch->print_vector_info != NULL);
2424 if (gdbarch_debug >= 2)
2425 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2426 gdbarch->print_vector_info (gdbarch, file, frame, args);
2430 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2431 gdbarch_print_vector_info_ftype print_vector_info)
2433 gdbarch->print_vector_info = print_vector_info;
2437 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2439 gdb_assert (gdbarch != NULL);
2440 gdb_assert (gdbarch->register_sim_regno != NULL);
2441 if (gdbarch_debug >= 2)
2442 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2443 return gdbarch->register_sim_regno (reg_nr);
2447 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2448 gdbarch_register_sim_regno_ftype register_sim_regno)
2450 gdbarch->register_sim_regno = register_sim_regno;
2454 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2456 gdb_assert (gdbarch != NULL);
2457 return gdbarch->register_bytes_ok != NULL;
2461 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2463 gdb_assert (gdbarch != NULL);
2464 gdb_assert (gdbarch->register_bytes_ok != NULL);
2465 if (gdbarch_debug >= 2)
2466 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2467 return gdbarch->register_bytes_ok (nr_bytes);
2471 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2472 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2474 gdbarch->register_bytes_ok = register_bytes_ok;
2478 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2480 gdb_assert (gdbarch != NULL);
2481 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2482 if (gdbarch_debug >= 2)
2483 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2484 return gdbarch->cannot_fetch_register (regnum);
2488 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2489 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2491 gdbarch->cannot_fetch_register = cannot_fetch_register;
2495 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2497 gdb_assert (gdbarch != NULL);
2498 gdb_assert (gdbarch->cannot_store_register != NULL);
2499 if (gdbarch_debug >= 2)
2500 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2501 return gdbarch->cannot_store_register (regnum);
2505 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2506 gdbarch_cannot_store_register_ftype cannot_store_register)
2508 gdbarch->cannot_store_register = cannot_store_register;
2512 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2514 gdb_assert (gdbarch != NULL);
2515 return gdbarch->get_longjmp_target != NULL;
2519 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
2521 gdb_assert (gdbarch != NULL);
2522 gdb_assert (gdbarch->get_longjmp_target != NULL);
2523 if (gdbarch_debug >= 2)
2524 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2525 return gdbarch->get_longjmp_target (pc);
2529 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2530 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2532 gdbarch->get_longjmp_target = get_longjmp_target;
2536 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2538 gdb_assert (gdbarch != NULL);
2539 if (gdbarch_debug >= 2)
2540 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2541 return gdbarch->believe_pcc_promotion;
2545 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2546 int believe_pcc_promotion)
2548 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2552 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2554 gdb_assert (gdbarch != NULL);
2555 gdb_assert (gdbarch->convert_register_p != NULL);
2556 if (gdbarch_debug >= 2)
2557 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2558 return gdbarch->convert_register_p (regnum, type);
2562 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2563 gdbarch_convert_register_p_ftype convert_register_p)
2565 gdbarch->convert_register_p = convert_register_p;
2569 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
2571 gdb_assert (gdbarch != NULL);
2572 gdb_assert (gdbarch->register_to_value != NULL);
2573 if (gdbarch_debug >= 2)
2574 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2575 gdbarch->register_to_value (frame, regnum, type, buf);
2579 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2580 gdbarch_register_to_value_ftype register_to_value)
2582 gdbarch->register_to_value = register_to_value;
2586 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2588 gdb_assert (gdbarch != NULL);
2589 gdb_assert (gdbarch->value_to_register != NULL);
2590 if (gdbarch_debug >= 2)
2591 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2592 gdbarch->value_to_register (frame, regnum, type, buf);
2596 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2597 gdbarch_value_to_register_ftype value_to_register)
2599 gdbarch->value_to_register = value_to_register;
2603 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2605 gdb_assert (gdbarch != NULL);
2606 gdb_assert (gdbarch->value_from_register != NULL);
2607 if (gdbarch_debug >= 2)
2608 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2609 return gdbarch->value_from_register (type, regnum, frame);
2613 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2614 gdbarch_value_from_register_ftype value_from_register)
2616 gdbarch->value_from_register = value_from_register;
2620 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2622 gdb_assert (gdbarch != NULL);
2623 gdb_assert (gdbarch->pointer_to_address != NULL);
2624 if (gdbarch_debug >= 2)
2625 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2626 return gdbarch->pointer_to_address (type, buf);
2630 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2631 gdbarch_pointer_to_address_ftype pointer_to_address)
2633 gdbarch->pointer_to_address = pointer_to_address;
2637 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2639 gdb_assert (gdbarch != NULL);
2640 gdb_assert (gdbarch->address_to_pointer != NULL);
2641 if (gdbarch_debug >= 2)
2642 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2643 gdbarch->address_to_pointer (type, buf, addr);
2647 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2648 gdbarch_address_to_pointer_ftype address_to_pointer)
2650 gdbarch->address_to_pointer = address_to_pointer;
2654 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2656 gdb_assert (gdbarch != NULL);
2657 return gdbarch->integer_to_address != NULL;
2661 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2663 gdb_assert (gdbarch != NULL);
2664 gdb_assert (gdbarch->integer_to_address != NULL);
2665 if (gdbarch_debug >= 2)
2666 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2667 return gdbarch->integer_to_address (gdbarch, type, buf);
2671 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2672 gdbarch_integer_to_address_ftype integer_to_address)
2674 gdbarch->integer_to_address = integer_to_address;
2678 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
2680 gdb_assert (gdbarch != NULL);
2681 return gdbarch->deprecated_store_struct_return != NULL;
2685 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
2687 gdb_assert (gdbarch != NULL);
2688 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
2689 if (gdbarch_debug >= 2)
2690 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
2691 gdbarch->deprecated_store_struct_return (addr, sp);
2695 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
2696 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
2698 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
2702 gdbarch_return_value_p (struct gdbarch *gdbarch)
2704 gdb_assert (gdbarch != NULL);
2705 return gdbarch->return_value != legacy_return_value;
2708 enum return_value_convention
2709 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2711 gdb_assert (gdbarch != NULL);
2712 gdb_assert (gdbarch->return_value != NULL);
2713 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
2714 if (gdbarch_debug >= 2)
2715 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2716 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
2720 set_gdbarch_return_value (struct gdbarch *gdbarch,
2721 gdbarch_return_value_ftype return_value)
2723 gdbarch->return_value = return_value;
2727 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
2729 gdb_assert (gdbarch != NULL);
2730 gdb_assert (gdbarch->extract_return_value != NULL);
2731 if (gdbarch_debug >= 2)
2732 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2733 gdbarch->extract_return_value (type, regcache, valbuf);
2737 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2738 gdbarch_extract_return_value_ftype extract_return_value)
2740 gdbarch->extract_return_value = extract_return_value;
2744 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
2746 gdb_assert (gdbarch != NULL);
2747 gdb_assert (gdbarch->store_return_value != NULL);
2748 if (gdbarch_debug >= 2)
2749 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2750 gdbarch->store_return_value (type, regcache, valbuf);
2754 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2755 gdbarch_store_return_value_ftype store_return_value)
2757 gdbarch->store_return_value = store_return_value;
2761 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2763 gdb_assert (gdbarch != NULL);
2764 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
2765 if (gdbarch_debug >= 2)
2766 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
2767 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
2771 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
2772 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
2774 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
2778 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
2780 gdb_assert (gdbarch != NULL);
2781 return gdbarch->deprecated_extract_struct_value_address != NULL;
2785 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
2787 gdb_assert (gdbarch != NULL);
2788 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
2789 if (gdbarch_debug >= 2)
2790 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
2791 return gdbarch->deprecated_extract_struct_value_address (regcache);
2795 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
2796 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
2798 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
2802 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2804 gdb_assert (gdbarch != NULL);
2805 gdb_assert (gdbarch->skip_prologue != NULL);
2806 if (gdbarch_debug >= 2)
2807 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2808 return gdbarch->skip_prologue (ip);
2812 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2813 gdbarch_skip_prologue_ftype skip_prologue)
2815 gdbarch->skip_prologue = skip_prologue;
2819 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2821 gdb_assert (gdbarch != NULL);
2822 gdb_assert (gdbarch->inner_than != NULL);
2823 if (gdbarch_debug >= 2)
2824 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2825 return gdbarch->inner_than (lhs, rhs);
2829 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2830 gdbarch_inner_than_ftype inner_than)
2832 gdbarch->inner_than = inner_than;
2836 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2838 gdb_assert (gdbarch != NULL);
2839 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2840 if (gdbarch_debug >= 2)
2841 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2842 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2846 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2847 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2849 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2853 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2855 gdb_assert (gdbarch != NULL);
2856 return gdbarch->adjust_breakpoint_address != NULL;
2860 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2862 gdb_assert (gdbarch != NULL);
2863 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2864 if (gdbarch_debug >= 2)
2865 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2866 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2870 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2871 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2873 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2877 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2879 gdb_assert (gdbarch != NULL);
2880 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2881 if (gdbarch_debug >= 2)
2882 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2883 return gdbarch->memory_insert_breakpoint (bp_tgt);
2887 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2888 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2890 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2894 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2896 gdb_assert (gdbarch != NULL);
2897 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2898 if (gdbarch_debug >= 2)
2899 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2900 return gdbarch->memory_remove_breakpoint (bp_tgt);
2904 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2905 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2907 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2911 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2913 gdb_assert (gdbarch != NULL);
2914 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2915 if (gdbarch_debug >= 2)
2916 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2917 return gdbarch->decr_pc_after_break;
2921 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2922 CORE_ADDR decr_pc_after_break)
2924 gdbarch->decr_pc_after_break = decr_pc_after_break;
2928 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2930 gdb_assert (gdbarch != NULL);
2931 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2932 if (gdbarch_debug >= 2)
2933 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2934 return gdbarch->deprecated_function_start_offset;
2938 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2939 CORE_ADDR deprecated_function_start_offset)
2941 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2945 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)
2947 gdb_assert (gdbarch != NULL);
2948 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
2949 if (gdbarch_debug >= 2)
2950 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
2951 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
2955 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
2956 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
2958 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
2962 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2964 gdb_assert (gdbarch != NULL);
2965 gdb_assert (gdbarch->remote_register_number != NULL);
2966 if (gdbarch_debug >= 2)
2967 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2968 return gdbarch->remote_register_number (gdbarch, regno);
2972 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2973 gdbarch_remote_register_number_ftype remote_register_number)
2975 gdbarch->remote_register_number = remote_register_number;
2979 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2981 gdb_assert (gdbarch != NULL);
2982 return gdbarch->fetch_tls_load_module_address != NULL;
2986 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2988 gdb_assert (gdbarch != NULL);
2989 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2990 if (gdbarch_debug >= 2)
2991 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2992 return gdbarch->fetch_tls_load_module_address (objfile);
2996 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2997 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2999 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
3003 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3005 gdb_assert (gdbarch != NULL);
3006 /* Skip verify of frame_args_skip, invalid_p == 0 */
3007 if (gdbarch_debug >= 2)
3008 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3009 return gdbarch->frame_args_skip;
3013 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3014 CORE_ADDR frame_args_skip)
3016 gdbarch->frame_args_skip = frame_args_skip;
3020 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3022 gdb_assert (gdbarch != NULL);
3023 return gdbarch->unwind_pc != NULL;
3027 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3029 gdb_assert (gdbarch != NULL);
3030 gdb_assert (gdbarch->unwind_pc != NULL);
3031 if (gdbarch_debug >= 2)
3032 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3033 return gdbarch->unwind_pc (gdbarch, next_frame);
3037 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3038 gdbarch_unwind_pc_ftype unwind_pc)
3040 gdbarch->unwind_pc = unwind_pc;
3044 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3046 gdb_assert (gdbarch != NULL);
3047 return gdbarch->unwind_sp != NULL;
3051 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3053 gdb_assert (gdbarch != NULL);
3054 gdb_assert (gdbarch->unwind_sp != NULL);
3055 if (gdbarch_debug >= 2)
3056 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3057 return gdbarch->unwind_sp (gdbarch, next_frame);
3061 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3062 gdbarch_unwind_sp_ftype unwind_sp)
3064 gdbarch->unwind_sp = unwind_sp;
3068 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3070 gdb_assert (gdbarch != NULL);
3071 return gdbarch->frame_num_args != NULL;
3075 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3077 gdb_assert (gdbarch != NULL);
3078 gdb_assert (gdbarch->frame_num_args != NULL);
3079 if (gdbarch_debug >= 2)
3080 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3081 return gdbarch->frame_num_args (frame);
3085 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3086 gdbarch_frame_num_args_ftype frame_num_args)
3088 gdbarch->frame_num_args = frame_num_args;
3092 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3094 gdb_assert (gdbarch != NULL);
3095 return gdbarch->deprecated_stack_align != NULL;
3099 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3101 gdb_assert (gdbarch != NULL);
3102 gdb_assert (gdbarch->deprecated_stack_align != NULL);
3103 if (gdbarch_debug >= 2)
3104 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3105 return gdbarch->deprecated_stack_align (sp);
3109 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3110 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3112 gdbarch->deprecated_stack_align = deprecated_stack_align;
3116 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3118 gdb_assert (gdbarch != NULL);
3119 return gdbarch->frame_align != NULL;
3123 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3125 gdb_assert (gdbarch != NULL);
3126 gdb_assert (gdbarch->frame_align != NULL);
3127 if (gdbarch_debug >= 2)
3128 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3129 return gdbarch->frame_align (gdbarch, address);
3133 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3134 gdbarch_frame_align_ftype frame_align)
3136 gdbarch->frame_align = frame_align;
3140 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3142 gdb_assert (gdbarch != NULL);
3143 return gdbarch->deprecated_reg_struct_has_addr != NULL;
3147 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3149 gdb_assert (gdbarch != NULL);
3150 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3151 if (gdbarch_debug >= 2)
3152 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3153 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3157 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3158 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3160 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3164 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3166 gdb_assert (gdbarch != NULL);
3167 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3168 if (gdbarch_debug >= 2)
3169 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3170 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3174 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3175 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3177 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3181 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3183 gdb_assert (gdbarch != NULL);
3184 if (gdbarch_debug >= 2)
3185 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3186 return gdbarch->frame_red_zone_size;
3190 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3191 int frame_red_zone_size)
3193 gdbarch->frame_red_zone_size = frame_red_zone_size;
3197 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3199 gdb_assert (gdbarch != NULL);
3200 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3201 if (gdbarch_debug >= 2)
3202 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3203 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3207 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3208 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3210 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3214 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3216 gdb_assert (gdbarch != NULL);
3217 gdb_assert (gdbarch->addr_bits_remove != NULL);
3218 if (gdbarch_debug >= 2)
3219 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3220 return gdbarch->addr_bits_remove (addr);
3224 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3225 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3227 gdbarch->addr_bits_remove = addr_bits_remove;
3231 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3233 gdb_assert (gdbarch != NULL);
3234 gdb_assert (gdbarch->smash_text_address != NULL);
3235 if (gdbarch_debug >= 2)
3236 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3237 return gdbarch->smash_text_address (addr);
3241 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3242 gdbarch_smash_text_address_ftype smash_text_address)
3244 gdbarch->smash_text_address = smash_text_address;
3248 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3250 gdb_assert (gdbarch != NULL);
3251 return gdbarch->software_single_step != NULL;
3255 gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
3257 gdb_assert (gdbarch != NULL);
3258 gdb_assert (gdbarch->software_single_step != NULL);
3259 if (gdbarch_debug >= 2)
3260 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3261 return gdbarch->software_single_step (regcache);
3265 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3266 gdbarch_software_single_step_ftype software_single_step)
3268 gdbarch->software_single_step = software_single_step;
3272 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3274 gdb_assert (gdbarch != NULL);
3275 return gdbarch->single_step_through_delay != NULL;
3279 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3281 gdb_assert (gdbarch != NULL);
3282 gdb_assert (gdbarch->single_step_through_delay != NULL);
3283 if (gdbarch_debug >= 2)
3284 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3285 return gdbarch->single_step_through_delay (gdbarch, frame);
3289 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3290 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3292 gdbarch->single_step_through_delay = single_step_through_delay;
3296 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3298 gdb_assert (gdbarch != NULL);
3299 gdb_assert (gdbarch->print_insn != NULL);
3300 if (gdbarch_debug >= 2)
3301 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3302 return gdbarch->print_insn (vma, info);
3306 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3307 gdbarch_print_insn_ftype print_insn)
3309 gdbarch->print_insn = print_insn;
3313 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3315 gdb_assert (gdbarch != NULL);
3316 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3317 if (gdbarch_debug >= 2)
3318 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3319 return gdbarch->skip_trampoline_code (pc);
3323 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3324 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3326 gdbarch->skip_trampoline_code = skip_trampoline_code;
3330 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3332 gdb_assert (gdbarch != NULL);
3333 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3334 if (gdbarch_debug >= 2)
3335 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3336 return gdbarch->skip_solib_resolver (gdbarch, pc);
3340 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3341 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3343 gdbarch->skip_solib_resolver = skip_solib_resolver;
3347 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3349 gdb_assert (gdbarch != NULL);
3350 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3351 if (gdbarch_debug >= 2)
3352 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3353 return gdbarch->in_solib_return_trampoline (pc, name);
3357 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3358 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3360 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3364 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3366 gdb_assert (gdbarch != NULL);
3367 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3368 if (gdbarch_debug >= 2)
3369 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3370 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3374 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3375 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3377 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3381 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
3383 gdb_assert (gdbarch != NULL);
3384 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
3385 if (gdbarch_debug >= 2)
3386 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
3387 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
3391 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
3392 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
3394 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
3398 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3400 gdb_assert (gdbarch != NULL);
3401 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3402 if (gdbarch_debug >= 2)
3403 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3404 gdbarch->elf_make_msymbol_special (sym, msym);
3408 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3409 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3411 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3415 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3417 gdb_assert (gdbarch != NULL);
3418 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3419 if (gdbarch_debug >= 2)
3420 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3421 gdbarch->coff_make_msymbol_special (val, msym);
3425 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3426 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3428 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3432 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
3434 gdb_assert (gdbarch != NULL);
3435 /* Skip verify of name_of_malloc, invalid_p == 0 */
3436 if (gdbarch_debug >= 2)
3437 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
3438 return gdbarch->name_of_malloc;
3442 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
3443 const char * name_of_malloc)
3445 gdbarch->name_of_malloc = name_of_malloc;
3449 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3451 gdb_assert (gdbarch != NULL);
3452 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3453 if (gdbarch_debug >= 2)
3454 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3455 return gdbarch->cannot_step_breakpoint;
3459 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3460 int cannot_step_breakpoint)
3462 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3466 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3468 gdb_assert (gdbarch != NULL);
3469 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3470 if (gdbarch_debug >= 2)
3471 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3472 return gdbarch->have_nonsteppable_watchpoint;
3476 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3477 int have_nonsteppable_watchpoint)
3479 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3483 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3485 gdb_assert (gdbarch != NULL);
3486 return gdbarch->address_class_type_flags != NULL;
3490 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3492 gdb_assert (gdbarch != NULL);
3493 gdb_assert (gdbarch->address_class_type_flags != NULL);
3494 if (gdbarch_debug >= 2)
3495 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3496 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3500 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3501 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3503 gdbarch->address_class_type_flags = address_class_type_flags;
3507 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3509 gdb_assert (gdbarch != NULL);
3510 return gdbarch->address_class_type_flags_to_name != NULL;
3514 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3516 gdb_assert (gdbarch != NULL);
3517 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3518 if (gdbarch_debug >= 2)
3519 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3520 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3524 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3525 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3527 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3531 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3533 gdb_assert (gdbarch != NULL);
3534 return gdbarch->address_class_name_to_type_flags != NULL;
3538 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3540 gdb_assert (gdbarch != NULL);
3541 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3542 if (gdbarch_debug >= 2)
3543 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3544 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3548 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3549 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3551 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3555 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3557 gdb_assert (gdbarch != NULL);
3558 gdb_assert (gdbarch->register_reggroup_p != NULL);
3559 if (gdbarch_debug >= 2)
3560 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3561 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3565 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3566 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3568 gdbarch->register_reggroup_p = register_reggroup_p;
3572 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3574 gdb_assert (gdbarch != NULL);
3575 return gdbarch->fetch_pointer_argument != NULL;
3579 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3581 gdb_assert (gdbarch != NULL);
3582 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3583 if (gdbarch_debug >= 2)
3584 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3585 return gdbarch->fetch_pointer_argument (frame, argi, type);
3589 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3590 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3592 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3596 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3598 gdb_assert (gdbarch != NULL);
3599 return gdbarch->regset_from_core_section != NULL;
3602 const struct regset *
3603 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3605 gdb_assert (gdbarch != NULL);
3606 gdb_assert (gdbarch->regset_from_core_section != NULL);
3607 if (gdbarch_debug >= 2)
3608 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3609 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3613 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3614 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3616 gdbarch->regset_from_core_section = regset_from_core_section;
3620 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3622 gdb_assert (gdbarch != NULL);
3623 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3624 if (gdbarch_debug >= 2)
3625 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3626 return gdbarch->vtable_function_descriptors;
3630 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3631 int vtable_function_descriptors)
3633 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3637 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3639 gdb_assert (gdbarch != NULL);
3640 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3641 if (gdbarch_debug >= 2)
3642 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3643 return gdbarch->vbit_in_delta;
3647 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3650 gdbarch->vbit_in_delta = vbit_in_delta;
3654 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3656 gdb_assert (gdbarch != NULL);
3657 return gdbarch->skip_permanent_breakpoint != NULL;
3661 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3663 gdb_assert (gdbarch != NULL);
3664 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3665 if (gdbarch_debug >= 2)
3666 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3667 gdbarch->skip_permanent_breakpoint (regcache);
3671 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3672 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3674 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3678 /* Keep a registry of per-architecture data-pointers required by GDB
3685 gdbarch_data_pre_init_ftype *pre_init;
3686 gdbarch_data_post_init_ftype *post_init;
3689 struct gdbarch_data_registration
3691 struct gdbarch_data *data;
3692 struct gdbarch_data_registration *next;
3695 struct gdbarch_data_registry
3698 struct gdbarch_data_registration *registrations;
3701 struct gdbarch_data_registry gdbarch_data_registry =
3706 static struct gdbarch_data *
3707 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3708 gdbarch_data_post_init_ftype *post_init)
3710 struct gdbarch_data_registration **curr;
3711 /* Append the new registraration. */
3712 for (curr = &gdbarch_data_registry.registrations;
3714 curr = &(*curr)->next);
3715 (*curr) = XMALLOC (struct gdbarch_data_registration);
3716 (*curr)->next = NULL;
3717 (*curr)->data = XMALLOC (struct gdbarch_data);
3718 (*curr)->data->index = gdbarch_data_registry.nr++;
3719 (*curr)->data->pre_init = pre_init;
3720 (*curr)->data->post_init = post_init;
3721 (*curr)->data->init_p = 1;
3722 return (*curr)->data;
3725 struct gdbarch_data *
3726 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3728 return gdbarch_data_register (pre_init, NULL);
3731 struct gdbarch_data *
3732 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3734 return gdbarch_data_register (NULL, post_init);
3737 /* Create/delete the gdbarch data vector. */
3740 alloc_gdbarch_data (struct gdbarch *gdbarch)
3742 gdb_assert (gdbarch->data == NULL);
3743 gdbarch->nr_data = gdbarch_data_registry.nr;
3744 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3747 /* Initialize the current value of the specified per-architecture
3751 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3752 struct gdbarch_data *data,
3755 gdb_assert (data->index < gdbarch->nr_data);
3756 gdb_assert (gdbarch->data[data->index] == NULL);
3757 gdb_assert (data->pre_init == NULL);
3758 gdbarch->data[data->index] = pointer;
3761 /* Return the current value of the specified per-architecture
3765 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3767 gdb_assert (data->index < gdbarch->nr_data);
3768 if (gdbarch->data[data->index] == NULL)
3770 /* The data-pointer isn't initialized, call init() to get a
3772 if (data->pre_init != NULL)
3773 /* Mid architecture creation: pass just the obstack, and not
3774 the entire architecture, as that way it isn't possible for
3775 pre-init code to refer to undefined architecture
3777 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3778 else if (gdbarch->initialized_p
3779 && data->post_init != NULL)
3780 /* Post architecture creation: pass the entire architecture
3781 (as all fields are valid), but be careful to also detect
3782 recursive references. */
3784 gdb_assert (data->init_p);
3786 gdbarch->data[data->index] = data->post_init (gdbarch);
3790 /* The architecture initialization hasn't completed - punt -
3791 hope that the caller knows what they are doing. Once
3792 deprecated_set_gdbarch_data has been initialized, this can be
3793 changed to an internal error. */
3795 gdb_assert (gdbarch->data[data->index] != NULL);
3797 return gdbarch->data[data->index];
3802 /* Keep a registry of swapped data required by GDB modules. */
3807 struct gdbarch_swap_registration *source;
3808 struct gdbarch_swap *next;
3811 struct gdbarch_swap_registration
3814 unsigned long sizeof_data;
3815 gdbarch_swap_ftype *init;
3816 struct gdbarch_swap_registration *next;
3819 struct gdbarch_swap_registry
3822 struct gdbarch_swap_registration *registrations;
3825 struct gdbarch_swap_registry gdbarch_swap_registry =
3831 deprecated_register_gdbarch_swap (void *data,
3832 unsigned long sizeof_data,
3833 gdbarch_swap_ftype *init)
3835 struct gdbarch_swap_registration **rego;
3836 for (rego = &gdbarch_swap_registry.registrations;
3838 rego = &(*rego)->next);
3839 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3840 (*rego)->next = NULL;
3841 (*rego)->init = init;
3842 (*rego)->data = data;
3843 (*rego)->sizeof_data = sizeof_data;
3847 current_gdbarch_swap_init_hack (void)
3849 struct gdbarch_swap_registration *rego;
3850 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
3851 for (rego = gdbarch_swap_registry.registrations;
3855 if (rego->data != NULL)
3857 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
3858 struct gdbarch_swap);
3859 (*curr)->source = rego;
3860 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
3862 (*curr)->next = NULL;
3863 curr = &(*curr)->next;
3865 if (rego->init != NULL)
3870 static struct gdbarch *
3871 current_gdbarch_swap_out_hack (void)
3873 struct gdbarch *old_gdbarch = current_gdbarch;
3874 struct gdbarch_swap *curr;
3876 gdb_assert (old_gdbarch != NULL);
3877 for (curr = old_gdbarch->swap;
3881 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3882 memset (curr->source->data, 0, curr->source->sizeof_data);
3884 current_gdbarch = NULL;
3889 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
3891 struct gdbarch_swap *curr;
3893 gdb_assert (current_gdbarch == NULL);
3894 for (curr = new_gdbarch->swap;
3897 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3898 current_gdbarch = new_gdbarch;
3902 /* Keep a registry of the architectures known by GDB. */
3904 struct gdbarch_registration
3906 enum bfd_architecture bfd_architecture;
3907 gdbarch_init_ftype *init;
3908 gdbarch_dump_tdep_ftype *dump_tdep;
3909 struct gdbarch_list *arches;
3910 struct gdbarch_registration *next;
3913 static struct gdbarch_registration *gdbarch_registry = NULL;
3916 append_name (const char ***buf, int *nr, const char *name)
3918 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3924 gdbarch_printable_names (void)
3926 /* Accumulate a list of names based on the registed list of
3928 enum bfd_architecture a;
3930 const char **arches = NULL;
3931 struct gdbarch_registration *rego;
3932 for (rego = gdbarch_registry;
3936 const struct bfd_arch_info *ap;
3937 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3939 internal_error (__FILE__, __LINE__,
3940 _("gdbarch_architecture_names: multi-arch unknown"));
3943 append_name (&arches, &nr_arches, ap->printable_name);
3948 append_name (&arches, &nr_arches, NULL);
3954 gdbarch_register (enum bfd_architecture bfd_architecture,
3955 gdbarch_init_ftype *init,
3956 gdbarch_dump_tdep_ftype *dump_tdep)
3958 struct gdbarch_registration **curr;
3959 const struct bfd_arch_info *bfd_arch_info;
3960 /* Check that BFD recognizes this architecture */
3961 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3962 if (bfd_arch_info == NULL)
3964 internal_error (__FILE__, __LINE__,
3965 _("gdbarch: Attempt to register unknown architecture (%d)"),
3968 /* Check that we haven't seen this architecture before */
3969 for (curr = &gdbarch_registry;
3971 curr = &(*curr)->next)
3973 if (bfd_architecture == (*curr)->bfd_architecture)
3974 internal_error (__FILE__, __LINE__,
3975 _("gdbarch: Duplicate registraration of architecture (%s)"),
3976 bfd_arch_info->printable_name);
3980 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3981 bfd_arch_info->printable_name,
3984 (*curr) = XMALLOC (struct gdbarch_registration);
3985 (*curr)->bfd_architecture = bfd_architecture;
3986 (*curr)->init = init;
3987 (*curr)->dump_tdep = dump_tdep;
3988 (*curr)->arches = NULL;
3989 (*curr)->next = NULL;
3993 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3994 gdbarch_init_ftype *init)
3996 gdbarch_register (bfd_architecture, init, NULL);
4000 /* Look for an architecture using gdbarch_info. */
4002 struct gdbarch_list *
4003 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4004 const struct gdbarch_info *info)
4006 for (; arches != NULL; arches = arches->next)
4008 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4010 if (info->byte_order != arches->gdbarch->byte_order)
4012 if (info->osabi != arches->gdbarch->osabi)
4014 if (info->target_desc != arches->gdbarch->target_desc)
4022 /* Find an architecture that matches the specified INFO. Create a new
4023 architecture if needed. Return that new architecture. Assumes
4024 that there is no current architecture. */
4026 static struct gdbarch *
4027 find_arch_by_info (struct gdbarch_info info)
4029 struct gdbarch *new_gdbarch;
4030 struct gdbarch_registration *rego;
4032 /* The existing architecture has been swapped out - all this code
4033 works from a clean slate. */
4034 gdb_assert (current_gdbarch == NULL);
4036 /* Fill in missing parts of the INFO struct using a number of
4037 sources: "set ..."; INFOabfd supplied; and the global
4039 gdbarch_info_fill (&info);
4041 /* Must have found some sort of architecture. */
4042 gdb_assert (info.bfd_arch_info != NULL);
4046 fprintf_unfiltered (gdb_stdlog,
4047 "find_arch_by_info: info.bfd_arch_info %s\n",
4048 (info.bfd_arch_info != NULL
4049 ? info.bfd_arch_info->printable_name
4051 fprintf_unfiltered (gdb_stdlog,
4052 "find_arch_by_info: info.byte_order %d (%s)\n",
4054 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4055 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4057 fprintf_unfiltered (gdb_stdlog,
4058 "find_arch_by_info: info.osabi %d (%s)\n",
4059 info.osabi, gdbarch_osabi_name (info.osabi));
4060 fprintf_unfiltered (gdb_stdlog,
4061 "find_arch_by_info: info.abfd 0x%lx\n",
4063 fprintf_unfiltered (gdb_stdlog,
4064 "find_arch_by_info: info.tdep_info 0x%lx\n",
4065 (long) info.tdep_info);
4068 /* Find the tdep code that knows about this architecture. */
4069 for (rego = gdbarch_registry;
4072 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4077 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4078 "No matching architecture\n");
4082 /* Ask the tdep code for an architecture that matches "info". */
4083 new_gdbarch = rego->init (info, rego->arches);
4085 /* Did the tdep code like it? No. Reject the change and revert to
4086 the old architecture. */
4087 if (new_gdbarch == NULL)
4090 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4091 "Target rejected architecture\n");
4095 /* Is this a pre-existing architecture (as determined by already
4096 being initialized)? Move it to the front of the architecture
4097 list (keeping the list sorted Most Recently Used). */
4098 if (new_gdbarch->initialized_p)
4100 struct gdbarch_list **list;
4101 struct gdbarch_list *this;
4103 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4104 "Previous architecture 0x%08lx (%s) selected\n",
4106 new_gdbarch->bfd_arch_info->printable_name);
4107 /* Find the existing arch in the list. */
4108 for (list = ®o->arches;
4109 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4110 list = &(*list)->next);
4111 /* It had better be in the list of architectures. */
4112 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4115 (*list) = this->next;
4116 /* Insert THIS at the front. */
4117 this->next = rego->arches;
4118 rego->arches = this;
4123 /* It's a new architecture. */
4125 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4126 "New architecture 0x%08lx (%s) selected\n",
4128 new_gdbarch->bfd_arch_info->printable_name);
4130 /* Insert the new architecture into the front of the architecture
4131 list (keep the list sorted Most Recently Used). */
4133 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4134 this->next = rego->arches;
4135 this->gdbarch = new_gdbarch;
4136 rego->arches = this;
4139 /* Check that the newly installed architecture is valid. Plug in
4140 any post init values. */
4141 new_gdbarch->dump_tdep = rego->dump_tdep;
4142 verify_gdbarch (new_gdbarch);
4143 new_gdbarch->initialized_p = 1;
4145 /* Initialize any per-architecture swap areas. This phase requires
4146 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4147 swap the entire architecture out. */
4148 current_gdbarch = new_gdbarch;
4149 current_gdbarch_swap_init_hack ();
4150 current_gdbarch_swap_out_hack ();
4153 gdbarch_dump (new_gdbarch, gdb_stdlog);
4159 gdbarch_find_by_info (struct gdbarch_info info)
4161 /* Save the previously selected architecture, setting the global to
4162 NULL. This stops things like gdbarch->init() trying to use the
4163 previous architecture's configuration. The previous architecture
4164 may not even be of the same architecture family. The most recent
4165 architecture of the same family is found at the head of the
4166 rego->arches list. */
4167 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4169 /* Find the specified architecture. */
4170 struct gdbarch *new_gdbarch = find_arch_by_info (info);
4172 /* Restore the existing architecture. */
4173 gdb_assert (current_gdbarch == NULL);
4174 current_gdbarch_swap_in_hack (old_gdbarch);
4179 /* Make the specified architecture current, swapping the existing one
4183 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4185 gdb_assert (new_gdbarch != NULL);
4186 gdb_assert (current_gdbarch != NULL);
4187 gdb_assert (new_gdbarch->initialized_p);
4188 current_gdbarch_swap_out_hack ();
4189 current_gdbarch_swap_in_hack (new_gdbarch);
4190 architecture_changed_event ();
4191 reinit_frame_cache ();
4194 extern void _initialize_gdbarch (void);
4197 _initialize_gdbarch (void)
4199 struct cmd_list_element *c;
4201 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4202 Set architecture debugging."), _("\
4203 Show architecture debugging."), _("\
4204 When non-zero, architecture debugging is enabled."),
4207 &setdebuglist, &showdebuglist);