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, 2007
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 3 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, see <http://www.gnu.org/licenses/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
43 #include "floatformat.h"
45 #include "gdb_assert.h"
46 #include "gdb_string.h"
47 #include "reggroups.h"
49 #include "gdb_obstack.h"
53 /* Static function declarations */
55 static void alloc_gdbarch_data (struct gdbarch *);
57 /* Non-zero if we want to trace architecture code. */
60 #define GDBARCH_DEBUG 0
62 int gdbarch_debug = GDBARCH_DEBUG;
64 show_gdbarch_debug (struct ui_file *file, int from_tty,
65 struct cmd_list_element *c, const char *value)
67 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
71 pformat (const struct floatformat **format)
76 /* Just print out one of them - this is only for diagnostics. */
77 return format[0]->name;
81 /* Maintain the struct gdbarch object */
85 /* Has this architecture been fully initialized? */
88 /* An obstack bound to the lifetime of the architecture. */
89 struct obstack *obstack;
91 /* basic architectural information */
92 const struct bfd_arch_info * bfd_arch_info;
94 int byte_order_for_code;
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).
141 const struct floatformat ** float_format;
143 const struct floatformat ** double_format;
145 const struct floatformat ** long_double_format;
149 gdbarch_read_pc_ftype *read_pc;
150 gdbarch_write_pc_ftype *write_pc;
151 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
152 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
153 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
160 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
161 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
162 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
163 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
164 gdbarch_register_name_ftype *register_name;
165 gdbarch_register_type_ftype *register_type;
166 gdbarch_dummy_id_ftype *dummy_id;
167 int deprecated_fp_regnum;
168 gdbarch_push_dummy_call_ftype *push_dummy_call;
169 int call_dummy_location;
170 gdbarch_push_dummy_code_ftype *push_dummy_code;
171 gdbarch_print_registers_info_ftype *print_registers_info;
172 gdbarch_print_float_info_ftype *print_float_info;
173 gdbarch_print_vector_info_ftype *print_vector_info;
174 gdbarch_register_sim_regno_ftype *register_sim_regno;
175 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
176 gdbarch_cannot_store_register_ftype *cannot_store_register;
177 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
178 int believe_pcc_promotion;
179 gdbarch_convert_register_p_ftype *convert_register_p;
180 gdbarch_register_to_value_ftype *register_to_value;
181 gdbarch_value_to_register_ftype *value_to_register;
182 gdbarch_value_from_register_ftype *value_from_register;
183 gdbarch_pointer_to_address_ftype *pointer_to_address;
184 gdbarch_address_to_pointer_ftype *address_to_pointer;
185 gdbarch_integer_to_address_ftype *integer_to_address;
186 gdbarch_return_value_ftype *return_value;
187 gdbarch_skip_prologue_ftype *skip_prologue;
188 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
189 gdbarch_inner_than_ftype *inner_than;
190 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
191 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
192 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
193 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
194 CORE_ADDR decr_pc_after_break;
195 CORE_ADDR deprecated_function_start_offset;
196 gdbarch_remote_register_number_ftype *remote_register_number;
197 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
198 CORE_ADDR frame_args_skip;
199 gdbarch_unwind_pc_ftype *unwind_pc;
200 gdbarch_unwind_sp_ftype *unwind_sp;
201 gdbarch_frame_num_args_ftype *frame_num_args;
202 gdbarch_frame_align_ftype *frame_align;
203 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
204 int frame_red_zone_size;
205 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
206 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
207 gdbarch_smash_text_address_ftype *smash_text_address;
208 gdbarch_software_single_step_ftype *software_single_step;
209 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
210 gdbarch_print_insn_ftype *print_insn;
211 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
212 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
213 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
214 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
215 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
216 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
217 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
218 int cannot_step_breakpoint;
219 int have_nonsteppable_watchpoint;
220 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
221 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
222 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
223 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
224 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
225 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
226 struct core_regset_section * core_regset_sections;
227 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
228 int vtable_function_descriptors;
230 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
231 ULONGEST max_insn_length;
232 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
233 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
234 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
235 gdbarch_displaced_step_location_ftype *displaced_step_location;
236 gdbarch_overlay_update_ftype *overlay_update;
237 gdbarch_core_read_description_ftype *core_read_description;
238 gdbarch_static_transform_name_ftype *static_transform_name;
239 int sofun_address_maybe_missing;
240 gdbarch_target_signal_from_host_ftype *target_signal_from_host;
241 gdbarch_target_signal_to_host_ftype *target_signal_to_host;
242 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
243 gdbarch_record_special_symbol_ftype *record_special_symbol;
244 int has_global_solist;
248 /* The default architecture uses host values (for want of a better
251 extern const struct bfd_arch_info bfd_default_arch_struct;
253 struct gdbarch startup_gdbarch =
255 1, /* Always initialized. */
256 NULL, /* The obstack. */
257 /* basic architecture information */
258 &bfd_default_arch_struct, /* bfd_arch_info */
259 BFD_ENDIAN_BIG, /* byte_order */
260 BFD_ENDIAN_BIG, /* byte_order_for_code */
261 GDB_OSABI_UNKNOWN, /* osabi */
263 /* target specific vector and its dump routine */
265 /*per-architecture data-pointers and swap regions */
267 /* Multi-arch values */
268 1, /* bits_big_endian */
269 8 * sizeof (short), /* short_bit */
270 8 * sizeof (int), /* int_bit */
271 8 * sizeof (long), /* long_bit */
272 8 * sizeof (LONGEST), /* long_long_bit */
273 8 * sizeof (float), /* float_bit */
274 0, /* float_format */
275 8 * sizeof (double), /* double_bit */
276 0, /* double_format */
277 8 * sizeof (long double), /* long_double_bit */
278 0, /* long_double_format */
279 8 * sizeof (void*), /* ptr_bit */
280 8 * sizeof (void*), /* addr_bit */
284 legacy_virtual_frame_pointer, /* virtual_frame_pointer */
285 0, /* pseudo_register_read */
286 0, /* pseudo_register_write */
288 0, /* num_pseudo_regs */
293 no_op_reg_to_regnum, /* stab_reg_to_regnum */
294 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
295 no_op_reg_to_regnum, /* sdb_reg_to_regnum */
296 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
297 0, /* register_name */
298 0, /* register_type */
300 -1, /* deprecated_fp_regnum */
301 0, /* push_dummy_call */
302 0, /* call_dummy_location */
303 0, /* push_dummy_code */
304 default_print_registers_info, /* print_registers_info */
305 0, /* print_float_info */
306 0, /* print_vector_info */
307 legacy_register_sim_regno, /* register_sim_regno */
308 cannot_register_not, /* cannot_fetch_register */
309 cannot_register_not, /* cannot_store_register */
310 0, /* get_longjmp_target */
311 0, /* believe_pcc_promotion */
312 generic_convert_register_p, /* convert_register_p */
313 0, /* register_to_value */
314 0, /* value_to_register */
315 0, /* value_from_register */
316 0, /* pointer_to_address */
317 0, /* address_to_pointer */
318 0, /* integer_to_address */
319 0, /* return_value */
320 0, /* skip_prologue */
321 0, /* skip_main_prologue */
323 0, /* breakpoint_from_pc */
324 0, /* adjust_breakpoint_address */
325 default_memory_insert_breakpoint, /* memory_insert_breakpoint */
326 default_memory_remove_breakpoint, /* memory_remove_breakpoint */
327 0, /* decr_pc_after_break */
328 0, /* deprecated_function_start_offset */
329 default_remote_register_number, /* remote_register_number */
330 0, /* fetch_tls_load_module_address */
331 0, /* frame_args_skip */
334 0, /* frame_num_args */
336 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
337 0, /* frame_red_zone_size */
338 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
339 core_addr_identity, /* addr_bits_remove */
340 core_addr_identity, /* smash_text_address */
341 0, /* software_single_step */
342 0, /* single_step_through_delay */
344 0, /* skip_trampoline_code */
345 generic_skip_solib_resolver, /* skip_solib_resolver */
346 0, /* in_solib_return_trampoline */
347 generic_in_function_epilogue_p, /* in_function_epilogue_p */
348 construct_inferior_arguments, /* construct_inferior_arguments */
349 0, /* elf_make_msymbol_special */
350 0, /* coff_make_msymbol_special */
351 0, /* cannot_step_breakpoint */
352 0, /* have_nonsteppable_watchpoint */
353 0, /* address_class_type_flags */
354 0, /* address_class_type_flags_to_name */
355 0, /* address_class_name_to_type_flags */
356 default_register_reggroup_p, /* register_reggroup_p */
357 0, /* fetch_pointer_argument */
358 0, /* regset_from_core_section */
359 0, /* core_regset_sections */
360 0, /* core_xfer_shared_libraries */
361 0, /* vtable_function_descriptors */
362 0, /* vbit_in_delta */
363 0, /* skip_permanent_breakpoint */
364 0, /* max_insn_length */
365 0, /* displaced_step_copy_insn */
366 0, /* displaced_step_fixup */
367 NULL, /* displaced_step_free_closure */
368 NULL, /* displaced_step_location */
369 0, /* overlay_update */
370 0, /* core_read_description */
371 0, /* static_transform_name */
372 0, /* sofun_address_maybe_missing */
373 default_target_signal_from_host, /* target_signal_from_host */
374 default_target_signal_to_host, /* target_signal_to_host */
375 0, /* get_siginfo_type */
376 0, /* record_special_symbol */
377 0, /* has_global_solist */
378 /* startup_gdbarch() */
381 struct gdbarch *current_gdbarch = &startup_gdbarch;
382 struct gdbarch *target_gdbarch = &startup_gdbarch;
384 /* Create a new ``struct gdbarch'' based on information provided by
385 ``struct gdbarch_info''. */
388 gdbarch_alloc (const struct gdbarch_info *info,
389 struct gdbarch_tdep *tdep)
391 struct gdbarch *gdbarch;
393 /* Create an obstack for allocating all the per-architecture memory,
394 then use that to allocate the architecture vector. */
395 struct obstack *obstack = XMALLOC (struct obstack);
396 obstack_init (obstack);
397 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
398 memset (gdbarch, 0, sizeof (*gdbarch));
399 gdbarch->obstack = obstack;
401 alloc_gdbarch_data (gdbarch);
403 gdbarch->tdep = tdep;
405 gdbarch->bfd_arch_info = info->bfd_arch_info;
406 gdbarch->byte_order = info->byte_order;
407 gdbarch->byte_order_for_code = info->byte_order_for_code;
408 gdbarch->osabi = info->osabi;
409 gdbarch->target_desc = info->target_desc;
411 /* Force the explicit initialization of these. */
412 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
413 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
414 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
415 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
416 gdbarch->long_long_bit = 2*gdbarch->long_bit;
417 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
418 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
419 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
420 gdbarch->ptr_bit = gdbarch->int_bit;
421 gdbarch->char_signed = -1;
422 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
423 gdbarch->num_regs = -1;
424 gdbarch->sp_regnum = -1;
425 gdbarch->pc_regnum = -1;
426 gdbarch->ps_regnum = -1;
427 gdbarch->fp0_regnum = -1;
428 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
429 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
430 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
431 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
432 gdbarch->deprecated_fp_regnum = -1;
433 gdbarch->call_dummy_location = AT_ENTRY_POINT;
434 gdbarch->print_registers_info = default_print_registers_info;
435 gdbarch->register_sim_regno = legacy_register_sim_regno;
436 gdbarch->cannot_fetch_register = cannot_register_not;
437 gdbarch->cannot_store_register = cannot_register_not;
438 gdbarch->convert_register_p = generic_convert_register_p;
439 gdbarch->value_from_register = default_value_from_register;
440 gdbarch->pointer_to_address = unsigned_pointer_to_address;
441 gdbarch->address_to_pointer = unsigned_address_to_pointer;
442 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
443 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
444 gdbarch->remote_register_number = default_remote_register_number;
445 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
446 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
447 gdbarch->addr_bits_remove = core_addr_identity;
448 gdbarch->smash_text_address = core_addr_identity;
449 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
450 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
451 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
452 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
453 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
454 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
455 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
456 gdbarch->register_reggroup_p = default_register_reggroup_p;
457 gdbarch->displaced_step_fixup = NULL;
458 gdbarch->displaced_step_free_closure = NULL;
459 gdbarch->displaced_step_location = NULL;
460 gdbarch->target_signal_from_host = default_target_signal_from_host;
461 gdbarch->target_signal_to_host = default_target_signal_to_host;
462 /* gdbarch_alloc() */
468 /* Allocate extra space using the per-architecture obstack. */
471 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
473 void *data = obstack_alloc (arch->obstack, size);
474 memset (data, 0, size);
479 /* Free a gdbarch struct. This should never happen in normal
480 operation --- once you've created a gdbarch, you keep it around.
481 However, if an architecture's init function encounters an error
482 building the structure, it may need to clean up a partially
483 constructed gdbarch. */
486 gdbarch_free (struct gdbarch *arch)
488 struct obstack *obstack;
489 gdb_assert (arch != NULL);
490 gdb_assert (!arch->initialized_p);
491 obstack = arch->obstack;
492 obstack_free (obstack, 0); /* Includes the ARCH. */
497 /* Ensure that all values in a GDBARCH are reasonable. */
500 verify_gdbarch (struct gdbarch *gdbarch)
503 struct cleanup *cleanups;
506 log = mem_fileopen ();
507 cleanups = make_cleanup_ui_file_delete (log);
509 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
510 fprintf_unfiltered (log, "\n\tbyte-order");
511 if (gdbarch->bfd_arch_info == NULL)
512 fprintf_unfiltered (log, "\n\tbfd_arch_info");
513 /* Check those that need to be defined for the given multi-arch level. */
514 /* Skip verify of bits_big_endian, invalid_p == 0 */
515 /* Skip verify of short_bit, invalid_p == 0 */
516 /* Skip verify of int_bit, invalid_p == 0 */
517 /* Skip verify of long_bit, invalid_p == 0 */
518 /* Skip verify of long_long_bit, invalid_p == 0 */
519 /* Skip verify of float_bit, invalid_p == 0 */
520 if (gdbarch->float_format == 0)
521 gdbarch->float_format = floatformats_ieee_single;
522 /* Skip verify of double_bit, invalid_p == 0 */
523 if (gdbarch->double_format == 0)
524 gdbarch->double_format = floatformats_ieee_double;
525 /* Skip verify of long_double_bit, invalid_p == 0 */
526 if (gdbarch->long_double_format == 0)
527 gdbarch->long_double_format = floatformats_ieee_double;
528 /* Skip verify of ptr_bit, invalid_p == 0 */
529 if (gdbarch->addr_bit == 0)
530 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
531 if (gdbarch->char_signed == -1)
532 gdbarch->char_signed = 1;
533 /* Skip verify of read_pc, has predicate */
534 /* Skip verify of write_pc, has predicate */
535 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
536 /* Skip verify of pseudo_register_read, has predicate */
537 /* Skip verify of pseudo_register_write, has predicate */
538 if (gdbarch->num_regs == -1)
539 fprintf_unfiltered (log, "\n\tnum_regs");
540 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
541 /* Skip verify of sp_regnum, invalid_p == 0 */
542 /* Skip verify of pc_regnum, invalid_p == 0 */
543 /* Skip verify of ps_regnum, invalid_p == 0 */
544 /* Skip verify of fp0_regnum, invalid_p == 0 */
545 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
546 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
547 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
548 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
549 if (gdbarch->register_name == 0)
550 fprintf_unfiltered (log, "\n\tregister_name");
551 /* Skip verify of register_type, has predicate */
552 /* Skip verify of dummy_id, has predicate */
553 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
554 /* Skip verify of push_dummy_call, has predicate */
555 /* Skip verify of call_dummy_location, invalid_p == 0 */
556 /* Skip verify of push_dummy_code, has predicate */
557 /* Skip verify of print_registers_info, invalid_p == 0 */
558 /* Skip verify of print_float_info, has predicate */
559 /* Skip verify of print_vector_info, has predicate */
560 /* Skip verify of register_sim_regno, invalid_p == 0 */
561 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
562 /* Skip verify of cannot_store_register, invalid_p == 0 */
563 /* Skip verify of get_longjmp_target, has predicate */
564 /* Skip verify of convert_register_p, invalid_p == 0 */
565 /* Skip verify of value_from_register, invalid_p == 0 */
566 /* Skip verify of pointer_to_address, invalid_p == 0 */
567 /* Skip verify of address_to_pointer, invalid_p == 0 */
568 /* Skip verify of integer_to_address, has predicate */
569 /* Skip verify of return_value, has predicate */
570 if (gdbarch->skip_prologue == 0)
571 fprintf_unfiltered (log, "\n\tskip_prologue");
572 /* Skip verify of skip_main_prologue, has predicate */
573 if (gdbarch->inner_than == 0)
574 fprintf_unfiltered (log, "\n\tinner_than");
575 if (gdbarch->breakpoint_from_pc == 0)
576 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
577 /* Skip verify of adjust_breakpoint_address, has predicate */
578 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
579 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
580 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
581 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
582 /* Skip verify of remote_register_number, invalid_p == 0 */
583 /* Skip verify of fetch_tls_load_module_address, has predicate */
584 /* Skip verify of frame_args_skip, invalid_p == 0 */
585 /* Skip verify of unwind_pc, has predicate */
586 /* Skip verify of unwind_sp, has predicate */
587 /* Skip verify of frame_num_args, has predicate */
588 /* Skip verify of frame_align, has predicate */
589 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
590 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
591 /* Skip verify of addr_bits_remove, invalid_p == 0 */
592 /* Skip verify of smash_text_address, invalid_p == 0 */
593 /* Skip verify of software_single_step, has predicate */
594 /* Skip verify of single_step_through_delay, has predicate */
595 if (gdbarch->print_insn == 0)
596 fprintf_unfiltered (log, "\n\tprint_insn");
597 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
598 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
599 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
600 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
601 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
602 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
603 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
604 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
605 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
606 /* Skip verify of address_class_type_flags, has predicate */
607 /* Skip verify of address_class_type_flags_to_name, has predicate */
608 /* Skip verify of address_class_name_to_type_flags, has predicate */
609 /* Skip verify of register_reggroup_p, invalid_p == 0 */
610 /* Skip verify of fetch_pointer_argument, has predicate */
611 /* Skip verify of regset_from_core_section, has predicate */
612 /* Skip verify of core_xfer_shared_libraries, has predicate */
613 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
614 /* Skip verify of vbit_in_delta, invalid_p == 0 */
615 /* Skip verify of skip_permanent_breakpoint, has predicate */
616 /* Skip verify of max_insn_length, has predicate */
617 /* Skip verify of displaced_step_copy_insn, has predicate */
618 /* Skip verify of displaced_step_fixup, has predicate */
619 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
620 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
621 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
622 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
623 /* Skip verify of overlay_update, has predicate */
624 /* Skip verify of core_read_description, has predicate */
625 /* Skip verify of static_transform_name, has predicate */
626 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
627 /* Skip verify of target_signal_from_host, invalid_p == 0 */
628 /* Skip verify of target_signal_to_host, invalid_p == 0 */
629 /* Skip verify of get_siginfo_type, has predicate */
630 /* Skip verify of record_special_symbol, has predicate */
631 /* Skip verify of has_global_solist, invalid_p == 0 */
632 buf = ui_file_xstrdup (log, &dummy);
633 make_cleanup (xfree, buf);
634 if (strlen (buf) > 0)
635 internal_error (__FILE__, __LINE__,
636 _("verify_gdbarch: the following are invalid ...%s"),
638 do_cleanups (cleanups);
642 /* Print out the details of the current architecture. */
645 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
647 const char *gdb_nm_file = "<not-defined>";
648 #if defined (GDB_NM_FILE)
649 gdb_nm_file = GDB_NM_FILE;
651 fprintf_unfiltered (file,
652 "gdbarch_dump: GDB_NM_FILE = %s\n",
654 fprintf_unfiltered (file,
655 "gdbarch_dump: addr_bit = %s\n",
656 plongest (gdbarch->addr_bit));
657 fprintf_unfiltered (file,
658 "gdbarch_dump: addr_bits_remove = <%s>\n",
659 host_address_to_string (gdbarch->addr_bits_remove));
660 fprintf_unfiltered (file,
661 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
662 gdbarch_address_class_name_to_type_flags_p (gdbarch));
663 fprintf_unfiltered (file,
664 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
665 host_address_to_string (gdbarch->address_class_name_to_type_flags));
666 fprintf_unfiltered (file,
667 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
668 gdbarch_address_class_type_flags_p (gdbarch));
669 fprintf_unfiltered (file,
670 "gdbarch_dump: address_class_type_flags = <%s>\n",
671 host_address_to_string (gdbarch->address_class_type_flags));
672 fprintf_unfiltered (file,
673 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
674 gdbarch_address_class_type_flags_to_name_p (gdbarch));
675 fprintf_unfiltered (file,
676 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
677 host_address_to_string (gdbarch->address_class_type_flags_to_name));
678 fprintf_unfiltered (file,
679 "gdbarch_dump: address_to_pointer = <%s>\n",
680 host_address_to_string (gdbarch->address_to_pointer));
681 fprintf_unfiltered (file,
682 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
683 gdbarch_adjust_breakpoint_address_p (gdbarch));
684 fprintf_unfiltered (file,
685 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
686 host_address_to_string (gdbarch->adjust_breakpoint_address));
687 fprintf_unfiltered (file,
688 "gdbarch_dump: believe_pcc_promotion = %s\n",
689 plongest (gdbarch->believe_pcc_promotion));
690 fprintf_unfiltered (file,
691 "gdbarch_dump: bfd_arch_info = %s\n",
692 gdbarch_bfd_arch_info (gdbarch)->printable_name);
693 fprintf_unfiltered (file,
694 "gdbarch_dump: bits_big_endian = %s\n",
695 plongest (gdbarch->bits_big_endian));
696 fprintf_unfiltered (file,
697 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
698 host_address_to_string (gdbarch->breakpoint_from_pc));
699 fprintf_unfiltered (file,
700 "gdbarch_dump: byte_order = %s\n",
701 plongest (gdbarch->byte_order));
702 fprintf_unfiltered (file,
703 "gdbarch_dump: byte_order_for_code = %s\n",
704 plongest (gdbarch->byte_order_for_code));
705 fprintf_unfiltered (file,
706 "gdbarch_dump: call_dummy_location = %s\n",
707 plongest (gdbarch->call_dummy_location));
708 fprintf_unfiltered (file,
709 "gdbarch_dump: cannot_fetch_register = <%s>\n",
710 host_address_to_string (gdbarch->cannot_fetch_register));
711 fprintf_unfiltered (file,
712 "gdbarch_dump: cannot_step_breakpoint = %s\n",
713 plongest (gdbarch->cannot_step_breakpoint));
714 fprintf_unfiltered (file,
715 "gdbarch_dump: cannot_store_register = <%s>\n",
716 host_address_to_string (gdbarch->cannot_store_register));
717 fprintf_unfiltered (file,
718 "gdbarch_dump: char_signed = %s\n",
719 plongest (gdbarch->char_signed));
720 fprintf_unfiltered (file,
721 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
722 host_address_to_string (gdbarch->coff_make_msymbol_special));
723 fprintf_unfiltered (file,
724 "gdbarch_dump: construct_inferior_arguments = <%s>\n",
725 host_address_to_string (gdbarch->construct_inferior_arguments));
726 fprintf_unfiltered (file,
727 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
728 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
729 fprintf_unfiltered (file,
730 "gdbarch_dump: convert_register_p = <%s>\n",
731 host_address_to_string (gdbarch->convert_register_p));
732 fprintf_unfiltered (file,
733 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
734 gdbarch_core_read_description_p (gdbarch));
735 fprintf_unfiltered (file,
736 "gdbarch_dump: core_read_description = <%s>\n",
737 host_address_to_string (gdbarch->core_read_description));
738 fprintf_unfiltered (file,
739 "gdbarch_dump: core_regset_sections = %s\n",
740 host_address_to_string (gdbarch->core_regset_sections));
741 fprintf_unfiltered (file,
742 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
743 gdbarch_core_xfer_shared_libraries_p (gdbarch));
744 fprintf_unfiltered (file,
745 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
746 host_address_to_string (gdbarch->core_xfer_shared_libraries));
747 fprintf_unfiltered (file,
748 "gdbarch_dump: decr_pc_after_break = %s\n",
749 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
750 fprintf_unfiltered (file,
751 "gdbarch_dump: deprecated_fp_regnum = %s\n",
752 plongest (gdbarch->deprecated_fp_regnum));
753 fprintf_unfiltered (file,
754 "gdbarch_dump: deprecated_function_start_offset = %s\n",
755 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
756 fprintf_unfiltered (file,
757 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
758 gdbarch_displaced_step_copy_insn_p (gdbarch));
759 fprintf_unfiltered (file,
760 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
761 host_address_to_string (gdbarch->displaced_step_copy_insn));
762 fprintf_unfiltered (file,
763 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
764 gdbarch_displaced_step_fixup_p (gdbarch));
765 fprintf_unfiltered (file,
766 "gdbarch_dump: displaced_step_fixup = <%s>\n",
767 host_address_to_string (gdbarch->displaced_step_fixup));
768 fprintf_unfiltered (file,
769 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
770 host_address_to_string (gdbarch->displaced_step_free_closure));
771 fprintf_unfiltered (file,
772 "gdbarch_dump: displaced_step_location = <%s>\n",
773 host_address_to_string (gdbarch->displaced_step_location));
774 fprintf_unfiltered (file,
775 "gdbarch_dump: double_bit = %s\n",
776 plongest (gdbarch->double_bit));
777 fprintf_unfiltered (file,
778 "gdbarch_dump: double_format = %s\n",
779 pformat (gdbarch->double_format));
780 fprintf_unfiltered (file,
781 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
782 gdbarch_dummy_id_p (gdbarch));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: dummy_id = <%s>\n",
785 host_address_to_string (gdbarch->dummy_id));
786 fprintf_unfiltered (file,
787 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
788 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
789 fprintf_unfiltered (file,
790 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
791 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
792 fprintf_unfiltered (file,
793 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
794 host_address_to_string (gdbarch->elf_make_msymbol_special));
795 fprintf_unfiltered (file,
796 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
797 gdbarch_fetch_pointer_argument_p (gdbarch));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
800 host_address_to_string (gdbarch->fetch_pointer_argument));
801 fprintf_unfiltered (file,
802 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
803 gdbarch_fetch_tls_load_module_address_p (gdbarch));
804 fprintf_unfiltered (file,
805 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
806 host_address_to_string (gdbarch->fetch_tls_load_module_address));
807 fprintf_unfiltered (file,
808 "gdbarch_dump: float_bit = %s\n",
809 plongest (gdbarch->float_bit));
810 fprintf_unfiltered (file,
811 "gdbarch_dump: float_format = %s\n",
812 pformat (gdbarch->float_format));
813 fprintf_unfiltered (file,
814 "gdbarch_dump: fp0_regnum = %s\n",
815 plongest (gdbarch->fp0_regnum));
816 fprintf_unfiltered (file,
817 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
818 gdbarch_frame_align_p (gdbarch));
819 fprintf_unfiltered (file,
820 "gdbarch_dump: frame_align = <%s>\n",
821 host_address_to_string (gdbarch->frame_align));
822 fprintf_unfiltered (file,
823 "gdbarch_dump: frame_args_skip = %s\n",
824 core_addr_to_string_nz (gdbarch->frame_args_skip));
825 fprintf_unfiltered (file,
826 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
827 gdbarch_frame_num_args_p (gdbarch));
828 fprintf_unfiltered (file,
829 "gdbarch_dump: frame_num_args = <%s>\n",
830 host_address_to_string (gdbarch->frame_num_args));
831 fprintf_unfiltered (file,
832 "gdbarch_dump: frame_red_zone_size = %s\n",
833 plongest (gdbarch->frame_red_zone_size));
834 fprintf_unfiltered (file,
835 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
836 gdbarch_get_longjmp_target_p (gdbarch));
837 fprintf_unfiltered (file,
838 "gdbarch_dump: get_longjmp_target = <%s>\n",
839 host_address_to_string (gdbarch->get_longjmp_target));
840 fprintf_unfiltered (file,
841 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
842 gdbarch_get_siginfo_type_p (gdbarch));
843 fprintf_unfiltered (file,
844 "gdbarch_dump: get_siginfo_type = <0x%lx>\n",
845 (long) gdbarch->get_siginfo_type);
846 fprintf_unfiltered (file,
847 "gdbarch_dump: has_global_solist = %s\n",
848 plongest (gdbarch->has_global_solist));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
851 plongest (gdbarch->have_nonsteppable_watchpoint));
852 fprintf_unfiltered (file,
853 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
854 host_address_to_string (gdbarch->in_function_epilogue_p));
855 fprintf_unfiltered (file,
856 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
857 host_address_to_string (gdbarch->in_solib_return_trampoline));
858 fprintf_unfiltered (file,
859 "gdbarch_dump: inner_than = <%s>\n",
860 host_address_to_string (gdbarch->inner_than));
861 fprintf_unfiltered (file,
862 "gdbarch_dump: int_bit = %s\n",
863 plongest (gdbarch->int_bit));
864 fprintf_unfiltered (file,
865 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
866 gdbarch_integer_to_address_p (gdbarch));
867 fprintf_unfiltered (file,
868 "gdbarch_dump: integer_to_address = <%s>\n",
869 host_address_to_string (gdbarch->integer_to_address));
870 fprintf_unfiltered (file,
871 "gdbarch_dump: long_bit = %s\n",
872 plongest (gdbarch->long_bit));
873 fprintf_unfiltered (file,
874 "gdbarch_dump: long_double_bit = %s\n",
875 plongest (gdbarch->long_double_bit));
876 fprintf_unfiltered (file,
877 "gdbarch_dump: long_double_format = %s\n",
878 pformat (gdbarch->long_double_format));
879 fprintf_unfiltered (file,
880 "gdbarch_dump: long_long_bit = %s\n",
881 plongest (gdbarch->long_long_bit));
882 fprintf_unfiltered (file,
883 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
884 gdbarch_max_insn_length_p (gdbarch));
885 fprintf_unfiltered (file,
886 "gdbarch_dump: max_insn_length = %s\n",
887 plongest (gdbarch->max_insn_length));
888 fprintf_unfiltered (file,
889 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
890 host_address_to_string (gdbarch->memory_insert_breakpoint));
891 fprintf_unfiltered (file,
892 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
893 host_address_to_string (gdbarch->memory_remove_breakpoint));
894 fprintf_unfiltered (file,
895 "gdbarch_dump: num_pseudo_regs = %s\n",
896 plongest (gdbarch->num_pseudo_regs));
897 fprintf_unfiltered (file,
898 "gdbarch_dump: num_regs = %s\n",
899 plongest (gdbarch->num_regs));
900 fprintf_unfiltered (file,
901 "gdbarch_dump: osabi = %s\n",
902 plongest (gdbarch->osabi));
903 fprintf_unfiltered (file,
904 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
905 gdbarch_overlay_update_p (gdbarch));
906 fprintf_unfiltered (file,
907 "gdbarch_dump: overlay_update = <%s>\n",
908 host_address_to_string (gdbarch->overlay_update));
909 fprintf_unfiltered (file,
910 "gdbarch_dump: pc_regnum = %s\n",
911 plongest (gdbarch->pc_regnum));
912 fprintf_unfiltered (file,
913 "gdbarch_dump: pointer_to_address = <%s>\n",
914 host_address_to_string (gdbarch->pointer_to_address));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
917 gdbarch_print_float_info_p (gdbarch));
918 fprintf_unfiltered (file,
919 "gdbarch_dump: print_float_info = <%s>\n",
920 host_address_to_string (gdbarch->print_float_info));
921 fprintf_unfiltered (file,
922 "gdbarch_dump: print_insn = <%s>\n",
923 host_address_to_string (gdbarch->print_insn));
924 fprintf_unfiltered (file,
925 "gdbarch_dump: print_registers_info = <%s>\n",
926 host_address_to_string (gdbarch->print_registers_info));
927 fprintf_unfiltered (file,
928 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
929 gdbarch_print_vector_info_p (gdbarch));
930 fprintf_unfiltered (file,
931 "gdbarch_dump: print_vector_info = <%s>\n",
932 host_address_to_string (gdbarch->print_vector_info));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: ps_regnum = %s\n",
935 plongest (gdbarch->ps_regnum));
936 fprintf_unfiltered (file,
937 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
938 gdbarch_pseudo_register_read_p (gdbarch));
939 fprintf_unfiltered (file,
940 "gdbarch_dump: pseudo_register_read = <%s>\n",
941 host_address_to_string (gdbarch->pseudo_register_read));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
944 gdbarch_pseudo_register_write_p (gdbarch));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: pseudo_register_write = <%s>\n",
947 host_address_to_string (gdbarch->pseudo_register_write));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: ptr_bit = %s\n",
950 plongest (gdbarch->ptr_bit));
951 fprintf_unfiltered (file,
952 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
953 gdbarch_push_dummy_call_p (gdbarch));
954 fprintf_unfiltered (file,
955 "gdbarch_dump: push_dummy_call = <%s>\n",
956 host_address_to_string (gdbarch->push_dummy_call));
957 fprintf_unfiltered (file,
958 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
959 gdbarch_push_dummy_code_p (gdbarch));
960 fprintf_unfiltered (file,
961 "gdbarch_dump: push_dummy_code = <%s>\n",
962 host_address_to_string (gdbarch->push_dummy_code));
963 fprintf_unfiltered (file,
964 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
965 gdbarch_read_pc_p (gdbarch));
966 fprintf_unfiltered (file,
967 "gdbarch_dump: read_pc = <%s>\n",
968 host_address_to_string (gdbarch->read_pc));
969 fprintf_unfiltered (file,
970 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
971 gdbarch_record_special_symbol_p (gdbarch));
972 fprintf_unfiltered (file,
973 "gdbarch_dump: record_special_symbol = <%s>\n",
974 host_address_to_string (gdbarch->record_special_symbol));
975 fprintf_unfiltered (file,
976 "gdbarch_dump: register_name = <%s>\n",
977 host_address_to_string (gdbarch->register_name));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: register_reggroup_p = <%s>\n",
980 host_address_to_string (gdbarch->register_reggroup_p));
981 fprintf_unfiltered (file,
982 "gdbarch_dump: register_sim_regno = <%s>\n",
983 host_address_to_string (gdbarch->register_sim_regno));
984 fprintf_unfiltered (file,
985 "gdbarch_dump: register_to_value = <%s>\n",
986 host_address_to_string (gdbarch->register_to_value));
987 fprintf_unfiltered (file,
988 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
989 gdbarch_register_type_p (gdbarch));
990 fprintf_unfiltered (file,
991 "gdbarch_dump: register_type = <%s>\n",
992 host_address_to_string (gdbarch->register_type));
993 fprintf_unfiltered (file,
994 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
995 gdbarch_regset_from_core_section_p (gdbarch));
996 fprintf_unfiltered (file,
997 "gdbarch_dump: regset_from_core_section = <%s>\n",
998 host_address_to_string (gdbarch->regset_from_core_section));
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: remote_register_number = <%s>\n",
1001 host_address_to_string (gdbarch->remote_register_number));
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1004 gdbarch_return_value_p (gdbarch));
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: return_value = <%s>\n",
1007 host_address_to_string (gdbarch->return_value));
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1010 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: short_bit = %s\n",
1013 plongest (gdbarch->short_bit));
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1016 gdbarch_single_step_through_delay_p (gdbarch));
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: single_step_through_delay = <%s>\n",
1019 host_address_to_string (gdbarch->single_step_through_delay));
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1022 gdbarch_skip_main_prologue_p (gdbarch));
1023 fprintf_unfiltered (file,
1024 "gdbarch_dump: skip_main_prologue = <%s>\n",
1025 host_address_to_string (gdbarch->skip_main_prologue));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1028 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1031 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: skip_prologue = <%s>\n",
1034 host_address_to_string (gdbarch->skip_prologue));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1037 host_address_to_string (gdbarch->skip_solib_resolver));
1038 fprintf_unfiltered (file,
1039 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1040 host_address_to_string (gdbarch->skip_trampoline_code));
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: smash_text_address = <%s>\n",
1043 host_address_to_string (gdbarch->smash_text_address));
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1046 gdbarch_software_single_step_p (gdbarch));
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: software_single_step = <%s>\n",
1049 host_address_to_string (gdbarch->software_single_step));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1052 plongest (gdbarch->sofun_address_maybe_missing));
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: sp_regnum = %s\n",
1055 plongest (gdbarch->sp_regnum));
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1058 host_address_to_string (gdbarch->stab_reg_to_regnum));
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1061 host_address_to_string (gdbarch->stabs_argument_has_addr));
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1064 gdbarch_static_transform_name_p (gdbarch));
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: static_transform_name = <%s>\n",
1067 host_address_to_string (gdbarch->static_transform_name));
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: target_desc = %s\n",
1070 host_address_to_string (gdbarch->target_desc));
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: target_signal_from_host = <%s>\n",
1073 host_address_to_string (gdbarch->target_signal_from_host));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: target_signal_to_host = <%s>\n",
1076 host_address_to_string (gdbarch->target_signal_to_host));
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1079 gdbarch_unwind_pc_p (gdbarch));
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: unwind_pc = <%s>\n",
1082 host_address_to_string (gdbarch->unwind_pc));
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1085 gdbarch_unwind_sp_p (gdbarch));
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: unwind_sp = <%s>\n",
1088 host_address_to_string (gdbarch->unwind_sp));
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: value_from_register = <%s>\n",
1091 host_address_to_string (gdbarch->value_from_register));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: value_to_register = <%s>\n",
1094 host_address_to_string (gdbarch->value_to_register));
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: vbit_in_delta = %s\n",
1097 plongest (gdbarch->vbit_in_delta));
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1100 host_address_to_string (gdbarch->virtual_frame_pointer));
1101 fprintf_unfiltered (file,
1102 "gdbarch_dump: vtable_function_descriptors = %s\n",
1103 plongest (gdbarch->vtable_function_descriptors));
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1106 gdbarch_write_pc_p (gdbarch));
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: write_pc = <%s>\n",
1109 host_address_to_string (gdbarch->write_pc));
1110 if (gdbarch->dump_tdep != NULL)
1111 gdbarch->dump_tdep (gdbarch, file);
1114 struct gdbarch_tdep *
1115 gdbarch_tdep (struct gdbarch *gdbarch)
1117 if (gdbarch_debug >= 2)
1118 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1119 return gdbarch->tdep;
1123 const struct bfd_arch_info *
1124 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1126 gdb_assert (gdbarch != NULL);
1127 if (gdbarch_debug >= 2)
1128 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1129 return gdbarch->bfd_arch_info;
1133 gdbarch_byte_order (struct gdbarch *gdbarch)
1135 gdb_assert (gdbarch != NULL);
1136 if (gdbarch_debug >= 2)
1137 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1138 return gdbarch->byte_order;
1142 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1144 gdb_assert (gdbarch != NULL);
1145 if (gdbarch_debug >= 2)
1146 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1147 return gdbarch->byte_order_for_code;
1151 gdbarch_osabi (struct gdbarch *gdbarch)
1153 gdb_assert (gdbarch != NULL);
1154 if (gdbarch_debug >= 2)
1155 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1156 return gdbarch->osabi;
1159 const struct target_desc *
1160 gdbarch_target_desc (struct gdbarch *gdbarch)
1162 gdb_assert (gdbarch != NULL);
1163 if (gdbarch_debug >= 2)
1164 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1165 return gdbarch->target_desc;
1169 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1171 gdb_assert (gdbarch != NULL);
1172 /* Skip verify of bits_big_endian, invalid_p == 0 */
1173 if (gdbarch_debug >= 2)
1174 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1175 return gdbarch->bits_big_endian;
1179 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1180 int bits_big_endian)
1182 gdbarch->bits_big_endian = bits_big_endian;
1186 gdbarch_short_bit (struct gdbarch *gdbarch)
1188 gdb_assert (gdbarch != NULL);
1189 /* Skip verify of short_bit, invalid_p == 0 */
1190 if (gdbarch_debug >= 2)
1191 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1192 return gdbarch->short_bit;
1196 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1199 gdbarch->short_bit = short_bit;
1203 gdbarch_int_bit (struct gdbarch *gdbarch)
1205 gdb_assert (gdbarch != NULL);
1206 /* Skip verify of int_bit, invalid_p == 0 */
1207 if (gdbarch_debug >= 2)
1208 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1209 return gdbarch->int_bit;
1213 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1216 gdbarch->int_bit = int_bit;
1220 gdbarch_long_bit (struct gdbarch *gdbarch)
1222 gdb_assert (gdbarch != NULL);
1223 /* Skip verify of long_bit, invalid_p == 0 */
1224 if (gdbarch_debug >= 2)
1225 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1226 return gdbarch->long_bit;
1230 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1233 gdbarch->long_bit = long_bit;
1237 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1239 gdb_assert (gdbarch != NULL);
1240 /* Skip verify of long_long_bit, invalid_p == 0 */
1241 if (gdbarch_debug >= 2)
1242 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1243 return gdbarch->long_long_bit;
1247 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1250 gdbarch->long_long_bit = long_long_bit;
1254 gdbarch_float_bit (struct gdbarch *gdbarch)
1256 gdb_assert (gdbarch != NULL);
1257 /* Skip verify of float_bit, invalid_p == 0 */
1258 if (gdbarch_debug >= 2)
1259 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1260 return gdbarch->float_bit;
1264 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1267 gdbarch->float_bit = float_bit;
1270 const struct floatformat **
1271 gdbarch_float_format (struct gdbarch *gdbarch)
1273 gdb_assert (gdbarch != NULL);
1274 if (gdbarch_debug >= 2)
1275 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1276 return gdbarch->float_format;
1280 set_gdbarch_float_format (struct gdbarch *gdbarch,
1281 const struct floatformat ** float_format)
1283 gdbarch->float_format = float_format;
1287 gdbarch_double_bit (struct gdbarch *gdbarch)
1289 gdb_assert (gdbarch != NULL);
1290 /* Skip verify of double_bit, invalid_p == 0 */
1291 if (gdbarch_debug >= 2)
1292 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1293 return gdbarch->double_bit;
1297 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1300 gdbarch->double_bit = double_bit;
1303 const struct floatformat **
1304 gdbarch_double_format (struct gdbarch *gdbarch)
1306 gdb_assert (gdbarch != NULL);
1307 if (gdbarch_debug >= 2)
1308 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1309 return gdbarch->double_format;
1313 set_gdbarch_double_format (struct gdbarch *gdbarch,
1314 const struct floatformat ** double_format)
1316 gdbarch->double_format = double_format;
1320 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1322 gdb_assert (gdbarch != NULL);
1323 /* Skip verify of long_double_bit, invalid_p == 0 */
1324 if (gdbarch_debug >= 2)
1325 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1326 return gdbarch->long_double_bit;
1330 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1331 int long_double_bit)
1333 gdbarch->long_double_bit = long_double_bit;
1336 const struct floatformat **
1337 gdbarch_long_double_format (struct gdbarch *gdbarch)
1339 gdb_assert (gdbarch != NULL);
1340 if (gdbarch_debug >= 2)
1341 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1342 return gdbarch->long_double_format;
1346 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1347 const struct floatformat ** long_double_format)
1349 gdbarch->long_double_format = long_double_format;
1353 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1355 gdb_assert (gdbarch != NULL);
1356 /* Skip verify of ptr_bit, invalid_p == 0 */
1357 if (gdbarch_debug >= 2)
1358 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1359 return gdbarch->ptr_bit;
1363 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1366 gdbarch->ptr_bit = ptr_bit;
1370 gdbarch_addr_bit (struct gdbarch *gdbarch)
1372 gdb_assert (gdbarch != NULL);
1373 /* Check variable changed from pre-default. */
1374 gdb_assert (gdbarch->addr_bit != 0);
1375 if (gdbarch_debug >= 2)
1376 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1377 return gdbarch->addr_bit;
1381 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1384 gdbarch->addr_bit = addr_bit;
1388 gdbarch_char_signed (struct gdbarch *gdbarch)
1390 gdb_assert (gdbarch != NULL);
1391 /* Check variable changed from pre-default. */
1392 gdb_assert (gdbarch->char_signed != -1);
1393 if (gdbarch_debug >= 2)
1394 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1395 return gdbarch->char_signed;
1399 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1402 gdbarch->char_signed = char_signed;
1406 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1408 gdb_assert (gdbarch != NULL);
1409 return gdbarch->read_pc != NULL;
1413 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1415 gdb_assert (gdbarch != NULL);
1416 gdb_assert (gdbarch->read_pc != NULL);
1417 if (gdbarch_debug >= 2)
1418 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1419 return gdbarch->read_pc (regcache);
1423 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1424 gdbarch_read_pc_ftype read_pc)
1426 gdbarch->read_pc = read_pc;
1430 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1432 gdb_assert (gdbarch != NULL);
1433 return gdbarch->write_pc != NULL;
1437 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1439 gdb_assert (gdbarch != NULL);
1440 gdb_assert (gdbarch->write_pc != NULL);
1441 if (gdbarch_debug >= 2)
1442 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1443 gdbarch->write_pc (regcache, val);
1447 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1448 gdbarch_write_pc_ftype write_pc)
1450 gdbarch->write_pc = write_pc;
1454 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1456 gdb_assert (gdbarch != NULL);
1457 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1458 if (gdbarch_debug >= 2)
1459 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1460 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1464 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1465 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1467 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1471 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1473 gdb_assert (gdbarch != NULL);
1474 return gdbarch->pseudo_register_read != NULL;
1478 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1480 gdb_assert (gdbarch != NULL);
1481 gdb_assert (gdbarch->pseudo_register_read != NULL);
1482 if (gdbarch_debug >= 2)
1483 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1484 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1488 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1489 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1491 gdbarch->pseudo_register_read = pseudo_register_read;
1495 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1497 gdb_assert (gdbarch != NULL);
1498 return gdbarch->pseudo_register_write != NULL;
1502 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1504 gdb_assert (gdbarch != NULL);
1505 gdb_assert (gdbarch->pseudo_register_write != NULL);
1506 if (gdbarch_debug >= 2)
1507 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1508 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1512 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1513 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1515 gdbarch->pseudo_register_write = pseudo_register_write;
1519 gdbarch_num_regs (struct gdbarch *gdbarch)
1521 gdb_assert (gdbarch != NULL);
1522 /* Check variable changed from pre-default. */
1523 gdb_assert (gdbarch->num_regs != -1);
1524 if (gdbarch_debug >= 2)
1525 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1526 return gdbarch->num_regs;
1530 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1533 gdbarch->num_regs = num_regs;
1537 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1539 gdb_assert (gdbarch != NULL);
1540 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1541 if (gdbarch_debug >= 2)
1542 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1543 return gdbarch->num_pseudo_regs;
1547 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1548 int num_pseudo_regs)
1550 gdbarch->num_pseudo_regs = num_pseudo_regs;
1554 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1556 gdb_assert (gdbarch != NULL);
1557 /* Skip verify of sp_regnum, invalid_p == 0 */
1558 if (gdbarch_debug >= 2)
1559 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1560 return gdbarch->sp_regnum;
1564 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1567 gdbarch->sp_regnum = sp_regnum;
1571 gdbarch_pc_regnum (struct gdbarch *gdbarch)
1573 gdb_assert (gdbarch != NULL);
1574 /* Skip verify of pc_regnum, invalid_p == 0 */
1575 if (gdbarch_debug >= 2)
1576 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1577 return gdbarch->pc_regnum;
1581 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
1584 gdbarch->pc_regnum = pc_regnum;
1588 gdbarch_ps_regnum (struct gdbarch *gdbarch)
1590 gdb_assert (gdbarch != NULL);
1591 /* Skip verify of ps_regnum, invalid_p == 0 */
1592 if (gdbarch_debug >= 2)
1593 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
1594 return gdbarch->ps_regnum;
1598 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
1601 gdbarch->ps_regnum = ps_regnum;
1605 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
1607 gdb_assert (gdbarch != NULL);
1608 /* Skip verify of fp0_regnum, invalid_p == 0 */
1609 if (gdbarch_debug >= 2)
1610 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
1611 return gdbarch->fp0_regnum;
1615 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
1618 gdbarch->fp0_regnum = fp0_regnum;
1622 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
1624 gdb_assert (gdbarch != NULL);
1625 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
1626 if (gdbarch_debug >= 2)
1627 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
1628 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
1632 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
1633 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
1635 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
1639 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
1641 gdb_assert (gdbarch != NULL);
1642 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
1643 if (gdbarch_debug >= 2)
1644 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
1645 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
1649 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
1650 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
1652 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
1656 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
1658 gdb_assert (gdbarch != NULL);
1659 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
1660 if (gdbarch_debug >= 2)
1661 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
1662 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
1666 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
1667 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
1669 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
1673 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
1675 gdb_assert (gdbarch != NULL);
1676 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
1677 if (gdbarch_debug >= 2)
1678 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
1679 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
1683 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
1684 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
1686 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
1690 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
1692 gdb_assert (gdbarch != NULL);
1693 gdb_assert (gdbarch->register_name != NULL);
1694 if (gdbarch_debug >= 2)
1695 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
1696 return gdbarch->register_name (gdbarch, regnr);
1700 set_gdbarch_register_name (struct gdbarch *gdbarch,
1701 gdbarch_register_name_ftype register_name)
1703 gdbarch->register_name = register_name;
1707 gdbarch_register_type_p (struct gdbarch *gdbarch)
1709 gdb_assert (gdbarch != NULL);
1710 return gdbarch->register_type != NULL;
1714 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
1716 gdb_assert (gdbarch != NULL);
1717 gdb_assert (gdbarch->register_type != NULL);
1718 if (gdbarch_debug >= 2)
1719 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
1720 return gdbarch->register_type (gdbarch, reg_nr);
1724 set_gdbarch_register_type (struct gdbarch *gdbarch,
1725 gdbarch_register_type_ftype register_type)
1727 gdbarch->register_type = register_type;
1731 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
1733 gdb_assert (gdbarch != NULL);
1734 return gdbarch->dummy_id != NULL;
1738 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
1740 gdb_assert (gdbarch != NULL);
1741 gdb_assert (gdbarch->dummy_id != NULL);
1742 if (gdbarch_debug >= 2)
1743 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
1744 return gdbarch->dummy_id (gdbarch, this_frame);
1748 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
1749 gdbarch_dummy_id_ftype dummy_id)
1751 gdbarch->dummy_id = dummy_id;
1755 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
1757 gdb_assert (gdbarch != NULL);
1758 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
1759 if (gdbarch_debug >= 2)
1760 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
1761 return gdbarch->deprecated_fp_regnum;
1765 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
1766 int deprecated_fp_regnum)
1768 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
1772 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
1774 gdb_assert (gdbarch != NULL);
1775 return gdbarch->push_dummy_call != NULL;
1779 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)
1781 gdb_assert (gdbarch != NULL);
1782 gdb_assert (gdbarch->push_dummy_call != NULL);
1783 if (gdbarch_debug >= 2)
1784 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
1785 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
1789 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
1790 gdbarch_push_dummy_call_ftype push_dummy_call)
1792 gdbarch->push_dummy_call = push_dummy_call;
1796 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
1798 gdb_assert (gdbarch != NULL);
1799 /* Skip verify of call_dummy_location, invalid_p == 0 */
1800 if (gdbarch_debug >= 2)
1801 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
1802 return gdbarch->call_dummy_location;
1806 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
1807 int call_dummy_location)
1809 gdbarch->call_dummy_location = call_dummy_location;
1813 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
1815 gdb_assert (gdbarch != NULL);
1816 return gdbarch->push_dummy_code != NULL;
1820 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
1822 gdb_assert (gdbarch != NULL);
1823 gdb_assert (gdbarch->push_dummy_code != NULL);
1824 if (gdbarch_debug >= 2)
1825 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
1826 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
1830 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
1831 gdbarch_push_dummy_code_ftype push_dummy_code)
1833 gdbarch->push_dummy_code = push_dummy_code;
1837 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
1839 gdb_assert (gdbarch != NULL);
1840 gdb_assert (gdbarch->print_registers_info != NULL);
1841 if (gdbarch_debug >= 2)
1842 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
1843 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
1847 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
1848 gdbarch_print_registers_info_ftype print_registers_info)
1850 gdbarch->print_registers_info = print_registers_info;
1854 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
1856 gdb_assert (gdbarch != NULL);
1857 return gdbarch->print_float_info != NULL;
1861 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
1863 gdb_assert (gdbarch != NULL);
1864 gdb_assert (gdbarch->print_float_info != NULL);
1865 if (gdbarch_debug >= 2)
1866 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
1867 gdbarch->print_float_info (gdbarch, file, frame, args);
1871 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
1872 gdbarch_print_float_info_ftype print_float_info)
1874 gdbarch->print_float_info = print_float_info;
1878 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
1880 gdb_assert (gdbarch != NULL);
1881 return gdbarch->print_vector_info != NULL;
1885 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
1887 gdb_assert (gdbarch != NULL);
1888 gdb_assert (gdbarch->print_vector_info != NULL);
1889 if (gdbarch_debug >= 2)
1890 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
1891 gdbarch->print_vector_info (gdbarch, file, frame, args);
1895 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
1896 gdbarch_print_vector_info_ftype print_vector_info)
1898 gdbarch->print_vector_info = print_vector_info;
1902 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
1904 gdb_assert (gdbarch != NULL);
1905 gdb_assert (gdbarch->register_sim_regno != NULL);
1906 if (gdbarch_debug >= 2)
1907 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
1908 return gdbarch->register_sim_regno (gdbarch, reg_nr);
1912 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
1913 gdbarch_register_sim_regno_ftype register_sim_regno)
1915 gdbarch->register_sim_regno = register_sim_regno;
1919 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
1921 gdb_assert (gdbarch != NULL);
1922 gdb_assert (gdbarch->cannot_fetch_register != NULL);
1923 if (gdbarch_debug >= 2)
1924 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
1925 return gdbarch->cannot_fetch_register (gdbarch, regnum);
1929 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
1930 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
1932 gdbarch->cannot_fetch_register = cannot_fetch_register;
1936 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
1938 gdb_assert (gdbarch != NULL);
1939 gdb_assert (gdbarch->cannot_store_register != NULL);
1940 if (gdbarch_debug >= 2)
1941 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
1942 return gdbarch->cannot_store_register (gdbarch, regnum);
1946 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
1947 gdbarch_cannot_store_register_ftype cannot_store_register)
1949 gdbarch->cannot_store_register = cannot_store_register;
1953 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
1955 gdb_assert (gdbarch != NULL);
1956 return gdbarch->get_longjmp_target != NULL;
1960 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
1962 gdb_assert (gdbarch != NULL);
1963 gdb_assert (gdbarch->get_longjmp_target != NULL);
1964 if (gdbarch_debug >= 2)
1965 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
1966 return gdbarch->get_longjmp_target (frame, pc);
1970 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
1971 gdbarch_get_longjmp_target_ftype get_longjmp_target)
1973 gdbarch->get_longjmp_target = get_longjmp_target;
1977 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
1979 gdb_assert (gdbarch != NULL);
1980 if (gdbarch_debug >= 2)
1981 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
1982 return gdbarch->believe_pcc_promotion;
1986 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
1987 int believe_pcc_promotion)
1989 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
1993 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
1995 gdb_assert (gdbarch != NULL);
1996 gdb_assert (gdbarch->convert_register_p != NULL);
1997 if (gdbarch_debug >= 2)
1998 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
1999 return gdbarch->convert_register_p (gdbarch, regnum, type);
2003 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2004 gdbarch_convert_register_p_ftype convert_register_p)
2006 gdbarch->convert_register_p = convert_register_p;
2010 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
2012 gdb_assert (gdbarch != NULL);
2013 gdb_assert (gdbarch->register_to_value != NULL);
2014 if (gdbarch_debug >= 2)
2015 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2016 gdbarch->register_to_value (frame, regnum, type, buf);
2020 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2021 gdbarch_register_to_value_ftype register_to_value)
2023 gdbarch->register_to_value = register_to_value;
2027 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2029 gdb_assert (gdbarch != NULL);
2030 gdb_assert (gdbarch->value_to_register != NULL);
2031 if (gdbarch_debug >= 2)
2032 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2033 gdbarch->value_to_register (frame, regnum, type, buf);
2037 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2038 gdbarch_value_to_register_ftype value_to_register)
2040 gdbarch->value_to_register = value_to_register;
2044 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2046 gdb_assert (gdbarch != NULL);
2047 gdb_assert (gdbarch->value_from_register != NULL);
2048 if (gdbarch_debug >= 2)
2049 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2050 return gdbarch->value_from_register (type, regnum, frame);
2054 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2055 gdbarch_value_from_register_ftype value_from_register)
2057 gdbarch->value_from_register = value_from_register;
2061 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2063 gdb_assert (gdbarch != NULL);
2064 gdb_assert (gdbarch->pointer_to_address != NULL);
2065 if (gdbarch_debug >= 2)
2066 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2067 return gdbarch->pointer_to_address (type, buf);
2071 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2072 gdbarch_pointer_to_address_ftype pointer_to_address)
2074 gdbarch->pointer_to_address = pointer_to_address;
2078 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2080 gdb_assert (gdbarch != NULL);
2081 gdb_assert (gdbarch->address_to_pointer != NULL);
2082 if (gdbarch_debug >= 2)
2083 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2084 gdbarch->address_to_pointer (type, buf, addr);
2088 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2089 gdbarch_address_to_pointer_ftype address_to_pointer)
2091 gdbarch->address_to_pointer = address_to_pointer;
2095 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2097 gdb_assert (gdbarch != NULL);
2098 return gdbarch->integer_to_address != NULL;
2102 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2104 gdb_assert (gdbarch != NULL);
2105 gdb_assert (gdbarch->integer_to_address != NULL);
2106 if (gdbarch_debug >= 2)
2107 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2108 return gdbarch->integer_to_address (gdbarch, type, buf);
2112 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2113 gdbarch_integer_to_address_ftype integer_to_address)
2115 gdbarch->integer_to_address = integer_to_address;
2119 gdbarch_return_value_p (struct gdbarch *gdbarch)
2121 gdb_assert (gdbarch != NULL);
2122 return gdbarch->return_value != NULL;
2125 enum return_value_convention
2126 gdbarch_return_value (struct gdbarch *gdbarch, struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2128 gdb_assert (gdbarch != NULL);
2129 gdb_assert (gdbarch->return_value != NULL);
2130 if (gdbarch_debug >= 2)
2131 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2132 return gdbarch->return_value (gdbarch, functype, valtype, regcache, readbuf, writebuf);
2136 set_gdbarch_return_value (struct gdbarch *gdbarch,
2137 gdbarch_return_value_ftype return_value)
2139 gdbarch->return_value = return_value;
2143 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2145 gdb_assert (gdbarch != NULL);
2146 gdb_assert (gdbarch->skip_prologue != NULL);
2147 if (gdbarch_debug >= 2)
2148 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2149 return gdbarch->skip_prologue (gdbarch, ip);
2153 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2154 gdbarch_skip_prologue_ftype skip_prologue)
2156 gdbarch->skip_prologue = skip_prologue;
2160 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2162 gdb_assert (gdbarch != NULL);
2163 return gdbarch->skip_main_prologue != NULL;
2167 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2169 gdb_assert (gdbarch != NULL);
2170 gdb_assert (gdbarch->skip_main_prologue != NULL);
2171 if (gdbarch_debug >= 2)
2172 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2173 return gdbarch->skip_main_prologue (gdbarch, ip);
2177 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2178 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2180 gdbarch->skip_main_prologue = skip_main_prologue;
2184 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2186 gdb_assert (gdbarch != NULL);
2187 gdb_assert (gdbarch->inner_than != NULL);
2188 if (gdbarch_debug >= 2)
2189 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2190 return gdbarch->inner_than (lhs, rhs);
2194 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2195 gdbarch_inner_than_ftype inner_than)
2197 gdbarch->inner_than = inner_than;
2201 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2203 gdb_assert (gdbarch != NULL);
2204 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2205 if (gdbarch_debug >= 2)
2206 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2207 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2211 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2212 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2214 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2218 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2220 gdb_assert (gdbarch != NULL);
2221 return gdbarch->adjust_breakpoint_address != NULL;
2225 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2227 gdb_assert (gdbarch != NULL);
2228 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2229 if (gdbarch_debug >= 2)
2230 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2231 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2235 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2236 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2238 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2242 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2244 gdb_assert (gdbarch != NULL);
2245 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2246 if (gdbarch_debug >= 2)
2247 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2248 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2252 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2253 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2255 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2259 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2261 gdb_assert (gdbarch != NULL);
2262 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2263 if (gdbarch_debug >= 2)
2264 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2265 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2269 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2270 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2272 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2276 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2278 gdb_assert (gdbarch != NULL);
2279 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2280 if (gdbarch_debug >= 2)
2281 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2282 return gdbarch->decr_pc_after_break;
2286 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2287 CORE_ADDR decr_pc_after_break)
2289 gdbarch->decr_pc_after_break = decr_pc_after_break;
2293 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2295 gdb_assert (gdbarch != NULL);
2296 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2297 if (gdbarch_debug >= 2)
2298 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2299 return gdbarch->deprecated_function_start_offset;
2303 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2304 CORE_ADDR deprecated_function_start_offset)
2306 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2310 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2312 gdb_assert (gdbarch != NULL);
2313 gdb_assert (gdbarch->remote_register_number != NULL);
2314 if (gdbarch_debug >= 2)
2315 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2316 return gdbarch->remote_register_number (gdbarch, regno);
2320 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2321 gdbarch_remote_register_number_ftype remote_register_number)
2323 gdbarch->remote_register_number = remote_register_number;
2327 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2329 gdb_assert (gdbarch != NULL);
2330 return gdbarch->fetch_tls_load_module_address != NULL;
2334 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2336 gdb_assert (gdbarch != NULL);
2337 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2338 if (gdbarch_debug >= 2)
2339 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2340 return gdbarch->fetch_tls_load_module_address (objfile);
2344 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2345 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2347 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2351 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2353 gdb_assert (gdbarch != NULL);
2354 /* Skip verify of frame_args_skip, invalid_p == 0 */
2355 if (gdbarch_debug >= 2)
2356 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2357 return gdbarch->frame_args_skip;
2361 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2362 CORE_ADDR frame_args_skip)
2364 gdbarch->frame_args_skip = frame_args_skip;
2368 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2370 gdb_assert (gdbarch != NULL);
2371 return gdbarch->unwind_pc != NULL;
2375 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2377 gdb_assert (gdbarch != NULL);
2378 gdb_assert (gdbarch->unwind_pc != NULL);
2379 if (gdbarch_debug >= 2)
2380 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2381 return gdbarch->unwind_pc (gdbarch, next_frame);
2385 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2386 gdbarch_unwind_pc_ftype unwind_pc)
2388 gdbarch->unwind_pc = unwind_pc;
2392 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2394 gdb_assert (gdbarch != NULL);
2395 return gdbarch->unwind_sp != NULL;
2399 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2401 gdb_assert (gdbarch != NULL);
2402 gdb_assert (gdbarch->unwind_sp != NULL);
2403 if (gdbarch_debug >= 2)
2404 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2405 return gdbarch->unwind_sp (gdbarch, next_frame);
2409 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2410 gdbarch_unwind_sp_ftype unwind_sp)
2412 gdbarch->unwind_sp = unwind_sp;
2416 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2418 gdb_assert (gdbarch != NULL);
2419 return gdbarch->frame_num_args != NULL;
2423 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2425 gdb_assert (gdbarch != NULL);
2426 gdb_assert (gdbarch->frame_num_args != NULL);
2427 if (gdbarch_debug >= 2)
2428 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2429 return gdbarch->frame_num_args (frame);
2433 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2434 gdbarch_frame_num_args_ftype frame_num_args)
2436 gdbarch->frame_num_args = frame_num_args;
2440 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2442 gdb_assert (gdbarch != NULL);
2443 return gdbarch->frame_align != NULL;
2447 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2449 gdb_assert (gdbarch != NULL);
2450 gdb_assert (gdbarch->frame_align != NULL);
2451 if (gdbarch_debug >= 2)
2452 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2453 return gdbarch->frame_align (gdbarch, address);
2457 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2458 gdbarch_frame_align_ftype frame_align)
2460 gdbarch->frame_align = frame_align;
2464 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2466 gdb_assert (gdbarch != NULL);
2467 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
2468 if (gdbarch_debug >= 2)
2469 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
2470 return gdbarch->stabs_argument_has_addr (gdbarch, type);
2474 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
2475 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
2477 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
2481 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
2483 gdb_assert (gdbarch != NULL);
2484 if (gdbarch_debug >= 2)
2485 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
2486 return gdbarch->frame_red_zone_size;
2490 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
2491 int frame_red_zone_size)
2493 gdbarch->frame_red_zone_size = frame_red_zone_size;
2497 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
2499 gdb_assert (gdbarch != NULL);
2500 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
2501 if (gdbarch_debug >= 2)
2502 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
2503 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
2507 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
2508 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
2510 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
2514 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
2516 gdb_assert (gdbarch != NULL);
2517 gdb_assert (gdbarch->addr_bits_remove != NULL);
2518 if (gdbarch_debug >= 2)
2519 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
2520 return gdbarch->addr_bits_remove (gdbarch, addr);
2524 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
2525 gdbarch_addr_bits_remove_ftype addr_bits_remove)
2527 gdbarch->addr_bits_remove = addr_bits_remove;
2531 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
2533 gdb_assert (gdbarch != NULL);
2534 gdb_assert (gdbarch->smash_text_address != NULL);
2535 if (gdbarch_debug >= 2)
2536 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
2537 return gdbarch->smash_text_address (gdbarch, addr);
2541 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
2542 gdbarch_smash_text_address_ftype smash_text_address)
2544 gdbarch->smash_text_address = smash_text_address;
2548 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
2550 gdb_assert (gdbarch != NULL);
2551 return gdbarch->software_single_step != NULL;
2555 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
2557 gdb_assert (gdbarch != NULL);
2558 gdb_assert (gdbarch->software_single_step != NULL);
2559 if (gdbarch_debug >= 2)
2560 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
2561 return gdbarch->software_single_step (frame);
2565 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
2566 gdbarch_software_single_step_ftype software_single_step)
2568 gdbarch->software_single_step = software_single_step;
2572 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
2574 gdb_assert (gdbarch != NULL);
2575 return gdbarch->single_step_through_delay != NULL;
2579 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
2581 gdb_assert (gdbarch != NULL);
2582 gdb_assert (gdbarch->single_step_through_delay != NULL);
2583 if (gdbarch_debug >= 2)
2584 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
2585 return gdbarch->single_step_through_delay (gdbarch, frame);
2589 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
2590 gdbarch_single_step_through_delay_ftype single_step_through_delay)
2592 gdbarch->single_step_through_delay = single_step_through_delay;
2596 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
2598 gdb_assert (gdbarch != NULL);
2599 gdb_assert (gdbarch->print_insn != NULL);
2600 if (gdbarch_debug >= 2)
2601 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
2602 return gdbarch->print_insn (vma, info);
2606 set_gdbarch_print_insn (struct gdbarch *gdbarch,
2607 gdbarch_print_insn_ftype print_insn)
2609 gdbarch->print_insn = print_insn;
2613 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
2615 gdb_assert (gdbarch != NULL);
2616 gdb_assert (gdbarch->skip_trampoline_code != NULL);
2617 if (gdbarch_debug >= 2)
2618 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
2619 return gdbarch->skip_trampoline_code (frame, pc);
2623 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
2624 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
2626 gdbarch->skip_trampoline_code = skip_trampoline_code;
2630 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
2632 gdb_assert (gdbarch != NULL);
2633 gdb_assert (gdbarch->skip_solib_resolver != NULL);
2634 if (gdbarch_debug >= 2)
2635 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
2636 return gdbarch->skip_solib_resolver (gdbarch, pc);
2640 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
2641 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
2643 gdbarch->skip_solib_resolver = skip_solib_resolver;
2647 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
2649 gdb_assert (gdbarch != NULL);
2650 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
2651 if (gdbarch_debug >= 2)
2652 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
2653 return gdbarch->in_solib_return_trampoline (pc, name);
2657 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
2658 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
2660 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
2664 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
2666 gdb_assert (gdbarch != NULL);
2667 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
2668 if (gdbarch_debug >= 2)
2669 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
2670 return gdbarch->in_function_epilogue_p (gdbarch, addr);
2674 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
2675 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
2677 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
2681 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
2683 gdb_assert (gdbarch != NULL);
2684 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
2685 if (gdbarch_debug >= 2)
2686 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
2687 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
2691 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
2692 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
2694 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
2698 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
2700 gdb_assert (gdbarch != NULL);
2701 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
2702 if (gdbarch_debug >= 2)
2703 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
2704 gdbarch->elf_make_msymbol_special (sym, msym);
2708 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
2709 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
2711 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
2715 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
2717 gdb_assert (gdbarch != NULL);
2718 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
2719 if (gdbarch_debug >= 2)
2720 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
2721 gdbarch->coff_make_msymbol_special (val, msym);
2725 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
2726 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
2728 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
2732 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
2734 gdb_assert (gdbarch != NULL);
2735 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
2736 if (gdbarch_debug >= 2)
2737 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
2738 return gdbarch->cannot_step_breakpoint;
2742 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
2743 int cannot_step_breakpoint)
2745 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
2749 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
2751 gdb_assert (gdbarch != NULL);
2752 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
2753 if (gdbarch_debug >= 2)
2754 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
2755 return gdbarch->have_nonsteppable_watchpoint;
2759 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
2760 int have_nonsteppable_watchpoint)
2762 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
2766 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
2768 gdb_assert (gdbarch != NULL);
2769 return gdbarch->address_class_type_flags != NULL;
2773 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
2775 gdb_assert (gdbarch != NULL);
2776 gdb_assert (gdbarch->address_class_type_flags != NULL);
2777 if (gdbarch_debug >= 2)
2778 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
2779 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
2783 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
2784 gdbarch_address_class_type_flags_ftype address_class_type_flags)
2786 gdbarch->address_class_type_flags = address_class_type_flags;
2790 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
2792 gdb_assert (gdbarch != NULL);
2793 return gdbarch->address_class_type_flags_to_name != NULL;
2797 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
2799 gdb_assert (gdbarch != NULL);
2800 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
2801 if (gdbarch_debug >= 2)
2802 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
2803 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
2807 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
2808 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
2810 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
2814 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
2816 gdb_assert (gdbarch != NULL);
2817 return gdbarch->address_class_name_to_type_flags != NULL;
2821 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
2823 gdb_assert (gdbarch != NULL);
2824 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
2825 if (gdbarch_debug >= 2)
2826 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
2827 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
2831 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
2832 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
2834 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
2838 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
2840 gdb_assert (gdbarch != NULL);
2841 gdb_assert (gdbarch->register_reggroup_p != NULL);
2842 if (gdbarch_debug >= 2)
2843 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
2844 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
2848 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
2849 gdbarch_register_reggroup_p_ftype register_reggroup_p)
2851 gdbarch->register_reggroup_p = register_reggroup_p;
2855 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
2857 gdb_assert (gdbarch != NULL);
2858 return gdbarch->fetch_pointer_argument != NULL;
2862 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
2864 gdb_assert (gdbarch != NULL);
2865 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
2866 if (gdbarch_debug >= 2)
2867 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
2868 return gdbarch->fetch_pointer_argument (frame, argi, type);
2872 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
2873 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
2875 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
2879 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
2881 gdb_assert (gdbarch != NULL);
2882 return gdbarch->regset_from_core_section != NULL;
2885 const struct regset *
2886 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
2888 gdb_assert (gdbarch != NULL);
2889 gdb_assert (gdbarch->regset_from_core_section != NULL);
2890 if (gdbarch_debug >= 2)
2891 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
2892 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
2896 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
2897 gdbarch_regset_from_core_section_ftype regset_from_core_section)
2899 gdbarch->regset_from_core_section = regset_from_core_section;
2902 struct core_regset_section *
2903 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
2905 gdb_assert (gdbarch != NULL);
2906 if (gdbarch_debug >= 2)
2907 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
2908 return gdbarch->core_regset_sections;
2912 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
2913 struct core_regset_section * core_regset_sections)
2915 gdbarch->core_regset_sections = core_regset_sections;
2919 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
2921 gdb_assert (gdbarch != NULL);
2922 return gdbarch->core_xfer_shared_libraries != NULL;
2926 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
2928 gdb_assert (gdbarch != NULL);
2929 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
2930 if (gdbarch_debug >= 2)
2931 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
2932 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
2936 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
2937 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
2939 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
2943 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
2945 gdb_assert (gdbarch != NULL);
2946 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
2947 if (gdbarch_debug >= 2)
2948 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
2949 return gdbarch->vtable_function_descriptors;
2953 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
2954 int vtable_function_descriptors)
2956 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
2960 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
2962 gdb_assert (gdbarch != NULL);
2963 /* Skip verify of vbit_in_delta, invalid_p == 0 */
2964 if (gdbarch_debug >= 2)
2965 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
2966 return gdbarch->vbit_in_delta;
2970 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
2973 gdbarch->vbit_in_delta = vbit_in_delta;
2977 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
2979 gdb_assert (gdbarch != NULL);
2980 return gdbarch->skip_permanent_breakpoint != NULL;
2984 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
2986 gdb_assert (gdbarch != NULL);
2987 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
2988 if (gdbarch_debug >= 2)
2989 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
2990 gdbarch->skip_permanent_breakpoint (regcache);
2994 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
2995 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
2997 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3001 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3003 gdb_assert (gdbarch != NULL);
3004 return gdbarch->max_insn_length != 0;
3008 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3010 gdb_assert (gdbarch != NULL);
3011 /* Check variable changed from pre-default. */
3012 gdb_assert (gdbarch->max_insn_length != 0);
3013 if (gdbarch_debug >= 2)
3014 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3015 return gdbarch->max_insn_length;
3019 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3020 ULONGEST max_insn_length)
3022 gdbarch->max_insn_length = max_insn_length;
3026 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3028 gdb_assert (gdbarch != NULL);
3029 return gdbarch->displaced_step_copy_insn != NULL;
3032 struct displaced_step_closure *
3033 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3035 gdb_assert (gdbarch != NULL);
3036 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3037 if (gdbarch_debug >= 2)
3038 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3039 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3043 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3044 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3046 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3050 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3052 gdb_assert (gdbarch != NULL);
3053 return gdbarch->displaced_step_fixup != NULL;
3057 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3059 gdb_assert (gdbarch != NULL);
3060 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3061 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3062 if (gdbarch_debug >= 2)
3063 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3064 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3068 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3069 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3071 gdbarch->displaced_step_fixup = displaced_step_fixup;
3075 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3077 gdb_assert (gdbarch != NULL);
3078 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3079 if (gdbarch_debug >= 2)
3080 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3081 gdbarch->displaced_step_free_closure (gdbarch, closure);
3085 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3086 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3088 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3092 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3094 gdb_assert (gdbarch != NULL);
3095 gdb_assert (gdbarch->displaced_step_location != NULL);
3096 if (gdbarch_debug >= 2)
3097 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3098 return gdbarch->displaced_step_location (gdbarch);
3102 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3103 gdbarch_displaced_step_location_ftype displaced_step_location)
3105 gdbarch->displaced_step_location = displaced_step_location;
3109 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3111 gdb_assert (gdbarch != NULL);
3112 return gdbarch->overlay_update != NULL;
3116 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3118 gdb_assert (gdbarch != NULL);
3119 gdb_assert (gdbarch->overlay_update != NULL);
3120 if (gdbarch_debug >= 2)
3121 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3122 gdbarch->overlay_update (osect);
3126 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3127 gdbarch_overlay_update_ftype overlay_update)
3129 gdbarch->overlay_update = overlay_update;
3133 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3135 gdb_assert (gdbarch != NULL);
3136 return gdbarch->core_read_description != NULL;
3139 const struct target_desc *
3140 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3142 gdb_assert (gdbarch != NULL);
3143 gdb_assert (gdbarch->core_read_description != NULL);
3144 if (gdbarch_debug >= 2)
3145 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3146 return gdbarch->core_read_description (gdbarch, target, abfd);
3150 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3151 gdbarch_core_read_description_ftype core_read_description)
3153 gdbarch->core_read_description = core_read_description;
3157 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3159 gdb_assert (gdbarch != NULL);
3160 return gdbarch->static_transform_name != NULL;
3164 gdbarch_static_transform_name (struct gdbarch *gdbarch, char *name)
3166 gdb_assert (gdbarch != NULL);
3167 gdb_assert (gdbarch->static_transform_name != NULL);
3168 if (gdbarch_debug >= 2)
3169 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3170 return gdbarch->static_transform_name (name);
3174 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3175 gdbarch_static_transform_name_ftype static_transform_name)
3177 gdbarch->static_transform_name = static_transform_name;
3181 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3183 gdb_assert (gdbarch != NULL);
3184 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3185 if (gdbarch_debug >= 2)
3186 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3187 return gdbarch->sofun_address_maybe_missing;
3191 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3192 int sofun_address_maybe_missing)
3194 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3198 gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo)
3200 gdb_assert (gdbarch != NULL);
3201 gdb_assert (gdbarch->target_signal_from_host != NULL);
3202 if (gdbarch_debug >= 2)
3203 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_from_host called\n");
3204 return gdbarch->target_signal_from_host (gdbarch, signo);
3208 set_gdbarch_target_signal_from_host (struct gdbarch *gdbarch,
3209 gdbarch_target_signal_from_host_ftype target_signal_from_host)
3211 gdbarch->target_signal_from_host = target_signal_from_host;
3215 gdbarch_target_signal_to_host (struct gdbarch *gdbarch, enum target_signal ts)
3217 gdb_assert (gdbarch != NULL);
3218 gdb_assert (gdbarch->target_signal_to_host != NULL);
3219 if (gdbarch_debug >= 2)
3220 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_to_host called\n");
3221 return gdbarch->target_signal_to_host (gdbarch, ts);
3225 set_gdbarch_target_signal_to_host (struct gdbarch *gdbarch,
3226 gdbarch_target_signal_to_host_ftype target_signal_to_host)
3228 gdbarch->target_signal_to_host = target_signal_to_host;
3232 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
3234 gdb_assert (gdbarch != NULL);
3235 return gdbarch->get_siginfo_type != NULL;
3239 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
3241 gdb_assert (gdbarch != NULL);
3242 gdb_assert (gdbarch->get_siginfo_type != NULL);
3243 if (gdbarch_debug >= 2)
3244 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
3245 return gdbarch->get_siginfo_type (gdbarch);
3249 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
3250 gdbarch_get_siginfo_type_ftype get_siginfo_type)
3252 gdbarch->get_siginfo_type = get_siginfo_type;
3256 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
3258 gdb_assert (gdbarch != NULL);
3259 return gdbarch->record_special_symbol != NULL;
3263 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
3265 gdb_assert (gdbarch != NULL);
3266 gdb_assert (gdbarch->record_special_symbol != NULL);
3267 if (gdbarch_debug >= 2)
3268 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
3269 gdbarch->record_special_symbol (gdbarch, objfile, sym);
3273 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
3274 gdbarch_record_special_symbol_ftype record_special_symbol)
3276 gdbarch->record_special_symbol = record_special_symbol;
3280 gdbarch_has_global_solist (struct gdbarch *gdbarch)
3282 gdb_assert (gdbarch != NULL);
3283 /* Skip verify of has_global_solist, invalid_p == 0 */
3284 if (gdbarch_debug >= 2)
3285 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
3286 return gdbarch->has_global_solist;
3290 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
3291 int has_global_solist)
3293 gdbarch->has_global_solist = has_global_solist;
3297 /* Keep a registry of per-architecture data-pointers required by GDB
3304 gdbarch_data_pre_init_ftype *pre_init;
3305 gdbarch_data_post_init_ftype *post_init;
3308 struct gdbarch_data_registration
3310 struct gdbarch_data *data;
3311 struct gdbarch_data_registration *next;
3314 struct gdbarch_data_registry
3317 struct gdbarch_data_registration *registrations;
3320 struct gdbarch_data_registry gdbarch_data_registry =
3325 static struct gdbarch_data *
3326 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3327 gdbarch_data_post_init_ftype *post_init)
3329 struct gdbarch_data_registration **curr;
3330 /* Append the new registraration. */
3331 for (curr = &gdbarch_data_registry.registrations;
3333 curr = &(*curr)->next);
3334 (*curr) = XMALLOC (struct gdbarch_data_registration);
3335 (*curr)->next = NULL;
3336 (*curr)->data = XMALLOC (struct gdbarch_data);
3337 (*curr)->data->index = gdbarch_data_registry.nr++;
3338 (*curr)->data->pre_init = pre_init;
3339 (*curr)->data->post_init = post_init;
3340 (*curr)->data->init_p = 1;
3341 return (*curr)->data;
3344 struct gdbarch_data *
3345 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3347 return gdbarch_data_register (pre_init, NULL);
3350 struct gdbarch_data *
3351 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3353 return gdbarch_data_register (NULL, post_init);
3356 /* Create/delete the gdbarch data vector. */
3359 alloc_gdbarch_data (struct gdbarch *gdbarch)
3361 gdb_assert (gdbarch->data == NULL);
3362 gdbarch->nr_data = gdbarch_data_registry.nr;
3363 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3366 /* Initialize the current value of the specified per-architecture
3370 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3371 struct gdbarch_data *data,
3374 gdb_assert (data->index < gdbarch->nr_data);
3375 gdb_assert (gdbarch->data[data->index] == NULL);
3376 gdb_assert (data->pre_init == NULL);
3377 gdbarch->data[data->index] = pointer;
3380 /* Return the current value of the specified per-architecture
3384 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3386 gdb_assert (data->index < gdbarch->nr_data);
3387 if (gdbarch->data[data->index] == NULL)
3389 /* The data-pointer isn't initialized, call init() to get a
3391 if (data->pre_init != NULL)
3392 /* Mid architecture creation: pass just the obstack, and not
3393 the entire architecture, as that way it isn't possible for
3394 pre-init code to refer to undefined architecture
3396 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3397 else if (gdbarch->initialized_p
3398 && data->post_init != NULL)
3399 /* Post architecture creation: pass the entire architecture
3400 (as all fields are valid), but be careful to also detect
3401 recursive references. */
3403 gdb_assert (data->init_p);
3405 gdbarch->data[data->index] = data->post_init (gdbarch);
3409 /* The architecture initialization hasn't completed - punt -
3410 hope that the caller knows what they are doing. Once
3411 deprecated_set_gdbarch_data has been initialized, this can be
3412 changed to an internal error. */
3414 gdb_assert (gdbarch->data[data->index] != NULL);
3416 return gdbarch->data[data->index];
3420 /* Keep a registry of the architectures known by GDB. */
3422 struct gdbarch_registration
3424 enum bfd_architecture bfd_architecture;
3425 gdbarch_init_ftype *init;
3426 gdbarch_dump_tdep_ftype *dump_tdep;
3427 struct gdbarch_list *arches;
3428 struct gdbarch_registration *next;
3431 static struct gdbarch_registration *gdbarch_registry = NULL;
3434 append_name (const char ***buf, int *nr, const char *name)
3436 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3442 gdbarch_printable_names (void)
3444 /* Accumulate a list of names based on the registed list of
3446 enum bfd_architecture a;
3448 const char **arches = NULL;
3449 struct gdbarch_registration *rego;
3450 for (rego = gdbarch_registry;
3454 const struct bfd_arch_info *ap;
3455 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3457 internal_error (__FILE__, __LINE__,
3458 _("gdbarch_architecture_names: multi-arch unknown"));
3461 append_name (&arches, &nr_arches, ap->printable_name);
3466 append_name (&arches, &nr_arches, NULL);
3472 gdbarch_register (enum bfd_architecture bfd_architecture,
3473 gdbarch_init_ftype *init,
3474 gdbarch_dump_tdep_ftype *dump_tdep)
3476 struct gdbarch_registration **curr;
3477 const struct bfd_arch_info *bfd_arch_info;
3478 /* Check that BFD recognizes this architecture */
3479 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3480 if (bfd_arch_info == NULL)
3482 internal_error (__FILE__, __LINE__,
3483 _("gdbarch: Attempt to register unknown architecture (%d)"),
3486 /* Check that we haven't seen this architecture before */
3487 for (curr = &gdbarch_registry;
3489 curr = &(*curr)->next)
3491 if (bfd_architecture == (*curr)->bfd_architecture)
3492 internal_error (__FILE__, __LINE__,
3493 _("gdbarch: Duplicate registraration of architecture (%s)"),
3494 bfd_arch_info->printable_name);
3498 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
3499 bfd_arch_info->printable_name,
3500 host_address_to_string (init));
3502 (*curr) = XMALLOC (struct gdbarch_registration);
3503 (*curr)->bfd_architecture = bfd_architecture;
3504 (*curr)->init = init;
3505 (*curr)->dump_tdep = dump_tdep;
3506 (*curr)->arches = NULL;
3507 (*curr)->next = NULL;
3511 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3512 gdbarch_init_ftype *init)
3514 gdbarch_register (bfd_architecture, init, NULL);
3518 /* Look for an architecture using gdbarch_info. */
3520 struct gdbarch_list *
3521 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3522 const struct gdbarch_info *info)
3524 for (; arches != NULL; arches = arches->next)
3526 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3528 if (info->byte_order != arches->gdbarch->byte_order)
3530 if (info->osabi != arches->gdbarch->osabi)
3532 if (info->target_desc != arches->gdbarch->target_desc)
3540 /* Find an architecture that matches the specified INFO. Create a new
3541 architecture if needed. Return that new architecture. Assumes
3542 that there is no current architecture. */
3544 static struct gdbarch *
3545 find_arch_by_info (struct gdbarch_info info)
3547 struct gdbarch *new_gdbarch;
3548 struct gdbarch_registration *rego;
3550 /* The existing architecture has been swapped out - all this code
3551 works from a clean slate. */
3552 gdb_assert (current_gdbarch == NULL);
3554 /* Fill in missing parts of the INFO struct using a number of
3555 sources: "set ..."; INFOabfd supplied; and the global
3557 gdbarch_info_fill (&info);
3559 /* Must have found some sort of architecture. */
3560 gdb_assert (info.bfd_arch_info != NULL);
3564 fprintf_unfiltered (gdb_stdlog,
3565 "find_arch_by_info: info.bfd_arch_info %s\n",
3566 (info.bfd_arch_info != NULL
3567 ? info.bfd_arch_info->printable_name
3569 fprintf_unfiltered (gdb_stdlog,
3570 "find_arch_by_info: info.byte_order %d (%s)\n",
3572 (info.byte_order == BFD_ENDIAN_BIG ? "big"
3573 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
3575 fprintf_unfiltered (gdb_stdlog,
3576 "find_arch_by_info: info.osabi %d (%s)\n",
3577 info.osabi, gdbarch_osabi_name (info.osabi));
3578 fprintf_unfiltered (gdb_stdlog,
3579 "find_arch_by_info: info.abfd %s\n",
3580 host_address_to_string (info.abfd));
3581 fprintf_unfiltered (gdb_stdlog,
3582 "find_arch_by_info: info.tdep_info %s\n",
3583 host_address_to_string (info.tdep_info));
3586 /* Find the tdep code that knows about this architecture. */
3587 for (rego = gdbarch_registry;
3590 if (rego->bfd_architecture == info.bfd_arch_info->arch)
3595 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3596 "No matching architecture\n");
3600 /* Ask the tdep code for an architecture that matches "info". */
3601 new_gdbarch = rego->init (info, rego->arches);
3603 /* Did the tdep code like it? No. Reject the change and revert to
3604 the old architecture. */
3605 if (new_gdbarch == NULL)
3608 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3609 "Target rejected architecture\n");
3613 /* Is this a pre-existing architecture (as determined by already
3614 being initialized)? Move it to the front of the architecture
3615 list (keeping the list sorted Most Recently Used). */
3616 if (new_gdbarch->initialized_p)
3618 struct gdbarch_list **list;
3619 struct gdbarch_list *this;
3621 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3622 "Previous architecture %s (%s) selected\n",
3623 host_address_to_string (new_gdbarch),
3624 new_gdbarch->bfd_arch_info->printable_name);
3625 /* Find the existing arch in the list. */
3626 for (list = ®o->arches;
3627 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
3628 list = &(*list)->next);
3629 /* It had better be in the list of architectures. */
3630 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
3633 (*list) = this->next;
3634 /* Insert THIS at the front. */
3635 this->next = rego->arches;
3636 rego->arches = this;
3641 /* It's a new architecture. */
3643 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3644 "New architecture %s (%s) selected\n",
3645 host_address_to_string (new_gdbarch),
3646 new_gdbarch->bfd_arch_info->printable_name);
3648 /* Insert the new architecture into the front of the architecture
3649 list (keep the list sorted Most Recently Used). */
3651 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
3652 this->next = rego->arches;
3653 this->gdbarch = new_gdbarch;
3654 rego->arches = this;
3657 /* Check that the newly installed architecture is valid. Plug in
3658 any post init values. */
3659 new_gdbarch->dump_tdep = rego->dump_tdep;
3660 verify_gdbarch (new_gdbarch);
3661 new_gdbarch->initialized_p = 1;
3664 gdbarch_dump (new_gdbarch, gdb_stdlog);
3670 gdbarch_find_by_info (struct gdbarch_info info)
3672 struct gdbarch *new_gdbarch;
3674 /* Save the previously selected architecture, setting the global to
3675 NULL. This stops things like gdbarch->init() trying to use the
3676 previous architecture's configuration. The previous architecture
3677 may not even be of the same architecture family. The most recent
3678 architecture of the same family is found at the head of the
3679 rego->arches list. */
3680 struct gdbarch *old_gdbarch = current_gdbarch;
3681 current_gdbarch = NULL;
3683 /* Find the specified architecture. */
3684 new_gdbarch = find_arch_by_info (info);
3686 /* Restore the existing architecture. */
3687 gdb_assert (current_gdbarch == NULL);
3688 current_gdbarch = old_gdbarch;
3693 /* Make the specified architecture current. */
3696 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
3698 gdb_assert (new_gdbarch != NULL);
3699 gdb_assert (current_gdbarch != NULL);
3700 gdb_assert (new_gdbarch->initialized_p);
3701 current_gdbarch = new_gdbarch;
3702 target_gdbarch = new_gdbarch;
3703 observer_notify_architecture_changed (new_gdbarch);
3704 registers_changed ();
3707 extern void _initialize_gdbarch (void);
3710 _initialize_gdbarch (void)
3712 struct cmd_list_element *c;
3714 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
3715 Set architecture debugging."), _("\
3716 Show architecture debugging."), _("\
3717 When non-zero, architecture debugging is enabled."),
3720 &setdebuglist, &showdebuglist);