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 get_gdbarch(): Implement the set/get functions (probably using
163 the macro's as shortcuts).
172 int long_long_align_bit;
174 const struct floatformat ** half_format;
176 const struct floatformat ** float_format;
178 const struct floatformat ** double_format;
180 const struct floatformat ** long_double_format;
183 int dwarf2_addr_size;
185 gdbarch_read_pc_ftype *read_pc;
186 gdbarch_write_pc_ftype *write_pc;
187 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
188 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
189 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
190 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
193 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
194 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
199 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
200 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
201 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
202 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
203 gdbarch_register_name_ftype *register_name;
204 gdbarch_register_type_ftype *register_type;
205 gdbarch_dummy_id_ftype *dummy_id;
206 int deprecated_fp_regnum;
207 gdbarch_push_dummy_call_ftype *push_dummy_call;
208 int call_dummy_location;
209 gdbarch_push_dummy_code_ftype *push_dummy_code;
210 gdbarch_print_registers_info_ftype *print_registers_info;
211 gdbarch_print_float_info_ftype *print_float_info;
212 gdbarch_print_vector_info_ftype *print_vector_info;
213 gdbarch_register_sim_regno_ftype *register_sim_regno;
214 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
215 gdbarch_cannot_store_register_ftype *cannot_store_register;
216 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
217 int believe_pcc_promotion;
218 gdbarch_convert_register_p_ftype *convert_register_p;
219 gdbarch_register_to_value_ftype *register_to_value;
220 gdbarch_value_to_register_ftype *value_to_register;
221 gdbarch_value_from_register_ftype *value_from_register;
222 gdbarch_pointer_to_address_ftype *pointer_to_address;
223 gdbarch_address_to_pointer_ftype *address_to_pointer;
224 gdbarch_integer_to_address_ftype *integer_to_address;
225 gdbarch_return_value_ftype *return_value;
226 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
227 gdbarch_skip_prologue_ftype *skip_prologue;
228 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
229 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
230 gdbarch_inner_than_ftype *inner_than;
231 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
232 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
233 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
234 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
235 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
236 CORE_ADDR decr_pc_after_break;
237 CORE_ADDR deprecated_function_start_offset;
238 gdbarch_remote_register_number_ftype *remote_register_number;
239 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
240 CORE_ADDR frame_args_skip;
241 gdbarch_unwind_pc_ftype *unwind_pc;
242 gdbarch_unwind_sp_ftype *unwind_sp;
243 gdbarch_frame_num_args_ftype *frame_num_args;
244 gdbarch_frame_align_ftype *frame_align;
245 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
246 int frame_red_zone_size;
247 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
248 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
249 gdbarch_software_single_step_ftype *software_single_step;
250 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
251 gdbarch_print_insn_ftype *print_insn;
252 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
253 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
254 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
255 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
256 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
257 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
258 int cannot_step_breakpoint;
259 int have_nonsteppable_watchpoint;
260 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
261 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
262 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
263 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
264 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
265 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
266 struct core_regset_section * core_regset_sections;
267 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
268 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
269 gdbarch_find_memory_regions_ftype *find_memory_regions;
270 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
271 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
272 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
273 const char * gcore_bfd_target;
274 int vtable_function_descriptors;
276 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
277 ULONGEST max_insn_length;
278 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
279 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
280 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
281 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
282 gdbarch_displaced_step_location_ftype *displaced_step_location;
283 gdbarch_relocate_instruction_ftype *relocate_instruction;
284 gdbarch_overlay_update_ftype *overlay_update;
285 gdbarch_core_read_description_ftype *core_read_description;
286 gdbarch_static_transform_name_ftype *static_transform_name;
287 int sofun_address_maybe_missing;
288 gdbarch_process_record_ftype *process_record;
289 gdbarch_process_record_signal_ftype *process_record_signal;
290 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
291 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
292 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
293 gdbarch_record_special_symbol_ftype *record_special_symbol;
294 gdbarch_get_syscall_number_ftype *get_syscall_number;
295 const char *const * stap_integer_prefixes;
296 const char *const * stap_integer_suffixes;
297 const char *const * stap_register_prefixes;
298 const char *const * stap_register_suffixes;
299 const char *const * stap_register_indirection_prefixes;
300 const char *const * stap_register_indirection_suffixes;
301 const char * stap_gdb_register_prefix;
302 const char * stap_gdb_register_suffix;
303 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
304 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
305 int has_global_solist;
306 int has_global_breakpoints;
307 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
308 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
309 gdbarch_auto_charset_ftype *auto_charset;
310 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
311 const char * solib_symbols_extension;
312 int has_dos_based_file_system;
313 gdbarch_gen_return_address_ftype *gen_return_address;
314 gdbarch_info_proc_ftype *info_proc;
315 gdbarch_core_info_proc_ftype *core_info_proc;
316 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
317 struct ravenscar_arch_ops * ravenscar_ops;
318 gdbarch_insn_is_call_ftype *insn_is_call;
319 gdbarch_insn_is_ret_ftype *insn_is_ret;
320 gdbarch_insn_is_jump_ftype *insn_is_jump;
321 gdbarch_auxv_parse_ftype *auxv_parse;
324 /* Create a new ``struct gdbarch'' based on information provided by
325 ``struct gdbarch_info''. */
328 gdbarch_alloc (const struct gdbarch_info *info,
329 struct gdbarch_tdep *tdep)
331 struct gdbarch *gdbarch;
333 /* Create an obstack for allocating all the per-architecture memory,
334 then use that to allocate the architecture vector. */
335 struct obstack *obstack = XNEW (struct obstack);
336 obstack_init (obstack);
337 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
338 memset (gdbarch, 0, sizeof (*gdbarch));
339 gdbarch->obstack = obstack;
341 alloc_gdbarch_data (gdbarch);
343 gdbarch->tdep = tdep;
345 gdbarch->bfd_arch_info = info->bfd_arch_info;
346 gdbarch->byte_order = info->byte_order;
347 gdbarch->byte_order_for_code = info->byte_order_for_code;
348 gdbarch->osabi = info->osabi;
349 gdbarch->target_desc = info->target_desc;
351 /* Force the explicit initialization of these. */
352 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
353 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
354 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
355 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
356 gdbarch->long_long_bit = 2*gdbarch->long_bit;
357 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
358 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
359 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
360 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
361 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
362 gdbarch->ptr_bit = gdbarch->int_bit;
363 gdbarch->char_signed = -1;
364 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
365 gdbarch->num_regs = -1;
366 gdbarch->sp_regnum = -1;
367 gdbarch->pc_regnum = -1;
368 gdbarch->ps_regnum = -1;
369 gdbarch->fp0_regnum = -1;
370 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
371 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
372 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
373 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
374 gdbarch->deprecated_fp_regnum = -1;
375 gdbarch->call_dummy_location = AT_ENTRY_POINT;
376 gdbarch->print_registers_info = default_print_registers_info;
377 gdbarch->register_sim_regno = legacy_register_sim_regno;
378 gdbarch->cannot_fetch_register = cannot_register_not;
379 gdbarch->cannot_store_register = cannot_register_not;
380 gdbarch->convert_register_p = generic_convert_register_p;
381 gdbarch->value_from_register = default_value_from_register;
382 gdbarch->pointer_to_address = unsigned_pointer_to_address;
383 gdbarch->address_to_pointer = unsigned_address_to_pointer;
384 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
385 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
386 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
387 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
388 gdbarch->remote_register_number = default_remote_register_number;
389 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
390 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
391 gdbarch->addr_bits_remove = core_addr_identity;
392 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
393 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
394 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
395 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
396 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
397 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
398 gdbarch->register_reggroup_p = default_register_reggroup_p;
399 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
400 gdbarch->displaced_step_fixup = NULL;
401 gdbarch->displaced_step_free_closure = NULL;
402 gdbarch->displaced_step_location = NULL;
403 gdbarch->relocate_instruction = NULL;
404 gdbarch->has_shared_address_space = default_has_shared_address_space;
405 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
406 gdbarch->auto_charset = default_auto_charset;
407 gdbarch->auto_wide_charset = default_auto_wide_charset;
408 gdbarch->gen_return_address = default_gen_return_address;
409 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
410 gdbarch->ravenscar_ops = NULL;
411 gdbarch->insn_is_call = default_insn_is_call;
412 gdbarch->insn_is_ret = default_insn_is_ret;
413 gdbarch->insn_is_jump = default_insn_is_jump;
414 /* gdbarch_alloc() */
420 /* Allocate extra space using the per-architecture obstack. */
423 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
425 void *data = obstack_alloc (arch->obstack, size);
427 memset (data, 0, size);
432 /* Free a gdbarch struct. This should never happen in normal
433 operation --- once you've created a gdbarch, you keep it around.
434 However, if an architecture's init function encounters an error
435 building the structure, it may need to clean up a partially
436 constructed gdbarch. */
439 gdbarch_free (struct gdbarch *arch)
441 struct obstack *obstack;
443 gdb_assert (arch != NULL);
444 gdb_assert (!arch->initialized_p);
445 obstack = arch->obstack;
446 obstack_free (obstack, 0); /* Includes the ARCH. */
451 /* Ensure that all values in a GDBARCH are reasonable. */
454 verify_gdbarch (struct gdbarch *gdbarch)
457 struct cleanup *cleanups;
461 log = mem_fileopen ();
462 cleanups = make_cleanup_ui_file_delete (log);
464 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
465 fprintf_unfiltered (log, "\n\tbyte-order");
466 if (gdbarch->bfd_arch_info == NULL)
467 fprintf_unfiltered (log, "\n\tbfd_arch_info");
468 /* Check those that need to be defined for the given multi-arch level. */
469 /* Skip verify of bits_big_endian, invalid_p == 0 */
470 /* Skip verify of short_bit, invalid_p == 0 */
471 /* Skip verify of int_bit, invalid_p == 0 */
472 /* Skip verify of long_bit, invalid_p == 0 */
473 /* Skip verify of long_long_bit, invalid_p == 0 */
474 /* Skip verify of long_long_align_bit, invalid_p == 0 */
475 /* Skip verify of half_bit, invalid_p == 0 */
476 if (gdbarch->half_format == 0)
477 gdbarch->half_format = floatformats_ieee_half;
478 /* Skip verify of float_bit, invalid_p == 0 */
479 if (gdbarch->float_format == 0)
480 gdbarch->float_format = floatformats_ieee_single;
481 /* Skip verify of double_bit, invalid_p == 0 */
482 if (gdbarch->double_format == 0)
483 gdbarch->double_format = floatformats_ieee_double;
484 /* Skip verify of long_double_bit, invalid_p == 0 */
485 if (gdbarch->long_double_format == 0)
486 gdbarch->long_double_format = floatformats_ieee_double;
487 /* Skip verify of ptr_bit, invalid_p == 0 */
488 if (gdbarch->addr_bit == 0)
489 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
490 if (gdbarch->dwarf2_addr_size == 0)
491 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
492 if (gdbarch->char_signed == -1)
493 gdbarch->char_signed = 1;
494 /* Skip verify of read_pc, has predicate. */
495 /* Skip verify of write_pc, has predicate. */
496 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
497 /* Skip verify of pseudo_register_read, has predicate. */
498 /* Skip verify of pseudo_register_read_value, has predicate. */
499 /* Skip verify of pseudo_register_write, has predicate. */
500 if (gdbarch->num_regs == -1)
501 fprintf_unfiltered (log, "\n\tnum_regs");
502 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
503 /* Skip verify of ax_pseudo_register_collect, has predicate. */
504 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
505 /* Skip verify of sp_regnum, invalid_p == 0 */
506 /* Skip verify of pc_regnum, invalid_p == 0 */
507 /* Skip verify of ps_regnum, invalid_p == 0 */
508 /* Skip verify of fp0_regnum, invalid_p == 0 */
509 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
510 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
511 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
512 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
513 if (gdbarch->register_name == 0)
514 fprintf_unfiltered (log, "\n\tregister_name");
515 /* Skip verify of register_type, has predicate. */
516 /* Skip verify of dummy_id, has predicate. */
517 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
518 /* Skip verify of push_dummy_call, has predicate. */
519 /* Skip verify of call_dummy_location, invalid_p == 0 */
520 /* Skip verify of push_dummy_code, has predicate. */
521 /* Skip verify of print_registers_info, invalid_p == 0 */
522 /* Skip verify of print_float_info, has predicate. */
523 /* Skip verify of print_vector_info, has predicate. */
524 /* Skip verify of register_sim_regno, invalid_p == 0 */
525 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
526 /* Skip verify of cannot_store_register, invalid_p == 0 */
527 /* Skip verify of get_longjmp_target, has predicate. */
528 /* Skip verify of convert_register_p, invalid_p == 0 */
529 /* Skip verify of value_from_register, invalid_p == 0 */
530 /* Skip verify of pointer_to_address, invalid_p == 0 */
531 /* Skip verify of address_to_pointer, invalid_p == 0 */
532 /* Skip verify of integer_to_address, has predicate. */
533 /* Skip verify of return_value, has predicate. */
534 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
535 if (gdbarch->skip_prologue == 0)
536 fprintf_unfiltered (log, "\n\tskip_prologue");
537 /* Skip verify of skip_main_prologue, has predicate. */
538 /* Skip verify of skip_entrypoint, has predicate. */
539 if (gdbarch->inner_than == 0)
540 fprintf_unfiltered (log, "\n\tinner_than");
541 if (gdbarch->breakpoint_from_pc == 0)
542 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
543 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
544 /* Skip verify of adjust_breakpoint_address, has predicate. */
545 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
546 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
547 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
548 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
549 /* Skip verify of remote_register_number, invalid_p == 0 */
550 /* Skip verify of fetch_tls_load_module_address, has predicate. */
551 /* Skip verify of frame_args_skip, invalid_p == 0 */
552 /* Skip verify of unwind_pc, has predicate. */
553 /* Skip verify of unwind_sp, has predicate. */
554 /* Skip verify of frame_num_args, has predicate. */
555 /* Skip verify of frame_align, has predicate. */
556 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
557 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
558 /* Skip verify of addr_bits_remove, invalid_p == 0 */
559 /* Skip verify of software_single_step, has predicate. */
560 /* Skip verify of single_step_through_delay, has predicate. */
561 if (gdbarch->print_insn == 0)
562 fprintf_unfiltered (log, "\n\tprint_insn");
563 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
564 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
565 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
566 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
567 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
568 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
569 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
570 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
571 /* Skip verify of address_class_type_flags, has predicate. */
572 /* Skip verify of address_class_type_flags_to_name, has predicate. */
573 /* Skip verify of address_class_name_to_type_flags, has predicate. */
574 /* Skip verify of register_reggroup_p, invalid_p == 0 */
575 /* Skip verify of fetch_pointer_argument, has predicate. */
576 /* Skip verify of regset_from_core_section, has predicate. */
577 /* Skip verify of make_corefile_notes, has predicate. */
578 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
579 /* Skip verify of find_memory_regions, has predicate. */
580 /* Skip verify of core_xfer_shared_libraries, has predicate. */
581 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
582 /* Skip verify of core_pid_to_str, has predicate. */
583 /* Skip verify of gcore_bfd_target, has predicate. */
584 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
585 /* Skip verify of vbit_in_delta, invalid_p == 0 */
586 /* Skip verify of skip_permanent_breakpoint, has predicate. */
587 /* Skip verify of max_insn_length, has predicate. */
588 /* Skip verify of displaced_step_copy_insn, has predicate. */
589 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
590 /* Skip verify of displaced_step_fixup, has predicate. */
591 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
592 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
593 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
594 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
595 /* Skip verify of relocate_instruction, has predicate. */
596 /* Skip verify of overlay_update, has predicate. */
597 /* Skip verify of core_read_description, has predicate. */
598 /* Skip verify of static_transform_name, has predicate. */
599 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
600 /* Skip verify of process_record, has predicate. */
601 /* Skip verify of process_record_signal, has predicate. */
602 /* Skip verify of gdb_signal_from_target, has predicate. */
603 /* Skip verify of gdb_signal_to_target, has predicate. */
604 /* Skip verify of get_siginfo_type, has predicate. */
605 /* Skip verify of record_special_symbol, has predicate. */
606 /* Skip verify of get_syscall_number, has predicate. */
607 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
608 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
609 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
610 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
611 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
612 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
613 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
614 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
615 /* Skip verify of stap_is_single_operand, has predicate. */
616 /* Skip verify of stap_parse_special_token, has predicate. */
617 /* Skip verify of has_global_solist, invalid_p == 0 */
618 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
619 /* Skip verify of has_shared_address_space, invalid_p == 0 */
620 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
621 /* Skip verify of auto_charset, invalid_p == 0 */
622 /* Skip verify of auto_wide_charset, invalid_p == 0 */
623 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
624 /* Skip verify of gen_return_address, invalid_p == 0 */
625 /* Skip verify of info_proc, has predicate. */
626 /* Skip verify of core_info_proc, has predicate. */
627 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
628 /* Skip verify of ravenscar_ops, invalid_p == 0 */
629 /* Skip verify of insn_is_call, invalid_p == 0 */
630 /* Skip verify of insn_is_ret, invalid_p == 0 */
631 /* Skip verify of insn_is_jump, invalid_p == 0 */
632 /* Skip verify of auxv_parse, has predicate. */
633 buf = ui_file_xstrdup (log, &length);
634 make_cleanup (xfree, buf);
636 internal_error (__FILE__, __LINE__,
637 _("verify_gdbarch: the following are invalid ...%s"),
639 do_cleanups (cleanups);
643 /* Print out the details of the current architecture. */
646 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
648 const char *gdb_nm_file = "<not-defined>";
650 #if defined (GDB_NM_FILE)
651 gdb_nm_file = GDB_NM_FILE;
653 fprintf_unfiltered (file,
654 "gdbarch_dump: GDB_NM_FILE = %s\n",
656 fprintf_unfiltered (file,
657 "gdbarch_dump: addr_bit = %s\n",
658 plongest (gdbarch->addr_bit));
659 fprintf_unfiltered (file,
660 "gdbarch_dump: addr_bits_remove = <%s>\n",
661 host_address_to_string (gdbarch->addr_bits_remove));
662 fprintf_unfiltered (file,
663 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
664 gdbarch_address_class_name_to_type_flags_p (gdbarch));
665 fprintf_unfiltered (file,
666 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
667 host_address_to_string (gdbarch->address_class_name_to_type_flags));
668 fprintf_unfiltered (file,
669 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
670 gdbarch_address_class_type_flags_p (gdbarch));
671 fprintf_unfiltered (file,
672 "gdbarch_dump: address_class_type_flags = <%s>\n",
673 host_address_to_string (gdbarch->address_class_type_flags));
674 fprintf_unfiltered (file,
675 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
676 gdbarch_address_class_type_flags_to_name_p (gdbarch));
677 fprintf_unfiltered (file,
678 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
679 host_address_to_string (gdbarch->address_class_type_flags_to_name));
680 fprintf_unfiltered (file,
681 "gdbarch_dump: address_to_pointer = <%s>\n",
682 host_address_to_string (gdbarch->address_to_pointer));
683 fprintf_unfiltered (file,
684 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
685 gdbarch_adjust_breakpoint_address_p (gdbarch));
686 fprintf_unfiltered (file,
687 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
688 host_address_to_string (gdbarch->adjust_breakpoint_address));
689 fprintf_unfiltered (file,
690 "gdbarch_dump: auto_charset = <%s>\n",
691 host_address_to_string (gdbarch->auto_charset));
692 fprintf_unfiltered (file,
693 "gdbarch_dump: auto_wide_charset = <%s>\n",
694 host_address_to_string (gdbarch->auto_wide_charset));
695 fprintf_unfiltered (file,
696 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
697 gdbarch_auxv_parse_p (gdbarch));
698 fprintf_unfiltered (file,
699 "gdbarch_dump: auxv_parse = <%s>\n",
700 host_address_to_string (gdbarch->auxv_parse));
701 fprintf_unfiltered (file,
702 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
703 gdbarch_ax_pseudo_register_collect_p (gdbarch));
704 fprintf_unfiltered (file,
705 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
706 host_address_to_string (gdbarch->ax_pseudo_register_collect));
707 fprintf_unfiltered (file,
708 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
709 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
710 fprintf_unfiltered (file,
711 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
712 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
713 fprintf_unfiltered (file,
714 "gdbarch_dump: believe_pcc_promotion = %s\n",
715 plongest (gdbarch->believe_pcc_promotion));
716 fprintf_unfiltered (file,
717 "gdbarch_dump: bfd_arch_info = %s\n",
718 gdbarch_bfd_arch_info (gdbarch)->printable_name);
719 fprintf_unfiltered (file,
720 "gdbarch_dump: bits_big_endian = %s\n",
721 plongest (gdbarch->bits_big_endian));
722 fprintf_unfiltered (file,
723 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
724 host_address_to_string (gdbarch->breakpoint_from_pc));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: byte_order = %s\n",
727 plongest (gdbarch->byte_order));
728 fprintf_unfiltered (file,
729 "gdbarch_dump: byte_order_for_code = %s\n",
730 plongest (gdbarch->byte_order_for_code));
731 fprintf_unfiltered (file,
732 "gdbarch_dump: call_dummy_location = %s\n",
733 plongest (gdbarch->call_dummy_location));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: cannot_fetch_register = <%s>\n",
736 host_address_to_string (gdbarch->cannot_fetch_register));
737 fprintf_unfiltered (file,
738 "gdbarch_dump: cannot_step_breakpoint = %s\n",
739 plongest (gdbarch->cannot_step_breakpoint));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: cannot_store_register = <%s>\n",
742 host_address_to_string (gdbarch->cannot_store_register));
743 fprintf_unfiltered (file,
744 "gdbarch_dump: char_signed = %s\n",
745 plongest (gdbarch->char_signed));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
748 host_address_to_string (gdbarch->coff_make_msymbol_special));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
751 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
752 fprintf_unfiltered (file,
753 "gdbarch_dump: convert_register_p = <%s>\n",
754 host_address_to_string (gdbarch->convert_register_p));
755 fprintf_unfiltered (file,
756 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
757 gdbarch_core_info_proc_p (gdbarch));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: core_info_proc = <%s>\n",
760 host_address_to_string (gdbarch->core_info_proc));
761 fprintf_unfiltered (file,
762 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
763 gdbarch_core_pid_to_str_p (gdbarch));
764 fprintf_unfiltered (file,
765 "gdbarch_dump: core_pid_to_str = <%s>\n",
766 host_address_to_string (gdbarch->core_pid_to_str));
767 fprintf_unfiltered (file,
768 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
769 gdbarch_core_read_description_p (gdbarch));
770 fprintf_unfiltered (file,
771 "gdbarch_dump: core_read_description = <%s>\n",
772 host_address_to_string (gdbarch->core_read_description));
773 fprintf_unfiltered (file,
774 "gdbarch_dump: core_regset_sections = %s\n",
775 host_address_to_string (gdbarch->core_regset_sections));
776 fprintf_unfiltered (file,
777 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
778 gdbarch_core_xfer_shared_libraries_p (gdbarch));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
781 host_address_to_string (gdbarch->core_xfer_shared_libraries));
782 fprintf_unfiltered (file,
783 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
784 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
785 fprintf_unfiltered (file,
786 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
787 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
788 fprintf_unfiltered (file,
789 "gdbarch_dump: decr_pc_after_break = %s\n",
790 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: deprecated_fp_regnum = %s\n",
793 plongest (gdbarch->deprecated_fp_regnum));
794 fprintf_unfiltered (file,
795 "gdbarch_dump: deprecated_function_start_offset = %s\n",
796 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
799 gdbarch_displaced_step_copy_insn_p (gdbarch));
800 fprintf_unfiltered (file,
801 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
802 host_address_to_string (gdbarch->displaced_step_copy_insn));
803 fprintf_unfiltered (file,
804 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
805 gdbarch_displaced_step_fixup_p (gdbarch));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: displaced_step_fixup = <%s>\n",
808 host_address_to_string (gdbarch->displaced_step_fixup));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
811 host_address_to_string (gdbarch->displaced_step_free_closure));
812 fprintf_unfiltered (file,
813 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
814 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: displaced_step_location = <%s>\n",
817 host_address_to_string (gdbarch->displaced_step_location));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: double_bit = %s\n",
820 plongest (gdbarch->double_bit));
821 fprintf_unfiltered (file,
822 "gdbarch_dump: double_format = %s\n",
823 pformat (gdbarch->double_format));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
826 gdbarch_dummy_id_p (gdbarch));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: dummy_id = <%s>\n",
829 host_address_to_string (gdbarch->dummy_id));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: dwarf2_addr_size = %s\n",
832 plongest (gdbarch->dwarf2_addr_size));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
835 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
838 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
841 host_address_to_string (gdbarch->elf_make_msymbol_special));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
844 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
847 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
850 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
853 gdbarch_fetch_pointer_argument_p (gdbarch));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
856 host_address_to_string (gdbarch->fetch_pointer_argument));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
859 gdbarch_fetch_tls_load_module_address_p (gdbarch));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
862 host_address_to_string (gdbarch->fetch_tls_load_module_address));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
865 gdbarch_find_memory_regions_p (gdbarch));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: find_memory_regions = <%s>\n",
868 host_address_to_string (gdbarch->find_memory_regions));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: float_bit = %s\n",
871 plongest (gdbarch->float_bit));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: float_format = %s\n",
874 pformat (gdbarch->float_format));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: fp0_regnum = %s\n",
877 plongest (gdbarch->fp0_regnum));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
880 gdbarch_frame_align_p (gdbarch));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: frame_align = <%s>\n",
883 host_address_to_string (gdbarch->frame_align));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: frame_args_skip = %s\n",
886 core_addr_to_string_nz (gdbarch->frame_args_skip));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
889 gdbarch_frame_num_args_p (gdbarch));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: frame_num_args = <%s>\n",
892 host_address_to_string (gdbarch->frame_num_args));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: frame_red_zone_size = %s\n",
895 plongest (gdbarch->frame_red_zone_size));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
898 gdbarch_gcore_bfd_target_p (gdbarch));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: gcore_bfd_target = %s\n",
901 pstring (gdbarch->gcore_bfd_target));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
904 gdbarch_gdb_signal_from_target_p (gdbarch));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
907 host_address_to_string (gdbarch->gdb_signal_from_target));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
910 gdbarch_gdb_signal_to_target_p (gdbarch));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
913 host_address_to_string (gdbarch->gdb_signal_to_target));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: gen_return_address = <%s>\n",
916 host_address_to_string (gdbarch->gen_return_address));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
919 gdbarch_get_longjmp_target_p (gdbarch));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: get_longjmp_target = <%s>\n",
922 host_address_to_string (gdbarch->get_longjmp_target));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
925 gdbarch_get_siginfo_type_p (gdbarch));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: get_siginfo_type = <%s>\n",
928 host_address_to_string (gdbarch->get_siginfo_type));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
931 gdbarch_get_syscall_number_p (gdbarch));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: get_syscall_number = <%s>\n",
934 host_address_to_string (gdbarch->get_syscall_number));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: half_bit = %s\n",
937 plongest (gdbarch->half_bit));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: half_format = %s\n",
940 pformat (gdbarch->half_format));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: has_dos_based_file_system = %s\n",
943 plongest (gdbarch->has_dos_based_file_system));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: has_global_breakpoints = %s\n",
946 plongest (gdbarch->has_global_breakpoints));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: has_global_solist = %s\n",
949 plongest (gdbarch->has_global_solist));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: has_shared_address_space = <%s>\n",
952 host_address_to_string (gdbarch->has_shared_address_space));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
955 plongest (gdbarch->have_nonsteppable_watchpoint));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
958 host_address_to_string (gdbarch->in_function_epilogue_p));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
961 host_address_to_string (gdbarch->in_solib_return_trampoline));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
964 gdbarch_info_proc_p (gdbarch));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: info_proc = <%s>\n",
967 host_address_to_string (gdbarch->info_proc));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: inner_than = <%s>\n",
970 host_address_to_string (gdbarch->inner_than));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: insn_is_call = <%s>\n",
973 host_address_to_string (gdbarch->insn_is_call));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: insn_is_jump = <%s>\n",
976 host_address_to_string (gdbarch->insn_is_jump));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: insn_is_ret = <%s>\n",
979 host_address_to_string (gdbarch->insn_is_ret));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: int_bit = %s\n",
982 plongest (gdbarch->int_bit));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
985 gdbarch_integer_to_address_p (gdbarch));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: integer_to_address = <%s>\n",
988 host_address_to_string (gdbarch->integer_to_address));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
991 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: long_bit = %s\n",
994 plongest (gdbarch->long_bit));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: long_double_bit = %s\n",
997 plongest (gdbarch->long_double_bit));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: long_double_format = %s\n",
1000 pformat (gdbarch->long_double_format));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: long_long_align_bit = %s\n",
1003 plongest (gdbarch->long_long_align_bit));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: long_long_bit = %s\n",
1006 plongest (gdbarch->long_long_bit));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1009 gdbarch_make_corefile_notes_p (gdbarch));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: make_corefile_notes = <%s>\n",
1012 host_address_to_string (gdbarch->make_corefile_notes));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1015 gdbarch_max_insn_length_p (gdbarch));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: max_insn_length = %s\n",
1018 plongest (gdbarch->max_insn_length));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1021 host_address_to_string (gdbarch->memory_insert_breakpoint));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1024 host_address_to_string (gdbarch->memory_remove_breakpoint));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: num_pseudo_regs = %s\n",
1027 plongest (gdbarch->num_pseudo_regs));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: num_regs = %s\n",
1030 plongest (gdbarch->num_regs));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: osabi = %s\n",
1033 plongest (gdbarch->osabi));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1036 gdbarch_overlay_update_p (gdbarch));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: overlay_update = <%s>\n",
1039 host_address_to_string (gdbarch->overlay_update));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: pc_regnum = %s\n",
1042 plongest (gdbarch->pc_regnum));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: pointer_to_address = <%s>\n",
1045 host_address_to_string (gdbarch->pointer_to_address));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1048 gdbarch_print_float_info_p (gdbarch));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: print_float_info = <%s>\n",
1051 host_address_to_string (gdbarch->print_float_info));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: print_insn = <%s>\n",
1054 host_address_to_string (gdbarch->print_insn));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: print_registers_info = <%s>\n",
1057 host_address_to_string (gdbarch->print_registers_info));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1060 gdbarch_print_vector_info_p (gdbarch));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: print_vector_info = <%s>\n",
1063 host_address_to_string (gdbarch->print_vector_info));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1066 gdbarch_process_record_p (gdbarch));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: process_record = <%s>\n",
1069 host_address_to_string (gdbarch->process_record));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1072 gdbarch_process_record_signal_p (gdbarch));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: process_record_signal = <%s>\n",
1075 host_address_to_string (gdbarch->process_record_signal));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: ps_regnum = %s\n",
1078 plongest (gdbarch->ps_regnum));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1081 gdbarch_pseudo_register_read_p (gdbarch));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: pseudo_register_read = <%s>\n",
1084 host_address_to_string (gdbarch->pseudo_register_read));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1087 gdbarch_pseudo_register_read_value_p (gdbarch));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1090 host_address_to_string (gdbarch->pseudo_register_read_value));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1093 gdbarch_pseudo_register_write_p (gdbarch));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: pseudo_register_write = <%s>\n",
1096 host_address_to_string (gdbarch->pseudo_register_write));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: ptr_bit = %s\n",
1099 plongest (gdbarch->ptr_bit));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1102 gdbarch_push_dummy_call_p (gdbarch));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: push_dummy_call = <%s>\n",
1105 host_address_to_string (gdbarch->push_dummy_call));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1108 gdbarch_push_dummy_code_p (gdbarch));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: push_dummy_code = <%s>\n",
1111 host_address_to_string (gdbarch->push_dummy_code));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: ravenscar_ops = %s\n",
1114 host_address_to_string (gdbarch->ravenscar_ops));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1117 gdbarch_read_pc_p (gdbarch));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: read_pc = <%s>\n",
1120 host_address_to_string (gdbarch->read_pc));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1123 gdbarch_record_special_symbol_p (gdbarch));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: record_special_symbol = <%s>\n",
1126 host_address_to_string (gdbarch->record_special_symbol));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: register_name = <%s>\n",
1129 host_address_to_string (gdbarch->register_name));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: register_reggroup_p = <%s>\n",
1132 host_address_to_string (gdbarch->register_reggroup_p));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: register_sim_regno = <%s>\n",
1135 host_address_to_string (gdbarch->register_sim_regno));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: register_to_value = <%s>\n",
1138 host_address_to_string (gdbarch->register_to_value));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1141 gdbarch_register_type_p (gdbarch));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: register_type = <%s>\n",
1144 host_address_to_string (gdbarch->register_type));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1147 gdbarch_regset_from_core_section_p (gdbarch));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: regset_from_core_section = <%s>\n",
1150 host_address_to_string (gdbarch->regset_from_core_section));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1153 gdbarch_relocate_instruction_p (gdbarch));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: relocate_instruction = <%s>\n",
1156 host_address_to_string (gdbarch->relocate_instruction));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1159 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: remote_register_number = <%s>\n",
1162 host_address_to_string (gdbarch->remote_register_number));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1165 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1168 gdbarch_return_value_p (gdbarch));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: return_value = <%s>\n",
1171 host_address_to_string (gdbarch->return_value));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1174 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: short_bit = %s\n",
1177 plongest (gdbarch->short_bit));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1180 gdbarch_single_step_through_delay_p (gdbarch));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: single_step_through_delay = <%s>\n",
1183 host_address_to_string (gdbarch->single_step_through_delay));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1186 gdbarch_skip_entrypoint_p (gdbarch));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: skip_entrypoint = <%s>\n",
1189 host_address_to_string (gdbarch->skip_entrypoint));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1192 gdbarch_skip_main_prologue_p (gdbarch));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: skip_main_prologue = <%s>\n",
1195 host_address_to_string (gdbarch->skip_main_prologue));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1198 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1201 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: skip_prologue = <%s>\n",
1204 host_address_to_string (gdbarch->skip_prologue));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1207 host_address_to_string (gdbarch->skip_solib_resolver));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1210 host_address_to_string (gdbarch->skip_trampoline_code));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1213 gdbarch_software_single_step_p (gdbarch));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: software_single_step = <%s>\n",
1216 host_address_to_string (gdbarch->software_single_step));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1219 plongest (gdbarch->sofun_address_maybe_missing));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: solib_symbols_extension = %s\n",
1222 pstring (gdbarch->solib_symbols_extension));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: sp_regnum = %s\n",
1225 plongest (gdbarch->sp_regnum));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1228 host_address_to_string (gdbarch->stab_reg_to_regnum));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1231 host_address_to_string (gdbarch->stabs_argument_has_addr));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1234 pstring (gdbarch->stap_gdb_register_prefix));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1237 pstring (gdbarch->stap_gdb_register_suffix));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: stap_integer_prefixes = %s\n",
1240 pstring_list (gdbarch->stap_integer_prefixes));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: stap_integer_suffixes = %s\n",
1243 pstring_list (gdbarch->stap_integer_suffixes));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1246 gdbarch_stap_is_single_operand_p (gdbarch));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1249 host_address_to_string (gdbarch->stap_is_single_operand));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1252 gdbarch_stap_parse_special_token_p (gdbarch));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1255 host_address_to_string (gdbarch->stap_parse_special_token));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1258 pstring_list (gdbarch->stap_register_indirection_prefixes));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1261 pstring_list (gdbarch->stap_register_indirection_suffixes));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: stap_register_prefixes = %s\n",
1264 pstring_list (gdbarch->stap_register_prefixes));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: stap_register_suffixes = %s\n",
1267 pstring_list (gdbarch->stap_register_suffixes));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1270 gdbarch_static_transform_name_p (gdbarch));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: static_transform_name = <%s>\n",
1273 host_address_to_string (gdbarch->static_transform_name));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: target_desc = %s\n",
1276 host_address_to_string (gdbarch->target_desc));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1279 gdbarch_unwind_pc_p (gdbarch));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: unwind_pc = <%s>\n",
1282 host_address_to_string (gdbarch->unwind_pc));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1285 gdbarch_unwind_sp_p (gdbarch));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: unwind_sp = <%s>\n",
1288 host_address_to_string (gdbarch->unwind_sp));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: value_from_register = <%s>\n",
1291 host_address_to_string (gdbarch->value_from_register));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: value_to_register = <%s>\n",
1294 host_address_to_string (gdbarch->value_to_register));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: vbit_in_delta = %s\n",
1297 plongest (gdbarch->vbit_in_delta));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1300 host_address_to_string (gdbarch->virtual_frame_pointer));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: vtable_function_descriptors = %s\n",
1303 plongest (gdbarch->vtable_function_descriptors));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1306 gdbarch_write_pc_p (gdbarch));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: write_pc = <%s>\n",
1309 host_address_to_string (gdbarch->write_pc));
1310 if (gdbarch->dump_tdep != NULL)
1311 gdbarch->dump_tdep (gdbarch, file);
1314 struct gdbarch_tdep *
1315 gdbarch_tdep (struct gdbarch *gdbarch)
1317 if (gdbarch_debug >= 2)
1318 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1319 return gdbarch->tdep;
1323 const struct bfd_arch_info *
1324 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1326 gdb_assert (gdbarch != NULL);
1327 if (gdbarch_debug >= 2)
1328 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1329 return gdbarch->bfd_arch_info;
1333 gdbarch_byte_order (struct gdbarch *gdbarch)
1335 gdb_assert (gdbarch != NULL);
1336 if (gdbarch_debug >= 2)
1337 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1338 return gdbarch->byte_order;
1342 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1344 gdb_assert (gdbarch != NULL);
1345 if (gdbarch_debug >= 2)
1346 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1347 return gdbarch->byte_order_for_code;
1351 gdbarch_osabi (struct gdbarch *gdbarch)
1353 gdb_assert (gdbarch != NULL);
1354 if (gdbarch_debug >= 2)
1355 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1356 return gdbarch->osabi;
1359 const struct target_desc *
1360 gdbarch_target_desc (struct gdbarch *gdbarch)
1362 gdb_assert (gdbarch != NULL);
1363 if (gdbarch_debug >= 2)
1364 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1365 return gdbarch->target_desc;
1369 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1371 gdb_assert (gdbarch != NULL);
1372 /* Skip verify of bits_big_endian, invalid_p == 0 */
1373 if (gdbarch_debug >= 2)
1374 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1375 return gdbarch->bits_big_endian;
1379 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1380 int bits_big_endian)
1382 gdbarch->bits_big_endian = bits_big_endian;
1386 gdbarch_short_bit (struct gdbarch *gdbarch)
1388 gdb_assert (gdbarch != NULL);
1389 /* Skip verify of short_bit, invalid_p == 0 */
1390 if (gdbarch_debug >= 2)
1391 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1392 return gdbarch->short_bit;
1396 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1399 gdbarch->short_bit = short_bit;
1403 gdbarch_int_bit (struct gdbarch *gdbarch)
1405 gdb_assert (gdbarch != NULL);
1406 /* Skip verify of int_bit, invalid_p == 0 */
1407 if (gdbarch_debug >= 2)
1408 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1409 return gdbarch->int_bit;
1413 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1416 gdbarch->int_bit = int_bit;
1420 gdbarch_long_bit (struct gdbarch *gdbarch)
1422 gdb_assert (gdbarch != NULL);
1423 /* Skip verify of long_bit, invalid_p == 0 */
1424 if (gdbarch_debug >= 2)
1425 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1426 return gdbarch->long_bit;
1430 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1433 gdbarch->long_bit = long_bit;
1437 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1439 gdb_assert (gdbarch != NULL);
1440 /* Skip verify of long_long_bit, invalid_p == 0 */
1441 if (gdbarch_debug >= 2)
1442 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1443 return gdbarch->long_long_bit;
1447 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1450 gdbarch->long_long_bit = long_long_bit;
1454 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1456 gdb_assert (gdbarch != NULL);
1457 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1458 if (gdbarch_debug >= 2)
1459 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1460 return gdbarch->long_long_align_bit;
1464 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1465 int long_long_align_bit)
1467 gdbarch->long_long_align_bit = long_long_align_bit;
1471 gdbarch_half_bit (struct gdbarch *gdbarch)
1473 gdb_assert (gdbarch != NULL);
1474 /* Skip verify of half_bit, invalid_p == 0 */
1475 if (gdbarch_debug >= 2)
1476 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1477 return gdbarch->half_bit;
1481 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1484 gdbarch->half_bit = half_bit;
1487 const struct floatformat **
1488 gdbarch_half_format (struct gdbarch *gdbarch)
1490 gdb_assert (gdbarch != NULL);
1491 if (gdbarch_debug >= 2)
1492 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1493 return gdbarch->half_format;
1497 set_gdbarch_half_format (struct gdbarch *gdbarch,
1498 const struct floatformat ** half_format)
1500 gdbarch->half_format = half_format;
1504 gdbarch_float_bit (struct gdbarch *gdbarch)
1506 gdb_assert (gdbarch != NULL);
1507 /* Skip verify of float_bit, invalid_p == 0 */
1508 if (gdbarch_debug >= 2)
1509 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1510 return gdbarch->float_bit;
1514 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1517 gdbarch->float_bit = float_bit;
1520 const struct floatformat **
1521 gdbarch_float_format (struct gdbarch *gdbarch)
1523 gdb_assert (gdbarch != NULL);
1524 if (gdbarch_debug >= 2)
1525 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1526 return gdbarch->float_format;
1530 set_gdbarch_float_format (struct gdbarch *gdbarch,
1531 const struct floatformat ** float_format)
1533 gdbarch->float_format = float_format;
1537 gdbarch_double_bit (struct gdbarch *gdbarch)
1539 gdb_assert (gdbarch != NULL);
1540 /* Skip verify of double_bit, invalid_p == 0 */
1541 if (gdbarch_debug >= 2)
1542 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1543 return gdbarch->double_bit;
1547 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1550 gdbarch->double_bit = double_bit;
1553 const struct floatformat **
1554 gdbarch_double_format (struct gdbarch *gdbarch)
1556 gdb_assert (gdbarch != NULL);
1557 if (gdbarch_debug >= 2)
1558 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1559 return gdbarch->double_format;
1563 set_gdbarch_double_format (struct gdbarch *gdbarch,
1564 const struct floatformat ** double_format)
1566 gdbarch->double_format = double_format;
1570 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1572 gdb_assert (gdbarch != NULL);
1573 /* Skip verify of long_double_bit, invalid_p == 0 */
1574 if (gdbarch_debug >= 2)
1575 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1576 return gdbarch->long_double_bit;
1580 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1581 int long_double_bit)
1583 gdbarch->long_double_bit = long_double_bit;
1586 const struct floatformat **
1587 gdbarch_long_double_format (struct gdbarch *gdbarch)
1589 gdb_assert (gdbarch != NULL);
1590 if (gdbarch_debug >= 2)
1591 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1592 return gdbarch->long_double_format;
1596 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1597 const struct floatformat ** long_double_format)
1599 gdbarch->long_double_format = long_double_format;
1603 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1605 gdb_assert (gdbarch != NULL);
1606 /* Skip verify of ptr_bit, invalid_p == 0 */
1607 if (gdbarch_debug >= 2)
1608 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1609 return gdbarch->ptr_bit;
1613 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1616 gdbarch->ptr_bit = ptr_bit;
1620 gdbarch_addr_bit (struct gdbarch *gdbarch)
1622 gdb_assert (gdbarch != NULL);
1623 /* Check variable changed from pre-default. */
1624 gdb_assert (gdbarch->addr_bit != 0);
1625 if (gdbarch_debug >= 2)
1626 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1627 return gdbarch->addr_bit;
1631 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1634 gdbarch->addr_bit = addr_bit;
1638 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1640 gdb_assert (gdbarch != NULL);
1641 /* Check variable changed from pre-default. */
1642 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1643 if (gdbarch_debug >= 2)
1644 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1645 return gdbarch->dwarf2_addr_size;
1649 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1650 int dwarf2_addr_size)
1652 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1656 gdbarch_char_signed (struct gdbarch *gdbarch)
1658 gdb_assert (gdbarch != NULL);
1659 /* Check variable changed from pre-default. */
1660 gdb_assert (gdbarch->char_signed != -1);
1661 if (gdbarch_debug >= 2)
1662 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1663 return gdbarch->char_signed;
1667 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1670 gdbarch->char_signed = char_signed;
1674 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1676 gdb_assert (gdbarch != NULL);
1677 return gdbarch->read_pc != NULL;
1681 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1683 gdb_assert (gdbarch != NULL);
1684 gdb_assert (gdbarch->read_pc != NULL);
1685 if (gdbarch_debug >= 2)
1686 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1687 return gdbarch->read_pc (regcache);
1691 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1692 gdbarch_read_pc_ftype read_pc)
1694 gdbarch->read_pc = read_pc;
1698 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1700 gdb_assert (gdbarch != NULL);
1701 return gdbarch->write_pc != NULL;
1705 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1707 gdb_assert (gdbarch != NULL);
1708 gdb_assert (gdbarch->write_pc != NULL);
1709 if (gdbarch_debug >= 2)
1710 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1711 gdbarch->write_pc (regcache, val);
1715 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1716 gdbarch_write_pc_ftype write_pc)
1718 gdbarch->write_pc = write_pc;
1722 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1724 gdb_assert (gdbarch != NULL);
1725 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1726 if (gdbarch_debug >= 2)
1727 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1728 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1732 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1733 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1735 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1739 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1741 gdb_assert (gdbarch != NULL);
1742 return gdbarch->pseudo_register_read != NULL;
1745 enum register_status
1746 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1748 gdb_assert (gdbarch != NULL);
1749 gdb_assert (gdbarch->pseudo_register_read != NULL);
1750 if (gdbarch_debug >= 2)
1751 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1752 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1756 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1757 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1759 gdbarch->pseudo_register_read = pseudo_register_read;
1763 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1765 gdb_assert (gdbarch != NULL);
1766 return gdbarch->pseudo_register_read_value != NULL;
1770 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1772 gdb_assert (gdbarch != NULL);
1773 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1774 if (gdbarch_debug >= 2)
1775 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1776 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1780 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1781 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1783 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1787 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1789 gdb_assert (gdbarch != NULL);
1790 return gdbarch->pseudo_register_write != NULL;
1794 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1796 gdb_assert (gdbarch != NULL);
1797 gdb_assert (gdbarch->pseudo_register_write != NULL);
1798 if (gdbarch_debug >= 2)
1799 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1800 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1804 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1805 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1807 gdbarch->pseudo_register_write = pseudo_register_write;
1811 gdbarch_num_regs (struct gdbarch *gdbarch)
1813 gdb_assert (gdbarch != NULL);
1814 /* Check variable changed from pre-default. */
1815 gdb_assert (gdbarch->num_regs != -1);
1816 if (gdbarch_debug >= 2)
1817 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1818 return gdbarch->num_regs;
1822 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1825 gdbarch->num_regs = num_regs;
1829 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1831 gdb_assert (gdbarch != NULL);
1832 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1833 if (gdbarch_debug >= 2)
1834 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1835 return gdbarch->num_pseudo_regs;
1839 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1840 int num_pseudo_regs)
1842 gdbarch->num_pseudo_regs = num_pseudo_regs;
1846 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1848 gdb_assert (gdbarch != NULL);
1849 return gdbarch->ax_pseudo_register_collect != NULL;
1853 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1855 gdb_assert (gdbarch != NULL);
1856 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1857 if (gdbarch_debug >= 2)
1858 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1859 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1863 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1864 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1866 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1870 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
1872 gdb_assert (gdbarch != NULL);
1873 return gdbarch->ax_pseudo_register_push_stack != NULL;
1877 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1879 gdb_assert (gdbarch != NULL);
1880 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
1881 if (gdbarch_debug >= 2)
1882 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
1883 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
1887 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
1888 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
1890 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
1894 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1896 gdb_assert (gdbarch != NULL);
1897 /* Skip verify of sp_regnum, invalid_p == 0 */
1898 if (gdbarch_debug >= 2)
1899 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1900 return gdbarch->sp_regnum;
1904 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1907 gdbarch->sp_regnum = sp_regnum;
1911 gdbarch_pc_regnum (struct gdbarch *gdbarch)
1913 gdb_assert (gdbarch != NULL);
1914 /* Skip verify of pc_regnum, invalid_p == 0 */
1915 if (gdbarch_debug >= 2)
1916 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1917 return gdbarch->pc_regnum;
1921 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
1924 gdbarch->pc_regnum = pc_regnum;
1928 gdbarch_ps_regnum (struct gdbarch *gdbarch)
1930 gdb_assert (gdbarch != NULL);
1931 /* Skip verify of ps_regnum, invalid_p == 0 */
1932 if (gdbarch_debug >= 2)
1933 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
1934 return gdbarch->ps_regnum;
1938 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
1941 gdbarch->ps_regnum = ps_regnum;
1945 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
1947 gdb_assert (gdbarch != NULL);
1948 /* Skip verify of fp0_regnum, invalid_p == 0 */
1949 if (gdbarch_debug >= 2)
1950 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
1951 return gdbarch->fp0_regnum;
1955 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
1958 gdbarch->fp0_regnum = fp0_regnum;
1962 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
1964 gdb_assert (gdbarch != NULL);
1965 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
1966 if (gdbarch_debug >= 2)
1967 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
1968 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
1972 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
1973 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
1975 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
1979 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
1981 gdb_assert (gdbarch != NULL);
1982 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
1983 if (gdbarch_debug >= 2)
1984 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
1985 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
1989 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
1990 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
1992 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
1996 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
1998 gdb_assert (gdbarch != NULL);
1999 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2000 if (gdbarch_debug >= 2)
2001 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2002 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2006 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2007 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2009 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2013 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2015 gdb_assert (gdbarch != NULL);
2016 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2017 if (gdbarch_debug >= 2)
2018 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2019 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2023 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2024 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2026 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2030 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2032 gdb_assert (gdbarch != NULL);
2033 gdb_assert (gdbarch->register_name != NULL);
2034 if (gdbarch_debug >= 2)
2035 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2036 return gdbarch->register_name (gdbarch, regnr);
2040 set_gdbarch_register_name (struct gdbarch *gdbarch,
2041 gdbarch_register_name_ftype register_name)
2043 gdbarch->register_name = register_name;
2047 gdbarch_register_type_p (struct gdbarch *gdbarch)
2049 gdb_assert (gdbarch != NULL);
2050 return gdbarch->register_type != NULL;
2054 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2056 gdb_assert (gdbarch != NULL);
2057 gdb_assert (gdbarch->register_type != NULL);
2058 if (gdbarch_debug >= 2)
2059 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2060 return gdbarch->register_type (gdbarch, reg_nr);
2064 set_gdbarch_register_type (struct gdbarch *gdbarch,
2065 gdbarch_register_type_ftype register_type)
2067 gdbarch->register_type = register_type;
2071 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2073 gdb_assert (gdbarch != NULL);
2074 return gdbarch->dummy_id != NULL;
2078 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2080 gdb_assert (gdbarch != NULL);
2081 gdb_assert (gdbarch->dummy_id != NULL);
2082 if (gdbarch_debug >= 2)
2083 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2084 return gdbarch->dummy_id (gdbarch, this_frame);
2088 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2089 gdbarch_dummy_id_ftype dummy_id)
2091 gdbarch->dummy_id = dummy_id;
2095 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2097 gdb_assert (gdbarch != NULL);
2098 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2099 if (gdbarch_debug >= 2)
2100 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2101 return gdbarch->deprecated_fp_regnum;
2105 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2106 int deprecated_fp_regnum)
2108 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2112 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2114 gdb_assert (gdbarch != NULL);
2115 return gdbarch->push_dummy_call != NULL;
2119 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)
2121 gdb_assert (gdbarch != NULL);
2122 gdb_assert (gdbarch->push_dummy_call != NULL);
2123 if (gdbarch_debug >= 2)
2124 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2125 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2129 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2130 gdbarch_push_dummy_call_ftype push_dummy_call)
2132 gdbarch->push_dummy_call = push_dummy_call;
2136 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2138 gdb_assert (gdbarch != NULL);
2139 /* Skip verify of call_dummy_location, invalid_p == 0 */
2140 if (gdbarch_debug >= 2)
2141 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2142 return gdbarch->call_dummy_location;
2146 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2147 int call_dummy_location)
2149 gdbarch->call_dummy_location = call_dummy_location;
2153 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2155 gdb_assert (gdbarch != NULL);
2156 return gdbarch->push_dummy_code != NULL;
2160 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)
2162 gdb_assert (gdbarch != NULL);
2163 gdb_assert (gdbarch->push_dummy_code != NULL);
2164 if (gdbarch_debug >= 2)
2165 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2166 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2170 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2171 gdbarch_push_dummy_code_ftype push_dummy_code)
2173 gdbarch->push_dummy_code = push_dummy_code;
2177 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2179 gdb_assert (gdbarch != NULL);
2180 gdb_assert (gdbarch->print_registers_info != NULL);
2181 if (gdbarch_debug >= 2)
2182 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2183 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2187 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2188 gdbarch_print_registers_info_ftype print_registers_info)
2190 gdbarch->print_registers_info = print_registers_info;
2194 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2196 gdb_assert (gdbarch != NULL);
2197 return gdbarch->print_float_info != NULL;
2201 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2203 gdb_assert (gdbarch != NULL);
2204 gdb_assert (gdbarch->print_float_info != NULL);
2205 if (gdbarch_debug >= 2)
2206 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2207 gdbarch->print_float_info (gdbarch, file, frame, args);
2211 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2212 gdbarch_print_float_info_ftype print_float_info)
2214 gdbarch->print_float_info = print_float_info;
2218 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2220 gdb_assert (gdbarch != NULL);
2221 return gdbarch->print_vector_info != NULL;
2225 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2227 gdb_assert (gdbarch != NULL);
2228 gdb_assert (gdbarch->print_vector_info != NULL);
2229 if (gdbarch_debug >= 2)
2230 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2231 gdbarch->print_vector_info (gdbarch, file, frame, args);
2235 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2236 gdbarch_print_vector_info_ftype print_vector_info)
2238 gdbarch->print_vector_info = print_vector_info;
2242 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2244 gdb_assert (gdbarch != NULL);
2245 gdb_assert (gdbarch->register_sim_regno != NULL);
2246 if (gdbarch_debug >= 2)
2247 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2248 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2252 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2253 gdbarch_register_sim_regno_ftype register_sim_regno)
2255 gdbarch->register_sim_regno = register_sim_regno;
2259 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2261 gdb_assert (gdbarch != NULL);
2262 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2263 if (gdbarch_debug >= 2)
2264 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2265 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2269 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2270 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2272 gdbarch->cannot_fetch_register = cannot_fetch_register;
2276 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2278 gdb_assert (gdbarch != NULL);
2279 gdb_assert (gdbarch->cannot_store_register != NULL);
2280 if (gdbarch_debug >= 2)
2281 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2282 return gdbarch->cannot_store_register (gdbarch, regnum);
2286 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2287 gdbarch_cannot_store_register_ftype cannot_store_register)
2289 gdbarch->cannot_store_register = cannot_store_register;
2293 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2295 gdb_assert (gdbarch != NULL);
2296 return gdbarch->get_longjmp_target != NULL;
2300 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2302 gdb_assert (gdbarch != NULL);
2303 gdb_assert (gdbarch->get_longjmp_target != NULL);
2304 if (gdbarch_debug >= 2)
2305 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2306 return gdbarch->get_longjmp_target (frame, pc);
2310 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2311 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2313 gdbarch->get_longjmp_target = get_longjmp_target;
2317 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2319 gdb_assert (gdbarch != NULL);
2320 if (gdbarch_debug >= 2)
2321 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2322 return gdbarch->believe_pcc_promotion;
2326 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2327 int believe_pcc_promotion)
2329 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2333 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2335 gdb_assert (gdbarch != NULL);
2336 gdb_assert (gdbarch->convert_register_p != NULL);
2337 if (gdbarch_debug >= 2)
2338 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2339 return gdbarch->convert_register_p (gdbarch, regnum, type);
2343 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2344 gdbarch_convert_register_p_ftype convert_register_p)
2346 gdbarch->convert_register_p = convert_register_p;
2350 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2352 gdb_assert (gdbarch != NULL);
2353 gdb_assert (gdbarch->register_to_value != NULL);
2354 if (gdbarch_debug >= 2)
2355 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2356 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2360 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2361 gdbarch_register_to_value_ftype register_to_value)
2363 gdbarch->register_to_value = register_to_value;
2367 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2369 gdb_assert (gdbarch != NULL);
2370 gdb_assert (gdbarch->value_to_register != NULL);
2371 if (gdbarch_debug >= 2)
2372 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2373 gdbarch->value_to_register (frame, regnum, type, buf);
2377 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2378 gdbarch_value_to_register_ftype value_to_register)
2380 gdbarch->value_to_register = value_to_register;
2384 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2386 gdb_assert (gdbarch != NULL);
2387 gdb_assert (gdbarch->value_from_register != NULL);
2388 if (gdbarch_debug >= 2)
2389 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2390 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2394 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2395 gdbarch_value_from_register_ftype value_from_register)
2397 gdbarch->value_from_register = value_from_register;
2401 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2403 gdb_assert (gdbarch != NULL);
2404 gdb_assert (gdbarch->pointer_to_address != NULL);
2405 if (gdbarch_debug >= 2)
2406 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2407 return gdbarch->pointer_to_address (gdbarch, type, buf);
2411 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2412 gdbarch_pointer_to_address_ftype pointer_to_address)
2414 gdbarch->pointer_to_address = pointer_to_address;
2418 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2420 gdb_assert (gdbarch != NULL);
2421 gdb_assert (gdbarch->address_to_pointer != NULL);
2422 if (gdbarch_debug >= 2)
2423 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2424 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2428 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2429 gdbarch_address_to_pointer_ftype address_to_pointer)
2431 gdbarch->address_to_pointer = address_to_pointer;
2435 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2437 gdb_assert (gdbarch != NULL);
2438 return gdbarch->integer_to_address != NULL;
2442 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2444 gdb_assert (gdbarch != NULL);
2445 gdb_assert (gdbarch->integer_to_address != NULL);
2446 if (gdbarch_debug >= 2)
2447 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2448 return gdbarch->integer_to_address (gdbarch, type, buf);
2452 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2453 gdbarch_integer_to_address_ftype integer_to_address)
2455 gdbarch->integer_to_address = integer_to_address;
2459 gdbarch_return_value_p (struct gdbarch *gdbarch)
2461 gdb_assert (gdbarch != NULL);
2462 return gdbarch->return_value != NULL;
2465 enum return_value_convention
2466 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2468 gdb_assert (gdbarch != NULL);
2469 gdb_assert (gdbarch->return_value != NULL);
2470 if (gdbarch_debug >= 2)
2471 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2472 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2476 set_gdbarch_return_value (struct gdbarch *gdbarch,
2477 gdbarch_return_value_ftype return_value)
2479 gdbarch->return_value = return_value;
2483 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2485 gdb_assert (gdbarch != NULL);
2486 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2487 if (gdbarch_debug >= 2)
2488 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2489 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2493 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2494 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2496 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2500 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2502 gdb_assert (gdbarch != NULL);
2503 gdb_assert (gdbarch->skip_prologue != NULL);
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2506 return gdbarch->skip_prologue (gdbarch, ip);
2510 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2511 gdbarch_skip_prologue_ftype skip_prologue)
2513 gdbarch->skip_prologue = skip_prologue;
2517 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2519 gdb_assert (gdbarch != NULL);
2520 return gdbarch->skip_main_prologue != NULL;
2524 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2526 gdb_assert (gdbarch != NULL);
2527 gdb_assert (gdbarch->skip_main_prologue != NULL);
2528 if (gdbarch_debug >= 2)
2529 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2530 return gdbarch->skip_main_prologue (gdbarch, ip);
2534 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2535 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2537 gdbarch->skip_main_prologue = skip_main_prologue;
2541 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2543 gdb_assert (gdbarch != NULL);
2544 return gdbarch->skip_entrypoint != NULL;
2548 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2550 gdb_assert (gdbarch != NULL);
2551 gdb_assert (gdbarch->skip_entrypoint != NULL);
2552 if (gdbarch_debug >= 2)
2553 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2554 return gdbarch->skip_entrypoint (gdbarch, ip);
2558 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2559 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2561 gdbarch->skip_entrypoint = skip_entrypoint;
2565 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2567 gdb_assert (gdbarch != NULL);
2568 gdb_assert (gdbarch->inner_than != NULL);
2569 if (gdbarch_debug >= 2)
2570 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2571 return gdbarch->inner_than (lhs, rhs);
2575 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2576 gdbarch_inner_than_ftype inner_than)
2578 gdbarch->inner_than = inner_than;
2582 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2584 gdb_assert (gdbarch != NULL);
2585 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2586 if (gdbarch_debug >= 2)
2587 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2588 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2592 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2593 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2595 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2599 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2601 gdb_assert (gdbarch != NULL);
2602 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2603 if (gdbarch_debug >= 2)
2604 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2605 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2609 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2610 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2612 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2616 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2618 gdb_assert (gdbarch != NULL);
2619 return gdbarch->adjust_breakpoint_address != NULL;
2623 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2625 gdb_assert (gdbarch != NULL);
2626 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2627 if (gdbarch_debug >= 2)
2628 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2629 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2633 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2634 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2636 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2640 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2642 gdb_assert (gdbarch != NULL);
2643 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2644 if (gdbarch_debug >= 2)
2645 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2646 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2650 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2651 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2653 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2657 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2659 gdb_assert (gdbarch != NULL);
2660 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2661 if (gdbarch_debug >= 2)
2662 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2663 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2667 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2668 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2670 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2674 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2676 gdb_assert (gdbarch != NULL);
2677 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2680 return gdbarch->decr_pc_after_break;
2684 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2685 CORE_ADDR decr_pc_after_break)
2687 gdbarch->decr_pc_after_break = decr_pc_after_break;
2691 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2693 gdb_assert (gdbarch != NULL);
2694 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2695 if (gdbarch_debug >= 2)
2696 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2697 return gdbarch->deprecated_function_start_offset;
2701 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2702 CORE_ADDR deprecated_function_start_offset)
2704 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2708 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2710 gdb_assert (gdbarch != NULL);
2711 gdb_assert (gdbarch->remote_register_number != NULL);
2712 if (gdbarch_debug >= 2)
2713 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2714 return gdbarch->remote_register_number (gdbarch, regno);
2718 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2719 gdbarch_remote_register_number_ftype remote_register_number)
2721 gdbarch->remote_register_number = remote_register_number;
2725 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2727 gdb_assert (gdbarch != NULL);
2728 return gdbarch->fetch_tls_load_module_address != NULL;
2732 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2734 gdb_assert (gdbarch != NULL);
2735 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2736 if (gdbarch_debug >= 2)
2737 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2738 return gdbarch->fetch_tls_load_module_address (objfile);
2742 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2743 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2745 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2749 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2751 gdb_assert (gdbarch != NULL);
2752 /* Skip verify of frame_args_skip, invalid_p == 0 */
2753 if (gdbarch_debug >= 2)
2754 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2755 return gdbarch->frame_args_skip;
2759 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2760 CORE_ADDR frame_args_skip)
2762 gdbarch->frame_args_skip = frame_args_skip;
2766 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2768 gdb_assert (gdbarch != NULL);
2769 return gdbarch->unwind_pc != NULL;
2773 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2775 gdb_assert (gdbarch != NULL);
2776 gdb_assert (gdbarch->unwind_pc != NULL);
2777 if (gdbarch_debug >= 2)
2778 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2779 return gdbarch->unwind_pc (gdbarch, next_frame);
2783 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2784 gdbarch_unwind_pc_ftype unwind_pc)
2786 gdbarch->unwind_pc = unwind_pc;
2790 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2792 gdb_assert (gdbarch != NULL);
2793 return gdbarch->unwind_sp != NULL;
2797 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2799 gdb_assert (gdbarch != NULL);
2800 gdb_assert (gdbarch->unwind_sp != NULL);
2801 if (gdbarch_debug >= 2)
2802 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2803 return gdbarch->unwind_sp (gdbarch, next_frame);
2807 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2808 gdbarch_unwind_sp_ftype unwind_sp)
2810 gdbarch->unwind_sp = unwind_sp;
2814 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2816 gdb_assert (gdbarch != NULL);
2817 return gdbarch->frame_num_args != NULL;
2821 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2823 gdb_assert (gdbarch != NULL);
2824 gdb_assert (gdbarch->frame_num_args != NULL);
2825 if (gdbarch_debug >= 2)
2826 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2827 return gdbarch->frame_num_args (frame);
2831 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2832 gdbarch_frame_num_args_ftype frame_num_args)
2834 gdbarch->frame_num_args = frame_num_args;
2838 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2840 gdb_assert (gdbarch != NULL);
2841 return gdbarch->frame_align != NULL;
2845 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2847 gdb_assert (gdbarch != NULL);
2848 gdb_assert (gdbarch->frame_align != NULL);
2849 if (gdbarch_debug >= 2)
2850 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2851 return gdbarch->frame_align (gdbarch, address);
2855 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2856 gdbarch_frame_align_ftype frame_align)
2858 gdbarch->frame_align = frame_align;
2862 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2864 gdb_assert (gdbarch != NULL);
2865 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
2866 if (gdbarch_debug >= 2)
2867 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
2868 return gdbarch->stabs_argument_has_addr (gdbarch, type);
2872 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
2873 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
2875 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
2879 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
2881 gdb_assert (gdbarch != NULL);
2882 if (gdbarch_debug >= 2)
2883 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
2884 return gdbarch->frame_red_zone_size;
2888 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
2889 int frame_red_zone_size)
2891 gdbarch->frame_red_zone_size = frame_red_zone_size;
2895 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
2897 gdb_assert (gdbarch != NULL);
2898 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
2899 if (gdbarch_debug >= 2)
2900 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
2901 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
2905 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
2906 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
2908 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
2912 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
2914 gdb_assert (gdbarch != NULL);
2915 gdb_assert (gdbarch->addr_bits_remove != NULL);
2916 if (gdbarch_debug >= 2)
2917 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
2918 return gdbarch->addr_bits_remove (gdbarch, addr);
2922 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
2923 gdbarch_addr_bits_remove_ftype addr_bits_remove)
2925 gdbarch->addr_bits_remove = addr_bits_remove;
2929 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
2931 gdb_assert (gdbarch != NULL);
2932 return gdbarch->software_single_step != NULL;
2936 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
2938 gdb_assert (gdbarch != NULL);
2939 gdb_assert (gdbarch->software_single_step != NULL);
2940 if (gdbarch_debug >= 2)
2941 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
2942 return gdbarch->software_single_step (frame);
2946 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
2947 gdbarch_software_single_step_ftype software_single_step)
2949 gdbarch->software_single_step = software_single_step;
2953 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
2955 gdb_assert (gdbarch != NULL);
2956 return gdbarch->single_step_through_delay != NULL;
2960 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
2962 gdb_assert (gdbarch != NULL);
2963 gdb_assert (gdbarch->single_step_through_delay != NULL);
2964 if (gdbarch_debug >= 2)
2965 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
2966 return gdbarch->single_step_through_delay (gdbarch, frame);
2970 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
2971 gdbarch_single_step_through_delay_ftype single_step_through_delay)
2973 gdbarch->single_step_through_delay = single_step_through_delay;
2977 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
2979 gdb_assert (gdbarch != NULL);
2980 gdb_assert (gdbarch->print_insn != NULL);
2981 if (gdbarch_debug >= 2)
2982 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
2983 return gdbarch->print_insn (vma, info);
2987 set_gdbarch_print_insn (struct gdbarch *gdbarch,
2988 gdbarch_print_insn_ftype print_insn)
2990 gdbarch->print_insn = print_insn;
2994 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
2996 gdb_assert (gdbarch != NULL);
2997 gdb_assert (gdbarch->skip_trampoline_code != NULL);
2998 if (gdbarch_debug >= 2)
2999 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3000 return gdbarch->skip_trampoline_code (frame, pc);
3004 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3005 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3007 gdbarch->skip_trampoline_code = skip_trampoline_code;
3011 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3013 gdb_assert (gdbarch != NULL);
3014 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3015 if (gdbarch_debug >= 2)
3016 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3017 return gdbarch->skip_solib_resolver (gdbarch, pc);
3021 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3022 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3024 gdbarch->skip_solib_resolver = skip_solib_resolver;
3028 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3030 gdb_assert (gdbarch != NULL);
3031 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3032 if (gdbarch_debug >= 2)
3033 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3034 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3038 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3039 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3041 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3045 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3047 gdb_assert (gdbarch != NULL);
3048 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3049 if (gdbarch_debug >= 2)
3050 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3051 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3055 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3056 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3058 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3062 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3064 gdb_assert (gdbarch != NULL);
3065 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3066 if (gdbarch_debug >= 2)
3067 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3068 gdbarch->elf_make_msymbol_special (sym, msym);
3072 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3073 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3075 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3079 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3081 gdb_assert (gdbarch != NULL);
3082 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3083 if (gdbarch_debug >= 2)
3084 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3085 gdbarch->coff_make_msymbol_special (val, msym);
3089 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3090 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3092 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3096 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3098 gdb_assert (gdbarch != NULL);
3099 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3102 return gdbarch->cannot_step_breakpoint;
3106 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3107 int cannot_step_breakpoint)
3109 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3113 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3115 gdb_assert (gdbarch != NULL);
3116 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3117 if (gdbarch_debug >= 2)
3118 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3119 return gdbarch->have_nonsteppable_watchpoint;
3123 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3124 int have_nonsteppable_watchpoint)
3126 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3130 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3132 gdb_assert (gdbarch != NULL);
3133 return gdbarch->address_class_type_flags != NULL;
3137 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3139 gdb_assert (gdbarch != NULL);
3140 gdb_assert (gdbarch->address_class_type_flags != NULL);
3141 if (gdbarch_debug >= 2)
3142 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3143 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3147 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3148 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3150 gdbarch->address_class_type_flags = address_class_type_flags;
3154 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3156 gdb_assert (gdbarch != NULL);
3157 return gdbarch->address_class_type_flags_to_name != NULL;
3161 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3163 gdb_assert (gdbarch != NULL);
3164 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3165 if (gdbarch_debug >= 2)
3166 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3167 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3171 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3172 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3174 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3178 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3180 gdb_assert (gdbarch != NULL);
3181 return gdbarch->address_class_name_to_type_flags != NULL;
3185 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3187 gdb_assert (gdbarch != NULL);
3188 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3189 if (gdbarch_debug >= 2)
3190 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3191 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3195 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3196 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3198 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3202 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3204 gdb_assert (gdbarch != NULL);
3205 gdb_assert (gdbarch->register_reggroup_p != NULL);
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3208 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3212 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3213 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3215 gdbarch->register_reggroup_p = register_reggroup_p;
3219 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3221 gdb_assert (gdbarch != NULL);
3222 return gdbarch->fetch_pointer_argument != NULL;
3226 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3228 gdb_assert (gdbarch != NULL);
3229 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3230 if (gdbarch_debug >= 2)
3231 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3232 return gdbarch->fetch_pointer_argument (frame, argi, type);
3236 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3237 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3239 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3243 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3245 gdb_assert (gdbarch != NULL);
3246 return gdbarch->regset_from_core_section != NULL;
3249 const struct regset *
3250 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3252 gdb_assert (gdbarch != NULL);
3253 gdb_assert (gdbarch->regset_from_core_section != NULL);
3254 if (gdbarch_debug >= 2)
3255 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3256 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3260 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3261 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3263 gdbarch->regset_from_core_section = regset_from_core_section;
3266 struct core_regset_section *
3267 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
3269 gdb_assert (gdbarch != NULL);
3270 if (gdbarch_debug >= 2)
3271 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
3272 return gdbarch->core_regset_sections;
3276 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
3277 struct core_regset_section * core_regset_sections)
3279 gdbarch->core_regset_sections = core_regset_sections;
3283 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3285 gdb_assert (gdbarch != NULL);
3286 return gdbarch->make_corefile_notes != NULL;
3290 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3292 gdb_assert (gdbarch != NULL);
3293 gdb_assert (gdbarch->make_corefile_notes != NULL);
3294 if (gdbarch_debug >= 2)
3295 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3296 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3300 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3301 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3303 gdbarch->make_corefile_notes = make_corefile_notes;
3307 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3309 gdb_assert (gdbarch != NULL);
3310 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3314 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3316 gdb_assert (gdbarch != NULL);
3317 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3318 if (gdbarch_debug >= 2)
3319 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3320 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3324 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3325 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3327 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3331 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3333 gdb_assert (gdbarch != NULL);
3334 return gdbarch->find_memory_regions != NULL;
3338 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3340 gdb_assert (gdbarch != NULL);
3341 gdb_assert (gdbarch->find_memory_regions != NULL);
3342 if (gdbarch_debug >= 2)
3343 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3344 return gdbarch->find_memory_regions (gdbarch, func, data);
3348 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3349 gdbarch_find_memory_regions_ftype find_memory_regions)
3351 gdbarch->find_memory_regions = find_memory_regions;
3355 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3357 gdb_assert (gdbarch != NULL);
3358 return gdbarch->core_xfer_shared_libraries != NULL;
3362 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3364 gdb_assert (gdbarch != NULL);
3365 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3366 if (gdbarch_debug >= 2)
3367 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3368 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3372 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3373 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3375 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3379 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3381 gdb_assert (gdbarch != NULL);
3382 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3386 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3388 gdb_assert (gdbarch != NULL);
3389 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3390 if (gdbarch_debug >= 2)
3391 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3392 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3396 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3397 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3399 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3403 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3405 gdb_assert (gdbarch != NULL);
3406 return gdbarch->core_pid_to_str != NULL;
3410 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3412 gdb_assert (gdbarch != NULL);
3413 gdb_assert (gdbarch->core_pid_to_str != NULL);
3414 if (gdbarch_debug >= 2)
3415 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3416 return gdbarch->core_pid_to_str (gdbarch, ptid);
3420 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3421 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3423 gdbarch->core_pid_to_str = core_pid_to_str;
3427 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3429 gdb_assert (gdbarch != NULL);
3430 return gdbarch->gcore_bfd_target != 0;
3434 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3436 gdb_assert (gdbarch != NULL);
3437 /* Check variable changed from pre-default. */
3438 gdb_assert (gdbarch->gcore_bfd_target != 0);
3439 if (gdbarch_debug >= 2)
3440 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3441 return gdbarch->gcore_bfd_target;
3445 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3446 const char * gcore_bfd_target)
3448 gdbarch->gcore_bfd_target = gcore_bfd_target;
3452 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3454 gdb_assert (gdbarch != NULL);
3455 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3456 if (gdbarch_debug >= 2)
3457 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3458 return gdbarch->vtable_function_descriptors;
3462 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3463 int vtable_function_descriptors)
3465 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3469 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3471 gdb_assert (gdbarch != NULL);
3472 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3473 if (gdbarch_debug >= 2)
3474 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3475 return gdbarch->vbit_in_delta;
3479 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3482 gdbarch->vbit_in_delta = vbit_in_delta;
3486 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3488 gdb_assert (gdbarch != NULL);
3489 return gdbarch->skip_permanent_breakpoint != NULL;
3493 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3495 gdb_assert (gdbarch != NULL);
3496 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3497 if (gdbarch_debug >= 2)
3498 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3499 gdbarch->skip_permanent_breakpoint (regcache);
3503 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3504 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3506 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3510 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3512 gdb_assert (gdbarch != NULL);
3513 return gdbarch->max_insn_length != 0;
3517 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3519 gdb_assert (gdbarch != NULL);
3520 /* Check variable changed from pre-default. */
3521 gdb_assert (gdbarch->max_insn_length != 0);
3522 if (gdbarch_debug >= 2)
3523 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3524 return gdbarch->max_insn_length;
3528 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3529 ULONGEST max_insn_length)
3531 gdbarch->max_insn_length = max_insn_length;
3535 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3537 gdb_assert (gdbarch != NULL);
3538 return gdbarch->displaced_step_copy_insn != NULL;
3541 struct displaced_step_closure *
3542 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3544 gdb_assert (gdbarch != NULL);
3545 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3546 if (gdbarch_debug >= 2)
3547 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3548 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3552 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3553 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3555 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3559 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3561 gdb_assert (gdbarch != NULL);
3562 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3563 if (gdbarch_debug >= 2)
3564 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3565 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3569 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3570 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3572 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3576 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3578 gdb_assert (gdbarch != NULL);
3579 return gdbarch->displaced_step_fixup != NULL;
3583 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3585 gdb_assert (gdbarch != NULL);
3586 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3587 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3588 if (gdbarch_debug >= 2)
3589 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3590 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3594 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3595 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3597 gdbarch->displaced_step_fixup = displaced_step_fixup;
3601 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3603 gdb_assert (gdbarch != NULL);
3604 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3605 if (gdbarch_debug >= 2)
3606 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3607 gdbarch->displaced_step_free_closure (gdbarch, closure);
3611 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3612 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3614 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3618 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3620 gdb_assert (gdbarch != NULL);
3621 gdb_assert (gdbarch->displaced_step_location != NULL);
3622 if (gdbarch_debug >= 2)
3623 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3624 return gdbarch->displaced_step_location (gdbarch);
3628 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3629 gdbarch_displaced_step_location_ftype displaced_step_location)
3631 gdbarch->displaced_step_location = displaced_step_location;
3635 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3637 gdb_assert (gdbarch != NULL);
3638 return gdbarch->relocate_instruction != NULL;
3642 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3644 gdb_assert (gdbarch != NULL);
3645 gdb_assert (gdbarch->relocate_instruction != NULL);
3646 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3647 if (gdbarch_debug >= 2)
3648 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3649 gdbarch->relocate_instruction (gdbarch, to, from);
3653 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3654 gdbarch_relocate_instruction_ftype relocate_instruction)
3656 gdbarch->relocate_instruction = relocate_instruction;
3660 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3662 gdb_assert (gdbarch != NULL);
3663 return gdbarch->overlay_update != NULL;
3667 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3669 gdb_assert (gdbarch != NULL);
3670 gdb_assert (gdbarch->overlay_update != NULL);
3671 if (gdbarch_debug >= 2)
3672 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3673 gdbarch->overlay_update (osect);
3677 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3678 gdbarch_overlay_update_ftype overlay_update)
3680 gdbarch->overlay_update = overlay_update;
3684 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3686 gdb_assert (gdbarch != NULL);
3687 return gdbarch->core_read_description != NULL;
3690 const struct target_desc *
3691 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3693 gdb_assert (gdbarch != NULL);
3694 gdb_assert (gdbarch->core_read_description != NULL);
3695 if (gdbarch_debug >= 2)
3696 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3697 return gdbarch->core_read_description (gdbarch, target, abfd);
3701 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3702 gdbarch_core_read_description_ftype core_read_description)
3704 gdbarch->core_read_description = core_read_description;
3708 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3710 gdb_assert (gdbarch != NULL);
3711 return gdbarch->static_transform_name != NULL;
3715 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3717 gdb_assert (gdbarch != NULL);
3718 gdb_assert (gdbarch->static_transform_name != NULL);
3719 if (gdbarch_debug >= 2)
3720 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3721 return gdbarch->static_transform_name (name);
3725 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3726 gdbarch_static_transform_name_ftype static_transform_name)
3728 gdbarch->static_transform_name = static_transform_name;
3732 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3734 gdb_assert (gdbarch != NULL);
3735 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3736 if (gdbarch_debug >= 2)
3737 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3738 return gdbarch->sofun_address_maybe_missing;
3742 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3743 int sofun_address_maybe_missing)
3745 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3749 gdbarch_process_record_p (struct gdbarch *gdbarch)
3751 gdb_assert (gdbarch != NULL);
3752 return gdbarch->process_record != NULL;
3756 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3758 gdb_assert (gdbarch != NULL);
3759 gdb_assert (gdbarch->process_record != NULL);
3760 if (gdbarch_debug >= 2)
3761 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3762 return gdbarch->process_record (gdbarch, regcache, addr);
3766 set_gdbarch_process_record (struct gdbarch *gdbarch,
3767 gdbarch_process_record_ftype process_record)
3769 gdbarch->process_record = process_record;
3773 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3775 gdb_assert (gdbarch != NULL);
3776 return gdbarch->process_record_signal != NULL;
3780 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3782 gdb_assert (gdbarch != NULL);
3783 gdb_assert (gdbarch->process_record_signal != NULL);
3784 if (gdbarch_debug >= 2)
3785 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3786 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3790 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3791 gdbarch_process_record_signal_ftype process_record_signal)
3793 gdbarch->process_record_signal = process_record_signal;
3797 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3799 gdb_assert (gdbarch != NULL);
3800 return gdbarch->gdb_signal_from_target != NULL;
3804 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3806 gdb_assert (gdbarch != NULL);
3807 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
3808 if (gdbarch_debug >= 2)
3809 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3810 return gdbarch->gdb_signal_from_target (gdbarch, signo);
3814 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3815 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
3817 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
3821 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
3823 gdb_assert (gdbarch != NULL);
3824 return gdbarch->gdb_signal_to_target != NULL;
3828 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
3830 gdb_assert (gdbarch != NULL);
3831 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
3832 if (gdbarch_debug >= 2)
3833 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
3834 return gdbarch->gdb_signal_to_target (gdbarch, signal);
3838 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
3839 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
3841 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
3845 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
3847 gdb_assert (gdbarch != NULL);
3848 return gdbarch->get_siginfo_type != NULL;
3852 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
3854 gdb_assert (gdbarch != NULL);
3855 gdb_assert (gdbarch->get_siginfo_type != NULL);
3856 if (gdbarch_debug >= 2)
3857 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
3858 return gdbarch->get_siginfo_type (gdbarch);
3862 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
3863 gdbarch_get_siginfo_type_ftype get_siginfo_type)
3865 gdbarch->get_siginfo_type = get_siginfo_type;
3869 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
3871 gdb_assert (gdbarch != NULL);
3872 return gdbarch->record_special_symbol != NULL;
3876 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
3878 gdb_assert (gdbarch != NULL);
3879 gdb_assert (gdbarch->record_special_symbol != NULL);
3880 if (gdbarch_debug >= 2)
3881 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
3882 gdbarch->record_special_symbol (gdbarch, objfile, sym);
3886 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
3887 gdbarch_record_special_symbol_ftype record_special_symbol)
3889 gdbarch->record_special_symbol = record_special_symbol;
3893 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
3895 gdb_assert (gdbarch != NULL);
3896 return gdbarch->get_syscall_number != NULL;
3900 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
3902 gdb_assert (gdbarch != NULL);
3903 gdb_assert (gdbarch->get_syscall_number != NULL);
3904 if (gdbarch_debug >= 2)
3905 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
3906 return gdbarch->get_syscall_number (gdbarch, ptid);
3910 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
3911 gdbarch_get_syscall_number_ftype get_syscall_number)
3913 gdbarch->get_syscall_number = get_syscall_number;
3917 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
3919 gdb_assert (gdbarch != NULL);
3920 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
3921 if (gdbarch_debug >= 2)
3922 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
3923 return gdbarch->stap_integer_prefixes;
3927 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
3928 const char *const * stap_integer_prefixes)
3930 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
3934 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
3936 gdb_assert (gdbarch != NULL);
3937 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
3938 if (gdbarch_debug >= 2)
3939 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
3940 return gdbarch->stap_integer_suffixes;
3944 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
3945 const char *const * stap_integer_suffixes)
3947 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
3951 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
3953 gdb_assert (gdbarch != NULL);
3954 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
3955 if (gdbarch_debug >= 2)
3956 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
3957 return gdbarch->stap_register_prefixes;
3961 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
3962 const char *const * stap_register_prefixes)
3964 gdbarch->stap_register_prefixes = stap_register_prefixes;
3968 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
3970 gdb_assert (gdbarch != NULL);
3971 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
3972 if (gdbarch_debug >= 2)
3973 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
3974 return gdbarch->stap_register_suffixes;
3978 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
3979 const char *const * stap_register_suffixes)
3981 gdbarch->stap_register_suffixes = stap_register_suffixes;
3985 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
3987 gdb_assert (gdbarch != NULL);
3988 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
3989 if (gdbarch_debug >= 2)
3990 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
3991 return gdbarch->stap_register_indirection_prefixes;
3995 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
3996 const char *const * stap_register_indirection_prefixes)
3998 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4002 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4004 gdb_assert (gdbarch != NULL);
4005 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4006 if (gdbarch_debug >= 2)
4007 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4008 return gdbarch->stap_register_indirection_suffixes;
4012 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4013 const char *const * stap_register_indirection_suffixes)
4015 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4019 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4021 gdb_assert (gdbarch != NULL);
4022 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4023 if (gdbarch_debug >= 2)
4024 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4025 return gdbarch->stap_gdb_register_prefix;
4029 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4030 const char * stap_gdb_register_prefix)
4032 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4036 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4038 gdb_assert (gdbarch != NULL);
4039 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4040 if (gdbarch_debug >= 2)
4041 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4042 return gdbarch->stap_gdb_register_suffix;
4046 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4047 const char * stap_gdb_register_suffix)
4049 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4053 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4055 gdb_assert (gdbarch != NULL);
4056 return gdbarch->stap_is_single_operand != NULL;
4060 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4062 gdb_assert (gdbarch != NULL);
4063 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4064 if (gdbarch_debug >= 2)
4065 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4066 return gdbarch->stap_is_single_operand (gdbarch, s);
4070 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4071 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4073 gdbarch->stap_is_single_operand = stap_is_single_operand;
4077 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4079 gdb_assert (gdbarch != NULL);
4080 return gdbarch->stap_parse_special_token != NULL;
4084 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4086 gdb_assert (gdbarch != NULL);
4087 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4090 return gdbarch->stap_parse_special_token (gdbarch, p);
4094 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4095 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4097 gdbarch->stap_parse_special_token = stap_parse_special_token;
4101 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4103 gdb_assert (gdbarch != NULL);
4104 /* Skip verify of has_global_solist, invalid_p == 0 */
4105 if (gdbarch_debug >= 2)
4106 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4107 return gdbarch->has_global_solist;
4111 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4112 int has_global_solist)
4114 gdbarch->has_global_solist = has_global_solist;
4118 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4120 gdb_assert (gdbarch != NULL);
4121 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4122 if (gdbarch_debug >= 2)
4123 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4124 return gdbarch->has_global_breakpoints;
4128 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4129 int has_global_breakpoints)
4131 gdbarch->has_global_breakpoints = has_global_breakpoints;
4135 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4137 gdb_assert (gdbarch != NULL);
4138 gdb_assert (gdbarch->has_shared_address_space != NULL);
4139 if (gdbarch_debug >= 2)
4140 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4141 return gdbarch->has_shared_address_space (gdbarch);
4145 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4146 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4148 gdbarch->has_shared_address_space = has_shared_address_space;
4152 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
4154 gdb_assert (gdbarch != NULL);
4155 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4156 if (gdbarch_debug >= 2)
4157 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4158 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
4162 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4163 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4165 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4169 gdbarch_auto_charset (struct gdbarch *gdbarch)
4171 gdb_assert (gdbarch != NULL);
4172 gdb_assert (gdbarch->auto_charset != NULL);
4173 if (gdbarch_debug >= 2)
4174 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4175 return gdbarch->auto_charset ();
4179 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4180 gdbarch_auto_charset_ftype auto_charset)
4182 gdbarch->auto_charset = auto_charset;
4186 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4188 gdb_assert (gdbarch != NULL);
4189 gdb_assert (gdbarch->auto_wide_charset != NULL);
4190 if (gdbarch_debug >= 2)
4191 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4192 return gdbarch->auto_wide_charset ();
4196 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4197 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4199 gdbarch->auto_wide_charset = auto_wide_charset;
4203 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4205 gdb_assert (gdbarch != NULL);
4206 if (gdbarch_debug >= 2)
4207 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4208 return gdbarch->solib_symbols_extension;
4212 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4213 const char * solib_symbols_extension)
4215 gdbarch->solib_symbols_extension = solib_symbols_extension;
4219 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4221 gdb_assert (gdbarch != NULL);
4222 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4223 if (gdbarch_debug >= 2)
4224 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4225 return gdbarch->has_dos_based_file_system;
4229 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4230 int has_dos_based_file_system)
4232 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4236 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4238 gdb_assert (gdbarch != NULL);
4239 gdb_assert (gdbarch->gen_return_address != NULL);
4240 if (gdbarch_debug >= 2)
4241 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4242 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4246 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4247 gdbarch_gen_return_address_ftype gen_return_address)
4249 gdbarch->gen_return_address = gen_return_address;
4253 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4255 gdb_assert (gdbarch != NULL);
4256 return gdbarch->info_proc != NULL;
4260 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4262 gdb_assert (gdbarch != NULL);
4263 gdb_assert (gdbarch->info_proc != NULL);
4264 if (gdbarch_debug >= 2)
4265 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4266 gdbarch->info_proc (gdbarch, args, what);
4270 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4271 gdbarch_info_proc_ftype info_proc)
4273 gdbarch->info_proc = info_proc;
4277 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4279 gdb_assert (gdbarch != NULL);
4280 return gdbarch->core_info_proc != NULL;
4284 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4286 gdb_assert (gdbarch != NULL);
4287 gdb_assert (gdbarch->core_info_proc != NULL);
4288 if (gdbarch_debug >= 2)
4289 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4290 gdbarch->core_info_proc (gdbarch, args, what);
4294 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4295 gdbarch_core_info_proc_ftype core_info_proc)
4297 gdbarch->core_info_proc = core_info_proc;
4301 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)
4303 gdb_assert (gdbarch != NULL);
4304 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4305 if (gdbarch_debug >= 2)
4306 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4307 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4311 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4312 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4314 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4317 struct ravenscar_arch_ops *
4318 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4320 gdb_assert (gdbarch != NULL);
4321 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4322 if (gdbarch_debug >= 2)
4323 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4324 return gdbarch->ravenscar_ops;
4328 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4329 struct ravenscar_arch_ops * ravenscar_ops)
4331 gdbarch->ravenscar_ops = ravenscar_ops;
4335 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4337 gdb_assert (gdbarch != NULL);
4338 gdb_assert (gdbarch->insn_is_call != NULL);
4339 if (gdbarch_debug >= 2)
4340 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4341 return gdbarch->insn_is_call (gdbarch, addr);
4345 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4346 gdbarch_insn_is_call_ftype insn_is_call)
4348 gdbarch->insn_is_call = insn_is_call;
4352 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4354 gdb_assert (gdbarch != NULL);
4355 gdb_assert (gdbarch->insn_is_ret != NULL);
4356 if (gdbarch_debug >= 2)
4357 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4358 return gdbarch->insn_is_ret (gdbarch, addr);
4362 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4363 gdbarch_insn_is_ret_ftype insn_is_ret)
4365 gdbarch->insn_is_ret = insn_is_ret;
4369 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4371 gdb_assert (gdbarch != NULL);
4372 gdb_assert (gdbarch->insn_is_jump != NULL);
4373 if (gdbarch_debug >= 2)
4374 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4375 return gdbarch->insn_is_jump (gdbarch, addr);
4379 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4380 gdbarch_insn_is_jump_ftype insn_is_jump)
4382 gdbarch->insn_is_jump = insn_is_jump;
4386 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4388 gdb_assert (gdbarch != NULL);
4389 return gdbarch->auxv_parse != NULL;
4393 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4395 gdb_assert (gdbarch != NULL);
4396 gdb_assert (gdbarch->auxv_parse != NULL);
4397 if (gdbarch_debug >= 2)
4398 fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4399 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4403 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4404 gdbarch_auxv_parse_ftype auxv_parse)
4406 gdbarch->auxv_parse = auxv_parse;
4410 /* Keep a registry of per-architecture data-pointers required by GDB
4417 gdbarch_data_pre_init_ftype *pre_init;
4418 gdbarch_data_post_init_ftype *post_init;
4421 struct gdbarch_data_registration
4423 struct gdbarch_data *data;
4424 struct gdbarch_data_registration *next;
4427 struct gdbarch_data_registry
4430 struct gdbarch_data_registration *registrations;
4433 struct gdbarch_data_registry gdbarch_data_registry =
4438 static struct gdbarch_data *
4439 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4440 gdbarch_data_post_init_ftype *post_init)
4442 struct gdbarch_data_registration **curr;
4444 /* Append the new registration. */
4445 for (curr = &gdbarch_data_registry.registrations;
4447 curr = &(*curr)->next);
4448 (*curr) = XNEW (struct gdbarch_data_registration);
4449 (*curr)->next = NULL;
4450 (*curr)->data = XNEW (struct gdbarch_data);
4451 (*curr)->data->index = gdbarch_data_registry.nr++;
4452 (*curr)->data->pre_init = pre_init;
4453 (*curr)->data->post_init = post_init;
4454 (*curr)->data->init_p = 1;
4455 return (*curr)->data;
4458 struct gdbarch_data *
4459 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4461 return gdbarch_data_register (pre_init, NULL);
4464 struct gdbarch_data *
4465 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4467 return gdbarch_data_register (NULL, post_init);
4470 /* Create/delete the gdbarch data vector. */
4473 alloc_gdbarch_data (struct gdbarch *gdbarch)
4475 gdb_assert (gdbarch->data == NULL);
4476 gdbarch->nr_data = gdbarch_data_registry.nr;
4477 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4480 /* Initialize the current value of the specified per-architecture
4484 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4485 struct gdbarch_data *data,
4488 gdb_assert (data->index < gdbarch->nr_data);
4489 gdb_assert (gdbarch->data[data->index] == NULL);
4490 gdb_assert (data->pre_init == NULL);
4491 gdbarch->data[data->index] = pointer;
4494 /* Return the current value of the specified per-architecture
4498 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4500 gdb_assert (data->index < gdbarch->nr_data);
4501 if (gdbarch->data[data->index] == NULL)
4503 /* The data-pointer isn't initialized, call init() to get a
4505 if (data->pre_init != NULL)
4506 /* Mid architecture creation: pass just the obstack, and not
4507 the entire architecture, as that way it isn't possible for
4508 pre-init code to refer to undefined architecture
4510 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4511 else if (gdbarch->initialized_p
4512 && data->post_init != NULL)
4513 /* Post architecture creation: pass the entire architecture
4514 (as all fields are valid), but be careful to also detect
4515 recursive references. */
4517 gdb_assert (data->init_p);
4519 gdbarch->data[data->index] = data->post_init (gdbarch);
4523 /* The architecture initialization hasn't completed - punt -
4524 hope that the caller knows what they are doing. Once
4525 deprecated_set_gdbarch_data has been initialized, this can be
4526 changed to an internal error. */
4528 gdb_assert (gdbarch->data[data->index] != NULL);
4530 return gdbarch->data[data->index];
4534 /* Keep a registry of the architectures known by GDB. */
4536 struct gdbarch_registration
4538 enum bfd_architecture bfd_architecture;
4539 gdbarch_init_ftype *init;
4540 gdbarch_dump_tdep_ftype *dump_tdep;
4541 struct gdbarch_list *arches;
4542 struct gdbarch_registration *next;
4545 static struct gdbarch_registration *gdbarch_registry = NULL;
4548 append_name (const char ***buf, int *nr, const char *name)
4550 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4556 gdbarch_printable_names (void)
4558 /* Accumulate a list of names based on the registed list of
4561 const char **arches = NULL;
4562 struct gdbarch_registration *rego;
4564 for (rego = gdbarch_registry;
4568 const struct bfd_arch_info *ap;
4569 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4571 internal_error (__FILE__, __LINE__,
4572 _("gdbarch_architecture_names: multi-arch unknown"));
4575 append_name (&arches, &nr_arches, ap->printable_name);
4580 append_name (&arches, &nr_arches, NULL);
4586 gdbarch_register (enum bfd_architecture bfd_architecture,
4587 gdbarch_init_ftype *init,
4588 gdbarch_dump_tdep_ftype *dump_tdep)
4590 struct gdbarch_registration **curr;
4591 const struct bfd_arch_info *bfd_arch_info;
4593 /* Check that BFD recognizes this architecture */
4594 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4595 if (bfd_arch_info == NULL)
4597 internal_error (__FILE__, __LINE__,
4598 _("gdbarch: Attempt to register "
4599 "unknown architecture (%d)"),
4602 /* Check that we haven't seen this architecture before. */
4603 for (curr = &gdbarch_registry;
4605 curr = &(*curr)->next)
4607 if (bfd_architecture == (*curr)->bfd_architecture)
4608 internal_error (__FILE__, __LINE__,
4609 _("gdbarch: Duplicate registration "
4610 "of architecture (%s)"),
4611 bfd_arch_info->printable_name);
4615 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
4616 bfd_arch_info->printable_name,
4617 host_address_to_string (init));
4619 (*curr) = XNEW (struct gdbarch_registration);
4620 (*curr)->bfd_architecture = bfd_architecture;
4621 (*curr)->init = init;
4622 (*curr)->dump_tdep = dump_tdep;
4623 (*curr)->arches = NULL;
4624 (*curr)->next = NULL;
4628 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4629 gdbarch_init_ftype *init)
4631 gdbarch_register (bfd_architecture, init, NULL);
4635 /* Look for an architecture using gdbarch_info. */
4637 struct gdbarch_list *
4638 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4639 const struct gdbarch_info *info)
4641 for (; arches != NULL; arches = arches->next)
4643 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4645 if (info->byte_order != arches->gdbarch->byte_order)
4647 if (info->osabi != arches->gdbarch->osabi)
4649 if (info->target_desc != arches->gdbarch->target_desc)
4657 /* Find an architecture that matches the specified INFO. Create a new
4658 architecture if needed. Return that new architecture. */
4661 gdbarch_find_by_info (struct gdbarch_info info)
4663 struct gdbarch *new_gdbarch;
4664 struct gdbarch_registration *rego;
4666 /* Fill in missing parts of the INFO struct using a number of
4667 sources: "set ..."; INFOabfd supplied; and the global
4669 gdbarch_info_fill (&info);
4671 /* Must have found some sort of architecture. */
4672 gdb_assert (info.bfd_arch_info != NULL);
4676 fprintf_unfiltered (gdb_stdlog,
4677 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4678 (info.bfd_arch_info != NULL
4679 ? info.bfd_arch_info->printable_name
4681 fprintf_unfiltered (gdb_stdlog,
4682 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4684 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4685 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4687 fprintf_unfiltered (gdb_stdlog,
4688 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4689 info.osabi, gdbarch_osabi_name (info.osabi));
4690 fprintf_unfiltered (gdb_stdlog,
4691 "gdbarch_find_by_info: info.abfd %s\n",
4692 host_address_to_string (info.abfd));
4693 fprintf_unfiltered (gdb_stdlog,
4694 "gdbarch_find_by_info: info.tdep_info %s\n",
4695 host_address_to_string (info.tdep_info));
4698 /* Find the tdep code that knows about this architecture. */
4699 for (rego = gdbarch_registry;
4702 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4707 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4708 "No matching architecture\n");
4712 /* Ask the tdep code for an architecture that matches "info". */
4713 new_gdbarch = rego->init (info, rego->arches);
4715 /* Did the tdep code like it? No. Reject the change and revert to
4716 the old architecture. */
4717 if (new_gdbarch == NULL)
4720 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4721 "Target rejected architecture\n");
4725 /* Is this a pre-existing architecture (as determined by already
4726 being initialized)? Move it to the front of the architecture
4727 list (keeping the list sorted Most Recently Used). */
4728 if (new_gdbarch->initialized_p)
4730 struct gdbarch_list **list;
4731 struct gdbarch_list *this;
4733 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4734 "Previous architecture %s (%s) selected\n",
4735 host_address_to_string (new_gdbarch),
4736 new_gdbarch->bfd_arch_info->printable_name);
4737 /* Find the existing arch in the list. */
4738 for (list = ®o->arches;
4739 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4740 list = &(*list)->next);
4741 /* It had better be in the list of architectures. */
4742 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4745 (*list) = this->next;
4746 /* Insert THIS at the front. */
4747 this->next = rego->arches;
4748 rego->arches = this;
4753 /* It's a new architecture. */
4755 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4756 "New architecture %s (%s) selected\n",
4757 host_address_to_string (new_gdbarch),
4758 new_gdbarch->bfd_arch_info->printable_name);
4760 /* Insert the new architecture into the front of the architecture
4761 list (keep the list sorted Most Recently Used). */
4763 struct gdbarch_list *this = XNEW (struct gdbarch_list);
4764 this->next = rego->arches;
4765 this->gdbarch = new_gdbarch;
4766 rego->arches = this;
4769 /* Check that the newly installed architecture is valid. Plug in
4770 any post init values. */
4771 new_gdbarch->dump_tdep = rego->dump_tdep;
4772 verify_gdbarch (new_gdbarch);
4773 new_gdbarch->initialized_p = 1;
4776 gdbarch_dump (new_gdbarch, gdb_stdlog);
4781 /* Make the specified architecture current. */
4784 set_target_gdbarch (struct gdbarch *new_gdbarch)
4786 gdb_assert (new_gdbarch != NULL);
4787 gdb_assert (new_gdbarch->initialized_p);
4788 current_inferior ()->gdbarch = new_gdbarch;
4789 observer_notify_architecture_changed (new_gdbarch);
4790 registers_changed ();
4793 /* Return the current inferior's arch. */
4796 target_gdbarch (void)
4798 return current_inferior ()->gdbarch;
4801 extern void _initialize_gdbarch (void);
4804 _initialize_gdbarch (void)
4806 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4807 Set architecture debugging."), _("\
4808 Show architecture debugging."), _("\
4809 When non-zero, architecture debugging is enabled."),
4812 &setdebuglist, &showdebuglist);