1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2014 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"
47 #include "reggroups.h"
49 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 unsigned int gdbarch_debug = GDBARCH_DEBUG;
65 show_gdbarch_debug (struct ui_file *file, int from_tty,
66 struct cmd_list_element *c, const char *value)
68 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
72 pformat (const struct floatformat **format)
77 /* Just print out one of them - this is only for diagnostics. */
78 return format[0]->name;
82 pstring (const char *string)
89 /* Helper function to print a list of strings, represented as "const
90 char *const *". The list is printed comma-separated. */
93 pstring_list (const char *const *list)
103 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
105 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
111 gdb_assert (offset - 2 < sizeof (ret));
112 ret[offset - 2] = '\0';
119 /* Maintain the struct gdbarch object. */
123 /* Has this architecture been fully initialized? */
126 /* An obstack bound to the lifetime of the architecture. */
127 struct obstack *obstack;
129 /* basic architectural information. */
130 const struct bfd_arch_info * bfd_arch_info;
132 int byte_order_for_code;
133 enum gdb_osabi osabi;
134 const struct target_desc * target_desc;
136 /* target specific vector. */
137 struct gdbarch_tdep *tdep;
138 gdbarch_dump_tdep_ftype *dump_tdep;
140 /* per-architecture data-pointers. */
144 /* Multi-arch values.
146 When extending this structure you must:
150 Declare set/get functions and define the corresponding
153 gdbarch_alloc(): If zero/NULL is not a suitable default,
154 initialize the new field.
156 verify_gdbarch(): Confirm that the target updated the field
159 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
162 ``startup_gdbarch()'': Append an initial value to the static
163 variable (base values on the host's c-type system).
165 get_gdbarch(): Implement the set/get functions (probably using
166 the macro's as shortcuts).
175 int long_long_align_bit;
177 const struct floatformat ** half_format;
179 const struct floatformat ** float_format;
181 const struct floatformat ** double_format;
183 const struct floatformat ** long_double_format;
186 int dwarf2_addr_size;
188 gdbarch_read_pc_ftype *read_pc;
189 gdbarch_write_pc_ftype *write_pc;
190 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
191 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
192 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
193 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
196 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
197 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
202 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
203 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
204 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
205 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
206 gdbarch_register_name_ftype *register_name;
207 gdbarch_register_type_ftype *register_type;
208 gdbarch_dummy_id_ftype *dummy_id;
209 int deprecated_fp_regnum;
210 gdbarch_push_dummy_call_ftype *push_dummy_call;
211 int call_dummy_location;
212 gdbarch_push_dummy_code_ftype *push_dummy_code;
213 gdbarch_print_registers_info_ftype *print_registers_info;
214 gdbarch_print_float_info_ftype *print_float_info;
215 gdbarch_print_vector_info_ftype *print_vector_info;
216 gdbarch_register_sim_regno_ftype *register_sim_regno;
217 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
218 gdbarch_cannot_store_register_ftype *cannot_store_register;
219 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
220 int believe_pcc_promotion;
221 gdbarch_convert_register_p_ftype *convert_register_p;
222 gdbarch_register_to_value_ftype *register_to_value;
223 gdbarch_value_to_register_ftype *value_to_register;
224 gdbarch_value_from_register_ftype *value_from_register;
225 gdbarch_pointer_to_address_ftype *pointer_to_address;
226 gdbarch_address_to_pointer_ftype *address_to_pointer;
227 gdbarch_integer_to_address_ftype *integer_to_address;
228 gdbarch_return_value_ftype *return_value;
229 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
230 gdbarch_skip_prologue_ftype *skip_prologue;
231 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
232 gdbarch_inner_than_ftype *inner_than;
233 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
234 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
235 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
236 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
237 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
238 CORE_ADDR decr_pc_after_break;
239 CORE_ADDR deprecated_function_start_offset;
240 gdbarch_remote_register_number_ftype *remote_register_number;
241 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
242 CORE_ADDR frame_args_skip;
243 gdbarch_unwind_pc_ftype *unwind_pc;
244 gdbarch_unwind_sp_ftype *unwind_sp;
245 gdbarch_frame_num_args_ftype *frame_num_args;
246 gdbarch_frame_align_ftype *frame_align;
247 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
248 int frame_red_zone_size;
249 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
250 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
251 gdbarch_software_single_step_ftype *software_single_step;
252 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
253 gdbarch_print_insn_ftype *print_insn;
254 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
255 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
256 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
257 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
258 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
259 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
260 int cannot_step_breakpoint;
261 int have_nonsteppable_watchpoint;
262 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
263 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
264 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
265 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
266 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
267 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
268 struct core_regset_section * core_regset_sections;
269 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
270 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
271 gdbarch_find_memory_regions_ftype *find_memory_regions;
272 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
273 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
274 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
275 const char * gcore_bfd_target;
276 int vtable_function_descriptors;
278 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
279 ULONGEST max_insn_length;
280 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
281 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
282 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
283 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
284 gdbarch_displaced_step_location_ftype *displaced_step_location;
285 gdbarch_relocate_instruction_ftype *relocate_instruction;
286 gdbarch_overlay_update_ftype *overlay_update;
287 gdbarch_core_read_description_ftype *core_read_description;
288 gdbarch_static_transform_name_ftype *static_transform_name;
289 int sofun_address_maybe_missing;
290 gdbarch_process_record_ftype *process_record;
291 gdbarch_process_record_signal_ftype *process_record_signal;
292 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
293 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
294 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
295 gdbarch_record_special_symbol_ftype *record_special_symbol;
296 gdbarch_get_syscall_number_ftype *get_syscall_number;
297 const char *const * stap_integer_prefixes;
298 const char *const * stap_integer_suffixes;
299 const char *const * stap_register_prefixes;
300 const char *const * stap_register_suffixes;
301 const char *const * stap_register_indirection_prefixes;
302 const char *const * stap_register_indirection_suffixes;
303 const char * stap_gdb_register_prefix;
304 const char * stap_gdb_register_suffix;
305 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
306 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
307 int has_global_solist;
308 int has_global_breakpoints;
309 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
310 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
311 gdbarch_auto_charset_ftype *auto_charset;
312 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
313 const char * solib_symbols_extension;
314 int has_dos_based_file_system;
315 gdbarch_gen_return_address_ftype *gen_return_address;
316 gdbarch_info_proc_ftype *info_proc;
317 gdbarch_core_info_proc_ftype *core_info_proc;
318 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
319 struct ravenscar_arch_ops * ravenscar_ops;
323 /* The default architecture uses host values (for want of a better
326 extern const struct bfd_arch_info bfd_default_arch_struct;
328 struct gdbarch startup_gdbarch =
330 1, /* Always initialized. */
331 NULL, /* The obstack. */
332 /* basic architecture information. */
333 &bfd_default_arch_struct, /* bfd_arch_info */
334 BFD_ENDIAN_BIG, /* byte_order */
335 BFD_ENDIAN_BIG, /* byte_order_for_code */
336 GDB_OSABI_UNKNOWN, /* osabi */
338 /* target specific vector and its dump routine. */
340 /*per-architecture data-pointers. */
342 /* Multi-arch values */
343 1, /* bits_big_endian */
344 8 * sizeof (short), /* short_bit */
345 8 * sizeof (int), /* int_bit */
346 8 * sizeof (long), /* long_bit */
347 8 * sizeof (LONGEST), /* long_long_bit */
348 8 * sizeof (LONGEST), /* long_long_align_bit */
351 8 * sizeof (float), /* float_bit */
352 0, /* float_format */
353 8 * sizeof (double), /* double_bit */
354 0, /* double_format */
355 8 * sizeof (long double), /* long_double_bit */
356 0, /* long_double_format */
357 8 * sizeof (void*), /* ptr_bit */
358 8 * sizeof (void*), /* addr_bit */
359 sizeof (void*), /* dwarf2_addr_size */
363 legacy_virtual_frame_pointer, /* virtual_frame_pointer */
364 0, /* pseudo_register_read */
365 0, /* pseudo_register_read_value */
366 0, /* pseudo_register_write */
368 0, /* num_pseudo_regs */
369 0, /* ax_pseudo_register_collect */
370 0, /* ax_pseudo_register_push_stack */
375 no_op_reg_to_regnum, /* stab_reg_to_regnum */
376 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
377 no_op_reg_to_regnum, /* sdb_reg_to_regnum */
378 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
379 0, /* register_name */
380 0, /* register_type */
382 -1, /* deprecated_fp_regnum */
383 0, /* push_dummy_call */
384 0, /* call_dummy_location */
385 0, /* push_dummy_code */
386 default_print_registers_info, /* print_registers_info */
387 0, /* print_float_info */
388 0, /* print_vector_info */
389 legacy_register_sim_regno, /* register_sim_regno */
390 cannot_register_not, /* cannot_fetch_register */
391 cannot_register_not, /* cannot_store_register */
392 0, /* get_longjmp_target */
393 0, /* believe_pcc_promotion */
394 generic_convert_register_p, /* convert_register_p */
395 0, /* register_to_value */
396 0, /* value_to_register */
397 0, /* value_from_register */
398 unsigned_pointer_to_address, /* pointer_to_address */
399 unsigned_address_to_pointer, /* address_to_pointer */
400 0, /* integer_to_address */
401 0, /* return_value */
402 default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */
403 0, /* skip_prologue */
404 0, /* skip_main_prologue */
406 0, /* breakpoint_from_pc */
407 default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */
408 0, /* adjust_breakpoint_address */
409 default_memory_insert_breakpoint, /* memory_insert_breakpoint */
410 default_memory_remove_breakpoint, /* memory_remove_breakpoint */
411 0, /* decr_pc_after_break */
412 0, /* deprecated_function_start_offset */
413 default_remote_register_number, /* remote_register_number */
414 0, /* fetch_tls_load_module_address */
415 0, /* frame_args_skip */
418 0, /* frame_num_args */
420 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
421 0, /* frame_red_zone_size */
422 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
423 core_addr_identity, /* addr_bits_remove */
424 0, /* software_single_step */
425 0, /* single_step_through_delay */
427 0, /* skip_trampoline_code */
428 generic_skip_solib_resolver, /* skip_solib_resolver */
429 generic_in_solib_return_trampoline, /* in_solib_return_trampoline */
430 generic_in_function_epilogue_p, /* in_function_epilogue_p */
431 0, /* elf_make_msymbol_special */
432 0, /* coff_make_msymbol_special */
433 0, /* cannot_step_breakpoint */
434 0, /* have_nonsteppable_watchpoint */
435 0, /* address_class_type_flags */
436 0, /* address_class_type_flags_to_name */
437 0, /* address_class_name_to_type_flags */
438 default_register_reggroup_p, /* register_reggroup_p */
439 0, /* fetch_pointer_argument */
440 0, /* regset_from_core_section */
441 0, /* core_regset_sections */
442 0, /* make_corefile_notes */
443 0, /* elfcore_write_linux_prpsinfo */
444 0, /* find_memory_regions */
445 0, /* core_xfer_shared_libraries */
446 0, /* core_xfer_shared_libraries_aix */
447 0, /* core_pid_to_str */
448 0, /* gcore_bfd_target */
449 0, /* vtable_function_descriptors */
450 0, /* vbit_in_delta */
451 0, /* skip_permanent_breakpoint */
452 0, /* max_insn_length */
453 0, /* displaced_step_copy_insn */
454 default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */
455 0, /* displaced_step_fixup */
456 NULL, /* displaced_step_free_closure */
457 NULL, /* displaced_step_location */
458 0, /* relocate_instruction */
459 0, /* overlay_update */
460 0, /* core_read_description */
461 0, /* static_transform_name */
462 0, /* sofun_address_maybe_missing */
463 0, /* process_record */
464 0, /* process_record_signal */
465 0, /* gdb_signal_from_target */
466 0, /* gdb_signal_to_target */
467 0, /* get_siginfo_type */
468 0, /* record_special_symbol */
469 0, /* get_syscall_number */
470 0, /* stap_integer_prefixes */
471 0, /* stap_integer_suffixes */
472 0, /* stap_register_prefixes */
473 0, /* stap_register_suffixes */
474 0, /* stap_register_indirection_prefixes */
475 0, /* stap_register_indirection_suffixes */
476 0, /* stap_gdb_register_prefix */
477 0, /* stap_gdb_register_suffix */
478 0, /* stap_is_single_operand */
479 0, /* stap_parse_special_token */
480 0, /* has_global_solist */
481 0, /* has_global_breakpoints */
482 default_has_shared_address_space, /* has_shared_address_space */
483 default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */
484 default_auto_charset, /* auto_charset */
485 default_auto_wide_charset, /* auto_wide_charset */
486 0, /* solib_symbols_extension */
487 0, /* has_dos_based_file_system */
488 default_gen_return_address, /* gen_return_address */
490 0, /* core_info_proc */
491 default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */
492 NULL, /* ravenscar_ops */
493 /* startup_gdbarch() */
497 /* Create a new ``struct gdbarch'' based on information provided by
498 ``struct gdbarch_info''. */
501 gdbarch_alloc (const struct gdbarch_info *info,
502 struct gdbarch_tdep *tdep)
504 struct gdbarch *gdbarch;
506 /* Create an obstack for allocating all the per-architecture memory,
507 then use that to allocate the architecture vector. */
508 struct obstack *obstack = XMALLOC (struct obstack);
509 obstack_init (obstack);
510 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
511 memset (gdbarch, 0, sizeof (*gdbarch));
512 gdbarch->obstack = obstack;
514 alloc_gdbarch_data (gdbarch);
516 gdbarch->tdep = tdep;
518 gdbarch->bfd_arch_info = info->bfd_arch_info;
519 gdbarch->byte_order = info->byte_order;
520 gdbarch->byte_order_for_code = info->byte_order_for_code;
521 gdbarch->osabi = info->osabi;
522 gdbarch->target_desc = info->target_desc;
524 /* Force the explicit initialization of these. */
525 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
526 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
527 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
528 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
529 gdbarch->long_long_bit = 2*gdbarch->long_bit;
530 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
531 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
532 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
533 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
534 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
535 gdbarch->ptr_bit = gdbarch->int_bit;
536 gdbarch->char_signed = -1;
537 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
538 gdbarch->num_regs = -1;
539 gdbarch->sp_regnum = -1;
540 gdbarch->pc_regnum = -1;
541 gdbarch->ps_regnum = -1;
542 gdbarch->fp0_regnum = -1;
543 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
544 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
545 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
546 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
547 gdbarch->deprecated_fp_regnum = -1;
548 gdbarch->call_dummy_location = AT_ENTRY_POINT;
549 gdbarch->print_registers_info = default_print_registers_info;
550 gdbarch->register_sim_regno = legacy_register_sim_regno;
551 gdbarch->cannot_fetch_register = cannot_register_not;
552 gdbarch->cannot_store_register = cannot_register_not;
553 gdbarch->convert_register_p = generic_convert_register_p;
554 gdbarch->value_from_register = default_value_from_register;
555 gdbarch->pointer_to_address = unsigned_pointer_to_address;
556 gdbarch->address_to_pointer = unsigned_address_to_pointer;
557 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
558 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
559 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
560 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
561 gdbarch->remote_register_number = default_remote_register_number;
562 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
563 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
564 gdbarch->addr_bits_remove = core_addr_identity;
565 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
566 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
567 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
568 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
569 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
570 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
571 gdbarch->register_reggroup_p = default_register_reggroup_p;
572 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
573 gdbarch->displaced_step_fixup = NULL;
574 gdbarch->displaced_step_free_closure = NULL;
575 gdbarch->displaced_step_location = NULL;
576 gdbarch->relocate_instruction = NULL;
577 gdbarch->has_shared_address_space = default_has_shared_address_space;
578 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
579 gdbarch->auto_charset = default_auto_charset;
580 gdbarch->auto_wide_charset = default_auto_wide_charset;
581 gdbarch->gen_return_address = default_gen_return_address;
582 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
583 gdbarch->ravenscar_ops = NULL;
584 /* gdbarch_alloc() */
590 /* Allocate extra space using the per-architecture obstack. */
593 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
595 void *data = obstack_alloc (arch->obstack, size);
597 memset (data, 0, size);
602 /* Free a gdbarch struct. This should never happen in normal
603 operation --- once you've created a gdbarch, you keep it around.
604 However, if an architecture's init function encounters an error
605 building the structure, it may need to clean up a partially
606 constructed gdbarch. */
609 gdbarch_free (struct gdbarch *arch)
611 struct obstack *obstack;
613 gdb_assert (arch != NULL);
614 gdb_assert (!arch->initialized_p);
615 obstack = arch->obstack;
616 obstack_free (obstack, 0); /* Includes the ARCH. */
621 /* Ensure that all values in a GDBARCH are reasonable. */
624 verify_gdbarch (struct gdbarch *gdbarch)
627 struct cleanup *cleanups;
631 log = mem_fileopen ();
632 cleanups = make_cleanup_ui_file_delete (log);
634 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
635 fprintf_unfiltered (log, "\n\tbyte-order");
636 if (gdbarch->bfd_arch_info == NULL)
637 fprintf_unfiltered (log, "\n\tbfd_arch_info");
638 /* Check those that need to be defined for the given multi-arch level. */
639 /* Skip verify of bits_big_endian, invalid_p == 0 */
640 /* Skip verify of short_bit, invalid_p == 0 */
641 /* Skip verify of int_bit, invalid_p == 0 */
642 /* Skip verify of long_bit, invalid_p == 0 */
643 /* Skip verify of long_long_bit, invalid_p == 0 */
644 /* Skip verify of long_long_align_bit, invalid_p == 0 */
645 /* Skip verify of half_bit, invalid_p == 0 */
646 if (gdbarch->half_format == 0)
647 gdbarch->half_format = floatformats_ieee_half;
648 /* Skip verify of float_bit, invalid_p == 0 */
649 if (gdbarch->float_format == 0)
650 gdbarch->float_format = floatformats_ieee_single;
651 /* Skip verify of double_bit, invalid_p == 0 */
652 if (gdbarch->double_format == 0)
653 gdbarch->double_format = floatformats_ieee_double;
654 /* Skip verify of long_double_bit, invalid_p == 0 */
655 if (gdbarch->long_double_format == 0)
656 gdbarch->long_double_format = floatformats_ieee_double;
657 /* Skip verify of ptr_bit, invalid_p == 0 */
658 if (gdbarch->addr_bit == 0)
659 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
660 if (gdbarch->dwarf2_addr_size == 0)
661 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
662 if (gdbarch->char_signed == -1)
663 gdbarch->char_signed = 1;
664 /* Skip verify of read_pc, has predicate. */
665 /* Skip verify of write_pc, has predicate. */
666 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
667 /* Skip verify of pseudo_register_read, has predicate. */
668 /* Skip verify of pseudo_register_read_value, has predicate. */
669 /* Skip verify of pseudo_register_write, has predicate. */
670 if (gdbarch->num_regs == -1)
671 fprintf_unfiltered (log, "\n\tnum_regs");
672 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
673 /* Skip verify of ax_pseudo_register_collect, has predicate. */
674 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
675 /* Skip verify of sp_regnum, invalid_p == 0 */
676 /* Skip verify of pc_regnum, invalid_p == 0 */
677 /* Skip verify of ps_regnum, invalid_p == 0 */
678 /* Skip verify of fp0_regnum, invalid_p == 0 */
679 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
680 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
681 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
682 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
683 if (gdbarch->register_name == 0)
684 fprintf_unfiltered (log, "\n\tregister_name");
685 /* Skip verify of register_type, has predicate. */
686 /* Skip verify of dummy_id, has predicate. */
687 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
688 /* Skip verify of push_dummy_call, has predicate. */
689 /* Skip verify of call_dummy_location, invalid_p == 0 */
690 /* Skip verify of push_dummy_code, has predicate. */
691 /* Skip verify of print_registers_info, invalid_p == 0 */
692 /* Skip verify of print_float_info, has predicate. */
693 /* Skip verify of print_vector_info, has predicate. */
694 /* Skip verify of register_sim_regno, invalid_p == 0 */
695 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
696 /* Skip verify of cannot_store_register, invalid_p == 0 */
697 /* Skip verify of get_longjmp_target, has predicate. */
698 /* Skip verify of convert_register_p, invalid_p == 0 */
699 /* Skip verify of value_from_register, invalid_p == 0 */
700 /* Skip verify of pointer_to_address, invalid_p == 0 */
701 /* Skip verify of address_to_pointer, invalid_p == 0 */
702 /* Skip verify of integer_to_address, has predicate. */
703 /* Skip verify of return_value, has predicate. */
704 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
705 if (gdbarch->skip_prologue == 0)
706 fprintf_unfiltered (log, "\n\tskip_prologue");
707 /* Skip verify of skip_main_prologue, has predicate. */
708 if (gdbarch->inner_than == 0)
709 fprintf_unfiltered (log, "\n\tinner_than");
710 if (gdbarch->breakpoint_from_pc == 0)
711 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
712 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
713 /* Skip verify of adjust_breakpoint_address, has predicate. */
714 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
715 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
716 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
717 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
718 /* Skip verify of remote_register_number, invalid_p == 0 */
719 /* Skip verify of fetch_tls_load_module_address, has predicate. */
720 /* Skip verify of frame_args_skip, invalid_p == 0 */
721 /* Skip verify of unwind_pc, has predicate. */
722 /* Skip verify of unwind_sp, has predicate. */
723 /* Skip verify of frame_num_args, has predicate. */
724 /* Skip verify of frame_align, has predicate. */
725 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
726 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
727 /* Skip verify of addr_bits_remove, invalid_p == 0 */
728 /* Skip verify of software_single_step, has predicate. */
729 /* Skip verify of single_step_through_delay, has predicate. */
730 if (gdbarch->print_insn == 0)
731 fprintf_unfiltered (log, "\n\tprint_insn");
732 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
733 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
734 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
735 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
736 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
737 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
738 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
739 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
740 /* Skip verify of address_class_type_flags, has predicate. */
741 /* Skip verify of address_class_type_flags_to_name, has predicate. */
742 /* Skip verify of address_class_name_to_type_flags, has predicate. */
743 /* Skip verify of register_reggroup_p, invalid_p == 0 */
744 /* Skip verify of fetch_pointer_argument, has predicate. */
745 /* Skip verify of regset_from_core_section, has predicate. */
746 /* Skip verify of make_corefile_notes, has predicate. */
747 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
748 /* Skip verify of find_memory_regions, has predicate. */
749 /* Skip verify of core_xfer_shared_libraries, has predicate. */
750 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
751 /* Skip verify of core_pid_to_str, has predicate. */
752 /* Skip verify of gcore_bfd_target, has predicate. */
753 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
754 /* Skip verify of vbit_in_delta, invalid_p == 0 */
755 /* Skip verify of skip_permanent_breakpoint, has predicate. */
756 /* Skip verify of max_insn_length, has predicate. */
757 /* Skip verify of displaced_step_copy_insn, has predicate. */
758 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
759 /* Skip verify of displaced_step_fixup, has predicate. */
760 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
761 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
762 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
763 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
764 /* Skip verify of relocate_instruction, has predicate. */
765 /* Skip verify of overlay_update, has predicate. */
766 /* Skip verify of core_read_description, has predicate. */
767 /* Skip verify of static_transform_name, has predicate. */
768 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
769 /* Skip verify of process_record, has predicate. */
770 /* Skip verify of process_record_signal, has predicate. */
771 /* Skip verify of gdb_signal_from_target, has predicate. */
772 /* Skip verify of gdb_signal_to_target, has predicate. */
773 /* Skip verify of get_siginfo_type, has predicate. */
774 /* Skip verify of record_special_symbol, has predicate. */
775 /* Skip verify of get_syscall_number, has predicate. */
776 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
777 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
778 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
779 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
780 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
781 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
782 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
783 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
784 /* Skip verify of stap_is_single_operand, has predicate. */
785 /* Skip verify of stap_parse_special_token, has predicate. */
786 /* Skip verify of has_global_solist, invalid_p == 0 */
787 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
788 /* Skip verify of has_shared_address_space, invalid_p == 0 */
789 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
790 /* Skip verify of auto_charset, invalid_p == 0 */
791 /* Skip verify of auto_wide_charset, invalid_p == 0 */
792 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
793 /* Skip verify of gen_return_address, invalid_p == 0 */
794 /* Skip verify of info_proc, has predicate. */
795 /* Skip verify of core_info_proc, has predicate. */
796 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
797 /* Skip verify of ravenscar_ops, invalid_p == 0 */
798 buf = ui_file_xstrdup (log, &length);
799 make_cleanup (xfree, buf);
801 internal_error (__FILE__, __LINE__,
802 _("verify_gdbarch: the following are invalid ...%s"),
804 do_cleanups (cleanups);
808 /* Print out the details of the current architecture. */
811 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
813 const char *gdb_nm_file = "<not-defined>";
815 #if defined (GDB_NM_FILE)
816 gdb_nm_file = GDB_NM_FILE;
818 fprintf_unfiltered (file,
819 "gdbarch_dump: GDB_NM_FILE = %s\n",
821 fprintf_unfiltered (file,
822 "gdbarch_dump: addr_bit = %s\n",
823 plongest (gdbarch->addr_bit));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: addr_bits_remove = <%s>\n",
826 host_address_to_string (gdbarch->addr_bits_remove));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
829 gdbarch_address_class_name_to_type_flags_p (gdbarch));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
832 host_address_to_string (gdbarch->address_class_name_to_type_flags));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
835 gdbarch_address_class_type_flags_p (gdbarch));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: address_class_type_flags = <%s>\n",
838 host_address_to_string (gdbarch->address_class_type_flags));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
841 gdbarch_address_class_type_flags_to_name_p (gdbarch));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
844 host_address_to_string (gdbarch->address_class_type_flags_to_name));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: address_to_pointer = <%s>\n",
847 host_address_to_string (gdbarch->address_to_pointer));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
850 gdbarch_adjust_breakpoint_address_p (gdbarch));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
853 host_address_to_string (gdbarch->adjust_breakpoint_address));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: auto_charset = <%s>\n",
856 host_address_to_string (gdbarch->auto_charset));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: auto_wide_charset = <%s>\n",
859 host_address_to_string (gdbarch->auto_wide_charset));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
862 gdbarch_ax_pseudo_register_collect_p (gdbarch));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
865 host_address_to_string (gdbarch->ax_pseudo_register_collect));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
868 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
871 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: believe_pcc_promotion = %s\n",
874 plongest (gdbarch->believe_pcc_promotion));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: bfd_arch_info = %s\n",
877 gdbarch_bfd_arch_info (gdbarch)->printable_name);
878 fprintf_unfiltered (file,
879 "gdbarch_dump: bits_big_endian = %s\n",
880 plongest (gdbarch->bits_big_endian));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
883 host_address_to_string (gdbarch->breakpoint_from_pc));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: byte_order = %s\n",
886 plongest (gdbarch->byte_order));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: byte_order_for_code = %s\n",
889 plongest (gdbarch->byte_order_for_code));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: call_dummy_location = %s\n",
892 plongest (gdbarch->call_dummy_location));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: cannot_fetch_register = <%s>\n",
895 host_address_to_string (gdbarch->cannot_fetch_register));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: cannot_step_breakpoint = %s\n",
898 plongest (gdbarch->cannot_step_breakpoint));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: cannot_store_register = <%s>\n",
901 host_address_to_string (gdbarch->cannot_store_register));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: char_signed = %s\n",
904 plongest (gdbarch->char_signed));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
907 host_address_to_string (gdbarch->coff_make_msymbol_special));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
910 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: convert_register_p = <%s>\n",
913 host_address_to_string (gdbarch->convert_register_p));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
916 gdbarch_core_info_proc_p (gdbarch));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: core_info_proc = <%s>\n",
919 host_address_to_string (gdbarch->core_info_proc));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
922 gdbarch_core_pid_to_str_p (gdbarch));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: core_pid_to_str = <%s>\n",
925 host_address_to_string (gdbarch->core_pid_to_str));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
928 gdbarch_core_read_description_p (gdbarch));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: core_read_description = <%s>\n",
931 host_address_to_string (gdbarch->core_read_description));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: core_regset_sections = %s\n",
934 host_address_to_string (gdbarch->core_regset_sections));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
937 gdbarch_core_xfer_shared_libraries_p (gdbarch));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
940 host_address_to_string (gdbarch->core_xfer_shared_libraries));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
943 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
946 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: decr_pc_after_break = %s\n",
949 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: deprecated_fp_regnum = %s\n",
952 plongest (gdbarch->deprecated_fp_regnum));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: deprecated_function_start_offset = %s\n",
955 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
958 gdbarch_displaced_step_copy_insn_p (gdbarch));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
961 host_address_to_string (gdbarch->displaced_step_copy_insn));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
964 gdbarch_displaced_step_fixup_p (gdbarch));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: displaced_step_fixup = <%s>\n",
967 host_address_to_string (gdbarch->displaced_step_fixup));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
970 host_address_to_string (gdbarch->displaced_step_free_closure));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
973 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: displaced_step_location = <%s>\n",
976 host_address_to_string (gdbarch->displaced_step_location));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: double_bit = %s\n",
979 plongest (gdbarch->double_bit));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: double_format = %s\n",
982 pformat (gdbarch->double_format));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
985 gdbarch_dummy_id_p (gdbarch));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: dummy_id = <%s>\n",
988 host_address_to_string (gdbarch->dummy_id));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: dwarf2_addr_size = %s\n",
991 plongest (gdbarch->dwarf2_addr_size));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
994 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
997 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
1000 host_address_to_string (gdbarch->elf_make_msymbol_special));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
1003 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
1006 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
1009 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1012 gdbarch_fetch_pointer_argument_p (gdbarch));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
1015 host_address_to_string (gdbarch->fetch_pointer_argument));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1018 gdbarch_fetch_tls_load_module_address_p (gdbarch));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
1021 host_address_to_string (gdbarch->fetch_tls_load_module_address));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
1024 gdbarch_find_memory_regions_p (gdbarch));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: find_memory_regions = <%s>\n",
1027 host_address_to_string (gdbarch->find_memory_regions));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: float_bit = %s\n",
1030 plongest (gdbarch->float_bit));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: float_format = %s\n",
1033 pformat (gdbarch->float_format));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: fp0_regnum = %s\n",
1036 plongest (gdbarch->fp0_regnum));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1039 gdbarch_frame_align_p (gdbarch));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: frame_align = <%s>\n",
1042 host_address_to_string (gdbarch->frame_align));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: frame_args_skip = %s\n",
1045 core_addr_to_string_nz (gdbarch->frame_args_skip));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1048 gdbarch_frame_num_args_p (gdbarch));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: frame_num_args = <%s>\n",
1051 host_address_to_string (gdbarch->frame_num_args));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: frame_red_zone_size = %s\n",
1054 plongest (gdbarch->frame_red_zone_size));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1057 gdbarch_gcore_bfd_target_p (gdbarch));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: gcore_bfd_target = %s\n",
1060 pstring (gdbarch->gcore_bfd_target));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1063 gdbarch_gdb_signal_from_target_p (gdbarch));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1066 host_address_to_string (gdbarch->gdb_signal_from_target));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1069 gdbarch_gdb_signal_to_target_p (gdbarch));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1072 host_address_to_string (gdbarch->gdb_signal_to_target));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: gen_return_address = <%s>\n",
1075 host_address_to_string (gdbarch->gen_return_address));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1078 gdbarch_get_longjmp_target_p (gdbarch));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: get_longjmp_target = <%s>\n",
1081 host_address_to_string (gdbarch->get_longjmp_target));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1084 gdbarch_get_siginfo_type_p (gdbarch));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: get_siginfo_type = <%s>\n",
1087 host_address_to_string (gdbarch->get_siginfo_type));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1090 gdbarch_get_syscall_number_p (gdbarch));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: get_syscall_number = <%s>\n",
1093 host_address_to_string (gdbarch->get_syscall_number));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: half_bit = %s\n",
1096 plongest (gdbarch->half_bit));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: half_format = %s\n",
1099 pformat (gdbarch->half_format));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: has_dos_based_file_system = %s\n",
1102 plongest (gdbarch->has_dos_based_file_system));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: has_global_breakpoints = %s\n",
1105 plongest (gdbarch->has_global_breakpoints));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: has_global_solist = %s\n",
1108 plongest (gdbarch->has_global_solist));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: has_shared_address_space = <%s>\n",
1111 host_address_to_string (gdbarch->has_shared_address_space));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1114 plongest (gdbarch->have_nonsteppable_watchpoint));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
1117 host_address_to_string (gdbarch->in_function_epilogue_p));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1120 host_address_to_string (gdbarch->in_solib_return_trampoline));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1123 gdbarch_info_proc_p (gdbarch));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: info_proc = <%s>\n",
1126 host_address_to_string (gdbarch->info_proc));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: inner_than = <%s>\n",
1129 host_address_to_string (gdbarch->inner_than));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: int_bit = %s\n",
1132 plongest (gdbarch->int_bit));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1135 gdbarch_integer_to_address_p (gdbarch));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: integer_to_address = <%s>\n",
1138 host_address_to_string (gdbarch->integer_to_address));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1141 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: long_bit = %s\n",
1144 plongest (gdbarch->long_bit));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: long_double_bit = %s\n",
1147 plongest (gdbarch->long_double_bit));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: long_double_format = %s\n",
1150 pformat (gdbarch->long_double_format));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: long_long_align_bit = %s\n",
1153 plongest (gdbarch->long_long_align_bit));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: long_long_bit = %s\n",
1156 plongest (gdbarch->long_long_bit));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1159 gdbarch_make_corefile_notes_p (gdbarch));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: make_corefile_notes = <%s>\n",
1162 host_address_to_string (gdbarch->make_corefile_notes));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1165 gdbarch_max_insn_length_p (gdbarch));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: max_insn_length = %s\n",
1168 plongest (gdbarch->max_insn_length));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1171 host_address_to_string (gdbarch->memory_insert_breakpoint));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1174 host_address_to_string (gdbarch->memory_remove_breakpoint));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: num_pseudo_regs = %s\n",
1177 plongest (gdbarch->num_pseudo_regs));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: num_regs = %s\n",
1180 plongest (gdbarch->num_regs));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: osabi = %s\n",
1183 plongest (gdbarch->osabi));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1186 gdbarch_overlay_update_p (gdbarch));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: overlay_update = <%s>\n",
1189 host_address_to_string (gdbarch->overlay_update));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: pc_regnum = %s\n",
1192 plongest (gdbarch->pc_regnum));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: pointer_to_address = <%s>\n",
1195 host_address_to_string (gdbarch->pointer_to_address));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1198 gdbarch_print_float_info_p (gdbarch));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: print_float_info = <%s>\n",
1201 host_address_to_string (gdbarch->print_float_info));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: print_insn = <%s>\n",
1204 host_address_to_string (gdbarch->print_insn));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: print_registers_info = <%s>\n",
1207 host_address_to_string (gdbarch->print_registers_info));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1210 gdbarch_print_vector_info_p (gdbarch));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: print_vector_info = <%s>\n",
1213 host_address_to_string (gdbarch->print_vector_info));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1216 gdbarch_process_record_p (gdbarch));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: process_record = <%s>\n",
1219 host_address_to_string (gdbarch->process_record));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1222 gdbarch_process_record_signal_p (gdbarch));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: process_record_signal = <%s>\n",
1225 host_address_to_string (gdbarch->process_record_signal));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: ps_regnum = %s\n",
1228 plongest (gdbarch->ps_regnum));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1231 gdbarch_pseudo_register_read_p (gdbarch));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: pseudo_register_read = <%s>\n",
1234 host_address_to_string (gdbarch->pseudo_register_read));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1237 gdbarch_pseudo_register_read_value_p (gdbarch));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1240 host_address_to_string (gdbarch->pseudo_register_read_value));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1243 gdbarch_pseudo_register_write_p (gdbarch));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: pseudo_register_write = <%s>\n",
1246 host_address_to_string (gdbarch->pseudo_register_write));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: ptr_bit = %s\n",
1249 plongest (gdbarch->ptr_bit));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1252 gdbarch_push_dummy_call_p (gdbarch));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: push_dummy_call = <%s>\n",
1255 host_address_to_string (gdbarch->push_dummy_call));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1258 gdbarch_push_dummy_code_p (gdbarch));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: push_dummy_code = <%s>\n",
1261 host_address_to_string (gdbarch->push_dummy_code));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: ravenscar_ops = %s\n",
1264 host_address_to_string (gdbarch->ravenscar_ops));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1267 gdbarch_read_pc_p (gdbarch));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: read_pc = <%s>\n",
1270 host_address_to_string (gdbarch->read_pc));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1273 gdbarch_record_special_symbol_p (gdbarch));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: record_special_symbol = <%s>\n",
1276 host_address_to_string (gdbarch->record_special_symbol));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: register_name = <%s>\n",
1279 host_address_to_string (gdbarch->register_name));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: register_reggroup_p = <%s>\n",
1282 host_address_to_string (gdbarch->register_reggroup_p));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: register_sim_regno = <%s>\n",
1285 host_address_to_string (gdbarch->register_sim_regno));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: register_to_value = <%s>\n",
1288 host_address_to_string (gdbarch->register_to_value));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1291 gdbarch_register_type_p (gdbarch));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: register_type = <%s>\n",
1294 host_address_to_string (gdbarch->register_type));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1297 gdbarch_regset_from_core_section_p (gdbarch));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: regset_from_core_section = <%s>\n",
1300 host_address_to_string (gdbarch->regset_from_core_section));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1303 gdbarch_relocate_instruction_p (gdbarch));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: relocate_instruction = <%s>\n",
1306 host_address_to_string (gdbarch->relocate_instruction));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1309 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: remote_register_number = <%s>\n",
1312 host_address_to_string (gdbarch->remote_register_number));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1315 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1318 gdbarch_return_value_p (gdbarch));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: return_value = <%s>\n",
1321 host_address_to_string (gdbarch->return_value));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1324 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: short_bit = %s\n",
1327 plongest (gdbarch->short_bit));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1330 gdbarch_single_step_through_delay_p (gdbarch));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: single_step_through_delay = <%s>\n",
1333 host_address_to_string (gdbarch->single_step_through_delay));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1336 gdbarch_skip_main_prologue_p (gdbarch));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: skip_main_prologue = <%s>\n",
1339 host_address_to_string (gdbarch->skip_main_prologue));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1342 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1345 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: skip_prologue = <%s>\n",
1348 host_address_to_string (gdbarch->skip_prologue));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1351 host_address_to_string (gdbarch->skip_solib_resolver));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1354 host_address_to_string (gdbarch->skip_trampoline_code));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1357 gdbarch_software_single_step_p (gdbarch));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: software_single_step = <%s>\n",
1360 host_address_to_string (gdbarch->software_single_step));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1363 plongest (gdbarch->sofun_address_maybe_missing));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: solib_symbols_extension = %s\n",
1366 pstring (gdbarch->solib_symbols_extension));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: sp_regnum = %s\n",
1369 plongest (gdbarch->sp_regnum));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1372 host_address_to_string (gdbarch->stab_reg_to_regnum));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1375 host_address_to_string (gdbarch->stabs_argument_has_addr));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1378 pstring (gdbarch->stap_gdb_register_prefix));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1381 pstring (gdbarch->stap_gdb_register_suffix));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: stap_integer_prefixes = %s\n",
1384 pstring_list (gdbarch->stap_integer_prefixes));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: stap_integer_suffixes = %s\n",
1387 pstring_list (gdbarch->stap_integer_suffixes));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1390 gdbarch_stap_is_single_operand_p (gdbarch));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1393 host_address_to_string (gdbarch->stap_is_single_operand));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1396 gdbarch_stap_parse_special_token_p (gdbarch));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1399 host_address_to_string (gdbarch->stap_parse_special_token));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1402 pstring_list (gdbarch->stap_register_indirection_prefixes));
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1405 pstring_list (gdbarch->stap_register_indirection_suffixes));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: stap_register_prefixes = %s\n",
1408 pstring_list (gdbarch->stap_register_prefixes));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: stap_register_suffixes = %s\n",
1411 pstring_list (gdbarch->stap_register_suffixes));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1414 gdbarch_static_transform_name_p (gdbarch));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: static_transform_name = <%s>\n",
1417 host_address_to_string (gdbarch->static_transform_name));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: target_desc = %s\n",
1420 host_address_to_string (gdbarch->target_desc));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1423 gdbarch_unwind_pc_p (gdbarch));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: unwind_pc = <%s>\n",
1426 host_address_to_string (gdbarch->unwind_pc));
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1429 gdbarch_unwind_sp_p (gdbarch));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: unwind_sp = <%s>\n",
1432 host_address_to_string (gdbarch->unwind_sp));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: value_from_register = <%s>\n",
1435 host_address_to_string (gdbarch->value_from_register));
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: value_to_register = <%s>\n",
1438 host_address_to_string (gdbarch->value_to_register));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: vbit_in_delta = %s\n",
1441 plongest (gdbarch->vbit_in_delta));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1444 host_address_to_string (gdbarch->virtual_frame_pointer));
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: vtable_function_descriptors = %s\n",
1447 plongest (gdbarch->vtable_function_descriptors));
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1450 gdbarch_write_pc_p (gdbarch));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: write_pc = <%s>\n",
1453 host_address_to_string (gdbarch->write_pc));
1454 if (gdbarch->dump_tdep != NULL)
1455 gdbarch->dump_tdep (gdbarch, file);
1458 struct gdbarch_tdep *
1459 gdbarch_tdep (struct gdbarch *gdbarch)
1461 if (gdbarch_debug >= 2)
1462 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1463 return gdbarch->tdep;
1467 const struct bfd_arch_info *
1468 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1470 gdb_assert (gdbarch != NULL);
1471 if (gdbarch_debug >= 2)
1472 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1473 return gdbarch->bfd_arch_info;
1477 gdbarch_byte_order (struct gdbarch *gdbarch)
1479 gdb_assert (gdbarch != NULL);
1480 if (gdbarch_debug >= 2)
1481 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1482 return gdbarch->byte_order;
1486 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1488 gdb_assert (gdbarch != NULL);
1489 if (gdbarch_debug >= 2)
1490 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1491 return gdbarch->byte_order_for_code;
1495 gdbarch_osabi (struct gdbarch *gdbarch)
1497 gdb_assert (gdbarch != NULL);
1498 if (gdbarch_debug >= 2)
1499 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1500 return gdbarch->osabi;
1503 const struct target_desc *
1504 gdbarch_target_desc (struct gdbarch *gdbarch)
1506 gdb_assert (gdbarch != NULL);
1507 if (gdbarch_debug >= 2)
1508 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1509 return gdbarch->target_desc;
1513 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1515 gdb_assert (gdbarch != NULL);
1516 /* Skip verify of bits_big_endian, invalid_p == 0 */
1517 if (gdbarch_debug >= 2)
1518 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1519 return gdbarch->bits_big_endian;
1523 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1524 int bits_big_endian)
1526 gdbarch->bits_big_endian = bits_big_endian;
1530 gdbarch_short_bit (struct gdbarch *gdbarch)
1532 gdb_assert (gdbarch != NULL);
1533 /* Skip verify of short_bit, invalid_p == 0 */
1534 if (gdbarch_debug >= 2)
1535 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1536 return gdbarch->short_bit;
1540 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1543 gdbarch->short_bit = short_bit;
1547 gdbarch_int_bit (struct gdbarch *gdbarch)
1549 gdb_assert (gdbarch != NULL);
1550 /* Skip verify of int_bit, invalid_p == 0 */
1551 if (gdbarch_debug >= 2)
1552 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1553 return gdbarch->int_bit;
1557 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1560 gdbarch->int_bit = int_bit;
1564 gdbarch_long_bit (struct gdbarch *gdbarch)
1566 gdb_assert (gdbarch != NULL);
1567 /* Skip verify of long_bit, invalid_p == 0 */
1568 if (gdbarch_debug >= 2)
1569 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1570 return gdbarch->long_bit;
1574 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1577 gdbarch->long_bit = long_bit;
1581 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1583 gdb_assert (gdbarch != NULL);
1584 /* Skip verify of long_long_bit, invalid_p == 0 */
1585 if (gdbarch_debug >= 2)
1586 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1587 return gdbarch->long_long_bit;
1591 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1594 gdbarch->long_long_bit = long_long_bit;
1598 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1600 gdb_assert (gdbarch != NULL);
1601 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1602 if (gdbarch_debug >= 2)
1603 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1604 return gdbarch->long_long_align_bit;
1608 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1609 int long_long_align_bit)
1611 gdbarch->long_long_align_bit = long_long_align_bit;
1615 gdbarch_half_bit (struct gdbarch *gdbarch)
1617 gdb_assert (gdbarch != NULL);
1618 /* Skip verify of half_bit, invalid_p == 0 */
1619 if (gdbarch_debug >= 2)
1620 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1621 return gdbarch->half_bit;
1625 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1628 gdbarch->half_bit = half_bit;
1631 const struct floatformat **
1632 gdbarch_half_format (struct gdbarch *gdbarch)
1634 gdb_assert (gdbarch != NULL);
1635 if (gdbarch_debug >= 2)
1636 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1637 return gdbarch->half_format;
1641 set_gdbarch_half_format (struct gdbarch *gdbarch,
1642 const struct floatformat ** half_format)
1644 gdbarch->half_format = half_format;
1648 gdbarch_float_bit (struct gdbarch *gdbarch)
1650 gdb_assert (gdbarch != NULL);
1651 /* Skip verify of float_bit, invalid_p == 0 */
1652 if (gdbarch_debug >= 2)
1653 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1654 return gdbarch->float_bit;
1658 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1661 gdbarch->float_bit = float_bit;
1664 const struct floatformat **
1665 gdbarch_float_format (struct gdbarch *gdbarch)
1667 gdb_assert (gdbarch != NULL);
1668 if (gdbarch_debug >= 2)
1669 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1670 return gdbarch->float_format;
1674 set_gdbarch_float_format (struct gdbarch *gdbarch,
1675 const struct floatformat ** float_format)
1677 gdbarch->float_format = float_format;
1681 gdbarch_double_bit (struct gdbarch *gdbarch)
1683 gdb_assert (gdbarch != NULL);
1684 /* Skip verify of double_bit, invalid_p == 0 */
1685 if (gdbarch_debug >= 2)
1686 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1687 return gdbarch->double_bit;
1691 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1694 gdbarch->double_bit = double_bit;
1697 const struct floatformat **
1698 gdbarch_double_format (struct gdbarch *gdbarch)
1700 gdb_assert (gdbarch != NULL);
1701 if (gdbarch_debug >= 2)
1702 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1703 return gdbarch->double_format;
1707 set_gdbarch_double_format (struct gdbarch *gdbarch,
1708 const struct floatformat ** double_format)
1710 gdbarch->double_format = double_format;
1714 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1716 gdb_assert (gdbarch != NULL);
1717 /* Skip verify of long_double_bit, invalid_p == 0 */
1718 if (gdbarch_debug >= 2)
1719 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1720 return gdbarch->long_double_bit;
1724 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1725 int long_double_bit)
1727 gdbarch->long_double_bit = long_double_bit;
1730 const struct floatformat **
1731 gdbarch_long_double_format (struct gdbarch *gdbarch)
1733 gdb_assert (gdbarch != NULL);
1734 if (gdbarch_debug >= 2)
1735 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1736 return gdbarch->long_double_format;
1740 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1741 const struct floatformat ** long_double_format)
1743 gdbarch->long_double_format = long_double_format;
1747 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1749 gdb_assert (gdbarch != NULL);
1750 /* Skip verify of ptr_bit, invalid_p == 0 */
1751 if (gdbarch_debug >= 2)
1752 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1753 return gdbarch->ptr_bit;
1757 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1760 gdbarch->ptr_bit = ptr_bit;
1764 gdbarch_addr_bit (struct gdbarch *gdbarch)
1766 gdb_assert (gdbarch != NULL);
1767 /* Check variable changed from pre-default. */
1768 gdb_assert (gdbarch->addr_bit != 0);
1769 if (gdbarch_debug >= 2)
1770 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1771 return gdbarch->addr_bit;
1775 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1778 gdbarch->addr_bit = addr_bit;
1782 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1784 gdb_assert (gdbarch != NULL);
1785 /* Check variable changed from pre-default. */
1786 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1787 if (gdbarch_debug >= 2)
1788 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1789 return gdbarch->dwarf2_addr_size;
1793 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1794 int dwarf2_addr_size)
1796 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1800 gdbarch_char_signed (struct gdbarch *gdbarch)
1802 gdb_assert (gdbarch != NULL);
1803 /* Check variable changed from pre-default. */
1804 gdb_assert (gdbarch->char_signed != -1);
1805 if (gdbarch_debug >= 2)
1806 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1807 return gdbarch->char_signed;
1811 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1814 gdbarch->char_signed = char_signed;
1818 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1820 gdb_assert (gdbarch != NULL);
1821 return gdbarch->read_pc != NULL;
1825 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1827 gdb_assert (gdbarch != NULL);
1828 gdb_assert (gdbarch->read_pc != NULL);
1829 if (gdbarch_debug >= 2)
1830 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1831 return gdbarch->read_pc (regcache);
1835 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1836 gdbarch_read_pc_ftype read_pc)
1838 gdbarch->read_pc = read_pc;
1842 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1844 gdb_assert (gdbarch != NULL);
1845 return gdbarch->write_pc != NULL;
1849 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1851 gdb_assert (gdbarch != NULL);
1852 gdb_assert (gdbarch->write_pc != NULL);
1853 if (gdbarch_debug >= 2)
1854 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1855 gdbarch->write_pc (regcache, val);
1859 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1860 gdbarch_write_pc_ftype write_pc)
1862 gdbarch->write_pc = write_pc;
1866 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1868 gdb_assert (gdbarch != NULL);
1869 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1870 if (gdbarch_debug >= 2)
1871 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1872 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1876 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1877 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1879 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1883 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1885 gdb_assert (gdbarch != NULL);
1886 return gdbarch->pseudo_register_read != NULL;
1889 enum register_status
1890 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1892 gdb_assert (gdbarch != NULL);
1893 gdb_assert (gdbarch->pseudo_register_read != NULL);
1894 if (gdbarch_debug >= 2)
1895 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1896 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1900 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1901 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1903 gdbarch->pseudo_register_read = pseudo_register_read;
1907 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1909 gdb_assert (gdbarch != NULL);
1910 return gdbarch->pseudo_register_read_value != NULL;
1914 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1916 gdb_assert (gdbarch != NULL);
1917 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1918 if (gdbarch_debug >= 2)
1919 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1920 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1924 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1925 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1927 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1931 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1933 gdb_assert (gdbarch != NULL);
1934 return gdbarch->pseudo_register_write != NULL;
1938 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1940 gdb_assert (gdbarch != NULL);
1941 gdb_assert (gdbarch->pseudo_register_write != NULL);
1942 if (gdbarch_debug >= 2)
1943 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1944 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1948 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1949 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1951 gdbarch->pseudo_register_write = pseudo_register_write;
1955 gdbarch_num_regs (struct gdbarch *gdbarch)
1957 gdb_assert (gdbarch != NULL);
1958 /* Check variable changed from pre-default. */
1959 gdb_assert (gdbarch->num_regs != -1);
1960 if (gdbarch_debug >= 2)
1961 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1962 return gdbarch->num_regs;
1966 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1969 gdbarch->num_regs = num_regs;
1973 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1975 gdb_assert (gdbarch != NULL);
1976 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1977 if (gdbarch_debug >= 2)
1978 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1979 return gdbarch->num_pseudo_regs;
1983 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1984 int num_pseudo_regs)
1986 gdbarch->num_pseudo_regs = num_pseudo_regs;
1990 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1992 gdb_assert (gdbarch != NULL);
1993 return gdbarch->ax_pseudo_register_collect != NULL;
1997 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1999 gdb_assert (gdbarch != NULL);
2000 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
2001 if (gdbarch_debug >= 2)
2002 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
2003 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
2007 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2008 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2010 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2014 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2016 gdb_assert (gdbarch != NULL);
2017 return gdbarch->ax_pseudo_register_push_stack != NULL;
2021 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2023 gdb_assert (gdbarch != NULL);
2024 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2025 if (gdbarch_debug >= 2)
2026 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2027 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2031 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2032 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2034 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2038 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2040 gdb_assert (gdbarch != NULL);
2041 /* Skip verify of sp_regnum, invalid_p == 0 */
2042 if (gdbarch_debug >= 2)
2043 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2044 return gdbarch->sp_regnum;
2048 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2051 gdbarch->sp_regnum = sp_regnum;
2055 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2057 gdb_assert (gdbarch != NULL);
2058 /* Skip verify of pc_regnum, invalid_p == 0 */
2059 if (gdbarch_debug >= 2)
2060 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2061 return gdbarch->pc_regnum;
2065 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2068 gdbarch->pc_regnum = pc_regnum;
2072 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2074 gdb_assert (gdbarch != NULL);
2075 /* Skip verify of ps_regnum, invalid_p == 0 */
2076 if (gdbarch_debug >= 2)
2077 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2078 return gdbarch->ps_regnum;
2082 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2085 gdbarch->ps_regnum = ps_regnum;
2089 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2091 gdb_assert (gdbarch != NULL);
2092 /* Skip verify of fp0_regnum, invalid_p == 0 */
2093 if (gdbarch_debug >= 2)
2094 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2095 return gdbarch->fp0_regnum;
2099 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2102 gdbarch->fp0_regnum = fp0_regnum;
2106 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2108 gdb_assert (gdbarch != NULL);
2109 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2110 if (gdbarch_debug >= 2)
2111 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2112 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2116 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2117 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2119 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2123 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2125 gdb_assert (gdbarch != NULL);
2126 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2127 if (gdbarch_debug >= 2)
2128 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2129 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2133 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2134 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2136 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2140 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2142 gdb_assert (gdbarch != NULL);
2143 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2144 if (gdbarch_debug >= 2)
2145 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2146 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2150 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2151 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2153 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2157 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2159 gdb_assert (gdbarch != NULL);
2160 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2161 if (gdbarch_debug >= 2)
2162 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2163 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2167 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2168 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2170 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2174 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2176 gdb_assert (gdbarch != NULL);
2177 gdb_assert (gdbarch->register_name != NULL);
2178 if (gdbarch_debug >= 2)
2179 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2180 return gdbarch->register_name (gdbarch, regnr);
2184 set_gdbarch_register_name (struct gdbarch *gdbarch,
2185 gdbarch_register_name_ftype register_name)
2187 gdbarch->register_name = register_name;
2191 gdbarch_register_type_p (struct gdbarch *gdbarch)
2193 gdb_assert (gdbarch != NULL);
2194 return gdbarch->register_type != NULL;
2198 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2200 gdb_assert (gdbarch != NULL);
2201 gdb_assert (gdbarch->register_type != NULL);
2202 if (gdbarch_debug >= 2)
2203 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2204 return gdbarch->register_type (gdbarch, reg_nr);
2208 set_gdbarch_register_type (struct gdbarch *gdbarch,
2209 gdbarch_register_type_ftype register_type)
2211 gdbarch->register_type = register_type;
2215 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2217 gdb_assert (gdbarch != NULL);
2218 return gdbarch->dummy_id != NULL;
2222 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2224 gdb_assert (gdbarch != NULL);
2225 gdb_assert (gdbarch->dummy_id != NULL);
2226 if (gdbarch_debug >= 2)
2227 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2228 return gdbarch->dummy_id (gdbarch, this_frame);
2232 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2233 gdbarch_dummy_id_ftype dummy_id)
2235 gdbarch->dummy_id = dummy_id;
2239 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2241 gdb_assert (gdbarch != NULL);
2242 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2243 if (gdbarch_debug >= 2)
2244 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2245 return gdbarch->deprecated_fp_regnum;
2249 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2250 int deprecated_fp_regnum)
2252 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2256 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2258 gdb_assert (gdbarch != NULL);
2259 return gdbarch->push_dummy_call != NULL;
2263 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)
2265 gdb_assert (gdbarch != NULL);
2266 gdb_assert (gdbarch->push_dummy_call != NULL);
2267 if (gdbarch_debug >= 2)
2268 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2269 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2273 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2274 gdbarch_push_dummy_call_ftype push_dummy_call)
2276 gdbarch->push_dummy_call = push_dummy_call;
2280 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2282 gdb_assert (gdbarch != NULL);
2283 /* Skip verify of call_dummy_location, invalid_p == 0 */
2284 if (gdbarch_debug >= 2)
2285 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2286 return gdbarch->call_dummy_location;
2290 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2291 int call_dummy_location)
2293 gdbarch->call_dummy_location = call_dummy_location;
2297 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2299 gdb_assert (gdbarch != NULL);
2300 return gdbarch->push_dummy_code != NULL;
2304 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)
2306 gdb_assert (gdbarch != NULL);
2307 gdb_assert (gdbarch->push_dummy_code != NULL);
2308 if (gdbarch_debug >= 2)
2309 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2310 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2314 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2315 gdbarch_push_dummy_code_ftype push_dummy_code)
2317 gdbarch->push_dummy_code = push_dummy_code;
2321 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2323 gdb_assert (gdbarch != NULL);
2324 gdb_assert (gdbarch->print_registers_info != NULL);
2325 if (gdbarch_debug >= 2)
2326 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2327 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2331 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2332 gdbarch_print_registers_info_ftype print_registers_info)
2334 gdbarch->print_registers_info = print_registers_info;
2338 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2340 gdb_assert (gdbarch != NULL);
2341 return gdbarch->print_float_info != NULL;
2345 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2347 gdb_assert (gdbarch != NULL);
2348 gdb_assert (gdbarch->print_float_info != NULL);
2349 if (gdbarch_debug >= 2)
2350 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2351 gdbarch->print_float_info (gdbarch, file, frame, args);
2355 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2356 gdbarch_print_float_info_ftype print_float_info)
2358 gdbarch->print_float_info = print_float_info;
2362 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2364 gdb_assert (gdbarch != NULL);
2365 return gdbarch->print_vector_info != NULL;
2369 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2371 gdb_assert (gdbarch != NULL);
2372 gdb_assert (gdbarch->print_vector_info != NULL);
2373 if (gdbarch_debug >= 2)
2374 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2375 gdbarch->print_vector_info (gdbarch, file, frame, args);
2379 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2380 gdbarch_print_vector_info_ftype print_vector_info)
2382 gdbarch->print_vector_info = print_vector_info;
2386 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2388 gdb_assert (gdbarch != NULL);
2389 gdb_assert (gdbarch->register_sim_regno != NULL);
2390 if (gdbarch_debug >= 2)
2391 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2392 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2396 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2397 gdbarch_register_sim_regno_ftype register_sim_regno)
2399 gdbarch->register_sim_regno = register_sim_regno;
2403 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2405 gdb_assert (gdbarch != NULL);
2406 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2407 if (gdbarch_debug >= 2)
2408 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2409 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2413 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2414 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2416 gdbarch->cannot_fetch_register = cannot_fetch_register;
2420 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2422 gdb_assert (gdbarch != NULL);
2423 gdb_assert (gdbarch->cannot_store_register != NULL);
2424 if (gdbarch_debug >= 2)
2425 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2426 return gdbarch->cannot_store_register (gdbarch, regnum);
2430 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2431 gdbarch_cannot_store_register_ftype cannot_store_register)
2433 gdbarch->cannot_store_register = cannot_store_register;
2437 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2439 gdb_assert (gdbarch != NULL);
2440 return gdbarch->get_longjmp_target != NULL;
2444 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2446 gdb_assert (gdbarch != NULL);
2447 gdb_assert (gdbarch->get_longjmp_target != NULL);
2448 if (gdbarch_debug >= 2)
2449 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2450 return gdbarch->get_longjmp_target (frame, pc);
2454 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2455 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2457 gdbarch->get_longjmp_target = get_longjmp_target;
2461 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2463 gdb_assert (gdbarch != NULL);
2464 if (gdbarch_debug >= 2)
2465 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2466 return gdbarch->believe_pcc_promotion;
2470 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2471 int believe_pcc_promotion)
2473 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2477 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2479 gdb_assert (gdbarch != NULL);
2480 gdb_assert (gdbarch->convert_register_p != NULL);
2481 if (gdbarch_debug >= 2)
2482 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2483 return gdbarch->convert_register_p (gdbarch, regnum, type);
2487 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2488 gdbarch_convert_register_p_ftype convert_register_p)
2490 gdbarch->convert_register_p = convert_register_p;
2494 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2496 gdb_assert (gdbarch != NULL);
2497 gdb_assert (gdbarch->register_to_value != NULL);
2498 if (gdbarch_debug >= 2)
2499 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2500 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2504 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2505 gdbarch_register_to_value_ftype register_to_value)
2507 gdbarch->register_to_value = register_to_value;
2511 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2513 gdb_assert (gdbarch != NULL);
2514 gdb_assert (gdbarch->value_to_register != NULL);
2515 if (gdbarch_debug >= 2)
2516 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2517 gdbarch->value_to_register (frame, regnum, type, buf);
2521 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2522 gdbarch_value_to_register_ftype value_to_register)
2524 gdbarch->value_to_register = value_to_register;
2528 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2530 gdb_assert (gdbarch != NULL);
2531 gdb_assert (gdbarch->value_from_register != NULL);
2532 if (gdbarch_debug >= 2)
2533 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2534 return gdbarch->value_from_register (type, regnum, frame);
2538 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2539 gdbarch_value_from_register_ftype value_from_register)
2541 gdbarch->value_from_register = value_from_register;
2545 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2547 gdb_assert (gdbarch != NULL);
2548 gdb_assert (gdbarch->pointer_to_address != NULL);
2549 if (gdbarch_debug >= 2)
2550 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2551 return gdbarch->pointer_to_address (gdbarch, type, buf);
2555 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2556 gdbarch_pointer_to_address_ftype pointer_to_address)
2558 gdbarch->pointer_to_address = pointer_to_address;
2562 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2564 gdb_assert (gdbarch != NULL);
2565 gdb_assert (gdbarch->address_to_pointer != NULL);
2566 if (gdbarch_debug >= 2)
2567 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2568 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2572 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2573 gdbarch_address_to_pointer_ftype address_to_pointer)
2575 gdbarch->address_to_pointer = address_to_pointer;
2579 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2581 gdb_assert (gdbarch != NULL);
2582 return gdbarch->integer_to_address != NULL;
2586 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2588 gdb_assert (gdbarch != NULL);
2589 gdb_assert (gdbarch->integer_to_address != NULL);
2590 if (gdbarch_debug >= 2)
2591 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2592 return gdbarch->integer_to_address (gdbarch, type, buf);
2596 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2597 gdbarch_integer_to_address_ftype integer_to_address)
2599 gdbarch->integer_to_address = integer_to_address;
2603 gdbarch_return_value_p (struct gdbarch *gdbarch)
2605 gdb_assert (gdbarch != NULL);
2606 return gdbarch->return_value != NULL;
2609 enum return_value_convention
2610 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2612 gdb_assert (gdbarch != NULL);
2613 gdb_assert (gdbarch->return_value != NULL);
2614 if (gdbarch_debug >= 2)
2615 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2616 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2620 set_gdbarch_return_value (struct gdbarch *gdbarch,
2621 gdbarch_return_value_ftype return_value)
2623 gdbarch->return_value = return_value;
2627 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2629 gdb_assert (gdbarch != NULL);
2630 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2631 if (gdbarch_debug >= 2)
2632 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2633 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2637 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2638 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2640 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2644 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2646 gdb_assert (gdbarch != NULL);
2647 gdb_assert (gdbarch->skip_prologue != NULL);
2648 if (gdbarch_debug >= 2)
2649 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2650 return gdbarch->skip_prologue (gdbarch, ip);
2654 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2655 gdbarch_skip_prologue_ftype skip_prologue)
2657 gdbarch->skip_prologue = skip_prologue;
2661 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2663 gdb_assert (gdbarch != NULL);
2664 return gdbarch->skip_main_prologue != NULL;
2668 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2670 gdb_assert (gdbarch != NULL);
2671 gdb_assert (gdbarch->skip_main_prologue != NULL);
2672 if (gdbarch_debug >= 2)
2673 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2674 return gdbarch->skip_main_prologue (gdbarch, ip);
2678 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2679 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2681 gdbarch->skip_main_prologue = skip_main_prologue;
2685 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2687 gdb_assert (gdbarch != NULL);
2688 gdb_assert (gdbarch->inner_than != NULL);
2689 if (gdbarch_debug >= 2)
2690 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2691 return gdbarch->inner_than (lhs, rhs);
2695 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2696 gdbarch_inner_than_ftype inner_than)
2698 gdbarch->inner_than = inner_than;
2702 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2704 gdb_assert (gdbarch != NULL);
2705 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2706 if (gdbarch_debug >= 2)
2707 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2708 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2712 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2713 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2715 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2719 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2721 gdb_assert (gdbarch != NULL);
2722 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2723 if (gdbarch_debug >= 2)
2724 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2725 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2729 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2730 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2732 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2736 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2738 gdb_assert (gdbarch != NULL);
2739 return gdbarch->adjust_breakpoint_address != NULL;
2743 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2745 gdb_assert (gdbarch != NULL);
2746 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2747 if (gdbarch_debug >= 2)
2748 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2749 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2753 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2754 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2756 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2760 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2762 gdb_assert (gdbarch != NULL);
2763 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2764 if (gdbarch_debug >= 2)
2765 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2766 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2770 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2771 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2773 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2777 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2779 gdb_assert (gdbarch != NULL);
2780 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2781 if (gdbarch_debug >= 2)
2782 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2783 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2787 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2788 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2790 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2794 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2796 gdb_assert (gdbarch != NULL);
2797 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2798 if (gdbarch_debug >= 2)
2799 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2800 return gdbarch->decr_pc_after_break;
2804 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2805 CORE_ADDR decr_pc_after_break)
2807 gdbarch->decr_pc_after_break = decr_pc_after_break;
2811 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2813 gdb_assert (gdbarch != NULL);
2814 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2815 if (gdbarch_debug >= 2)
2816 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2817 return gdbarch->deprecated_function_start_offset;
2821 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2822 CORE_ADDR deprecated_function_start_offset)
2824 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2828 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2830 gdb_assert (gdbarch != NULL);
2831 gdb_assert (gdbarch->remote_register_number != NULL);
2832 if (gdbarch_debug >= 2)
2833 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2834 return gdbarch->remote_register_number (gdbarch, regno);
2838 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2839 gdbarch_remote_register_number_ftype remote_register_number)
2841 gdbarch->remote_register_number = remote_register_number;
2845 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2847 gdb_assert (gdbarch != NULL);
2848 return gdbarch->fetch_tls_load_module_address != NULL;
2852 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2854 gdb_assert (gdbarch != NULL);
2855 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2856 if (gdbarch_debug >= 2)
2857 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2858 return gdbarch->fetch_tls_load_module_address (objfile);
2862 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2863 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2865 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2869 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2871 gdb_assert (gdbarch != NULL);
2872 /* Skip verify of frame_args_skip, invalid_p == 0 */
2873 if (gdbarch_debug >= 2)
2874 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2875 return gdbarch->frame_args_skip;
2879 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2880 CORE_ADDR frame_args_skip)
2882 gdbarch->frame_args_skip = frame_args_skip;
2886 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2888 gdb_assert (gdbarch != NULL);
2889 return gdbarch->unwind_pc != NULL;
2893 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2895 gdb_assert (gdbarch != NULL);
2896 gdb_assert (gdbarch->unwind_pc != NULL);
2897 if (gdbarch_debug >= 2)
2898 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2899 return gdbarch->unwind_pc (gdbarch, next_frame);
2903 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2904 gdbarch_unwind_pc_ftype unwind_pc)
2906 gdbarch->unwind_pc = unwind_pc;
2910 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2912 gdb_assert (gdbarch != NULL);
2913 return gdbarch->unwind_sp != NULL;
2917 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2919 gdb_assert (gdbarch != NULL);
2920 gdb_assert (gdbarch->unwind_sp != NULL);
2921 if (gdbarch_debug >= 2)
2922 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2923 return gdbarch->unwind_sp (gdbarch, next_frame);
2927 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2928 gdbarch_unwind_sp_ftype unwind_sp)
2930 gdbarch->unwind_sp = unwind_sp;
2934 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2936 gdb_assert (gdbarch != NULL);
2937 return gdbarch->frame_num_args != NULL;
2941 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2943 gdb_assert (gdbarch != NULL);
2944 gdb_assert (gdbarch->frame_num_args != NULL);
2945 if (gdbarch_debug >= 2)
2946 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2947 return gdbarch->frame_num_args (frame);
2951 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2952 gdbarch_frame_num_args_ftype frame_num_args)
2954 gdbarch->frame_num_args = frame_num_args;
2958 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2960 gdb_assert (gdbarch != NULL);
2961 return gdbarch->frame_align != NULL;
2965 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2967 gdb_assert (gdbarch != NULL);
2968 gdb_assert (gdbarch->frame_align != NULL);
2969 if (gdbarch_debug >= 2)
2970 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2971 return gdbarch->frame_align (gdbarch, address);
2975 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2976 gdbarch_frame_align_ftype frame_align)
2978 gdbarch->frame_align = frame_align;
2982 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2984 gdb_assert (gdbarch != NULL);
2985 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
2986 if (gdbarch_debug >= 2)
2987 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
2988 return gdbarch->stabs_argument_has_addr (gdbarch, type);
2992 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
2993 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
2995 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
2999 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3001 gdb_assert (gdbarch != NULL);
3002 if (gdbarch_debug >= 2)
3003 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3004 return gdbarch->frame_red_zone_size;
3008 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3009 int frame_red_zone_size)
3011 gdbarch->frame_red_zone_size = frame_red_zone_size;
3015 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3017 gdb_assert (gdbarch != NULL);
3018 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3019 if (gdbarch_debug >= 2)
3020 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3021 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3025 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3026 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3028 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3032 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3034 gdb_assert (gdbarch != NULL);
3035 gdb_assert (gdbarch->addr_bits_remove != NULL);
3036 if (gdbarch_debug >= 2)
3037 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3038 return gdbarch->addr_bits_remove (gdbarch, addr);
3042 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3043 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3045 gdbarch->addr_bits_remove = addr_bits_remove;
3049 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3051 gdb_assert (gdbarch != NULL);
3052 return gdbarch->software_single_step != NULL;
3056 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3058 gdb_assert (gdbarch != NULL);
3059 gdb_assert (gdbarch->software_single_step != NULL);
3060 if (gdbarch_debug >= 2)
3061 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3062 return gdbarch->software_single_step (frame);
3066 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3067 gdbarch_software_single_step_ftype software_single_step)
3069 gdbarch->software_single_step = software_single_step;
3073 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3075 gdb_assert (gdbarch != NULL);
3076 return gdbarch->single_step_through_delay != NULL;
3080 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3082 gdb_assert (gdbarch != NULL);
3083 gdb_assert (gdbarch->single_step_through_delay != NULL);
3084 if (gdbarch_debug >= 2)
3085 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3086 return gdbarch->single_step_through_delay (gdbarch, frame);
3090 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3091 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3093 gdbarch->single_step_through_delay = single_step_through_delay;
3097 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3099 gdb_assert (gdbarch != NULL);
3100 gdb_assert (gdbarch->print_insn != NULL);
3101 if (gdbarch_debug >= 2)
3102 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3103 return gdbarch->print_insn (vma, info);
3107 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3108 gdbarch_print_insn_ftype print_insn)
3110 gdbarch->print_insn = print_insn;
3114 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3116 gdb_assert (gdbarch != NULL);
3117 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3118 if (gdbarch_debug >= 2)
3119 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3120 return gdbarch->skip_trampoline_code (frame, pc);
3124 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3125 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3127 gdbarch->skip_trampoline_code = skip_trampoline_code;
3131 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3133 gdb_assert (gdbarch != NULL);
3134 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3135 if (gdbarch_debug >= 2)
3136 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3137 return gdbarch->skip_solib_resolver (gdbarch, pc);
3141 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3142 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3144 gdbarch->skip_solib_resolver = skip_solib_resolver;
3148 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3150 gdb_assert (gdbarch != NULL);
3151 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3152 if (gdbarch_debug >= 2)
3153 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3154 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3158 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3159 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3161 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3165 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3167 gdb_assert (gdbarch != NULL);
3168 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3169 if (gdbarch_debug >= 2)
3170 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3171 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3175 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3176 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3178 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3182 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3184 gdb_assert (gdbarch != NULL);
3185 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3186 if (gdbarch_debug >= 2)
3187 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3188 gdbarch->elf_make_msymbol_special (sym, msym);
3192 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3193 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3195 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3199 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3201 gdb_assert (gdbarch != NULL);
3202 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3203 if (gdbarch_debug >= 2)
3204 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3205 gdbarch->coff_make_msymbol_special (val, msym);
3209 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3210 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3212 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3216 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3218 gdb_assert (gdbarch != NULL);
3219 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3220 if (gdbarch_debug >= 2)
3221 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3222 return gdbarch->cannot_step_breakpoint;
3226 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3227 int cannot_step_breakpoint)
3229 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3233 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3235 gdb_assert (gdbarch != NULL);
3236 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3237 if (gdbarch_debug >= 2)
3238 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3239 return gdbarch->have_nonsteppable_watchpoint;
3243 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3244 int have_nonsteppable_watchpoint)
3246 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3250 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3252 gdb_assert (gdbarch != NULL);
3253 return gdbarch->address_class_type_flags != NULL;
3257 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3259 gdb_assert (gdbarch != NULL);
3260 gdb_assert (gdbarch->address_class_type_flags != NULL);
3261 if (gdbarch_debug >= 2)
3262 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3263 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3267 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3268 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3270 gdbarch->address_class_type_flags = address_class_type_flags;
3274 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3276 gdb_assert (gdbarch != NULL);
3277 return gdbarch->address_class_type_flags_to_name != NULL;
3281 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3283 gdb_assert (gdbarch != NULL);
3284 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3285 if (gdbarch_debug >= 2)
3286 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3287 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3291 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3292 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3294 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3298 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3300 gdb_assert (gdbarch != NULL);
3301 return gdbarch->address_class_name_to_type_flags != NULL;
3305 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3307 gdb_assert (gdbarch != NULL);
3308 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3309 if (gdbarch_debug >= 2)
3310 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3311 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3315 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3316 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3318 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3322 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3324 gdb_assert (gdbarch != NULL);
3325 gdb_assert (gdbarch->register_reggroup_p != NULL);
3326 if (gdbarch_debug >= 2)
3327 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3328 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3332 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3333 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3335 gdbarch->register_reggroup_p = register_reggroup_p;
3339 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3341 gdb_assert (gdbarch != NULL);
3342 return gdbarch->fetch_pointer_argument != NULL;
3346 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3348 gdb_assert (gdbarch != NULL);
3349 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3350 if (gdbarch_debug >= 2)
3351 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3352 return gdbarch->fetch_pointer_argument (frame, argi, type);
3356 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3357 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3359 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3363 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3365 gdb_assert (gdbarch != NULL);
3366 return gdbarch->regset_from_core_section != NULL;
3369 const struct regset *
3370 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3372 gdb_assert (gdbarch != NULL);
3373 gdb_assert (gdbarch->regset_from_core_section != NULL);
3374 if (gdbarch_debug >= 2)
3375 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3376 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3380 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3381 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3383 gdbarch->regset_from_core_section = regset_from_core_section;
3386 struct core_regset_section *
3387 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
3389 gdb_assert (gdbarch != NULL);
3390 if (gdbarch_debug >= 2)
3391 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
3392 return gdbarch->core_regset_sections;
3396 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
3397 struct core_regset_section * core_regset_sections)
3399 gdbarch->core_regset_sections = core_regset_sections;
3403 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3405 gdb_assert (gdbarch != NULL);
3406 return gdbarch->make_corefile_notes != NULL;
3410 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3412 gdb_assert (gdbarch != NULL);
3413 gdb_assert (gdbarch->make_corefile_notes != NULL);
3414 if (gdbarch_debug >= 2)
3415 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3416 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3420 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3421 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3423 gdbarch->make_corefile_notes = make_corefile_notes;
3427 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3429 gdb_assert (gdbarch != NULL);
3430 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3434 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3436 gdb_assert (gdbarch != NULL);
3437 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3438 if (gdbarch_debug >= 2)
3439 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3440 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3444 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3445 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3447 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3451 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3453 gdb_assert (gdbarch != NULL);
3454 return gdbarch->find_memory_regions != NULL;
3458 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3460 gdb_assert (gdbarch != NULL);
3461 gdb_assert (gdbarch->find_memory_regions != NULL);
3462 if (gdbarch_debug >= 2)
3463 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3464 return gdbarch->find_memory_regions (gdbarch, func, data);
3468 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3469 gdbarch_find_memory_regions_ftype find_memory_regions)
3471 gdbarch->find_memory_regions = find_memory_regions;
3475 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3477 gdb_assert (gdbarch != NULL);
3478 return gdbarch->core_xfer_shared_libraries != NULL;
3482 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
3484 gdb_assert (gdbarch != NULL);
3485 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3486 if (gdbarch_debug >= 2)
3487 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3488 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3492 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3493 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3495 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3499 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3501 gdb_assert (gdbarch != NULL);
3502 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3506 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
3508 gdb_assert (gdbarch != NULL);
3509 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3510 if (gdbarch_debug >= 2)
3511 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3512 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3516 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3517 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3519 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3523 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3525 gdb_assert (gdbarch != NULL);
3526 return gdbarch->core_pid_to_str != NULL;
3530 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3532 gdb_assert (gdbarch != NULL);
3533 gdb_assert (gdbarch->core_pid_to_str != NULL);
3534 if (gdbarch_debug >= 2)
3535 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3536 return gdbarch->core_pid_to_str (gdbarch, ptid);
3540 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3541 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3543 gdbarch->core_pid_to_str = core_pid_to_str;
3547 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3549 gdb_assert (gdbarch != NULL);
3550 return gdbarch->gcore_bfd_target != 0;
3554 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3556 gdb_assert (gdbarch != NULL);
3557 /* Check variable changed from pre-default. */
3558 gdb_assert (gdbarch->gcore_bfd_target != 0);
3559 if (gdbarch_debug >= 2)
3560 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3561 return gdbarch->gcore_bfd_target;
3565 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3566 const char * gcore_bfd_target)
3568 gdbarch->gcore_bfd_target = gcore_bfd_target;
3572 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3574 gdb_assert (gdbarch != NULL);
3575 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3576 if (gdbarch_debug >= 2)
3577 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3578 return gdbarch->vtable_function_descriptors;
3582 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3583 int vtable_function_descriptors)
3585 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3589 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3591 gdb_assert (gdbarch != NULL);
3592 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3593 if (gdbarch_debug >= 2)
3594 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3595 return gdbarch->vbit_in_delta;
3599 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3602 gdbarch->vbit_in_delta = vbit_in_delta;
3606 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3608 gdb_assert (gdbarch != NULL);
3609 return gdbarch->skip_permanent_breakpoint != NULL;
3613 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3615 gdb_assert (gdbarch != NULL);
3616 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3617 if (gdbarch_debug >= 2)
3618 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3619 gdbarch->skip_permanent_breakpoint (regcache);
3623 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3624 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3626 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3630 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3632 gdb_assert (gdbarch != NULL);
3633 return gdbarch->max_insn_length != 0;
3637 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3639 gdb_assert (gdbarch != NULL);
3640 /* Check variable changed from pre-default. */
3641 gdb_assert (gdbarch->max_insn_length != 0);
3642 if (gdbarch_debug >= 2)
3643 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3644 return gdbarch->max_insn_length;
3648 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3649 ULONGEST max_insn_length)
3651 gdbarch->max_insn_length = max_insn_length;
3655 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3657 gdb_assert (gdbarch != NULL);
3658 return gdbarch->displaced_step_copy_insn != NULL;
3661 struct displaced_step_closure *
3662 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3664 gdb_assert (gdbarch != NULL);
3665 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3666 if (gdbarch_debug >= 2)
3667 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3668 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3672 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3673 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3675 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3679 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3681 gdb_assert (gdbarch != NULL);
3682 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3683 if (gdbarch_debug >= 2)
3684 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3685 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3689 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3690 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3692 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3696 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3698 gdb_assert (gdbarch != NULL);
3699 return gdbarch->displaced_step_fixup != NULL;
3703 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3705 gdb_assert (gdbarch != NULL);
3706 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3707 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3708 if (gdbarch_debug >= 2)
3709 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3710 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3714 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3715 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3717 gdbarch->displaced_step_fixup = displaced_step_fixup;
3721 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3723 gdb_assert (gdbarch != NULL);
3724 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3725 if (gdbarch_debug >= 2)
3726 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3727 gdbarch->displaced_step_free_closure (gdbarch, closure);
3731 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3732 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3734 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3738 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3740 gdb_assert (gdbarch != NULL);
3741 gdb_assert (gdbarch->displaced_step_location != NULL);
3742 if (gdbarch_debug >= 2)
3743 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3744 return gdbarch->displaced_step_location (gdbarch);
3748 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3749 gdbarch_displaced_step_location_ftype displaced_step_location)
3751 gdbarch->displaced_step_location = displaced_step_location;
3755 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3757 gdb_assert (gdbarch != NULL);
3758 return gdbarch->relocate_instruction != NULL;
3762 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3764 gdb_assert (gdbarch != NULL);
3765 gdb_assert (gdbarch->relocate_instruction != NULL);
3766 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3767 if (gdbarch_debug >= 2)
3768 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3769 gdbarch->relocate_instruction (gdbarch, to, from);
3773 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3774 gdbarch_relocate_instruction_ftype relocate_instruction)
3776 gdbarch->relocate_instruction = relocate_instruction;
3780 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3782 gdb_assert (gdbarch != NULL);
3783 return gdbarch->overlay_update != NULL;
3787 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3789 gdb_assert (gdbarch != NULL);
3790 gdb_assert (gdbarch->overlay_update != NULL);
3791 if (gdbarch_debug >= 2)
3792 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3793 gdbarch->overlay_update (osect);
3797 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3798 gdbarch_overlay_update_ftype overlay_update)
3800 gdbarch->overlay_update = overlay_update;
3804 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3806 gdb_assert (gdbarch != NULL);
3807 return gdbarch->core_read_description != NULL;
3810 const struct target_desc *
3811 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3813 gdb_assert (gdbarch != NULL);
3814 gdb_assert (gdbarch->core_read_description != NULL);
3815 if (gdbarch_debug >= 2)
3816 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3817 return gdbarch->core_read_description (gdbarch, target, abfd);
3821 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3822 gdbarch_core_read_description_ftype core_read_description)
3824 gdbarch->core_read_description = core_read_description;
3828 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3830 gdb_assert (gdbarch != NULL);
3831 return gdbarch->static_transform_name != NULL;
3835 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3837 gdb_assert (gdbarch != NULL);
3838 gdb_assert (gdbarch->static_transform_name != NULL);
3839 if (gdbarch_debug >= 2)
3840 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3841 return gdbarch->static_transform_name (name);
3845 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3846 gdbarch_static_transform_name_ftype static_transform_name)
3848 gdbarch->static_transform_name = static_transform_name;
3852 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3854 gdb_assert (gdbarch != NULL);
3855 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3856 if (gdbarch_debug >= 2)
3857 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3858 return gdbarch->sofun_address_maybe_missing;
3862 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3863 int sofun_address_maybe_missing)
3865 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3869 gdbarch_process_record_p (struct gdbarch *gdbarch)
3871 gdb_assert (gdbarch != NULL);
3872 return gdbarch->process_record != NULL;
3876 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3878 gdb_assert (gdbarch != NULL);
3879 gdb_assert (gdbarch->process_record != NULL);
3880 if (gdbarch_debug >= 2)
3881 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3882 return gdbarch->process_record (gdbarch, regcache, addr);
3886 set_gdbarch_process_record (struct gdbarch *gdbarch,
3887 gdbarch_process_record_ftype process_record)
3889 gdbarch->process_record = process_record;
3893 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3895 gdb_assert (gdbarch != NULL);
3896 return gdbarch->process_record_signal != NULL;
3900 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3902 gdb_assert (gdbarch != NULL);
3903 gdb_assert (gdbarch->process_record_signal != NULL);
3904 if (gdbarch_debug >= 2)
3905 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3906 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3910 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3911 gdbarch_process_record_signal_ftype process_record_signal)
3913 gdbarch->process_record_signal = process_record_signal;
3917 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3919 gdb_assert (gdbarch != NULL);
3920 return gdbarch->gdb_signal_from_target != NULL;
3924 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3926 gdb_assert (gdbarch != NULL);
3927 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
3928 if (gdbarch_debug >= 2)
3929 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3930 return gdbarch->gdb_signal_from_target (gdbarch, signo);
3934 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3935 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
3937 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
3941 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
3943 gdb_assert (gdbarch != NULL);
3944 return gdbarch->gdb_signal_to_target != NULL;
3948 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
3950 gdb_assert (gdbarch != NULL);
3951 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
3954 return gdbarch->gdb_signal_to_target (gdbarch, signal);
3958 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
3959 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
3961 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
3965 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
3967 gdb_assert (gdbarch != NULL);
3968 return gdbarch->get_siginfo_type != NULL;
3972 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
3974 gdb_assert (gdbarch != NULL);
3975 gdb_assert (gdbarch->get_siginfo_type != NULL);
3976 if (gdbarch_debug >= 2)
3977 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
3978 return gdbarch->get_siginfo_type (gdbarch);
3982 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
3983 gdbarch_get_siginfo_type_ftype get_siginfo_type)
3985 gdbarch->get_siginfo_type = get_siginfo_type;
3989 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
3991 gdb_assert (gdbarch != NULL);
3992 return gdbarch->record_special_symbol != NULL;
3996 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
3998 gdb_assert (gdbarch != NULL);
3999 gdb_assert (gdbarch->record_special_symbol != NULL);
4000 if (gdbarch_debug >= 2)
4001 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4002 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4006 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4007 gdbarch_record_special_symbol_ftype record_special_symbol)
4009 gdbarch->record_special_symbol = record_special_symbol;
4013 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4015 gdb_assert (gdbarch != NULL);
4016 return gdbarch->get_syscall_number != NULL;
4020 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4022 gdb_assert (gdbarch != NULL);
4023 gdb_assert (gdbarch->get_syscall_number != NULL);
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4026 return gdbarch->get_syscall_number (gdbarch, ptid);
4030 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4031 gdbarch_get_syscall_number_ftype get_syscall_number)
4033 gdbarch->get_syscall_number = get_syscall_number;
4037 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4039 gdb_assert (gdbarch != NULL);
4040 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4041 if (gdbarch_debug >= 2)
4042 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4043 return gdbarch->stap_integer_prefixes;
4047 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4048 const char *const * stap_integer_prefixes)
4050 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4054 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4056 gdb_assert (gdbarch != NULL);
4057 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4058 if (gdbarch_debug >= 2)
4059 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4060 return gdbarch->stap_integer_suffixes;
4064 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4065 const char *const * stap_integer_suffixes)
4067 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4071 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4073 gdb_assert (gdbarch != NULL);
4074 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4075 if (gdbarch_debug >= 2)
4076 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4077 return gdbarch->stap_register_prefixes;
4081 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4082 const char *const * stap_register_prefixes)
4084 gdbarch->stap_register_prefixes = stap_register_prefixes;
4088 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4090 gdb_assert (gdbarch != NULL);
4091 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4092 if (gdbarch_debug >= 2)
4093 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4094 return gdbarch->stap_register_suffixes;
4098 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4099 const char *const * stap_register_suffixes)
4101 gdbarch->stap_register_suffixes = stap_register_suffixes;
4105 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4107 gdb_assert (gdbarch != NULL);
4108 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4109 if (gdbarch_debug >= 2)
4110 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4111 return gdbarch->stap_register_indirection_prefixes;
4115 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4116 const char *const * stap_register_indirection_prefixes)
4118 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4122 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4124 gdb_assert (gdbarch != NULL);
4125 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4126 if (gdbarch_debug >= 2)
4127 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4128 return gdbarch->stap_register_indirection_suffixes;
4132 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4133 const char *const * stap_register_indirection_suffixes)
4135 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4139 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4141 gdb_assert (gdbarch != NULL);
4142 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4143 if (gdbarch_debug >= 2)
4144 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4145 return gdbarch->stap_gdb_register_prefix;
4149 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4150 const char * stap_gdb_register_prefix)
4152 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4156 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4158 gdb_assert (gdbarch != NULL);
4159 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4160 if (gdbarch_debug >= 2)
4161 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4162 return gdbarch->stap_gdb_register_suffix;
4166 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4167 const char * stap_gdb_register_suffix)
4169 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4173 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4175 gdb_assert (gdbarch != NULL);
4176 return gdbarch->stap_is_single_operand != NULL;
4180 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4182 gdb_assert (gdbarch != NULL);
4183 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4184 if (gdbarch_debug >= 2)
4185 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4186 return gdbarch->stap_is_single_operand (gdbarch, s);
4190 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4191 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4193 gdbarch->stap_is_single_operand = stap_is_single_operand;
4197 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4199 gdb_assert (gdbarch != NULL);
4200 return gdbarch->stap_parse_special_token != NULL;
4204 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4206 gdb_assert (gdbarch != NULL);
4207 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4208 if (gdbarch_debug >= 2)
4209 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4210 return gdbarch->stap_parse_special_token (gdbarch, p);
4214 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4215 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4217 gdbarch->stap_parse_special_token = stap_parse_special_token;
4221 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4223 gdb_assert (gdbarch != NULL);
4224 /* Skip verify of has_global_solist, invalid_p == 0 */
4225 if (gdbarch_debug >= 2)
4226 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4227 return gdbarch->has_global_solist;
4231 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4232 int has_global_solist)
4234 gdbarch->has_global_solist = has_global_solist;
4238 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4240 gdb_assert (gdbarch != NULL);
4241 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4242 if (gdbarch_debug >= 2)
4243 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4244 return gdbarch->has_global_breakpoints;
4248 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4249 int has_global_breakpoints)
4251 gdbarch->has_global_breakpoints = has_global_breakpoints;
4255 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4257 gdb_assert (gdbarch != NULL);
4258 gdb_assert (gdbarch->has_shared_address_space != NULL);
4259 if (gdbarch_debug >= 2)
4260 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4261 return gdbarch->has_shared_address_space (gdbarch);
4265 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4266 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4268 gdbarch->has_shared_address_space = has_shared_address_space;
4272 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
4274 gdb_assert (gdbarch != NULL);
4275 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4276 if (gdbarch_debug >= 2)
4277 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4278 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
4282 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4283 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4285 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4289 gdbarch_auto_charset (struct gdbarch *gdbarch)
4291 gdb_assert (gdbarch != NULL);
4292 gdb_assert (gdbarch->auto_charset != NULL);
4293 if (gdbarch_debug >= 2)
4294 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4295 return gdbarch->auto_charset ();
4299 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4300 gdbarch_auto_charset_ftype auto_charset)
4302 gdbarch->auto_charset = auto_charset;
4306 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4308 gdb_assert (gdbarch != NULL);
4309 gdb_assert (gdbarch->auto_wide_charset != NULL);
4310 if (gdbarch_debug >= 2)
4311 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4312 return gdbarch->auto_wide_charset ();
4316 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4317 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4319 gdbarch->auto_wide_charset = auto_wide_charset;
4323 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4325 gdb_assert (gdbarch != NULL);
4326 if (gdbarch_debug >= 2)
4327 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4328 return gdbarch->solib_symbols_extension;
4332 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4333 const char * solib_symbols_extension)
4335 gdbarch->solib_symbols_extension = solib_symbols_extension;
4339 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4341 gdb_assert (gdbarch != NULL);
4342 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4343 if (gdbarch_debug >= 2)
4344 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4345 return gdbarch->has_dos_based_file_system;
4349 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4350 int has_dos_based_file_system)
4352 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4356 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4358 gdb_assert (gdbarch != NULL);
4359 gdb_assert (gdbarch->gen_return_address != NULL);
4360 if (gdbarch_debug >= 2)
4361 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4362 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4366 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4367 gdbarch_gen_return_address_ftype gen_return_address)
4369 gdbarch->gen_return_address = gen_return_address;
4373 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4375 gdb_assert (gdbarch != NULL);
4376 return gdbarch->info_proc != NULL;
4380 gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4382 gdb_assert (gdbarch != NULL);
4383 gdb_assert (gdbarch->info_proc != NULL);
4384 if (gdbarch_debug >= 2)
4385 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4386 gdbarch->info_proc (gdbarch, args, what);
4390 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4391 gdbarch_info_proc_ftype info_proc)
4393 gdbarch->info_proc = info_proc;
4397 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4399 gdb_assert (gdbarch != NULL);
4400 return gdbarch->core_info_proc != NULL;
4404 gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4406 gdb_assert (gdbarch != NULL);
4407 gdb_assert (gdbarch->core_info_proc != NULL);
4408 if (gdbarch_debug >= 2)
4409 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4410 gdbarch->core_info_proc (gdbarch, args, what);
4414 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4415 gdbarch_core_info_proc_ftype core_info_proc)
4417 gdbarch->core_info_proc = core_info_proc;
4421 gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile)
4423 gdb_assert (gdbarch != NULL);
4424 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4425 if (gdbarch_debug >= 2)
4426 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4427 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4431 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4432 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4434 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4437 struct ravenscar_arch_ops *
4438 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4440 gdb_assert (gdbarch != NULL);
4441 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4442 if (gdbarch_debug >= 2)
4443 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4444 return gdbarch->ravenscar_ops;
4448 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4449 struct ravenscar_arch_ops * ravenscar_ops)
4451 gdbarch->ravenscar_ops = ravenscar_ops;
4455 /* Keep a registry of per-architecture data-pointers required by GDB
4462 gdbarch_data_pre_init_ftype *pre_init;
4463 gdbarch_data_post_init_ftype *post_init;
4466 struct gdbarch_data_registration
4468 struct gdbarch_data *data;
4469 struct gdbarch_data_registration *next;
4472 struct gdbarch_data_registry
4475 struct gdbarch_data_registration *registrations;
4478 struct gdbarch_data_registry gdbarch_data_registry =
4483 static struct gdbarch_data *
4484 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4485 gdbarch_data_post_init_ftype *post_init)
4487 struct gdbarch_data_registration **curr;
4489 /* Append the new registration. */
4490 for (curr = &gdbarch_data_registry.registrations;
4492 curr = &(*curr)->next);
4493 (*curr) = XMALLOC (struct gdbarch_data_registration);
4494 (*curr)->next = NULL;
4495 (*curr)->data = XMALLOC (struct gdbarch_data);
4496 (*curr)->data->index = gdbarch_data_registry.nr++;
4497 (*curr)->data->pre_init = pre_init;
4498 (*curr)->data->post_init = post_init;
4499 (*curr)->data->init_p = 1;
4500 return (*curr)->data;
4503 struct gdbarch_data *
4504 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4506 return gdbarch_data_register (pre_init, NULL);
4509 struct gdbarch_data *
4510 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4512 return gdbarch_data_register (NULL, post_init);
4515 /* Create/delete the gdbarch data vector. */
4518 alloc_gdbarch_data (struct gdbarch *gdbarch)
4520 gdb_assert (gdbarch->data == NULL);
4521 gdbarch->nr_data = gdbarch_data_registry.nr;
4522 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4525 /* Initialize the current value of the specified per-architecture
4529 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4530 struct gdbarch_data *data,
4533 gdb_assert (data->index < gdbarch->nr_data);
4534 gdb_assert (gdbarch->data[data->index] == NULL);
4535 gdb_assert (data->pre_init == NULL);
4536 gdbarch->data[data->index] = pointer;
4539 /* Return the current value of the specified per-architecture
4543 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4545 gdb_assert (data->index < gdbarch->nr_data);
4546 if (gdbarch->data[data->index] == NULL)
4548 /* The data-pointer isn't initialized, call init() to get a
4550 if (data->pre_init != NULL)
4551 /* Mid architecture creation: pass just the obstack, and not
4552 the entire architecture, as that way it isn't possible for
4553 pre-init code to refer to undefined architecture
4555 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4556 else if (gdbarch->initialized_p
4557 && data->post_init != NULL)
4558 /* Post architecture creation: pass the entire architecture
4559 (as all fields are valid), but be careful to also detect
4560 recursive references. */
4562 gdb_assert (data->init_p);
4564 gdbarch->data[data->index] = data->post_init (gdbarch);
4568 /* The architecture initialization hasn't completed - punt -
4569 hope that the caller knows what they are doing. Once
4570 deprecated_set_gdbarch_data has been initialized, this can be
4571 changed to an internal error. */
4573 gdb_assert (gdbarch->data[data->index] != NULL);
4575 return gdbarch->data[data->index];
4579 /* Keep a registry of the architectures known by GDB. */
4581 struct gdbarch_registration
4583 enum bfd_architecture bfd_architecture;
4584 gdbarch_init_ftype *init;
4585 gdbarch_dump_tdep_ftype *dump_tdep;
4586 struct gdbarch_list *arches;
4587 struct gdbarch_registration *next;
4590 static struct gdbarch_registration *gdbarch_registry = NULL;
4593 append_name (const char ***buf, int *nr, const char *name)
4595 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4601 gdbarch_printable_names (void)
4603 /* Accumulate a list of names based on the registed list of
4606 const char **arches = NULL;
4607 struct gdbarch_registration *rego;
4609 for (rego = gdbarch_registry;
4613 const struct bfd_arch_info *ap;
4614 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4616 internal_error (__FILE__, __LINE__,
4617 _("gdbarch_architecture_names: multi-arch unknown"));
4620 append_name (&arches, &nr_arches, ap->printable_name);
4625 append_name (&arches, &nr_arches, NULL);
4631 gdbarch_register (enum bfd_architecture bfd_architecture,
4632 gdbarch_init_ftype *init,
4633 gdbarch_dump_tdep_ftype *dump_tdep)
4635 struct gdbarch_registration **curr;
4636 const struct bfd_arch_info *bfd_arch_info;
4638 /* Check that BFD recognizes this architecture */
4639 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4640 if (bfd_arch_info == NULL)
4642 internal_error (__FILE__, __LINE__,
4643 _("gdbarch: Attempt to register "
4644 "unknown architecture (%d)"),
4647 /* Check that we haven't seen this architecture before. */
4648 for (curr = &gdbarch_registry;
4650 curr = &(*curr)->next)
4652 if (bfd_architecture == (*curr)->bfd_architecture)
4653 internal_error (__FILE__, __LINE__,
4654 _("gdbarch: Duplicate registration "
4655 "of architecture (%s)"),
4656 bfd_arch_info->printable_name);
4660 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
4661 bfd_arch_info->printable_name,
4662 host_address_to_string (init));
4664 (*curr) = XMALLOC (struct gdbarch_registration);
4665 (*curr)->bfd_architecture = bfd_architecture;
4666 (*curr)->init = init;
4667 (*curr)->dump_tdep = dump_tdep;
4668 (*curr)->arches = NULL;
4669 (*curr)->next = NULL;
4673 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4674 gdbarch_init_ftype *init)
4676 gdbarch_register (bfd_architecture, init, NULL);
4680 /* Look for an architecture using gdbarch_info. */
4682 struct gdbarch_list *
4683 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4684 const struct gdbarch_info *info)
4686 for (; arches != NULL; arches = arches->next)
4688 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4690 if (info->byte_order != arches->gdbarch->byte_order)
4692 if (info->osabi != arches->gdbarch->osabi)
4694 if (info->target_desc != arches->gdbarch->target_desc)
4702 /* Find an architecture that matches the specified INFO. Create a new
4703 architecture if needed. Return that new architecture. */
4706 gdbarch_find_by_info (struct gdbarch_info info)
4708 struct gdbarch *new_gdbarch;
4709 struct gdbarch_registration *rego;
4711 /* Fill in missing parts of the INFO struct using a number of
4712 sources: "set ..."; INFOabfd supplied; and the global
4714 gdbarch_info_fill (&info);
4716 /* Must have found some sort of architecture. */
4717 gdb_assert (info.bfd_arch_info != NULL);
4721 fprintf_unfiltered (gdb_stdlog,
4722 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4723 (info.bfd_arch_info != NULL
4724 ? info.bfd_arch_info->printable_name
4726 fprintf_unfiltered (gdb_stdlog,
4727 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4729 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4730 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4732 fprintf_unfiltered (gdb_stdlog,
4733 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4734 info.osabi, gdbarch_osabi_name (info.osabi));
4735 fprintf_unfiltered (gdb_stdlog,
4736 "gdbarch_find_by_info: info.abfd %s\n",
4737 host_address_to_string (info.abfd));
4738 fprintf_unfiltered (gdb_stdlog,
4739 "gdbarch_find_by_info: info.tdep_info %s\n",
4740 host_address_to_string (info.tdep_info));
4743 /* Find the tdep code that knows about this architecture. */
4744 for (rego = gdbarch_registry;
4747 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4752 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4753 "No matching architecture\n");
4757 /* Ask the tdep code for an architecture that matches "info". */
4758 new_gdbarch = rego->init (info, rego->arches);
4760 /* Did the tdep code like it? No. Reject the change and revert to
4761 the old architecture. */
4762 if (new_gdbarch == NULL)
4765 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4766 "Target rejected architecture\n");
4770 /* Is this a pre-existing architecture (as determined by already
4771 being initialized)? Move it to the front of the architecture
4772 list (keeping the list sorted Most Recently Used). */
4773 if (new_gdbarch->initialized_p)
4775 struct gdbarch_list **list;
4776 struct gdbarch_list *this;
4778 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4779 "Previous architecture %s (%s) selected\n",
4780 host_address_to_string (new_gdbarch),
4781 new_gdbarch->bfd_arch_info->printable_name);
4782 /* Find the existing arch in the list. */
4783 for (list = ®o->arches;
4784 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4785 list = &(*list)->next);
4786 /* It had better be in the list of architectures. */
4787 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4790 (*list) = this->next;
4791 /* Insert THIS at the front. */
4792 this->next = rego->arches;
4793 rego->arches = this;
4798 /* It's a new architecture. */
4800 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4801 "New architecture %s (%s) selected\n",
4802 host_address_to_string (new_gdbarch),
4803 new_gdbarch->bfd_arch_info->printable_name);
4805 /* Insert the new architecture into the front of the architecture
4806 list (keep the list sorted Most Recently Used). */
4808 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4809 this->next = rego->arches;
4810 this->gdbarch = new_gdbarch;
4811 rego->arches = this;
4814 /* Check that the newly installed architecture is valid. Plug in
4815 any post init values. */
4816 new_gdbarch->dump_tdep = rego->dump_tdep;
4817 verify_gdbarch (new_gdbarch);
4818 new_gdbarch->initialized_p = 1;
4821 gdbarch_dump (new_gdbarch, gdb_stdlog);
4826 /* Make the specified architecture current. */
4829 set_target_gdbarch (struct gdbarch *new_gdbarch)
4831 gdb_assert (new_gdbarch != NULL);
4832 gdb_assert (new_gdbarch->initialized_p);
4833 current_inferior ()->gdbarch = new_gdbarch;
4834 observer_notify_architecture_changed (new_gdbarch);
4835 registers_changed ();
4838 /* Return the current inferior's arch. */
4841 target_gdbarch (void)
4843 return current_inferior ()->gdbarch;
4846 extern void _initialize_gdbarch (void);
4849 _initialize_gdbarch (void)
4851 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4852 Set architecture debugging."), _("\
4853 Show architecture debugging."), _("\
4854 When non-zero, architecture debugging is enabled."),
4857 &setdebuglist, &showdebuglist);