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;
131 enum bfd_endian byte_order;
132 enum bfd_endian 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;
320 gdbarch_insn_is_call_ftype *insn_is_call;
321 gdbarch_insn_is_ret_ftype *insn_is_ret;
322 gdbarch_insn_is_jump_ftype *insn_is_jump;
326 /* The default architecture uses host values (for want of a better
329 extern const struct bfd_arch_info bfd_default_arch_struct;
331 struct gdbarch startup_gdbarch =
333 1, /* Always initialized. */
334 NULL, /* The obstack. */
335 /* basic architecture information. */
336 &bfd_default_arch_struct, /* bfd_arch_info */
337 BFD_ENDIAN_BIG, /* byte_order */
338 BFD_ENDIAN_BIG, /* byte_order_for_code */
339 GDB_OSABI_UNKNOWN, /* osabi */
341 /* target specific vector and its dump routine. */
343 /*per-architecture data-pointers. */
345 /* Multi-arch values */
346 1, /* bits_big_endian */
347 8 * sizeof (short), /* short_bit */
348 8 * sizeof (int), /* int_bit */
349 8 * sizeof (long), /* long_bit */
350 8 * sizeof (LONGEST), /* long_long_bit */
351 8 * sizeof (LONGEST), /* long_long_align_bit */
354 8 * sizeof (float), /* float_bit */
355 0, /* float_format */
356 8 * sizeof (double), /* double_bit */
357 0, /* double_format */
358 8 * sizeof (long double), /* long_double_bit */
359 0, /* long_double_format */
360 8 * sizeof (void*), /* ptr_bit */
361 8 * sizeof (void*), /* addr_bit */
362 sizeof (void*), /* dwarf2_addr_size */
366 legacy_virtual_frame_pointer, /* virtual_frame_pointer */
367 0, /* pseudo_register_read */
368 0, /* pseudo_register_read_value */
369 0, /* pseudo_register_write */
371 0, /* num_pseudo_regs */
372 0, /* ax_pseudo_register_collect */
373 0, /* ax_pseudo_register_push_stack */
378 no_op_reg_to_regnum, /* stab_reg_to_regnum */
379 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
380 no_op_reg_to_regnum, /* sdb_reg_to_regnum */
381 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
382 0, /* register_name */
383 0, /* register_type */
385 -1, /* deprecated_fp_regnum */
386 0, /* push_dummy_call */
387 0, /* call_dummy_location */
388 0, /* push_dummy_code */
389 default_print_registers_info, /* print_registers_info */
390 0, /* print_float_info */
391 0, /* print_vector_info */
392 legacy_register_sim_regno, /* register_sim_regno */
393 cannot_register_not, /* cannot_fetch_register */
394 cannot_register_not, /* cannot_store_register */
395 0, /* get_longjmp_target */
396 0, /* believe_pcc_promotion */
397 generic_convert_register_p, /* convert_register_p */
398 0, /* register_to_value */
399 0, /* value_to_register */
400 0, /* value_from_register */
401 unsigned_pointer_to_address, /* pointer_to_address */
402 unsigned_address_to_pointer, /* address_to_pointer */
403 0, /* integer_to_address */
404 0, /* return_value */
405 default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */
406 0, /* skip_prologue */
407 0, /* skip_main_prologue */
409 0, /* breakpoint_from_pc */
410 default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */
411 0, /* adjust_breakpoint_address */
412 default_memory_insert_breakpoint, /* memory_insert_breakpoint */
413 default_memory_remove_breakpoint, /* memory_remove_breakpoint */
414 0, /* decr_pc_after_break */
415 0, /* deprecated_function_start_offset */
416 default_remote_register_number, /* remote_register_number */
417 0, /* fetch_tls_load_module_address */
418 0, /* frame_args_skip */
421 0, /* frame_num_args */
423 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
424 0, /* frame_red_zone_size */
425 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
426 core_addr_identity, /* addr_bits_remove */
427 0, /* software_single_step */
428 0, /* single_step_through_delay */
430 0, /* skip_trampoline_code */
431 generic_skip_solib_resolver, /* skip_solib_resolver */
432 generic_in_solib_return_trampoline, /* in_solib_return_trampoline */
433 generic_in_function_epilogue_p, /* in_function_epilogue_p */
434 0, /* elf_make_msymbol_special */
435 0, /* coff_make_msymbol_special */
436 0, /* cannot_step_breakpoint */
437 0, /* have_nonsteppable_watchpoint */
438 0, /* address_class_type_flags */
439 0, /* address_class_type_flags_to_name */
440 0, /* address_class_name_to_type_flags */
441 default_register_reggroup_p, /* register_reggroup_p */
442 0, /* fetch_pointer_argument */
443 0, /* regset_from_core_section */
444 0, /* core_regset_sections */
445 0, /* make_corefile_notes */
446 0, /* elfcore_write_linux_prpsinfo */
447 0, /* find_memory_regions */
448 0, /* core_xfer_shared_libraries */
449 0, /* core_xfer_shared_libraries_aix */
450 0, /* core_pid_to_str */
451 0, /* gcore_bfd_target */
452 0, /* vtable_function_descriptors */
453 0, /* vbit_in_delta */
454 0, /* skip_permanent_breakpoint */
455 0, /* max_insn_length */
456 0, /* displaced_step_copy_insn */
457 default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */
458 0, /* displaced_step_fixup */
459 NULL, /* displaced_step_free_closure */
460 NULL, /* displaced_step_location */
461 0, /* relocate_instruction */
462 0, /* overlay_update */
463 0, /* core_read_description */
464 0, /* static_transform_name */
465 0, /* sofun_address_maybe_missing */
466 0, /* process_record */
467 0, /* process_record_signal */
468 0, /* gdb_signal_from_target */
469 0, /* gdb_signal_to_target */
470 0, /* get_siginfo_type */
471 0, /* record_special_symbol */
472 0, /* get_syscall_number */
473 0, /* stap_integer_prefixes */
474 0, /* stap_integer_suffixes */
475 0, /* stap_register_prefixes */
476 0, /* stap_register_suffixes */
477 0, /* stap_register_indirection_prefixes */
478 0, /* stap_register_indirection_suffixes */
479 0, /* stap_gdb_register_prefix */
480 0, /* stap_gdb_register_suffix */
481 0, /* stap_is_single_operand */
482 0, /* stap_parse_special_token */
483 0, /* has_global_solist */
484 0, /* has_global_breakpoints */
485 default_has_shared_address_space, /* has_shared_address_space */
486 default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */
487 default_auto_charset, /* auto_charset */
488 default_auto_wide_charset, /* auto_wide_charset */
489 0, /* solib_symbols_extension */
490 0, /* has_dos_based_file_system */
491 default_gen_return_address, /* gen_return_address */
493 0, /* core_info_proc */
494 default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */
495 NULL, /* ravenscar_ops */
496 default_insn_is_call, /* insn_is_call */
497 default_insn_is_ret, /* insn_is_ret */
498 default_insn_is_jump, /* insn_is_jump */
499 /* startup_gdbarch() */
503 /* Create a new ``struct gdbarch'' based on information provided by
504 ``struct gdbarch_info''. */
507 gdbarch_alloc (const struct gdbarch_info *info,
508 struct gdbarch_tdep *tdep)
510 struct gdbarch *gdbarch;
512 /* Create an obstack for allocating all the per-architecture memory,
513 then use that to allocate the architecture vector. */
514 struct obstack *obstack = XNEW (struct obstack);
515 obstack_init (obstack);
516 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
517 memset (gdbarch, 0, sizeof (*gdbarch));
518 gdbarch->obstack = obstack;
520 alloc_gdbarch_data (gdbarch);
522 gdbarch->tdep = tdep;
524 gdbarch->bfd_arch_info = info->bfd_arch_info;
525 gdbarch->byte_order = info->byte_order;
526 gdbarch->byte_order_for_code = info->byte_order_for_code;
527 gdbarch->osabi = info->osabi;
528 gdbarch->target_desc = info->target_desc;
530 /* Force the explicit initialization of these. */
531 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
532 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
533 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
534 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
535 gdbarch->long_long_bit = 2*gdbarch->long_bit;
536 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
537 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
538 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
539 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
540 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
541 gdbarch->ptr_bit = gdbarch->int_bit;
542 gdbarch->char_signed = -1;
543 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
544 gdbarch->num_regs = -1;
545 gdbarch->sp_regnum = -1;
546 gdbarch->pc_regnum = -1;
547 gdbarch->ps_regnum = -1;
548 gdbarch->fp0_regnum = -1;
549 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
550 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
551 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
552 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
553 gdbarch->deprecated_fp_regnum = -1;
554 gdbarch->call_dummy_location = AT_ENTRY_POINT;
555 gdbarch->print_registers_info = default_print_registers_info;
556 gdbarch->register_sim_regno = legacy_register_sim_regno;
557 gdbarch->cannot_fetch_register = cannot_register_not;
558 gdbarch->cannot_store_register = cannot_register_not;
559 gdbarch->convert_register_p = generic_convert_register_p;
560 gdbarch->value_from_register = default_value_from_register;
561 gdbarch->pointer_to_address = unsigned_pointer_to_address;
562 gdbarch->address_to_pointer = unsigned_address_to_pointer;
563 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
564 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
565 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
566 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
567 gdbarch->remote_register_number = default_remote_register_number;
568 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
569 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
570 gdbarch->addr_bits_remove = core_addr_identity;
571 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
572 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
573 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
574 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
575 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
576 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
577 gdbarch->register_reggroup_p = default_register_reggroup_p;
578 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
579 gdbarch->displaced_step_fixup = NULL;
580 gdbarch->displaced_step_free_closure = NULL;
581 gdbarch->displaced_step_location = NULL;
582 gdbarch->relocate_instruction = NULL;
583 gdbarch->has_shared_address_space = default_has_shared_address_space;
584 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
585 gdbarch->auto_charset = default_auto_charset;
586 gdbarch->auto_wide_charset = default_auto_wide_charset;
587 gdbarch->gen_return_address = default_gen_return_address;
588 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
589 gdbarch->ravenscar_ops = NULL;
590 gdbarch->insn_is_call = default_insn_is_call;
591 gdbarch->insn_is_ret = default_insn_is_ret;
592 gdbarch->insn_is_jump = default_insn_is_jump;
593 /* gdbarch_alloc() */
599 /* Allocate extra space using the per-architecture obstack. */
602 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
604 void *data = obstack_alloc (arch->obstack, size);
606 memset (data, 0, size);
611 /* Free a gdbarch struct. This should never happen in normal
612 operation --- once you've created a gdbarch, you keep it around.
613 However, if an architecture's init function encounters an error
614 building the structure, it may need to clean up a partially
615 constructed gdbarch. */
618 gdbarch_free (struct gdbarch *arch)
620 struct obstack *obstack;
622 gdb_assert (arch != NULL);
623 gdb_assert (!arch->initialized_p);
624 obstack = arch->obstack;
625 obstack_free (obstack, 0); /* Includes the ARCH. */
630 /* Ensure that all values in a GDBARCH are reasonable. */
633 verify_gdbarch (struct gdbarch *gdbarch)
636 struct cleanup *cleanups;
640 log = mem_fileopen ();
641 cleanups = make_cleanup_ui_file_delete (log);
643 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
644 fprintf_unfiltered (log, "\n\tbyte-order");
645 if (gdbarch->bfd_arch_info == NULL)
646 fprintf_unfiltered (log, "\n\tbfd_arch_info");
647 /* Check those that need to be defined for the given multi-arch level. */
648 /* Skip verify of bits_big_endian, invalid_p == 0 */
649 /* Skip verify of short_bit, invalid_p == 0 */
650 /* Skip verify of int_bit, invalid_p == 0 */
651 /* Skip verify of long_bit, invalid_p == 0 */
652 /* Skip verify of long_long_bit, invalid_p == 0 */
653 /* Skip verify of long_long_align_bit, invalid_p == 0 */
654 /* Skip verify of half_bit, invalid_p == 0 */
655 if (gdbarch->half_format == 0)
656 gdbarch->half_format = floatformats_ieee_half;
657 /* Skip verify of float_bit, invalid_p == 0 */
658 if (gdbarch->float_format == 0)
659 gdbarch->float_format = floatformats_ieee_single;
660 /* Skip verify of double_bit, invalid_p == 0 */
661 if (gdbarch->double_format == 0)
662 gdbarch->double_format = floatformats_ieee_double;
663 /* Skip verify of long_double_bit, invalid_p == 0 */
664 if (gdbarch->long_double_format == 0)
665 gdbarch->long_double_format = floatformats_ieee_double;
666 /* Skip verify of ptr_bit, invalid_p == 0 */
667 if (gdbarch->addr_bit == 0)
668 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
669 if (gdbarch->dwarf2_addr_size == 0)
670 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
671 if (gdbarch->char_signed == -1)
672 gdbarch->char_signed = 1;
673 /* Skip verify of read_pc, has predicate. */
674 /* Skip verify of write_pc, has predicate. */
675 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
676 /* Skip verify of pseudo_register_read, has predicate. */
677 /* Skip verify of pseudo_register_read_value, has predicate. */
678 /* Skip verify of pseudo_register_write, has predicate. */
679 if (gdbarch->num_regs == -1)
680 fprintf_unfiltered (log, "\n\tnum_regs");
681 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
682 /* Skip verify of ax_pseudo_register_collect, has predicate. */
683 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
684 /* Skip verify of sp_regnum, invalid_p == 0 */
685 /* Skip verify of pc_regnum, invalid_p == 0 */
686 /* Skip verify of ps_regnum, invalid_p == 0 */
687 /* Skip verify of fp0_regnum, invalid_p == 0 */
688 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
689 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
690 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
691 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
692 if (gdbarch->register_name == 0)
693 fprintf_unfiltered (log, "\n\tregister_name");
694 /* Skip verify of register_type, has predicate. */
695 /* Skip verify of dummy_id, has predicate. */
696 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
697 /* Skip verify of push_dummy_call, has predicate. */
698 /* Skip verify of call_dummy_location, invalid_p == 0 */
699 /* Skip verify of push_dummy_code, has predicate. */
700 /* Skip verify of print_registers_info, invalid_p == 0 */
701 /* Skip verify of print_float_info, has predicate. */
702 /* Skip verify of print_vector_info, has predicate. */
703 /* Skip verify of register_sim_regno, invalid_p == 0 */
704 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
705 /* Skip verify of cannot_store_register, invalid_p == 0 */
706 /* Skip verify of get_longjmp_target, has predicate. */
707 /* Skip verify of convert_register_p, invalid_p == 0 */
708 /* Skip verify of value_from_register, invalid_p == 0 */
709 /* Skip verify of pointer_to_address, invalid_p == 0 */
710 /* Skip verify of address_to_pointer, invalid_p == 0 */
711 /* Skip verify of integer_to_address, has predicate. */
712 /* Skip verify of return_value, has predicate. */
713 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
714 if (gdbarch->skip_prologue == 0)
715 fprintf_unfiltered (log, "\n\tskip_prologue");
716 /* Skip verify of skip_main_prologue, has predicate. */
717 if (gdbarch->inner_than == 0)
718 fprintf_unfiltered (log, "\n\tinner_than");
719 if (gdbarch->breakpoint_from_pc == 0)
720 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
721 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
722 /* Skip verify of adjust_breakpoint_address, has predicate. */
723 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
724 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
725 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
726 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
727 /* Skip verify of remote_register_number, invalid_p == 0 */
728 /* Skip verify of fetch_tls_load_module_address, has predicate. */
729 /* Skip verify of frame_args_skip, invalid_p == 0 */
730 /* Skip verify of unwind_pc, has predicate. */
731 /* Skip verify of unwind_sp, has predicate. */
732 /* Skip verify of frame_num_args, has predicate. */
733 /* Skip verify of frame_align, has predicate. */
734 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
735 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
736 /* Skip verify of addr_bits_remove, invalid_p == 0 */
737 /* Skip verify of software_single_step, has predicate. */
738 /* Skip verify of single_step_through_delay, has predicate. */
739 if (gdbarch->print_insn == 0)
740 fprintf_unfiltered (log, "\n\tprint_insn");
741 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
742 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
743 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
744 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
745 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
746 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
747 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
748 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
749 /* Skip verify of address_class_type_flags, has predicate. */
750 /* Skip verify of address_class_type_flags_to_name, has predicate. */
751 /* Skip verify of address_class_name_to_type_flags, has predicate. */
752 /* Skip verify of register_reggroup_p, invalid_p == 0 */
753 /* Skip verify of fetch_pointer_argument, has predicate. */
754 /* Skip verify of regset_from_core_section, has predicate. */
755 /* Skip verify of make_corefile_notes, has predicate. */
756 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
757 /* Skip verify of find_memory_regions, has predicate. */
758 /* Skip verify of core_xfer_shared_libraries, has predicate. */
759 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
760 /* Skip verify of core_pid_to_str, has predicate. */
761 /* Skip verify of gcore_bfd_target, has predicate. */
762 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
763 /* Skip verify of vbit_in_delta, invalid_p == 0 */
764 /* Skip verify of skip_permanent_breakpoint, has predicate. */
765 /* Skip verify of max_insn_length, has predicate. */
766 /* Skip verify of displaced_step_copy_insn, has predicate. */
767 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
768 /* Skip verify of displaced_step_fixup, has predicate. */
769 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
770 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
771 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
772 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
773 /* Skip verify of relocate_instruction, has predicate. */
774 /* Skip verify of overlay_update, has predicate. */
775 /* Skip verify of core_read_description, has predicate. */
776 /* Skip verify of static_transform_name, has predicate. */
777 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
778 /* Skip verify of process_record, has predicate. */
779 /* Skip verify of process_record_signal, has predicate. */
780 /* Skip verify of gdb_signal_from_target, has predicate. */
781 /* Skip verify of gdb_signal_to_target, has predicate. */
782 /* Skip verify of get_siginfo_type, has predicate. */
783 /* Skip verify of record_special_symbol, has predicate. */
784 /* Skip verify of get_syscall_number, has predicate. */
785 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
786 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
787 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
788 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
789 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
790 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
791 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
792 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
793 /* Skip verify of stap_is_single_operand, has predicate. */
794 /* Skip verify of stap_parse_special_token, has predicate. */
795 /* Skip verify of has_global_solist, invalid_p == 0 */
796 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
797 /* Skip verify of has_shared_address_space, invalid_p == 0 */
798 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
799 /* Skip verify of auto_charset, invalid_p == 0 */
800 /* Skip verify of auto_wide_charset, invalid_p == 0 */
801 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
802 /* Skip verify of gen_return_address, invalid_p == 0 */
803 /* Skip verify of info_proc, has predicate. */
804 /* Skip verify of core_info_proc, has predicate. */
805 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
806 /* Skip verify of ravenscar_ops, invalid_p == 0 */
807 /* Skip verify of insn_is_call, invalid_p == 0 */
808 /* Skip verify of insn_is_ret, invalid_p == 0 */
809 /* Skip verify of insn_is_jump, invalid_p == 0 */
810 buf = ui_file_xstrdup (log, &length);
811 make_cleanup (xfree, buf);
813 internal_error (__FILE__, __LINE__,
814 _("verify_gdbarch: the following are invalid ...%s"),
816 do_cleanups (cleanups);
820 /* Print out the details of the current architecture. */
823 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
825 const char *gdb_nm_file = "<not-defined>";
827 #if defined (GDB_NM_FILE)
828 gdb_nm_file = GDB_NM_FILE;
830 fprintf_unfiltered (file,
831 "gdbarch_dump: GDB_NM_FILE = %s\n",
833 fprintf_unfiltered (file,
834 "gdbarch_dump: addr_bit = %s\n",
835 plongest (gdbarch->addr_bit));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: addr_bits_remove = <%s>\n",
838 host_address_to_string (gdbarch->addr_bits_remove));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
841 gdbarch_address_class_name_to_type_flags_p (gdbarch));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
844 host_address_to_string (gdbarch->address_class_name_to_type_flags));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
847 gdbarch_address_class_type_flags_p (gdbarch));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: address_class_type_flags = <%s>\n",
850 host_address_to_string (gdbarch->address_class_type_flags));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
853 gdbarch_address_class_type_flags_to_name_p (gdbarch));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
856 host_address_to_string (gdbarch->address_class_type_flags_to_name));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: address_to_pointer = <%s>\n",
859 host_address_to_string (gdbarch->address_to_pointer));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
862 gdbarch_adjust_breakpoint_address_p (gdbarch));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
865 host_address_to_string (gdbarch->adjust_breakpoint_address));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: auto_charset = <%s>\n",
868 host_address_to_string (gdbarch->auto_charset));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: auto_wide_charset = <%s>\n",
871 host_address_to_string (gdbarch->auto_wide_charset));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
874 gdbarch_ax_pseudo_register_collect_p (gdbarch));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
877 host_address_to_string (gdbarch->ax_pseudo_register_collect));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
880 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
883 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: believe_pcc_promotion = %s\n",
886 plongest (gdbarch->believe_pcc_promotion));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: bfd_arch_info = %s\n",
889 gdbarch_bfd_arch_info (gdbarch)->printable_name);
890 fprintf_unfiltered (file,
891 "gdbarch_dump: bits_big_endian = %s\n",
892 plongest (gdbarch->bits_big_endian));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
895 host_address_to_string (gdbarch->breakpoint_from_pc));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: byte_order = %s\n",
898 plongest (gdbarch->byte_order));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: byte_order_for_code = %s\n",
901 plongest (gdbarch->byte_order_for_code));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: call_dummy_location = %s\n",
904 plongest (gdbarch->call_dummy_location));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: cannot_fetch_register = <%s>\n",
907 host_address_to_string (gdbarch->cannot_fetch_register));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: cannot_step_breakpoint = %s\n",
910 plongest (gdbarch->cannot_step_breakpoint));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: cannot_store_register = <%s>\n",
913 host_address_to_string (gdbarch->cannot_store_register));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: char_signed = %s\n",
916 plongest (gdbarch->char_signed));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
919 host_address_to_string (gdbarch->coff_make_msymbol_special));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
922 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: convert_register_p = <%s>\n",
925 host_address_to_string (gdbarch->convert_register_p));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
928 gdbarch_core_info_proc_p (gdbarch));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: core_info_proc = <%s>\n",
931 host_address_to_string (gdbarch->core_info_proc));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
934 gdbarch_core_pid_to_str_p (gdbarch));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: core_pid_to_str = <%s>\n",
937 host_address_to_string (gdbarch->core_pid_to_str));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
940 gdbarch_core_read_description_p (gdbarch));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: core_read_description = <%s>\n",
943 host_address_to_string (gdbarch->core_read_description));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: core_regset_sections = %s\n",
946 host_address_to_string (gdbarch->core_regset_sections));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
949 gdbarch_core_xfer_shared_libraries_p (gdbarch));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
952 host_address_to_string (gdbarch->core_xfer_shared_libraries));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
955 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
958 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: decr_pc_after_break = %s\n",
961 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: deprecated_fp_regnum = %s\n",
964 plongest (gdbarch->deprecated_fp_regnum));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: deprecated_function_start_offset = %s\n",
967 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
970 gdbarch_displaced_step_copy_insn_p (gdbarch));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
973 host_address_to_string (gdbarch->displaced_step_copy_insn));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
976 gdbarch_displaced_step_fixup_p (gdbarch));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: displaced_step_fixup = <%s>\n",
979 host_address_to_string (gdbarch->displaced_step_fixup));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
982 host_address_to_string (gdbarch->displaced_step_free_closure));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
985 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: displaced_step_location = <%s>\n",
988 host_address_to_string (gdbarch->displaced_step_location));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: double_bit = %s\n",
991 plongest (gdbarch->double_bit));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: double_format = %s\n",
994 pformat (gdbarch->double_format));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
997 gdbarch_dummy_id_p (gdbarch));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: dummy_id = <%s>\n",
1000 host_address_to_string (gdbarch->dummy_id));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: dwarf2_addr_size = %s\n",
1003 plongest (gdbarch->dwarf2_addr_size));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
1006 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
1009 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
1012 host_address_to_string (gdbarch->elf_make_msymbol_special));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
1015 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
1018 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
1021 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1024 gdbarch_fetch_pointer_argument_p (gdbarch));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
1027 host_address_to_string (gdbarch->fetch_pointer_argument));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1030 gdbarch_fetch_tls_load_module_address_p (gdbarch));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
1033 host_address_to_string (gdbarch->fetch_tls_load_module_address));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
1036 gdbarch_find_memory_regions_p (gdbarch));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: find_memory_regions = <%s>\n",
1039 host_address_to_string (gdbarch->find_memory_regions));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: float_bit = %s\n",
1042 plongest (gdbarch->float_bit));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: float_format = %s\n",
1045 pformat (gdbarch->float_format));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: fp0_regnum = %s\n",
1048 plongest (gdbarch->fp0_regnum));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1051 gdbarch_frame_align_p (gdbarch));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: frame_align = <%s>\n",
1054 host_address_to_string (gdbarch->frame_align));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: frame_args_skip = %s\n",
1057 core_addr_to_string_nz (gdbarch->frame_args_skip));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1060 gdbarch_frame_num_args_p (gdbarch));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: frame_num_args = <%s>\n",
1063 host_address_to_string (gdbarch->frame_num_args));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: frame_red_zone_size = %s\n",
1066 plongest (gdbarch->frame_red_zone_size));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1069 gdbarch_gcore_bfd_target_p (gdbarch));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: gcore_bfd_target = %s\n",
1072 pstring (gdbarch->gcore_bfd_target));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1075 gdbarch_gdb_signal_from_target_p (gdbarch));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1078 host_address_to_string (gdbarch->gdb_signal_from_target));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1081 gdbarch_gdb_signal_to_target_p (gdbarch));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1084 host_address_to_string (gdbarch->gdb_signal_to_target));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: gen_return_address = <%s>\n",
1087 host_address_to_string (gdbarch->gen_return_address));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1090 gdbarch_get_longjmp_target_p (gdbarch));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: get_longjmp_target = <%s>\n",
1093 host_address_to_string (gdbarch->get_longjmp_target));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1096 gdbarch_get_siginfo_type_p (gdbarch));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: get_siginfo_type = <%s>\n",
1099 host_address_to_string (gdbarch->get_siginfo_type));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1102 gdbarch_get_syscall_number_p (gdbarch));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: get_syscall_number = <%s>\n",
1105 host_address_to_string (gdbarch->get_syscall_number));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: half_bit = %s\n",
1108 plongest (gdbarch->half_bit));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: half_format = %s\n",
1111 pformat (gdbarch->half_format));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: has_dos_based_file_system = %s\n",
1114 plongest (gdbarch->has_dos_based_file_system));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: has_global_breakpoints = %s\n",
1117 plongest (gdbarch->has_global_breakpoints));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: has_global_solist = %s\n",
1120 plongest (gdbarch->has_global_solist));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: has_shared_address_space = <%s>\n",
1123 host_address_to_string (gdbarch->has_shared_address_space));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1126 plongest (gdbarch->have_nonsteppable_watchpoint));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
1129 host_address_to_string (gdbarch->in_function_epilogue_p));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1132 host_address_to_string (gdbarch->in_solib_return_trampoline));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1135 gdbarch_info_proc_p (gdbarch));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: info_proc = <%s>\n",
1138 host_address_to_string (gdbarch->info_proc));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: inner_than = <%s>\n",
1141 host_address_to_string (gdbarch->inner_than));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: insn_is_call = <%s>\n",
1144 host_address_to_string (gdbarch->insn_is_call));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: insn_is_jump = <%s>\n",
1147 host_address_to_string (gdbarch->insn_is_jump));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: insn_is_ret = <%s>\n",
1150 host_address_to_string (gdbarch->insn_is_ret));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: int_bit = %s\n",
1153 plongest (gdbarch->int_bit));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1156 gdbarch_integer_to_address_p (gdbarch));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: integer_to_address = <%s>\n",
1159 host_address_to_string (gdbarch->integer_to_address));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1162 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: long_bit = %s\n",
1165 plongest (gdbarch->long_bit));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: long_double_bit = %s\n",
1168 plongest (gdbarch->long_double_bit));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: long_double_format = %s\n",
1171 pformat (gdbarch->long_double_format));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: long_long_align_bit = %s\n",
1174 plongest (gdbarch->long_long_align_bit));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: long_long_bit = %s\n",
1177 plongest (gdbarch->long_long_bit));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1180 gdbarch_make_corefile_notes_p (gdbarch));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: make_corefile_notes = <%s>\n",
1183 host_address_to_string (gdbarch->make_corefile_notes));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1186 gdbarch_max_insn_length_p (gdbarch));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: max_insn_length = %s\n",
1189 plongest (gdbarch->max_insn_length));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1192 host_address_to_string (gdbarch->memory_insert_breakpoint));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1195 host_address_to_string (gdbarch->memory_remove_breakpoint));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: num_pseudo_regs = %s\n",
1198 plongest (gdbarch->num_pseudo_regs));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: num_regs = %s\n",
1201 plongest (gdbarch->num_regs));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: osabi = %s\n",
1204 plongest (gdbarch->osabi));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1207 gdbarch_overlay_update_p (gdbarch));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: overlay_update = <%s>\n",
1210 host_address_to_string (gdbarch->overlay_update));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: pc_regnum = %s\n",
1213 plongest (gdbarch->pc_regnum));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: pointer_to_address = <%s>\n",
1216 host_address_to_string (gdbarch->pointer_to_address));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1219 gdbarch_print_float_info_p (gdbarch));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: print_float_info = <%s>\n",
1222 host_address_to_string (gdbarch->print_float_info));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: print_insn = <%s>\n",
1225 host_address_to_string (gdbarch->print_insn));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: print_registers_info = <%s>\n",
1228 host_address_to_string (gdbarch->print_registers_info));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1231 gdbarch_print_vector_info_p (gdbarch));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: print_vector_info = <%s>\n",
1234 host_address_to_string (gdbarch->print_vector_info));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1237 gdbarch_process_record_p (gdbarch));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: process_record = <%s>\n",
1240 host_address_to_string (gdbarch->process_record));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1243 gdbarch_process_record_signal_p (gdbarch));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: process_record_signal = <%s>\n",
1246 host_address_to_string (gdbarch->process_record_signal));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: ps_regnum = %s\n",
1249 plongest (gdbarch->ps_regnum));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1252 gdbarch_pseudo_register_read_p (gdbarch));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: pseudo_register_read = <%s>\n",
1255 host_address_to_string (gdbarch->pseudo_register_read));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1258 gdbarch_pseudo_register_read_value_p (gdbarch));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1261 host_address_to_string (gdbarch->pseudo_register_read_value));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1264 gdbarch_pseudo_register_write_p (gdbarch));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: pseudo_register_write = <%s>\n",
1267 host_address_to_string (gdbarch->pseudo_register_write));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: ptr_bit = %s\n",
1270 plongest (gdbarch->ptr_bit));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1273 gdbarch_push_dummy_call_p (gdbarch));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: push_dummy_call = <%s>\n",
1276 host_address_to_string (gdbarch->push_dummy_call));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1279 gdbarch_push_dummy_code_p (gdbarch));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: push_dummy_code = <%s>\n",
1282 host_address_to_string (gdbarch->push_dummy_code));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: ravenscar_ops = %s\n",
1285 host_address_to_string (gdbarch->ravenscar_ops));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1288 gdbarch_read_pc_p (gdbarch));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: read_pc = <%s>\n",
1291 host_address_to_string (gdbarch->read_pc));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1294 gdbarch_record_special_symbol_p (gdbarch));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: record_special_symbol = <%s>\n",
1297 host_address_to_string (gdbarch->record_special_symbol));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: register_name = <%s>\n",
1300 host_address_to_string (gdbarch->register_name));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: register_reggroup_p = <%s>\n",
1303 host_address_to_string (gdbarch->register_reggroup_p));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: register_sim_regno = <%s>\n",
1306 host_address_to_string (gdbarch->register_sim_regno));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: register_to_value = <%s>\n",
1309 host_address_to_string (gdbarch->register_to_value));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1312 gdbarch_register_type_p (gdbarch));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: register_type = <%s>\n",
1315 host_address_to_string (gdbarch->register_type));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1318 gdbarch_regset_from_core_section_p (gdbarch));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: regset_from_core_section = <%s>\n",
1321 host_address_to_string (gdbarch->regset_from_core_section));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1324 gdbarch_relocate_instruction_p (gdbarch));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: relocate_instruction = <%s>\n",
1327 host_address_to_string (gdbarch->relocate_instruction));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1330 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: remote_register_number = <%s>\n",
1333 host_address_to_string (gdbarch->remote_register_number));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1336 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1339 gdbarch_return_value_p (gdbarch));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: return_value = <%s>\n",
1342 host_address_to_string (gdbarch->return_value));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1345 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: short_bit = %s\n",
1348 plongest (gdbarch->short_bit));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1351 gdbarch_single_step_through_delay_p (gdbarch));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: single_step_through_delay = <%s>\n",
1354 host_address_to_string (gdbarch->single_step_through_delay));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1357 gdbarch_skip_main_prologue_p (gdbarch));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: skip_main_prologue = <%s>\n",
1360 host_address_to_string (gdbarch->skip_main_prologue));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1363 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1366 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: skip_prologue = <%s>\n",
1369 host_address_to_string (gdbarch->skip_prologue));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1372 host_address_to_string (gdbarch->skip_solib_resolver));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1375 host_address_to_string (gdbarch->skip_trampoline_code));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1378 gdbarch_software_single_step_p (gdbarch));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: software_single_step = <%s>\n",
1381 host_address_to_string (gdbarch->software_single_step));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1384 plongest (gdbarch->sofun_address_maybe_missing));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: solib_symbols_extension = %s\n",
1387 pstring (gdbarch->solib_symbols_extension));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: sp_regnum = %s\n",
1390 plongest (gdbarch->sp_regnum));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1393 host_address_to_string (gdbarch->stab_reg_to_regnum));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1396 host_address_to_string (gdbarch->stabs_argument_has_addr));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1399 pstring (gdbarch->stap_gdb_register_prefix));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1402 pstring (gdbarch->stap_gdb_register_suffix));
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: stap_integer_prefixes = %s\n",
1405 pstring_list (gdbarch->stap_integer_prefixes));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: stap_integer_suffixes = %s\n",
1408 pstring_list (gdbarch->stap_integer_suffixes));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1411 gdbarch_stap_is_single_operand_p (gdbarch));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1414 host_address_to_string (gdbarch->stap_is_single_operand));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1417 gdbarch_stap_parse_special_token_p (gdbarch));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1420 host_address_to_string (gdbarch->stap_parse_special_token));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1423 pstring_list (gdbarch->stap_register_indirection_prefixes));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1426 pstring_list (gdbarch->stap_register_indirection_suffixes));
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: stap_register_prefixes = %s\n",
1429 pstring_list (gdbarch->stap_register_prefixes));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: stap_register_suffixes = %s\n",
1432 pstring_list (gdbarch->stap_register_suffixes));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1435 gdbarch_static_transform_name_p (gdbarch));
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: static_transform_name = <%s>\n",
1438 host_address_to_string (gdbarch->static_transform_name));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: target_desc = %s\n",
1441 host_address_to_string (gdbarch->target_desc));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1444 gdbarch_unwind_pc_p (gdbarch));
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: unwind_pc = <%s>\n",
1447 host_address_to_string (gdbarch->unwind_pc));
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1450 gdbarch_unwind_sp_p (gdbarch));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: unwind_sp = <%s>\n",
1453 host_address_to_string (gdbarch->unwind_sp));
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: value_from_register = <%s>\n",
1456 host_address_to_string (gdbarch->value_from_register));
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: value_to_register = <%s>\n",
1459 host_address_to_string (gdbarch->value_to_register));
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: vbit_in_delta = %s\n",
1462 plongest (gdbarch->vbit_in_delta));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1465 host_address_to_string (gdbarch->virtual_frame_pointer));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: vtable_function_descriptors = %s\n",
1468 plongest (gdbarch->vtable_function_descriptors));
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1471 gdbarch_write_pc_p (gdbarch));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: write_pc = <%s>\n",
1474 host_address_to_string (gdbarch->write_pc));
1475 if (gdbarch->dump_tdep != NULL)
1476 gdbarch->dump_tdep (gdbarch, file);
1479 struct gdbarch_tdep *
1480 gdbarch_tdep (struct gdbarch *gdbarch)
1482 if (gdbarch_debug >= 2)
1483 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1484 return gdbarch->tdep;
1488 const struct bfd_arch_info *
1489 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1491 gdb_assert (gdbarch != NULL);
1492 if (gdbarch_debug >= 2)
1493 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1494 return gdbarch->bfd_arch_info;
1498 gdbarch_byte_order (struct gdbarch *gdbarch)
1500 gdb_assert (gdbarch != NULL);
1501 if (gdbarch_debug >= 2)
1502 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1503 return gdbarch->byte_order;
1507 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1509 gdb_assert (gdbarch != NULL);
1510 if (gdbarch_debug >= 2)
1511 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1512 return gdbarch->byte_order_for_code;
1516 gdbarch_osabi (struct gdbarch *gdbarch)
1518 gdb_assert (gdbarch != NULL);
1519 if (gdbarch_debug >= 2)
1520 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1521 return gdbarch->osabi;
1524 const struct target_desc *
1525 gdbarch_target_desc (struct gdbarch *gdbarch)
1527 gdb_assert (gdbarch != NULL);
1528 if (gdbarch_debug >= 2)
1529 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1530 return gdbarch->target_desc;
1534 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1536 gdb_assert (gdbarch != NULL);
1537 /* Skip verify of bits_big_endian, invalid_p == 0 */
1538 if (gdbarch_debug >= 2)
1539 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1540 return gdbarch->bits_big_endian;
1544 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1545 int bits_big_endian)
1547 gdbarch->bits_big_endian = bits_big_endian;
1551 gdbarch_short_bit (struct gdbarch *gdbarch)
1553 gdb_assert (gdbarch != NULL);
1554 /* Skip verify of short_bit, invalid_p == 0 */
1555 if (gdbarch_debug >= 2)
1556 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1557 return gdbarch->short_bit;
1561 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1564 gdbarch->short_bit = short_bit;
1568 gdbarch_int_bit (struct gdbarch *gdbarch)
1570 gdb_assert (gdbarch != NULL);
1571 /* Skip verify of int_bit, invalid_p == 0 */
1572 if (gdbarch_debug >= 2)
1573 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1574 return gdbarch->int_bit;
1578 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1581 gdbarch->int_bit = int_bit;
1585 gdbarch_long_bit (struct gdbarch *gdbarch)
1587 gdb_assert (gdbarch != NULL);
1588 /* Skip verify of long_bit, invalid_p == 0 */
1589 if (gdbarch_debug >= 2)
1590 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1591 return gdbarch->long_bit;
1595 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1598 gdbarch->long_bit = long_bit;
1602 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1604 gdb_assert (gdbarch != NULL);
1605 /* Skip verify of long_long_bit, invalid_p == 0 */
1606 if (gdbarch_debug >= 2)
1607 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1608 return gdbarch->long_long_bit;
1612 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1615 gdbarch->long_long_bit = long_long_bit;
1619 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1621 gdb_assert (gdbarch != NULL);
1622 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1623 if (gdbarch_debug >= 2)
1624 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1625 return gdbarch->long_long_align_bit;
1629 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1630 int long_long_align_bit)
1632 gdbarch->long_long_align_bit = long_long_align_bit;
1636 gdbarch_half_bit (struct gdbarch *gdbarch)
1638 gdb_assert (gdbarch != NULL);
1639 /* Skip verify of half_bit, invalid_p == 0 */
1640 if (gdbarch_debug >= 2)
1641 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1642 return gdbarch->half_bit;
1646 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1649 gdbarch->half_bit = half_bit;
1652 const struct floatformat **
1653 gdbarch_half_format (struct gdbarch *gdbarch)
1655 gdb_assert (gdbarch != NULL);
1656 if (gdbarch_debug >= 2)
1657 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1658 return gdbarch->half_format;
1662 set_gdbarch_half_format (struct gdbarch *gdbarch,
1663 const struct floatformat ** half_format)
1665 gdbarch->half_format = half_format;
1669 gdbarch_float_bit (struct gdbarch *gdbarch)
1671 gdb_assert (gdbarch != NULL);
1672 /* Skip verify of float_bit, invalid_p == 0 */
1673 if (gdbarch_debug >= 2)
1674 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1675 return gdbarch->float_bit;
1679 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1682 gdbarch->float_bit = float_bit;
1685 const struct floatformat **
1686 gdbarch_float_format (struct gdbarch *gdbarch)
1688 gdb_assert (gdbarch != NULL);
1689 if (gdbarch_debug >= 2)
1690 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1691 return gdbarch->float_format;
1695 set_gdbarch_float_format (struct gdbarch *gdbarch,
1696 const struct floatformat ** float_format)
1698 gdbarch->float_format = float_format;
1702 gdbarch_double_bit (struct gdbarch *gdbarch)
1704 gdb_assert (gdbarch != NULL);
1705 /* Skip verify of double_bit, invalid_p == 0 */
1706 if (gdbarch_debug >= 2)
1707 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1708 return gdbarch->double_bit;
1712 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1715 gdbarch->double_bit = double_bit;
1718 const struct floatformat **
1719 gdbarch_double_format (struct gdbarch *gdbarch)
1721 gdb_assert (gdbarch != NULL);
1722 if (gdbarch_debug >= 2)
1723 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1724 return gdbarch->double_format;
1728 set_gdbarch_double_format (struct gdbarch *gdbarch,
1729 const struct floatformat ** double_format)
1731 gdbarch->double_format = double_format;
1735 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1737 gdb_assert (gdbarch != NULL);
1738 /* Skip verify of long_double_bit, invalid_p == 0 */
1739 if (gdbarch_debug >= 2)
1740 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1741 return gdbarch->long_double_bit;
1745 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1746 int long_double_bit)
1748 gdbarch->long_double_bit = long_double_bit;
1751 const struct floatformat **
1752 gdbarch_long_double_format (struct gdbarch *gdbarch)
1754 gdb_assert (gdbarch != NULL);
1755 if (gdbarch_debug >= 2)
1756 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1757 return gdbarch->long_double_format;
1761 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1762 const struct floatformat ** long_double_format)
1764 gdbarch->long_double_format = long_double_format;
1768 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1770 gdb_assert (gdbarch != NULL);
1771 /* Skip verify of ptr_bit, invalid_p == 0 */
1772 if (gdbarch_debug >= 2)
1773 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1774 return gdbarch->ptr_bit;
1778 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1781 gdbarch->ptr_bit = ptr_bit;
1785 gdbarch_addr_bit (struct gdbarch *gdbarch)
1787 gdb_assert (gdbarch != NULL);
1788 /* Check variable changed from pre-default. */
1789 gdb_assert (gdbarch->addr_bit != 0);
1790 if (gdbarch_debug >= 2)
1791 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1792 return gdbarch->addr_bit;
1796 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1799 gdbarch->addr_bit = addr_bit;
1803 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1805 gdb_assert (gdbarch != NULL);
1806 /* Check variable changed from pre-default. */
1807 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1808 if (gdbarch_debug >= 2)
1809 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1810 return gdbarch->dwarf2_addr_size;
1814 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1815 int dwarf2_addr_size)
1817 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1821 gdbarch_char_signed (struct gdbarch *gdbarch)
1823 gdb_assert (gdbarch != NULL);
1824 /* Check variable changed from pre-default. */
1825 gdb_assert (gdbarch->char_signed != -1);
1826 if (gdbarch_debug >= 2)
1827 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1828 return gdbarch->char_signed;
1832 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1835 gdbarch->char_signed = char_signed;
1839 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1841 gdb_assert (gdbarch != NULL);
1842 return gdbarch->read_pc != NULL;
1846 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1848 gdb_assert (gdbarch != NULL);
1849 gdb_assert (gdbarch->read_pc != NULL);
1850 if (gdbarch_debug >= 2)
1851 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1852 return gdbarch->read_pc (regcache);
1856 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1857 gdbarch_read_pc_ftype read_pc)
1859 gdbarch->read_pc = read_pc;
1863 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1865 gdb_assert (gdbarch != NULL);
1866 return gdbarch->write_pc != NULL;
1870 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1872 gdb_assert (gdbarch != NULL);
1873 gdb_assert (gdbarch->write_pc != NULL);
1874 if (gdbarch_debug >= 2)
1875 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1876 gdbarch->write_pc (regcache, val);
1880 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1881 gdbarch_write_pc_ftype write_pc)
1883 gdbarch->write_pc = write_pc;
1887 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1889 gdb_assert (gdbarch != NULL);
1890 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1891 if (gdbarch_debug >= 2)
1892 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1893 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1897 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1898 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1900 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1904 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1906 gdb_assert (gdbarch != NULL);
1907 return gdbarch->pseudo_register_read != NULL;
1910 enum register_status
1911 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1913 gdb_assert (gdbarch != NULL);
1914 gdb_assert (gdbarch->pseudo_register_read != NULL);
1915 if (gdbarch_debug >= 2)
1916 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1917 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1921 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1922 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1924 gdbarch->pseudo_register_read = pseudo_register_read;
1928 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1930 gdb_assert (gdbarch != NULL);
1931 return gdbarch->pseudo_register_read_value != NULL;
1935 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1937 gdb_assert (gdbarch != NULL);
1938 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1939 if (gdbarch_debug >= 2)
1940 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1941 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1945 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1946 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1948 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1952 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1954 gdb_assert (gdbarch != NULL);
1955 return gdbarch->pseudo_register_write != NULL;
1959 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1961 gdb_assert (gdbarch != NULL);
1962 gdb_assert (gdbarch->pseudo_register_write != NULL);
1963 if (gdbarch_debug >= 2)
1964 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1965 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1969 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1970 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1972 gdbarch->pseudo_register_write = pseudo_register_write;
1976 gdbarch_num_regs (struct gdbarch *gdbarch)
1978 gdb_assert (gdbarch != NULL);
1979 /* Check variable changed from pre-default. */
1980 gdb_assert (gdbarch->num_regs != -1);
1981 if (gdbarch_debug >= 2)
1982 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1983 return gdbarch->num_regs;
1987 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1990 gdbarch->num_regs = num_regs;
1994 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1996 gdb_assert (gdbarch != NULL);
1997 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1998 if (gdbarch_debug >= 2)
1999 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2000 return gdbarch->num_pseudo_regs;
2004 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2005 int num_pseudo_regs)
2007 gdbarch->num_pseudo_regs = num_pseudo_regs;
2011 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
2013 gdb_assert (gdbarch != NULL);
2014 return gdbarch->ax_pseudo_register_collect != NULL;
2018 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2020 gdb_assert (gdbarch != NULL);
2021 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
2022 if (gdbarch_debug >= 2)
2023 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
2024 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
2028 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
2029 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
2031 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
2035 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
2037 gdb_assert (gdbarch != NULL);
2038 return gdbarch->ax_pseudo_register_push_stack != NULL;
2042 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2044 gdb_assert (gdbarch != NULL);
2045 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2046 if (gdbarch_debug >= 2)
2047 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2048 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2052 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2053 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2055 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2059 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2061 gdb_assert (gdbarch != NULL);
2062 /* Skip verify of sp_regnum, invalid_p == 0 */
2063 if (gdbarch_debug >= 2)
2064 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2065 return gdbarch->sp_regnum;
2069 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2072 gdbarch->sp_regnum = sp_regnum;
2076 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2078 gdb_assert (gdbarch != NULL);
2079 /* Skip verify of pc_regnum, invalid_p == 0 */
2080 if (gdbarch_debug >= 2)
2081 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2082 return gdbarch->pc_regnum;
2086 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2089 gdbarch->pc_regnum = pc_regnum;
2093 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2095 gdb_assert (gdbarch != NULL);
2096 /* Skip verify of ps_regnum, invalid_p == 0 */
2097 if (gdbarch_debug >= 2)
2098 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2099 return gdbarch->ps_regnum;
2103 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2106 gdbarch->ps_regnum = ps_regnum;
2110 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2112 gdb_assert (gdbarch != NULL);
2113 /* Skip verify of fp0_regnum, invalid_p == 0 */
2114 if (gdbarch_debug >= 2)
2115 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2116 return gdbarch->fp0_regnum;
2120 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2123 gdbarch->fp0_regnum = fp0_regnum;
2127 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2129 gdb_assert (gdbarch != NULL);
2130 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2131 if (gdbarch_debug >= 2)
2132 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2133 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2137 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2138 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2140 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2144 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2146 gdb_assert (gdbarch != NULL);
2147 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2148 if (gdbarch_debug >= 2)
2149 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2150 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2154 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2155 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2157 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2161 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2163 gdb_assert (gdbarch != NULL);
2164 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2165 if (gdbarch_debug >= 2)
2166 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2167 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2171 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2172 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2174 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2178 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2180 gdb_assert (gdbarch != NULL);
2181 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2182 if (gdbarch_debug >= 2)
2183 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2184 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2188 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2189 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2191 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2195 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2197 gdb_assert (gdbarch != NULL);
2198 gdb_assert (gdbarch->register_name != NULL);
2199 if (gdbarch_debug >= 2)
2200 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2201 return gdbarch->register_name (gdbarch, regnr);
2205 set_gdbarch_register_name (struct gdbarch *gdbarch,
2206 gdbarch_register_name_ftype register_name)
2208 gdbarch->register_name = register_name;
2212 gdbarch_register_type_p (struct gdbarch *gdbarch)
2214 gdb_assert (gdbarch != NULL);
2215 return gdbarch->register_type != NULL;
2219 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2221 gdb_assert (gdbarch != NULL);
2222 gdb_assert (gdbarch->register_type != NULL);
2223 if (gdbarch_debug >= 2)
2224 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2225 return gdbarch->register_type (gdbarch, reg_nr);
2229 set_gdbarch_register_type (struct gdbarch *gdbarch,
2230 gdbarch_register_type_ftype register_type)
2232 gdbarch->register_type = register_type;
2236 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2238 gdb_assert (gdbarch != NULL);
2239 return gdbarch->dummy_id != NULL;
2243 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2245 gdb_assert (gdbarch != NULL);
2246 gdb_assert (gdbarch->dummy_id != NULL);
2247 if (gdbarch_debug >= 2)
2248 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2249 return gdbarch->dummy_id (gdbarch, this_frame);
2253 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2254 gdbarch_dummy_id_ftype dummy_id)
2256 gdbarch->dummy_id = dummy_id;
2260 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2262 gdb_assert (gdbarch != NULL);
2263 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2264 if (gdbarch_debug >= 2)
2265 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2266 return gdbarch->deprecated_fp_regnum;
2270 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2271 int deprecated_fp_regnum)
2273 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2277 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2279 gdb_assert (gdbarch != NULL);
2280 return gdbarch->push_dummy_call != NULL;
2284 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)
2286 gdb_assert (gdbarch != NULL);
2287 gdb_assert (gdbarch->push_dummy_call != NULL);
2288 if (gdbarch_debug >= 2)
2289 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2290 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2294 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2295 gdbarch_push_dummy_call_ftype push_dummy_call)
2297 gdbarch->push_dummy_call = push_dummy_call;
2301 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2303 gdb_assert (gdbarch != NULL);
2304 /* Skip verify of call_dummy_location, invalid_p == 0 */
2305 if (gdbarch_debug >= 2)
2306 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2307 return gdbarch->call_dummy_location;
2311 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2312 int call_dummy_location)
2314 gdbarch->call_dummy_location = call_dummy_location;
2318 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2320 gdb_assert (gdbarch != NULL);
2321 return gdbarch->push_dummy_code != NULL;
2325 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)
2327 gdb_assert (gdbarch != NULL);
2328 gdb_assert (gdbarch->push_dummy_code != NULL);
2329 if (gdbarch_debug >= 2)
2330 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2331 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2335 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2336 gdbarch_push_dummy_code_ftype push_dummy_code)
2338 gdbarch->push_dummy_code = push_dummy_code;
2342 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2344 gdb_assert (gdbarch != NULL);
2345 gdb_assert (gdbarch->print_registers_info != NULL);
2346 if (gdbarch_debug >= 2)
2347 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2348 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2352 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2353 gdbarch_print_registers_info_ftype print_registers_info)
2355 gdbarch->print_registers_info = print_registers_info;
2359 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2361 gdb_assert (gdbarch != NULL);
2362 return gdbarch->print_float_info != NULL;
2366 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2368 gdb_assert (gdbarch != NULL);
2369 gdb_assert (gdbarch->print_float_info != NULL);
2370 if (gdbarch_debug >= 2)
2371 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2372 gdbarch->print_float_info (gdbarch, file, frame, args);
2376 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2377 gdbarch_print_float_info_ftype print_float_info)
2379 gdbarch->print_float_info = print_float_info;
2383 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2385 gdb_assert (gdbarch != NULL);
2386 return gdbarch->print_vector_info != NULL;
2390 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2392 gdb_assert (gdbarch != NULL);
2393 gdb_assert (gdbarch->print_vector_info != NULL);
2394 if (gdbarch_debug >= 2)
2395 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2396 gdbarch->print_vector_info (gdbarch, file, frame, args);
2400 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2401 gdbarch_print_vector_info_ftype print_vector_info)
2403 gdbarch->print_vector_info = print_vector_info;
2407 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2409 gdb_assert (gdbarch != NULL);
2410 gdb_assert (gdbarch->register_sim_regno != NULL);
2411 if (gdbarch_debug >= 2)
2412 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2413 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2417 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2418 gdbarch_register_sim_regno_ftype register_sim_regno)
2420 gdbarch->register_sim_regno = register_sim_regno;
2424 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2426 gdb_assert (gdbarch != NULL);
2427 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2428 if (gdbarch_debug >= 2)
2429 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2430 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2434 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2435 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2437 gdbarch->cannot_fetch_register = cannot_fetch_register;
2441 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2443 gdb_assert (gdbarch != NULL);
2444 gdb_assert (gdbarch->cannot_store_register != NULL);
2445 if (gdbarch_debug >= 2)
2446 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2447 return gdbarch->cannot_store_register (gdbarch, regnum);
2451 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2452 gdbarch_cannot_store_register_ftype cannot_store_register)
2454 gdbarch->cannot_store_register = cannot_store_register;
2458 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2460 gdb_assert (gdbarch != NULL);
2461 return gdbarch->get_longjmp_target != NULL;
2465 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2467 gdb_assert (gdbarch != NULL);
2468 gdb_assert (gdbarch->get_longjmp_target != NULL);
2469 if (gdbarch_debug >= 2)
2470 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2471 return gdbarch->get_longjmp_target (frame, pc);
2475 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2476 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2478 gdbarch->get_longjmp_target = get_longjmp_target;
2482 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2484 gdb_assert (gdbarch != NULL);
2485 if (gdbarch_debug >= 2)
2486 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2487 return gdbarch->believe_pcc_promotion;
2491 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2492 int believe_pcc_promotion)
2494 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2498 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2500 gdb_assert (gdbarch != NULL);
2501 gdb_assert (gdbarch->convert_register_p != NULL);
2502 if (gdbarch_debug >= 2)
2503 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2504 return gdbarch->convert_register_p (gdbarch, regnum, type);
2508 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2509 gdbarch_convert_register_p_ftype convert_register_p)
2511 gdbarch->convert_register_p = convert_register_p;
2515 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2517 gdb_assert (gdbarch != NULL);
2518 gdb_assert (gdbarch->register_to_value != NULL);
2519 if (gdbarch_debug >= 2)
2520 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2521 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2525 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2526 gdbarch_register_to_value_ftype register_to_value)
2528 gdbarch->register_to_value = register_to_value;
2532 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2534 gdb_assert (gdbarch != NULL);
2535 gdb_assert (gdbarch->value_to_register != NULL);
2536 if (gdbarch_debug >= 2)
2537 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2538 gdbarch->value_to_register (frame, regnum, type, buf);
2542 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2543 gdbarch_value_to_register_ftype value_to_register)
2545 gdbarch->value_to_register = value_to_register;
2549 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2551 gdb_assert (gdbarch != NULL);
2552 gdb_assert (gdbarch->value_from_register != NULL);
2553 if (gdbarch_debug >= 2)
2554 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2555 return gdbarch->value_from_register (type, regnum, frame);
2559 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2560 gdbarch_value_from_register_ftype value_from_register)
2562 gdbarch->value_from_register = value_from_register;
2566 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2568 gdb_assert (gdbarch != NULL);
2569 gdb_assert (gdbarch->pointer_to_address != NULL);
2570 if (gdbarch_debug >= 2)
2571 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2572 return gdbarch->pointer_to_address (gdbarch, type, buf);
2576 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2577 gdbarch_pointer_to_address_ftype pointer_to_address)
2579 gdbarch->pointer_to_address = pointer_to_address;
2583 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2585 gdb_assert (gdbarch != NULL);
2586 gdb_assert (gdbarch->address_to_pointer != NULL);
2587 if (gdbarch_debug >= 2)
2588 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2589 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2593 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2594 gdbarch_address_to_pointer_ftype address_to_pointer)
2596 gdbarch->address_to_pointer = address_to_pointer;
2600 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2602 gdb_assert (gdbarch != NULL);
2603 return gdbarch->integer_to_address != NULL;
2607 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2609 gdb_assert (gdbarch != NULL);
2610 gdb_assert (gdbarch->integer_to_address != NULL);
2611 if (gdbarch_debug >= 2)
2612 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2613 return gdbarch->integer_to_address (gdbarch, type, buf);
2617 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2618 gdbarch_integer_to_address_ftype integer_to_address)
2620 gdbarch->integer_to_address = integer_to_address;
2624 gdbarch_return_value_p (struct gdbarch *gdbarch)
2626 gdb_assert (gdbarch != NULL);
2627 return gdbarch->return_value != NULL;
2630 enum return_value_convention
2631 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2633 gdb_assert (gdbarch != NULL);
2634 gdb_assert (gdbarch->return_value != NULL);
2635 if (gdbarch_debug >= 2)
2636 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2637 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2641 set_gdbarch_return_value (struct gdbarch *gdbarch,
2642 gdbarch_return_value_ftype return_value)
2644 gdbarch->return_value = return_value;
2648 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2650 gdb_assert (gdbarch != NULL);
2651 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2652 if (gdbarch_debug >= 2)
2653 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2654 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2658 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2659 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2661 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2665 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2667 gdb_assert (gdbarch != NULL);
2668 gdb_assert (gdbarch->skip_prologue != NULL);
2669 if (gdbarch_debug >= 2)
2670 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2671 return gdbarch->skip_prologue (gdbarch, ip);
2675 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2676 gdbarch_skip_prologue_ftype skip_prologue)
2678 gdbarch->skip_prologue = skip_prologue;
2682 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2684 gdb_assert (gdbarch != NULL);
2685 return gdbarch->skip_main_prologue != NULL;
2689 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2691 gdb_assert (gdbarch != NULL);
2692 gdb_assert (gdbarch->skip_main_prologue != NULL);
2693 if (gdbarch_debug >= 2)
2694 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2695 return gdbarch->skip_main_prologue (gdbarch, ip);
2699 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2700 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2702 gdbarch->skip_main_prologue = skip_main_prologue;
2706 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2708 gdb_assert (gdbarch != NULL);
2709 gdb_assert (gdbarch->inner_than != NULL);
2710 if (gdbarch_debug >= 2)
2711 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2712 return gdbarch->inner_than (lhs, rhs);
2716 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2717 gdbarch_inner_than_ftype inner_than)
2719 gdbarch->inner_than = inner_than;
2723 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2725 gdb_assert (gdbarch != NULL);
2726 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2727 if (gdbarch_debug >= 2)
2728 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2729 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2733 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2734 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2736 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2740 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2742 gdb_assert (gdbarch != NULL);
2743 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2744 if (gdbarch_debug >= 2)
2745 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2746 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2750 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2751 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2753 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2757 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2759 gdb_assert (gdbarch != NULL);
2760 return gdbarch->adjust_breakpoint_address != NULL;
2764 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2766 gdb_assert (gdbarch != NULL);
2767 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2768 if (gdbarch_debug >= 2)
2769 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2770 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2774 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2775 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2777 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2781 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2783 gdb_assert (gdbarch != NULL);
2784 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2785 if (gdbarch_debug >= 2)
2786 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2787 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2791 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2792 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2794 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2798 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2800 gdb_assert (gdbarch != NULL);
2801 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2802 if (gdbarch_debug >= 2)
2803 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2804 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2808 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2809 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2811 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2815 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2817 gdb_assert (gdbarch != NULL);
2818 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2819 if (gdbarch_debug >= 2)
2820 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2821 return gdbarch->decr_pc_after_break;
2825 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2826 CORE_ADDR decr_pc_after_break)
2828 gdbarch->decr_pc_after_break = decr_pc_after_break;
2832 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2834 gdb_assert (gdbarch != NULL);
2835 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2836 if (gdbarch_debug >= 2)
2837 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2838 return gdbarch->deprecated_function_start_offset;
2842 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2843 CORE_ADDR deprecated_function_start_offset)
2845 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2849 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2851 gdb_assert (gdbarch != NULL);
2852 gdb_assert (gdbarch->remote_register_number != NULL);
2853 if (gdbarch_debug >= 2)
2854 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2855 return gdbarch->remote_register_number (gdbarch, regno);
2859 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2860 gdbarch_remote_register_number_ftype remote_register_number)
2862 gdbarch->remote_register_number = remote_register_number;
2866 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2868 gdb_assert (gdbarch != NULL);
2869 return gdbarch->fetch_tls_load_module_address != NULL;
2873 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2875 gdb_assert (gdbarch != NULL);
2876 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2877 if (gdbarch_debug >= 2)
2878 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2879 return gdbarch->fetch_tls_load_module_address (objfile);
2883 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2884 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2886 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2890 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2892 gdb_assert (gdbarch != NULL);
2893 /* Skip verify of frame_args_skip, invalid_p == 0 */
2894 if (gdbarch_debug >= 2)
2895 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2896 return gdbarch->frame_args_skip;
2900 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2901 CORE_ADDR frame_args_skip)
2903 gdbarch->frame_args_skip = frame_args_skip;
2907 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2909 gdb_assert (gdbarch != NULL);
2910 return gdbarch->unwind_pc != NULL;
2914 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2916 gdb_assert (gdbarch != NULL);
2917 gdb_assert (gdbarch->unwind_pc != NULL);
2918 if (gdbarch_debug >= 2)
2919 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2920 return gdbarch->unwind_pc (gdbarch, next_frame);
2924 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2925 gdbarch_unwind_pc_ftype unwind_pc)
2927 gdbarch->unwind_pc = unwind_pc;
2931 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2933 gdb_assert (gdbarch != NULL);
2934 return gdbarch->unwind_sp != NULL;
2938 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2940 gdb_assert (gdbarch != NULL);
2941 gdb_assert (gdbarch->unwind_sp != NULL);
2942 if (gdbarch_debug >= 2)
2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2944 return gdbarch->unwind_sp (gdbarch, next_frame);
2948 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2949 gdbarch_unwind_sp_ftype unwind_sp)
2951 gdbarch->unwind_sp = unwind_sp;
2955 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2957 gdb_assert (gdbarch != NULL);
2958 return gdbarch->frame_num_args != NULL;
2962 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2964 gdb_assert (gdbarch != NULL);
2965 gdb_assert (gdbarch->frame_num_args != NULL);
2966 if (gdbarch_debug >= 2)
2967 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2968 return gdbarch->frame_num_args (frame);
2972 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2973 gdbarch_frame_num_args_ftype frame_num_args)
2975 gdbarch->frame_num_args = frame_num_args;
2979 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2981 gdb_assert (gdbarch != NULL);
2982 return gdbarch->frame_align != NULL;
2986 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2988 gdb_assert (gdbarch != NULL);
2989 gdb_assert (gdbarch->frame_align != NULL);
2990 if (gdbarch_debug >= 2)
2991 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2992 return gdbarch->frame_align (gdbarch, address);
2996 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2997 gdbarch_frame_align_ftype frame_align)
2999 gdbarch->frame_align = frame_align;
3003 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3005 gdb_assert (gdbarch != NULL);
3006 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3007 if (gdbarch_debug >= 2)
3008 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3009 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3013 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3014 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3016 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3020 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3022 gdb_assert (gdbarch != NULL);
3023 if (gdbarch_debug >= 2)
3024 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3025 return gdbarch->frame_red_zone_size;
3029 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3030 int frame_red_zone_size)
3032 gdbarch->frame_red_zone_size = frame_red_zone_size;
3036 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3038 gdb_assert (gdbarch != NULL);
3039 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3040 if (gdbarch_debug >= 2)
3041 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3042 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3046 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3047 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3049 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3053 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3055 gdb_assert (gdbarch != NULL);
3056 gdb_assert (gdbarch->addr_bits_remove != NULL);
3057 if (gdbarch_debug >= 2)
3058 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3059 return gdbarch->addr_bits_remove (gdbarch, addr);
3063 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3064 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3066 gdbarch->addr_bits_remove = addr_bits_remove;
3070 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3072 gdb_assert (gdbarch != NULL);
3073 return gdbarch->software_single_step != NULL;
3077 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3079 gdb_assert (gdbarch != NULL);
3080 gdb_assert (gdbarch->software_single_step != NULL);
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3083 return gdbarch->software_single_step (frame);
3087 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3088 gdbarch_software_single_step_ftype software_single_step)
3090 gdbarch->software_single_step = software_single_step;
3094 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3096 gdb_assert (gdbarch != NULL);
3097 return gdbarch->single_step_through_delay != NULL;
3101 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3103 gdb_assert (gdbarch != NULL);
3104 gdb_assert (gdbarch->single_step_through_delay != NULL);
3105 if (gdbarch_debug >= 2)
3106 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3107 return gdbarch->single_step_through_delay (gdbarch, frame);
3111 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3112 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3114 gdbarch->single_step_through_delay = single_step_through_delay;
3118 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3120 gdb_assert (gdbarch != NULL);
3121 gdb_assert (gdbarch->print_insn != NULL);
3122 if (gdbarch_debug >= 2)
3123 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3124 return gdbarch->print_insn (vma, info);
3128 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3129 gdbarch_print_insn_ftype print_insn)
3131 gdbarch->print_insn = print_insn;
3135 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3137 gdb_assert (gdbarch != NULL);
3138 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3139 if (gdbarch_debug >= 2)
3140 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3141 return gdbarch->skip_trampoline_code (frame, pc);
3145 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3146 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3148 gdbarch->skip_trampoline_code = skip_trampoline_code;
3152 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3154 gdb_assert (gdbarch != NULL);
3155 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3156 if (gdbarch_debug >= 2)
3157 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3158 return gdbarch->skip_solib_resolver (gdbarch, pc);
3162 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3163 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3165 gdbarch->skip_solib_resolver = skip_solib_resolver;
3169 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3171 gdb_assert (gdbarch != NULL);
3172 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3173 if (gdbarch_debug >= 2)
3174 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3175 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3179 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3180 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3182 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3186 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3188 gdb_assert (gdbarch != NULL);
3189 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3192 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3196 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3197 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3199 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3203 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3205 gdb_assert (gdbarch != NULL);
3206 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3207 if (gdbarch_debug >= 2)
3208 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3209 gdbarch->elf_make_msymbol_special (sym, msym);
3213 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3214 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3216 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3220 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3222 gdb_assert (gdbarch != NULL);
3223 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3224 if (gdbarch_debug >= 2)
3225 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3226 gdbarch->coff_make_msymbol_special (val, msym);
3230 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3231 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3233 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3237 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3239 gdb_assert (gdbarch != NULL);
3240 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3241 if (gdbarch_debug >= 2)
3242 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3243 return gdbarch->cannot_step_breakpoint;
3247 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3248 int cannot_step_breakpoint)
3250 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3254 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3256 gdb_assert (gdbarch != NULL);
3257 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3258 if (gdbarch_debug >= 2)
3259 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3260 return gdbarch->have_nonsteppable_watchpoint;
3264 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3265 int have_nonsteppable_watchpoint)
3267 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3271 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3273 gdb_assert (gdbarch != NULL);
3274 return gdbarch->address_class_type_flags != NULL;
3278 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3280 gdb_assert (gdbarch != NULL);
3281 gdb_assert (gdbarch->address_class_type_flags != NULL);
3282 if (gdbarch_debug >= 2)
3283 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3284 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3288 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3289 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3291 gdbarch->address_class_type_flags = address_class_type_flags;
3295 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3297 gdb_assert (gdbarch != NULL);
3298 return gdbarch->address_class_type_flags_to_name != NULL;
3302 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3304 gdb_assert (gdbarch != NULL);
3305 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3306 if (gdbarch_debug >= 2)
3307 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3308 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3312 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3313 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3315 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3319 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3321 gdb_assert (gdbarch != NULL);
3322 return gdbarch->address_class_name_to_type_flags != NULL;
3326 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3328 gdb_assert (gdbarch != NULL);
3329 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3330 if (gdbarch_debug >= 2)
3331 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3332 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3336 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3337 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3339 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3343 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3345 gdb_assert (gdbarch != NULL);
3346 gdb_assert (gdbarch->register_reggroup_p != NULL);
3347 if (gdbarch_debug >= 2)
3348 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3349 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3353 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3354 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3356 gdbarch->register_reggroup_p = register_reggroup_p;
3360 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3362 gdb_assert (gdbarch != NULL);
3363 return gdbarch->fetch_pointer_argument != NULL;
3367 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3369 gdb_assert (gdbarch != NULL);
3370 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3371 if (gdbarch_debug >= 2)
3372 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3373 return gdbarch->fetch_pointer_argument (frame, argi, type);
3377 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3378 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3380 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3384 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3386 gdb_assert (gdbarch != NULL);
3387 return gdbarch->regset_from_core_section != NULL;
3390 const struct regset *
3391 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3393 gdb_assert (gdbarch != NULL);
3394 gdb_assert (gdbarch->regset_from_core_section != NULL);
3395 if (gdbarch_debug >= 2)
3396 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3397 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3401 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3402 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3404 gdbarch->regset_from_core_section = regset_from_core_section;
3407 struct core_regset_section *
3408 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
3410 gdb_assert (gdbarch != NULL);
3411 if (gdbarch_debug >= 2)
3412 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
3413 return gdbarch->core_regset_sections;
3417 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
3418 struct core_regset_section * core_regset_sections)
3420 gdbarch->core_regset_sections = core_regset_sections;
3424 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3426 gdb_assert (gdbarch != NULL);
3427 return gdbarch->make_corefile_notes != NULL;
3431 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3433 gdb_assert (gdbarch != NULL);
3434 gdb_assert (gdbarch->make_corefile_notes != NULL);
3435 if (gdbarch_debug >= 2)
3436 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3437 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3441 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3442 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3444 gdbarch->make_corefile_notes = make_corefile_notes;
3448 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3450 gdb_assert (gdbarch != NULL);
3451 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3455 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3457 gdb_assert (gdbarch != NULL);
3458 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3459 if (gdbarch_debug >= 2)
3460 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3461 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3465 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3466 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3468 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3472 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3474 gdb_assert (gdbarch != NULL);
3475 return gdbarch->find_memory_regions != NULL;
3479 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3481 gdb_assert (gdbarch != NULL);
3482 gdb_assert (gdbarch->find_memory_regions != NULL);
3483 if (gdbarch_debug >= 2)
3484 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3485 return gdbarch->find_memory_regions (gdbarch, func, data);
3489 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3490 gdbarch_find_memory_regions_ftype find_memory_regions)
3492 gdbarch->find_memory_regions = find_memory_regions;
3496 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3498 gdb_assert (gdbarch != NULL);
3499 return gdbarch->core_xfer_shared_libraries != NULL;
3503 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3505 gdb_assert (gdbarch != NULL);
3506 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3507 if (gdbarch_debug >= 2)
3508 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3509 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3513 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3514 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3516 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3520 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3522 gdb_assert (gdbarch != NULL);
3523 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3527 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3529 gdb_assert (gdbarch != NULL);
3530 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3531 if (gdbarch_debug >= 2)
3532 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3533 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3537 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3538 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3540 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3544 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3546 gdb_assert (gdbarch != NULL);
3547 return gdbarch->core_pid_to_str != NULL;
3551 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3553 gdb_assert (gdbarch != NULL);
3554 gdb_assert (gdbarch->core_pid_to_str != NULL);
3555 if (gdbarch_debug >= 2)
3556 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3557 return gdbarch->core_pid_to_str (gdbarch, ptid);
3561 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3562 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3564 gdbarch->core_pid_to_str = core_pid_to_str;
3568 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3570 gdb_assert (gdbarch != NULL);
3571 return gdbarch->gcore_bfd_target != 0;
3575 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3577 gdb_assert (gdbarch != NULL);
3578 /* Check variable changed from pre-default. */
3579 gdb_assert (gdbarch->gcore_bfd_target != 0);
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3582 return gdbarch->gcore_bfd_target;
3586 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3587 const char * gcore_bfd_target)
3589 gdbarch->gcore_bfd_target = gcore_bfd_target;
3593 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3595 gdb_assert (gdbarch != NULL);
3596 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3597 if (gdbarch_debug >= 2)
3598 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3599 return gdbarch->vtable_function_descriptors;
3603 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3604 int vtable_function_descriptors)
3606 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3610 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3612 gdb_assert (gdbarch != NULL);
3613 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3614 if (gdbarch_debug >= 2)
3615 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3616 return gdbarch->vbit_in_delta;
3620 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3623 gdbarch->vbit_in_delta = vbit_in_delta;
3627 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3629 gdb_assert (gdbarch != NULL);
3630 return gdbarch->skip_permanent_breakpoint != NULL;
3634 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3636 gdb_assert (gdbarch != NULL);
3637 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3638 if (gdbarch_debug >= 2)
3639 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3640 gdbarch->skip_permanent_breakpoint (regcache);
3644 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3645 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3647 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3651 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3653 gdb_assert (gdbarch != NULL);
3654 return gdbarch->max_insn_length != 0;
3658 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3660 gdb_assert (gdbarch != NULL);
3661 /* Check variable changed from pre-default. */
3662 gdb_assert (gdbarch->max_insn_length != 0);
3663 if (gdbarch_debug >= 2)
3664 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3665 return gdbarch->max_insn_length;
3669 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3670 ULONGEST max_insn_length)
3672 gdbarch->max_insn_length = max_insn_length;
3676 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3678 gdb_assert (gdbarch != NULL);
3679 return gdbarch->displaced_step_copy_insn != NULL;
3682 struct displaced_step_closure *
3683 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3685 gdb_assert (gdbarch != NULL);
3686 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3687 if (gdbarch_debug >= 2)
3688 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3689 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3693 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3694 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3696 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3700 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3702 gdb_assert (gdbarch != NULL);
3703 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3704 if (gdbarch_debug >= 2)
3705 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3706 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3710 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3711 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3713 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3717 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3719 gdb_assert (gdbarch != NULL);
3720 return gdbarch->displaced_step_fixup != NULL;
3724 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3726 gdb_assert (gdbarch != NULL);
3727 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3728 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3729 if (gdbarch_debug >= 2)
3730 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3731 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3735 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3736 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3738 gdbarch->displaced_step_fixup = displaced_step_fixup;
3742 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3744 gdb_assert (gdbarch != NULL);
3745 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3746 if (gdbarch_debug >= 2)
3747 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3748 gdbarch->displaced_step_free_closure (gdbarch, closure);
3752 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3753 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3755 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3759 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3761 gdb_assert (gdbarch != NULL);
3762 gdb_assert (gdbarch->displaced_step_location != NULL);
3763 if (gdbarch_debug >= 2)
3764 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3765 return gdbarch->displaced_step_location (gdbarch);
3769 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3770 gdbarch_displaced_step_location_ftype displaced_step_location)
3772 gdbarch->displaced_step_location = displaced_step_location;
3776 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3778 gdb_assert (gdbarch != NULL);
3779 return gdbarch->relocate_instruction != NULL;
3783 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3785 gdb_assert (gdbarch != NULL);
3786 gdb_assert (gdbarch->relocate_instruction != NULL);
3787 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3788 if (gdbarch_debug >= 2)
3789 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3790 gdbarch->relocate_instruction (gdbarch, to, from);
3794 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3795 gdbarch_relocate_instruction_ftype relocate_instruction)
3797 gdbarch->relocate_instruction = relocate_instruction;
3801 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3803 gdb_assert (gdbarch != NULL);
3804 return gdbarch->overlay_update != NULL;
3808 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3810 gdb_assert (gdbarch != NULL);
3811 gdb_assert (gdbarch->overlay_update != NULL);
3812 if (gdbarch_debug >= 2)
3813 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3814 gdbarch->overlay_update (osect);
3818 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3819 gdbarch_overlay_update_ftype overlay_update)
3821 gdbarch->overlay_update = overlay_update;
3825 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3827 gdb_assert (gdbarch != NULL);
3828 return gdbarch->core_read_description != NULL;
3831 const struct target_desc *
3832 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3834 gdb_assert (gdbarch != NULL);
3835 gdb_assert (gdbarch->core_read_description != NULL);
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3838 return gdbarch->core_read_description (gdbarch, target, abfd);
3842 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3843 gdbarch_core_read_description_ftype core_read_description)
3845 gdbarch->core_read_description = core_read_description;
3849 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3851 gdb_assert (gdbarch != NULL);
3852 return gdbarch->static_transform_name != NULL;
3856 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3858 gdb_assert (gdbarch != NULL);
3859 gdb_assert (gdbarch->static_transform_name != NULL);
3860 if (gdbarch_debug >= 2)
3861 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3862 return gdbarch->static_transform_name (name);
3866 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3867 gdbarch_static_transform_name_ftype static_transform_name)
3869 gdbarch->static_transform_name = static_transform_name;
3873 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3875 gdb_assert (gdbarch != NULL);
3876 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3877 if (gdbarch_debug >= 2)
3878 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3879 return gdbarch->sofun_address_maybe_missing;
3883 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3884 int sofun_address_maybe_missing)
3886 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3890 gdbarch_process_record_p (struct gdbarch *gdbarch)
3892 gdb_assert (gdbarch != NULL);
3893 return gdbarch->process_record != NULL;
3897 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3899 gdb_assert (gdbarch != NULL);
3900 gdb_assert (gdbarch->process_record != NULL);
3901 if (gdbarch_debug >= 2)
3902 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3903 return gdbarch->process_record (gdbarch, regcache, addr);
3907 set_gdbarch_process_record (struct gdbarch *gdbarch,
3908 gdbarch_process_record_ftype process_record)
3910 gdbarch->process_record = process_record;
3914 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3916 gdb_assert (gdbarch != NULL);
3917 return gdbarch->process_record_signal != NULL;
3921 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3923 gdb_assert (gdbarch != NULL);
3924 gdb_assert (gdbarch->process_record_signal != NULL);
3925 if (gdbarch_debug >= 2)
3926 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3927 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3931 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3932 gdbarch_process_record_signal_ftype process_record_signal)
3934 gdbarch->process_record_signal = process_record_signal;
3938 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3940 gdb_assert (gdbarch != NULL);
3941 return gdbarch->gdb_signal_from_target != NULL;
3945 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3947 gdb_assert (gdbarch != NULL);
3948 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
3949 if (gdbarch_debug >= 2)
3950 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3951 return gdbarch->gdb_signal_from_target (gdbarch, signo);
3955 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3956 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
3958 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
3962 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
3964 gdb_assert (gdbarch != NULL);
3965 return gdbarch->gdb_signal_to_target != NULL;
3969 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
3971 gdb_assert (gdbarch != NULL);
3972 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
3973 if (gdbarch_debug >= 2)
3974 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
3975 return gdbarch->gdb_signal_to_target (gdbarch, signal);
3979 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
3980 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
3982 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
3986 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
3988 gdb_assert (gdbarch != NULL);
3989 return gdbarch->get_siginfo_type != NULL;
3993 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
3995 gdb_assert (gdbarch != NULL);
3996 gdb_assert (gdbarch->get_siginfo_type != NULL);
3997 if (gdbarch_debug >= 2)
3998 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
3999 return gdbarch->get_siginfo_type (gdbarch);
4003 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4004 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4006 gdbarch->get_siginfo_type = get_siginfo_type;
4010 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4012 gdb_assert (gdbarch != NULL);
4013 return gdbarch->record_special_symbol != NULL;
4017 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4019 gdb_assert (gdbarch != NULL);
4020 gdb_assert (gdbarch->record_special_symbol != NULL);
4021 if (gdbarch_debug >= 2)
4022 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4023 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4027 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4028 gdbarch_record_special_symbol_ftype record_special_symbol)
4030 gdbarch->record_special_symbol = record_special_symbol;
4034 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4036 gdb_assert (gdbarch != NULL);
4037 return gdbarch->get_syscall_number != NULL;
4041 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4043 gdb_assert (gdbarch != NULL);
4044 gdb_assert (gdbarch->get_syscall_number != NULL);
4045 if (gdbarch_debug >= 2)
4046 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4047 return gdbarch->get_syscall_number (gdbarch, ptid);
4051 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4052 gdbarch_get_syscall_number_ftype get_syscall_number)
4054 gdbarch->get_syscall_number = get_syscall_number;
4058 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4060 gdb_assert (gdbarch != NULL);
4061 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4064 return gdbarch->stap_integer_prefixes;
4068 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4069 const char *const * stap_integer_prefixes)
4071 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4075 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4077 gdb_assert (gdbarch != NULL);
4078 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4079 if (gdbarch_debug >= 2)
4080 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4081 return gdbarch->stap_integer_suffixes;
4085 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4086 const char *const * stap_integer_suffixes)
4088 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4092 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4094 gdb_assert (gdbarch != NULL);
4095 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4096 if (gdbarch_debug >= 2)
4097 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4098 return gdbarch->stap_register_prefixes;
4102 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4103 const char *const * stap_register_prefixes)
4105 gdbarch->stap_register_prefixes = stap_register_prefixes;
4109 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4111 gdb_assert (gdbarch != NULL);
4112 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4113 if (gdbarch_debug >= 2)
4114 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4115 return gdbarch->stap_register_suffixes;
4119 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4120 const char *const * stap_register_suffixes)
4122 gdbarch->stap_register_suffixes = stap_register_suffixes;
4126 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4128 gdb_assert (gdbarch != NULL);
4129 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4130 if (gdbarch_debug >= 2)
4131 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4132 return gdbarch->stap_register_indirection_prefixes;
4136 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4137 const char *const * stap_register_indirection_prefixes)
4139 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4143 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4145 gdb_assert (gdbarch != NULL);
4146 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4147 if (gdbarch_debug >= 2)
4148 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4149 return gdbarch->stap_register_indirection_suffixes;
4153 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4154 const char *const * stap_register_indirection_suffixes)
4156 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4160 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4162 gdb_assert (gdbarch != NULL);
4163 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4166 return gdbarch->stap_gdb_register_prefix;
4170 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4171 const char * stap_gdb_register_prefix)
4173 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4177 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4179 gdb_assert (gdbarch != NULL);
4180 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4181 if (gdbarch_debug >= 2)
4182 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4183 return gdbarch->stap_gdb_register_suffix;
4187 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4188 const char * stap_gdb_register_suffix)
4190 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4194 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4196 gdb_assert (gdbarch != NULL);
4197 return gdbarch->stap_is_single_operand != NULL;
4201 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4203 gdb_assert (gdbarch != NULL);
4204 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4205 if (gdbarch_debug >= 2)
4206 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4207 return gdbarch->stap_is_single_operand (gdbarch, s);
4211 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4212 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4214 gdbarch->stap_is_single_operand = stap_is_single_operand;
4218 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4220 gdb_assert (gdbarch != NULL);
4221 return gdbarch->stap_parse_special_token != NULL;
4225 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4227 gdb_assert (gdbarch != NULL);
4228 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4229 if (gdbarch_debug >= 2)
4230 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4231 return gdbarch->stap_parse_special_token (gdbarch, p);
4235 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4236 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4238 gdbarch->stap_parse_special_token = stap_parse_special_token;
4242 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4244 gdb_assert (gdbarch != NULL);
4245 /* Skip verify of has_global_solist, invalid_p == 0 */
4246 if (gdbarch_debug >= 2)
4247 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4248 return gdbarch->has_global_solist;
4252 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4253 int has_global_solist)
4255 gdbarch->has_global_solist = has_global_solist;
4259 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4261 gdb_assert (gdbarch != NULL);
4262 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4263 if (gdbarch_debug >= 2)
4264 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4265 return gdbarch->has_global_breakpoints;
4269 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4270 int has_global_breakpoints)
4272 gdbarch->has_global_breakpoints = has_global_breakpoints;
4276 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4278 gdb_assert (gdbarch != NULL);
4279 gdb_assert (gdbarch->has_shared_address_space != NULL);
4280 if (gdbarch_debug >= 2)
4281 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4282 return gdbarch->has_shared_address_space (gdbarch);
4286 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4287 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4289 gdbarch->has_shared_address_space = has_shared_address_space;
4293 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
4295 gdb_assert (gdbarch != NULL);
4296 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4297 if (gdbarch_debug >= 2)
4298 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4299 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
4303 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4304 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4306 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4310 gdbarch_auto_charset (struct gdbarch *gdbarch)
4312 gdb_assert (gdbarch != NULL);
4313 gdb_assert (gdbarch->auto_charset != NULL);
4314 if (gdbarch_debug >= 2)
4315 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4316 return gdbarch->auto_charset ();
4320 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4321 gdbarch_auto_charset_ftype auto_charset)
4323 gdbarch->auto_charset = auto_charset;
4327 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4329 gdb_assert (gdbarch != NULL);
4330 gdb_assert (gdbarch->auto_wide_charset != NULL);
4331 if (gdbarch_debug >= 2)
4332 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4333 return gdbarch->auto_wide_charset ();
4337 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4338 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4340 gdbarch->auto_wide_charset = auto_wide_charset;
4344 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4346 gdb_assert (gdbarch != NULL);
4347 if (gdbarch_debug >= 2)
4348 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4349 return gdbarch->solib_symbols_extension;
4353 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4354 const char * solib_symbols_extension)
4356 gdbarch->solib_symbols_extension = solib_symbols_extension;
4360 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4362 gdb_assert (gdbarch != NULL);
4363 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4364 if (gdbarch_debug >= 2)
4365 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4366 return gdbarch->has_dos_based_file_system;
4370 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4371 int has_dos_based_file_system)
4373 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4377 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4379 gdb_assert (gdbarch != NULL);
4380 gdb_assert (gdbarch->gen_return_address != NULL);
4381 if (gdbarch_debug >= 2)
4382 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4383 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4387 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4388 gdbarch_gen_return_address_ftype gen_return_address)
4390 gdbarch->gen_return_address = gen_return_address;
4394 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4396 gdb_assert (gdbarch != NULL);
4397 return gdbarch->info_proc != NULL;
4401 gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4403 gdb_assert (gdbarch != NULL);
4404 gdb_assert (gdbarch->info_proc != NULL);
4405 if (gdbarch_debug >= 2)
4406 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4407 gdbarch->info_proc (gdbarch, args, what);
4411 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4412 gdbarch_info_proc_ftype info_proc)
4414 gdbarch->info_proc = info_proc;
4418 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4420 gdb_assert (gdbarch != NULL);
4421 return gdbarch->core_info_proc != NULL;
4425 gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4427 gdb_assert (gdbarch != NULL);
4428 gdb_assert (gdbarch->core_info_proc != NULL);
4429 if (gdbarch_debug >= 2)
4430 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4431 gdbarch->core_info_proc (gdbarch, args, what);
4435 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4436 gdbarch_core_info_proc_ftype core_info_proc)
4438 gdbarch->core_info_proc = core_info_proc;
4442 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)
4444 gdb_assert (gdbarch != NULL);
4445 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4446 if (gdbarch_debug >= 2)
4447 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4448 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4452 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4453 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4455 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4458 struct ravenscar_arch_ops *
4459 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4461 gdb_assert (gdbarch != NULL);
4462 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4463 if (gdbarch_debug >= 2)
4464 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4465 return gdbarch->ravenscar_ops;
4469 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4470 struct ravenscar_arch_ops * ravenscar_ops)
4472 gdbarch->ravenscar_ops = ravenscar_ops;
4476 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4478 gdb_assert (gdbarch != NULL);
4479 gdb_assert (gdbarch->insn_is_call != NULL);
4480 if (gdbarch_debug >= 2)
4481 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4482 return gdbarch->insn_is_call (gdbarch, addr);
4486 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4487 gdbarch_insn_is_call_ftype insn_is_call)
4489 gdbarch->insn_is_call = insn_is_call;
4493 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4495 gdb_assert (gdbarch != NULL);
4496 gdb_assert (gdbarch->insn_is_ret != NULL);
4497 if (gdbarch_debug >= 2)
4498 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4499 return gdbarch->insn_is_ret (gdbarch, addr);
4503 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4504 gdbarch_insn_is_ret_ftype insn_is_ret)
4506 gdbarch->insn_is_ret = insn_is_ret;
4510 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4512 gdb_assert (gdbarch != NULL);
4513 gdb_assert (gdbarch->insn_is_jump != NULL);
4514 if (gdbarch_debug >= 2)
4515 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4516 return gdbarch->insn_is_jump (gdbarch, addr);
4520 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4521 gdbarch_insn_is_jump_ftype insn_is_jump)
4523 gdbarch->insn_is_jump = insn_is_jump;
4527 /* Keep a registry of per-architecture data-pointers required by GDB
4534 gdbarch_data_pre_init_ftype *pre_init;
4535 gdbarch_data_post_init_ftype *post_init;
4538 struct gdbarch_data_registration
4540 struct gdbarch_data *data;
4541 struct gdbarch_data_registration *next;
4544 struct gdbarch_data_registry
4547 struct gdbarch_data_registration *registrations;
4550 struct gdbarch_data_registry gdbarch_data_registry =
4555 static struct gdbarch_data *
4556 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4557 gdbarch_data_post_init_ftype *post_init)
4559 struct gdbarch_data_registration **curr;
4561 /* Append the new registration. */
4562 for (curr = &gdbarch_data_registry.registrations;
4564 curr = &(*curr)->next);
4565 (*curr) = XNEW (struct gdbarch_data_registration);
4566 (*curr)->next = NULL;
4567 (*curr)->data = XNEW (struct gdbarch_data);
4568 (*curr)->data->index = gdbarch_data_registry.nr++;
4569 (*curr)->data->pre_init = pre_init;
4570 (*curr)->data->post_init = post_init;
4571 (*curr)->data->init_p = 1;
4572 return (*curr)->data;
4575 struct gdbarch_data *
4576 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4578 return gdbarch_data_register (pre_init, NULL);
4581 struct gdbarch_data *
4582 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4584 return gdbarch_data_register (NULL, post_init);
4587 /* Create/delete the gdbarch data vector. */
4590 alloc_gdbarch_data (struct gdbarch *gdbarch)
4592 gdb_assert (gdbarch->data == NULL);
4593 gdbarch->nr_data = gdbarch_data_registry.nr;
4594 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4597 /* Initialize the current value of the specified per-architecture
4601 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4602 struct gdbarch_data *data,
4605 gdb_assert (data->index < gdbarch->nr_data);
4606 gdb_assert (gdbarch->data[data->index] == NULL);
4607 gdb_assert (data->pre_init == NULL);
4608 gdbarch->data[data->index] = pointer;
4611 /* Return the current value of the specified per-architecture
4615 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4617 gdb_assert (data->index < gdbarch->nr_data);
4618 if (gdbarch->data[data->index] == NULL)
4620 /* The data-pointer isn't initialized, call init() to get a
4622 if (data->pre_init != NULL)
4623 /* Mid architecture creation: pass just the obstack, and not
4624 the entire architecture, as that way it isn't possible for
4625 pre-init code to refer to undefined architecture
4627 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4628 else if (gdbarch->initialized_p
4629 && data->post_init != NULL)
4630 /* Post architecture creation: pass the entire architecture
4631 (as all fields are valid), but be careful to also detect
4632 recursive references. */
4634 gdb_assert (data->init_p);
4636 gdbarch->data[data->index] = data->post_init (gdbarch);
4640 /* The architecture initialization hasn't completed - punt -
4641 hope that the caller knows what they are doing. Once
4642 deprecated_set_gdbarch_data has been initialized, this can be
4643 changed to an internal error. */
4645 gdb_assert (gdbarch->data[data->index] != NULL);
4647 return gdbarch->data[data->index];
4651 /* Keep a registry of the architectures known by GDB. */
4653 struct gdbarch_registration
4655 enum bfd_architecture bfd_architecture;
4656 gdbarch_init_ftype *init;
4657 gdbarch_dump_tdep_ftype *dump_tdep;
4658 struct gdbarch_list *arches;
4659 struct gdbarch_registration *next;
4662 static struct gdbarch_registration *gdbarch_registry = NULL;
4665 append_name (const char ***buf, int *nr, const char *name)
4667 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4673 gdbarch_printable_names (void)
4675 /* Accumulate a list of names based on the registed list of
4678 const char **arches = NULL;
4679 struct gdbarch_registration *rego;
4681 for (rego = gdbarch_registry;
4685 const struct bfd_arch_info *ap;
4686 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4688 internal_error (__FILE__, __LINE__,
4689 _("gdbarch_architecture_names: multi-arch unknown"));
4692 append_name (&arches, &nr_arches, ap->printable_name);
4697 append_name (&arches, &nr_arches, NULL);
4703 gdbarch_register (enum bfd_architecture bfd_architecture,
4704 gdbarch_init_ftype *init,
4705 gdbarch_dump_tdep_ftype *dump_tdep)
4707 struct gdbarch_registration **curr;
4708 const struct bfd_arch_info *bfd_arch_info;
4710 /* Check that BFD recognizes this architecture */
4711 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4712 if (bfd_arch_info == NULL)
4714 internal_error (__FILE__, __LINE__,
4715 _("gdbarch: Attempt to register "
4716 "unknown architecture (%d)"),
4719 /* Check that we haven't seen this architecture before. */
4720 for (curr = &gdbarch_registry;
4722 curr = &(*curr)->next)
4724 if (bfd_architecture == (*curr)->bfd_architecture)
4725 internal_error (__FILE__, __LINE__,
4726 _("gdbarch: Duplicate registration "
4727 "of architecture (%s)"),
4728 bfd_arch_info->printable_name);
4732 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
4733 bfd_arch_info->printable_name,
4734 host_address_to_string (init));
4736 (*curr) = XNEW (struct gdbarch_registration);
4737 (*curr)->bfd_architecture = bfd_architecture;
4738 (*curr)->init = init;
4739 (*curr)->dump_tdep = dump_tdep;
4740 (*curr)->arches = NULL;
4741 (*curr)->next = NULL;
4745 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4746 gdbarch_init_ftype *init)
4748 gdbarch_register (bfd_architecture, init, NULL);
4752 /* Look for an architecture using gdbarch_info. */
4754 struct gdbarch_list *
4755 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4756 const struct gdbarch_info *info)
4758 for (; arches != NULL; arches = arches->next)
4760 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4762 if (info->byte_order != arches->gdbarch->byte_order)
4764 if (info->osabi != arches->gdbarch->osabi)
4766 if (info->target_desc != arches->gdbarch->target_desc)
4774 /* Find an architecture that matches the specified INFO. Create a new
4775 architecture if needed. Return that new architecture. */
4778 gdbarch_find_by_info (struct gdbarch_info info)
4780 struct gdbarch *new_gdbarch;
4781 struct gdbarch_registration *rego;
4783 /* Fill in missing parts of the INFO struct using a number of
4784 sources: "set ..."; INFOabfd supplied; and the global
4786 gdbarch_info_fill (&info);
4788 /* Must have found some sort of architecture. */
4789 gdb_assert (info.bfd_arch_info != NULL);
4793 fprintf_unfiltered (gdb_stdlog,
4794 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4795 (info.bfd_arch_info != NULL
4796 ? info.bfd_arch_info->printable_name
4798 fprintf_unfiltered (gdb_stdlog,
4799 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4801 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4802 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4804 fprintf_unfiltered (gdb_stdlog,
4805 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4806 info.osabi, gdbarch_osabi_name (info.osabi));
4807 fprintf_unfiltered (gdb_stdlog,
4808 "gdbarch_find_by_info: info.abfd %s\n",
4809 host_address_to_string (info.abfd));
4810 fprintf_unfiltered (gdb_stdlog,
4811 "gdbarch_find_by_info: info.tdep_info %s\n",
4812 host_address_to_string (info.tdep_info));
4815 /* Find the tdep code that knows about this architecture. */
4816 for (rego = gdbarch_registry;
4819 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4824 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4825 "No matching architecture\n");
4829 /* Ask the tdep code for an architecture that matches "info". */
4830 new_gdbarch = rego->init (info, rego->arches);
4832 /* Did the tdep code like it? No. Reject the change and revert to
4833 the old architecture. */
4834 if (new_gdbarch == NULL)
4837 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4838 "Target rejected architecture\n");
4842 /* Is this a pre-existing architecture (as determined by already
4843 being initialized)? Move it to the front of the architecture
4844 list (keeping the list sorted Most Recently Used). */
4845 if (new_gdbarch->initialized_p)
4847 struct gdbarch_list **list;
4848 struct gdbarch_list *this;
4850 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4851 "Previous architecture %s (%s) selected\n",
4852 host_address_to_string (new_gdbarch),
4853 new_gdbarch->bfd_arch_info->printable_name);
4854 /* Find the existing arch in the list. */
4855 for (list = ®o->arches;
4856 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4857 list = &(*list)->next);
4858 /* It had better be in the list of architectures. */
4859 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4862 (*list) = this->next;
4863 /* Insert THIS at the front. */
4864 this->next = rego->arches;
4865 rego->arches = this;
4870 /* It's a new architecture. */
4872 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4873 "New architecture %s (%s) selected\n",
4874 host_address_to_string (new_gdbarch),
4875 new_gdbarch->bfd_arch_info->printable_name);
4877 /* Insert the new architecture into the front of the architecture
4878 list (keep the list sorted Most Recently Used). */
4880 struct gdbarch_list *this = XNEW (struct gdbarch_list);
4881 this->next = rego->arches;
4882 this->gdbarch = new_gdbarch;
4883 rego->arches = this;
4886 /* Check that the newly installed architecture is valid. Plug in
4887 any post init values. */
4888 new_gdbarch->dump_tdep = rego->dump_tdep;
4889 verify_gdbarch (new_gdbarch);
4890 new_gdbarch->initialized_p = 1;
4893 gdbarch_dump (new_gdbarch, gdb_stdlog);
4898 /* Make the specified architecture current. */
4901 set_target_gdbarch (struct gdbarch *new_gdbarch)
4903 gdb_assert (new_gdbarch != NULL);
4904 gdb_assert (new_gdbarch->initialized_p);
4905 current_inferior ()->gdbarch = new_gdbarch;
4906 observer_notify_architecture_changed (new_gdbarch);
4907 registers_changed ();
4910 /* Return the current inferior's arch. */
4913 target_gdbarch (void)
4915 return current_inferior ()->gdbarch;
4918 extern void _initialize_gdbarch (void);
4921 _initialize_gdbarch (void)
4923 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4924 Set architecture debugging."), _("\
4925 Show architecture debugging."), _("\
4926 When non-zero, architecture debugging is enabled."),
4929 &setdebuglist, &showdebuglist);