313502b6afde5d670245021f7021f78d2dc038a0
[binutils-gdb.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
2 /* vi:set ro: */
3
4 /* Dynamic architecture support for GDB, the GNU debugger.
5
6 Copyright (C) 1998-2016 Free Software Foundation, Inc.
7
8 This file is part of GDB.
9
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.
14
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.
19
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/>. */
22
23 /* This file was created with the aid of ``gdbarch.sh''.
24
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
28 being reported.
29
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
33 easier. */
34
35
36 #include "defs.h"
37 #include "arch-utils.h"
38
39 #include "gdbcmd.h"
40 #include "inferior.h"
41 #include "symcat.h"
42
43 #include "floatformat.h"
44 #include "reggroups.h"
45 #include "osabi.h"
46 #include "gdb_obstack.h"
47 #include "observer.h"
48 #include "regcache.h"
49 #include "objfiles.h"
50
51 /* Static function declarations */
52
53 static void alloc_gdbarch_data (struct gdbarch *);
54
55 /* Non-zero if we want to trace architecture code. */
56
57 #ifndef GDBARCH_DEBUG
58 #define GDBARCH_DEBUG 0
59 #endif
60 unsigned int gdbarch_debug = GDBARCH_DEBUG;
61 static void
62 show_gdbarch_debug (struct ui_file *file, int from_tty,
63 struct cmd_list_element *c, const char *value)
64 {
65 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
66 }
67
68 static const char *
69 pformat (const struct floatformat **format)
70 {
71 if (format == NULL)
72 return "(null)";
73 else
74 /* Just print out one of them - this is only for diagnostics. */
75 return format[0]->name;
76 }
77
78 static const char *
79 pstring (const char *string)
80 {
81 if (string == NULL)
82 return "(null)";
83 return string;
84 }
85
86 /* Helper function to print a list of strings, represented as "const
87 char *const *". The list is printed comma-separated. */
88
89 static char *
90 pstring_list (const char *const *list)
91 {
92 static char ret[100];
93 const char *const *p;
94 size_t offset = 0;
95
96 if (list == NULL)
97 return "(null)";
98
99 ret[0] = '\0';
100 for (p = list; *p != NULL && offset < sizeof (ret); ++p)
101 {
102 size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p);
103 offset += 2 + s;
104 }
105
106 if (offset > 0)
107 {
108 gdb_assert (offset - 2 < sizeof (ret));
109 ret[offset - 2] = '\0';
110 }
111
112 return ret;
113 }
114
115
116 /* Maintain the struct gdbarch object. */
117
118 struct gdbarch
119 {
120 /* Has this architecture been fully initialized? */
121 int initialized_p;
122
123 /* An obstack bound to the lifetime of the architecture. */
124 struct obstack *obstack;
125
126 /* basic architectural information. */
127 const struct bfd_arch_info * bfd_arch_info;
128 enum bfd_endian byte_order;
129 enum bfd_endian byte_order_for_code;
130 enum gdb_osabi osabi;
131 const struct target_desc * target_desc;
132
133 /* target specific vector. */
134 struct gdbarch_tdep *tdep;
135 gdbarch_dump_tdep_ftype *dump_tdep;
136
137 /* per-architecture data-pointers. */
138 unsigned nr_data;
139 void **data;
140
141 /* Multi-arch values.
142
143 When extending this structure you must:
144
145 Add the field below.
146
147 Declare set/get functions and define the corresponding
148 macro in gdbarch.h.
149
150 gdbarch_alloc(): If zero/NULL is not a suitable default,
151 initialize the new field.
152
153 verify_gdbarch(): Confirm that the target updated the field
154 correctly.
155
156 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
157 field is dumped out
158
159 get_gdbarch(): Implement the set/get functions (probably using
160 the macro's as shortcuts).
161
162 */
163
164 int bits_big_endian;
165 int short_bit;
166 int int_bit;
167 int long_bit;
168 int long_long_bit;
169 int long_long_align_bit;
170 int half_bit;
171 const struct floatformat ** half_format;
172 int float_bit;
173 const struct floatformat ** float_format;
174 int double_bit;
175 const struct floatformat ** double_format;
176 int long_double_bit;
177 const struct floatformat ** long_double_format;
178 int ptr_bit;
179 int addr_bit;
180 int dwarf2_addr_size;
181 int char_signed;
182 gdbarch_read_pc_ftype *read_pc;
183 gdbarch_write_pc_ftype *write_pc;
184 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
185 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
186 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
187 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
188 int num_regs;
189 int num_pseudo_regs;
190 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
191 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
192 gdbarch_handle_segmentation_fault_ftype *handle_segmentation_fault;
193 int sp_regnum;
194 int pc_regnum;
195 int ps_regnum;
196 int fp0_regnum;
197 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
198 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
199 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
200 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
201 gdbarch_register_name_ftype *register_name;
202 gdbarch_register_type_ftype *register_type;
203 gdbarch_dummy_id_ftype *dummy_id;
204 int deprecated_fp_regnum;
205 gdbarch_push_dummy_call_ftype *push_dummy_call;
206 int call_dummy_location;
207 gdbarch_push_dummy_code_ftype *push_dummy_code;
208 gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
209 gdbarch_print_registers_info_ftype *print_registers_info;
210 gdbarch_print_float_info_ftype *print_float_info;
211 gdbarch_print_vector_info_ftype *print_vector_info;
212 gdbarch_register_sim_regno_ftype *register_sim_regno;
213 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
214 gdbarch_cannot_store_register_ftype *cannot_store_register;
215 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
216 int believe_pcc_promotion;
217 gdbarch_convert_register_p_ftype *convert_register_p;
218 gdbarch_register_to_value_ftype *register_to_value;
219 gdbarch_value_to_register_ftype *value_to_register;
220 gdbarch_value_from_register_ftype *value_from_register;
221 gdbarch_pointer_to_address_ftype *pointer_to_address;
222 gdbarch_address_to_pointer_ftype *address_to_pointer;
223 gdbarch_integer_to_address_ftype *integer_to_address;
224 gdbarch_return_value_ftype *return_value;
225 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
226 gdbarch_skip_prologue_ftype *skip_prologue;
227 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
228 gdbarch_skip_entrypoint_ftype *skip_entrypoint;
229 gdbarch_inner_than_ftype *inner_than;
230 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
231 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
232 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
233 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
234 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
235 CORE_ADDR decr_pc_after_break;
236 CORE_ADDR deprecated_function_start_offset;
237 gdbarch_remote_register_number_ftype *remote_register_number;
238 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
239 CORE_ADDR frame_args_skip;
240 gdbarch_unwind_pc_ftype *unwind_pc;
241 gdbarch_unwind_sp_ftype *unwind_sp;
242 gdbarch_frame_num_args_ftype *frame_num_args;
243 gdbarch_frame_align_ftype *frame_align;
244 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
245 int frame_red_zone_size;
246 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
247 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
248 gdbarch_software_single_step_ftype *software_single_step;
249 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
250 gdbarch_print_insn_ftype *print_insn;
251 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
252 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
253 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
254 gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
255 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
256 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
257 gdbarch_make_symbol_special_ftype *make_symbol_special;
258 gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr;
259 gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line;
260 int cannot_step_breakpoint;
261 int have_nonsteppable_watchpoint;
262 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
263 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
264 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
265 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
266 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
267 gdbarch_iterate_over_regset_sections_ftype *iterate_over_regset_sections;
268 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
269 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo;
270 gdbarch_find_memory_regions_ftype *find_memory_regions;
271 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
272 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix;
273 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
274 gdbarch_core_thread_name_ftype *core_thread_name;
275 const char * gcore_bfd_target;
276 int vtable_function_descriptors;
277 int vbit_in_delta;
278 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
279 ULONGEST max_insn_length;
280 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
281 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
282 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
283 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
284 gdbarch_displaced_step_location_ftype *displaced_step_location;
285 gdbarch_relocate_instruction_ftype *relocate_instruction;
286 gdbarch_overlay_update_ftype *overlay_update;
287 gdbarch_core_read_description_ftype *core_read_description;
288 gdbarch_static_transform_name_ftype *static_transform_name;
289 int sofun_address_maybe_missing;
290 gdbarch_process_record_ftype *process_record;
291 gdbarch_process_record_signal_ftype *process_record_signal;
292 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
293 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target;
294 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
295 gdbarch_record_special_symbol_ftype *record_special_symbol;
296 gdbarch_get_syscall_number_ftype *get_syscall_number;
297 const char * xml_syscall_file;
298 struct syscalls_info * syscalls_info;
299 const char *const * stap_integer_prefixes;
300 const char *const * stap_integer_suffixes;
301 const char *const * stap_register_prefixes;
302 const char *const * stap_register_suffixes;
303 const char *const * stap_register_indirection_prefixes;
304 const char *const * stap_register_indirection_suffixes;
305 const char * stap_gdb_register_prefix;
306 const char * stap_gdb_register_suffix;
307 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
308 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
309 gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
310 gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
311 gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
312 gdbarch_dtrace_disable_probe_ftype *dtrace_disable_probe;
313 int has_global_solist;
314 int has_global_breakpoints;
315 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
316 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
317 gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers;
318 gdbarch_auto_charset_ftype *auto_charset;
319 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
320 const char * solib_symbols_extension;
321 int has_dos_based_file_system;
322 gdbarch_gen_return_address_ftype *gen_return_address;
323 gdbarch_info_proc_ftype *info_proc;
324 gdbarch_core_info_proc_ftype *core_info_proc;
325 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
326 struct ravenscar_arch_ops * ravenscar_ops;
327 gdbarch_insn_is_call_ftype *insn_is_call;
328 gdbarch_insn_is_ret_ftype *insn_is_ret;
329 gdbarch_insn_is_jump_ftype *insn_is_jump;
330 gdbarch_auxv_parse_ftype *auxv_parse;
331 gdbarch_vsyscall_range_ftype *vsyscall_range;
332 gdbarch_infcall_mmap_ftype *infcall_mmap;
333 gdbarch_infcall_munmap_ftype *infcall_munmap;
334 gdbarch_gcc_target_options_ftype *gcc_target_options;
335 gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp;
336 gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size;
337 };
338
339 /* Create a new ``struct gdbarch'' based on information provided by
340 ``struct gdbarch_info''. */
341
342 struct gdbarch *
343 gdbarch_alloc (const struct gdbarch_info *info,
344 struct gdbarch_tdep *tdep)
345 {
346 struct gdbarch *gdbarch;
347
348 /* Create an obstack for allocating all the per-architecture memory,
349 then use that to allocate the architecture vector. */
350 struct obstack *obstack = XNEW (struct obstack);
351 obstack_init (obstack);
352 gdbarch = XOBNEW (obstack, struct gdbarch);
353 memset (gdbarch, 0, sizeof (*gdbarch));
354 gdbarch->obstack = obstack;
355
356 alloc_gdbarch_data (gdbarch);
357
358 gdbarch->tdep = tdep;
359
360 gdbarch->bfd_arch_info = info->bfd_arch_info;
361 gdbarch->byte_order = info->byte_order;
362 gdbarch->byte_order_for_code = info->byte_order_for_code;
363 gdbarch->osabi = info->osabi;
364 gdbarch->target_desc = info->target_desc;
365
366 /* Force the explicit initialization of these. */
367 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
368 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
369 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
370 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
371 gdbarch->long_long_bit = 2*gdbarch->long_bit;
372 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
373 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
374 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
375 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
376 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
377 gdbarch->ptr_bit = gdbarch->int_bit;
378 gdbarch->char_signed = -1;
379 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
380 gdbarch->num_regs = -1;
381 gdbarch->sp_regnum = -1;
382 gdbarch->pc_regnum = -1;
383 gdbarch->ps_regnum = -1;
384 gdbarch->fp0_regnum = -1;
385 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
386 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
387 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
388 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
389 gdbarch->deprecated_fp_regnum = -1;
390 gdbarch->call_dummy_location = AT_ENTRY_POINT;
391 gdbarch->code_of_frame_writable = default_code_of_frame_writable;
392 gdbarch->print_registers_info = default_print_registers_info;
393 gdbarch->print_float_info = default_print_float_info;
394 gdbarch->register_sim_regno = legacy_register_sim_regno;
395 gdbarch->cannot_fetch_register = cannot_register_not;
396 gdbarch->cannot_store_register = cannot_register_not;
397 gdbarch->convert_register_p = generic_convert_register_p;
398 gdbarch->value_from_register = default_value_from_register;
399 gdbarch->pointer_to_address = unsigned_pointer_to_address;
400 gdbarch->address_to_pointer = unsigned_address_to_pointer;
401 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
402 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
403 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
404 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
405 gdbarch->remote_register_number = default_remote_register_number;
406 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
407 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
408 gdbarch->addr_bits_remove = core_addr_identity;
409 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
410 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
411 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
412 gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
413 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
414 gdbarch->make_symbol_special = default_make_symbol_special;
415 gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
416 gdbarch->adjust_dwarf2_line = default_adjust_dwarf2_line;
417 gdbarch->register_reggroup_p = default_register_reggroup_p;
418 gdbarch->skip_permanent_breakpoint = default_skip_permanent_breakpoint;
419 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
420 gdbarch->displaced_step_fixup = NULL;
421 gdbarch->displaced_step_free_closure = NULL;
422 gdbarch->displaced_step_location = NULL;
423 gdbarch->relocate_instruction = NULL;
424 gdbarch->has_shared_address_space = default_has_shared_address_space;
425 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
426 gdbarch->guess_tracepoint_registers = default_guess_tracepoint_registers;
427 gdbarch->auto_charset = default_auto_charset;
428 gdbarch->auto_wide_charset = default_auto_wide_charset;
429 gdbarch->gen_return_address = default_gen_return_address;
430 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
431 gdbarch->ravenscar_ops = NULL;
432 gdbarch->insn_is_call = default_insn_is_call;
433 gdbarch->insn_is_ret = default_insn_is_ret;
434 gdbarch->insn_is_jump = default_insn_is_jump;
435 gdbarch->vsyscall_range = default_vsyscall_range;
436 gdbarch->infcall_mmap = default_infcall_mmap;
437 gdbarch->infcall_munmap = default_infcall_munmap;
438 gdbarch->gcc_target_options = default_gcc_target_options;
439 gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
440 gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
441 /* gdbarch_alloc() */
442
443 return gdbarch;
444 }
445
446
447 /* Allocate extra space using the per-architecture obstack. */
448
449 void *
450 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
451 {
452 void *data = obstack_alloc (arch->obstack, size);
453
454 memset (data, 0, size);
455 return data;
456 }
457
458 /* See gdbarch.h. */
459
460 char *
461 gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
462 {
463 return obstack_strdup (arch->obstack, string);
464 }
465
466
467 /* Free a gdbarch struct. This should never happen in normal
468 operation --- once you've created a gdbarch, you keep it around.
469 However, if an architecture's init function encounters an error
470 building the structure, it may need to clean up a partially
471 constructed gdbarch. */
472
473 void
474 gdbarch_free (struct gdbarch *arch)
475 {
476 struct obstack *obstack;
477
478 gdb_assert (arch != NULL);
479 gdb_assert (!arch->initialized_p);
480 obstack = arch->obstack;
481 obstack_free (obstack, 0); /* Includes the ARCH. */
482 xfree (obstack);
483 }
484
485
486 /* Ensure that all values in a GDBARCH are reasonable. */
487
488 static void
489 verify_gdbarch (struct gdbarch *gdbarch)
490 {
491 struct ui_file *log;
492 struct cleanup *cleanups;
493 long length;
494 char *buf;
495
496 log = mem_fileopen ();
497 cleanups = make_cleanup_ui_file_delete (log);
498 /* fundamental */
499 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
500 fprintf_unfiltered (log, "\n\tbyte-order");
501 if (gdbarch->bfd_arch_info == NULL)
502 fprintf_unfiltered (log, "\n\tbfd_arch_info");
503 /* Check those that need to be defined for the given multi-arch level. */
504 /* Skip verify of bits_big_endian, invalid_p == 0 */
505 /* Skip verify of short_bit, invalid_p == 0 */
506 /* Skip verify of int_bit, invalid_p == 0 */
507 /* Skip verify of long_bit, invalid_p == 0 */
508 /* Skip verify of long_long_bit, invalid_p == 0 */
509 /* Skip verify of long_long_align_bit, invalid_p == 0 */
510 /* Skip verify of half_bit, invalid_p == 0 */
511 if (gdbarch->half_format == 0)
512 gdbarch->half_format = floatformats_ieee_half;
513 /* Skip verify of float_bit, invalid_p == 0 */
514 if (gdbarch->float_format == 0)
515 gdbarch->float_format = floatformats_ieee_single;
516 /* Skip verify of double_bit, invalid_p == 0 */
517 if (gdbarch->double_format == 0)
518 gdbarch->double_format = floatformats_ieee_double;
519 /* Skip verify of long_double_bit, invalid_p == 0 */
520 if (gdbarch->long_double_format == 0)
521 gdbarch->long_double_format = floatformats_ieee_double;
522 /* Skip verify of ptr_bit, invalid_p == 0 */
523 if (gdbarch->addr_bit == 0)
524 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
525 if (gdbarch->dwarf2_addr_size == 0)
526 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
527 if (gdbarch->char_signed == -1)
528 gdbarch->char_signed = 1;
529 /* Skip verify of read_pc, has predicate. */
530 /* Skip verify of write_pc, has predicate. */
531 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
532 /* Skip verify of pseudo_register_read, has predicate. */
533 /* Skip verify of pseudo_register_read_value, has predicate. */
534 /* Skip verify of pseudo_register_write, has predicate. */
535 if (gdbarch->num_regs == -1)
536 fprintf_unfiltered (log, "\n\tnum_regs");
537 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
538 /* Skip verify of ax_pseudo_register_collect, has predicate. */
539 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
540 /* Skip verify of handle_segmentation_fault, has predicate. */
541 /* Skip verify of sp_regnum, invalid_p == 0 */
542 /* Skip verify of pc_regnum, invalid_p == 0 */
543 /* Skip verify of ps_regnum, invalid_p == 0 */
544 /* Skip verify of fp0_regnum, invalid_p == 0 */
545 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
546 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
547 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
548 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
549 if (gdbarch->register_name == 0)
550 fprintf_unfiltered (log, "\n\tregister_name");
551 /* Skip verify of register_type, has predicate. */
552 /* Skip verify of dummy_id, has predicate. */
553 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
554 /* Skip verify of push_dummy_call, has predicate. */
555 /* Skip verify of call_dummy_location, invalid_p == 0 */
556 /* Skip verify of push_dummy_code, has predicate. */
557 /* Skip verify of code_of_frame_writable, invalid_p == 0 */
558 /* Skip verify of print_registers_info, invalid_p == 0 */
559 /* Skip verify of print_float_info, invalid_p == 0 */
560 /* Skip verify of print_vector_info, has predicate. */
561 /* Skip verify of register_sim_regno, invalid_p == 0 */
562 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
563 /* Skip verify of cannot_store_register, invalid_p == 0 */
564 /* Skip verify of get_longjmp_target, has predicate. */
565 /* Skip verify of convert_register_p, invalid_p == 0 */
566 /* Skip verify of value_from_register, invalid_p == 0 */
567 /* Skip verify of pointer_to_address, invalid_p == 0 */
568 /* Skip verify of address_to_pointer, invalid_p == 0 */
569 /* Skip verify of integer_to_address, has predicate. */
570 /* Skip verify of return_value, has predicate. */
571 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
572 if (gdbarch->skip_prologue == 0)
573 fprintf_unfiltered (log, "\n\tskip_prologue");
574 /* Skip verify of skip_main_prologue, has predicate. */
575 /* Skip verify of skip_entrypoint, has predicate. */
576 if (gdbarch->inner_than == 0)
577 fprintf_unfiltered (log, "\n\tinner_than");
578 if (gdbarch->breakpoint_from_pc == 0)
579 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
580 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
581 /* Skip verify of adjust_breakpoint_address, has predicate. */
582 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
583 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
584 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
585 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
586 /* Skip verify of remote_register_number, invalid_p == 0 */
587 /* Skip verify of fetch_tls_load_module_address, has predicate. */
588 /* Skip verify of frame_args_skip, invalid_p == 0 */
589 /* Skip verify of unwind_pc, has predicate. */
590 /* Skip verify of unwind_sp, has predicate. */
591 /* Skip verify of frame_num_args, has predicate. */
592 /* Skip verify of frame_align, has predicate. */
593 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
594 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
595 /* Skip verify of addr_bits_remove, invalid_p == 0 */
596 /* Skip verify of software_single_step, has predicate. */
597 /* Skip verify of single_step_through_delay, has predicate. */
598 if (gdbarch->print_insn == 0)
599 fprintf_unfiltered (log, "\n\tprint_insn");
600 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
601 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
602 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
603 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
604 /* Skip verify of elf_make_msymbol_special, has predicate. */
605 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
606 /* Skip verify of make_symbol_special, invalid_p == 0 */
607 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
608 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
609 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
610 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
611 /* Skip verify of address_class_type_flags, has predicate. */
612 /* Skip verify of address_class_type_flags_to_name, has predicate. */
613 /* Skip verify of address_class_name_to_type_flags, has predicate. */
614 /* Skip verify of register_reggroup_p, invalid_p == 0 */
615 /* Skip verify of fetch_pointer_argument, has predicate. */
616 /* Skip verify of iterate_over_regset_sections, has predicate. */
617 /* Skip verify of make_corefile_notes, has predicate. */
618 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
619 /* Skip verify of find_memory_regions, has predicate. */
620 /* Skip verify of core_xfer_shared_libraries, has predicate. */
621 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
622 /* Skip verify of core_pid_to_str, has predicate. */
623 /* Skip verify of core_thread_name, has predicate. */
624 /* Skip verify of gcore_bfd_target, has predicate. */
625 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
626 /* Skip verify of vbit_in_delta, invalid_p == 0 */
627 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
628 /* Skip verify of max_insn_length, has predicate. */
629 /* Skip verify of displaced_step_copy_insn, has predicate. */
630 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
631 /* Skip verify of displaced_step_fixup, has predicate. */
632 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
633 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
634 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
635 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
636 /* Skip verify of relocate_instruction, has predicate. */
637 /* Skip verify of overlay_update, has predicate. */
638 /* Skip verify of core_read_description, has predicate. */
639 /* Skip verify of static_transform_name, has predicate. */
640 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
641 /* Skip verify of process_record, has predicate. */
642 /* Skip verify of process_record_signal, has predicate. */
643 /* Skip verify of gdb_signal_from_target, has predicate. */
644 /* Skip verify of gdb_signal_to_target, has predicate. */
645 /* Skip verify of get_siginfo_type, has predicate. */
646 /* Skip verify of record_special_symbol, has predicate. */
647 /* Skip verify of get_syscall_number, has predicate. */
648 /* Skip verify of xml_syscall_file, invalid_p == 0 */
649 /* Skip verify of syscalls_info, invalid_p == 0 */
650 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
651 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
652 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
653 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
654 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
655 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
656 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
657 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
658 /* Skip verify of stap_is_single_operand, has predicate. */
659 /* Skip verify of stap_parse_special_token, has predicate. */
660 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
661 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
662 /* Skip verify of dtrace_enable_probe, has predicate. */
663 /* Skip verify of dtrace_disable_probe, has predicate. */
664 /* Skip verify of has_global_solist, invalid_p == 0 */
665 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
666 /* Skip verify of has_shared_address_space, invalid_p == 0 */
667 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
668 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
669 /* Skip verify of auto_charset, invalid_p == 0 */
670 /* Skip verify of auto_wide_charset, invalid_p == 0 */
671 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
672 /* Skip verify of gen_return_address, invalid_p == 0 */
673 /* Skip verify of info_proc, has predicate. */
674 /* Skip verify of core_info_proc, has predicate. */
675 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
676 /* Skip verify of ravenscar_ops, invalid_p == 0 */
677 /* Skip verify of insn_is_call, invalid_p == 0 */
678 /* Skip verify of insn_is_ret, invalid_p == 0 */
679 /* Skip verify of insn_is_jump, invalid_p == 0 */
680 /* Skip verify of auxv_parse, has predicate. */
681 /* Skip verify of vsyscall_range, invalid_p == 0 */
682 /* Skip verify of infcall_mmap, invalid_p == 0 */
683 /* Skip verify of infcall_munmap, invalid_p == 0 */
684 /* Skip verify of gcc_target_options, invalid_p == 0 */
685 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
686 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
687 buf = ui_file_xstrdup (log, &length);
688 make_cleanup (xfree, buf);
689 if (length > 0)
690 internal_error (__FILE__, __LINE__,
691 _("verify_gdbarch: the following are invalid ...%s"),
692 buf);
693 do_cleanups (cleanups);
694 }
695
696
697 /* Print out the details of the current architecture. */
698
699 void
700 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
701 {
702 const char *gdb_nm_file = "<not-defined>";
703
704 #if defined (GDB_NM_FILE)
705 gdb_nm_file = GDB_NM_FILE;
706 #endif
707 fprintf_unfiltered (file,
708 "gdbarch_dump: GDB_NM_FILE = %s\n",
709 gdb_nm_file);
710 fprintf_unfiltered (file,
711 "gdbarch_dump: addr_bit = %s\n",
712 plongest (gdbarch->addr_bit));
713 fprintf_unfiltered (file,
714 "gdbarch_dump: addr_bits_remove = <%s>\n",
715 host_address_to_string (gdbarch->addr_bits_remove));
716 fprintf_unfiltered (file,
717 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
718 gdbarch_address_class_name_to_type_flags_p (gdbarch));
719 fprintf_unfiltered (file,
720 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
721 host_address_to_string (gdbarch->address_class_name_to_type_flags));
722 fprintf_unfiltered (file,
723 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
724 gdbarch_address_class_type_flags_p (gdbarch));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: address_class_type_flags = <%s>\n",
727 host_address_to_string (gdbarch->address_class_type_flags));
728 fprintf_unfiltered (file,
729 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
730 gdbarch_address_class_type_flags_to_name_p (gdbarch));
731 fprintf_unfiltered (file,
732 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
733 host_address_to_string (gdbarch->address_class_type_flags_to_name));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: address_to_pointer = <%s>\n",
736 host_address_to_string (gdbarch->address_to_pointer));
737 fprintf_unfiltered (file,
738 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
739 host_address_to_string (gdbarch->addressable_memory_unit_size));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
742 gdbarch_adjust_breakpoint_address_p (gdbarch));
743 fprintf_unfiltered (file,
744 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
745 host_address_to_string (gdbarch->adjust_breakpoint_address));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
748 host_address_to_string (gdbarch->adjust_dwarf2_addr));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
751 host_address_to_string (gdbarch->adjust_dwarf2_line));
752 fprintf_unfiltered (file,
753 "gdbarch_dump: auto_charset = <%s>\n",
754 host_address_to_string (gdbarch->auto_charset));
755 fprintf_unfiltered (file,
756 "gdbarch_dump: auto_wide_charset = <%s>\n",
757 host_address_to_string (gdbarch->auto_wide_charset));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
760 gdbarch_auxv_parse_p (gdbarch));
761 fprintf_unfiltered (file,
762 "gdbarch_dump: auxv_parse = <%s>\n",
763 host_address_to_string (gdbarch->auxv_parse));
764 fprintf_unfiltered (file,
765 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
766 gdbarch_ax_pseudo_register_collect_p (gdbarch));
767 fprintf_unfiltered (file,
768 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
769 host_address_to_string (gdbarch->ax_pseudo_register_collect));
770 fprintf_unfiltered (file,
771 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
772 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
773 fprintf_unfiltered (file,
774 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
775 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
776 fprintf_unfiltered (file,
777 "gdbarch_dump: believe_pcc_promotion = %s\n",
778 plongest (gdbarch->believe_pcc_promotion));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: bfd_arch_info = %s\n",
781 gdbarch_bfd_arch_info (gdbarch)->printable_name);
782 fprintf_unfiltered (file,
783 "gdbarch_dump: bits_big_endian = %s\n",
784 plongest (gdbarch->bits_big_endian));
785 fprintf_unfiltered (file,
786 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
787 host_address_to_string (gdbarch->breakpoint_from_pc));
788 fprintf_unfiltered (file,
789 "gdbarch_dump: byte_order = %s\n",
790 plongest (gdbarch->byte_order));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: byte_order_for_code = %s\n",
793 plongest (gdbarch->byte_order_for_code));
794 fprintf_unfiltered (file,
795 "gdbarch_dump: call_dummy_location = %s\n",
796 plongest (gdbarch->call_dummy_location));
797 fprintf_unfiltered (file,
798 "gdbarch_dump: cannot_fetch_register = <%s>\n",
799 host_address_to_string (gdbarch->cannot_fetch_register));
800 fprintf_unfiltered (file,
801 "gdbarch_dump: cannot_step_breakpoint = %s\n",
802 plongest (gdbarch->cannot_step_breakpoint));
803 fprintf_unfiltered (file,
804 "gdbarch_dump: cannot_store_register = <%s>\n",
805 host_address_to_string (gdbarch->cannot_store_register));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: char_signed = %s\n",
808 plongest (gdbarch->char_signed));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: code_of_frame_writable = <%s>\n",
811 host_address_to_string (gdbarch->code_of_frame_writable));
812 fprintf_unfiltered (file,
813 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
814 host_address_to_string (gdbarch->coff_make_msymbol_special));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
817 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: convert_register_p = <%s>\n",
820 host_address_to_string (gdbarch->convert_register_p));
821 fprintf_unfiltered (file,
822 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
823 gdbarch_core_info_proc_p (gdbarch));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: core_info_proc = <%s>\n",
826 host_address_to_string (gdbarch->core_info_proc));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
829 gdbarch_core_pid_to_str_p (gdbarch));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: core_pid_to_str = <%s>\n",
832 host_address_to_string (gdbarch->core_pid_to_str));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
835 gdbarch_core_read_description_p (gdbarch));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: core_read_description = <%s>\n",
838 host_address_to_string (gdbarch->core_read_description));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
841 gdbarch_core_thread_name_p (gdbarch));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: core_thread_name = <%s>\n",
844 host_address_to_string (gdbarch->core_thread_name));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
847 gdbarch_core_xfer_shared_libraries_p (gdbarch));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
850 host_address_to_string (gdbarch->core_xfer_shared_libraries));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
853 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
856 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: decr_pc_after_break = %s\n",
859 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: deprecated_fp_regnum = %s\n",
862 plongest (gdbarch->deprecated_fp_regnum));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: deprecated_function_start_offset = %s\n",
865 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
868 gdbarch_displaced_step_copy_insn_p (gdbarch));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
871 host_address_to_string (gdbarch->displaced_step_copy_insn));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
874 gdbarch_displaced_step_fixup_p (gdbarch));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: displaced_step_fixup = <%s>\n",
877 host_address_to_string (gdbarch->displaced_step_fixup));
878 fprintf_unfiltered (file,
879 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
880 host_address_to_string (gdbarch->displaced_step_free_closure));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
883 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: displaced_step_location = <%s>\n",
886 host_address_to_string (gdbarch->displaced_step_location));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: double_bit = %s\n",
889 plongest (gdbarch->double_bit));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: double_format = %s\n",
892 pformat (gdbarch->double_format));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
895 gdbarch_dtrace_disable_probe_p (gdbarch));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
898 host_address_to_string (gdbarch->dtrace_disable_probe));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
901 gdbarch_dtrace_enable_probe_p (gdbarch));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
904 host_address_to_string (gdbarch->dtrace_enable_probe));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
907 gdbarch_dtrace_parse_probe_argument_p (gdbarch));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
910 host_address_to_string (gdbarch->dtrace_parse_probe_argument));
911 fprintf_unfiltered (file,
912 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
913 gdbarch_dtrace_probe_is_enabled_p (gdbarch));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
916 host_address_to_string (gdbarch->dtrace_probe_is_enabled));
917 fprintf_unfiltered (file,
918 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
919 gdbarch_dummy_id_p (gdbarch));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: dummy_id = <%s>\n",
922 host_address_to_string (gdbarch->dummy_id));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: dwarf2_addr_size = %s\n",
925 plongest (gdbarch->dwarf2_addr_size));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
928 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
931 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
934 gdbarch_elf_make_msymbol_special_p (gdbarch));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
937 host_address_to_string (gdbarch->elf_make_msymbol_special));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
940 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
943 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
946 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
949 gdbarch_fetch_pointer_argument_p (gdbarch));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
952 host_address_to_string (gdbarch->fetch_pointer_argument));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
955 gdbarch_fetch_tls_load_module_address_p (gdbarch));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
958 host_address_to_string (gdbarch->fetch_tls_load_module_address));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
961 gdbarch_find_memory_regions_p (gdbarch));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: find_memory_regions = <%s>\n",
964 host_address_to_string (gdbarch->find_memory_regions));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: float_bit = %s\n",
967 plongest (gdbarch->float_bit));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: float_format = %s\n",
970 pformat (gdbarch->float_format));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: fp0_regnum = %s\n",
973 plongest (gdbarch->fp0_regnum));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
976 gdbarch_frame_align_p (gdbarch));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: frame_align = <%s>\n",
979 host_address_to_string (gdbarch->frame_align));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: frame_args_skip = %s\n",
982 core_addr_to_string_nz (gdbarch->frame_args_skip));
983 fprintf_unfiltered (file,
984 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
985 gdbarch_frame_num_args_p (gdbarch));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: frame_num_args = <%s>\n",
988 host_address_to_string (gdbarch->frame_num_args));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: frame_red_zone_size = %s\n",
991 plongest (gdbarch->frame_red_zone_size));
992 fprintf_unfiltered (file,
993 "gdbarch_dump: gcc_target_options = <%s>\n",
994 host_address_to_string (gdbarch->gcc_target_options));
995 fprintf_unfiltered (file,
996 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
997 gdbarch_gcore_bfd_target_p (gdbarch));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: gcore_bfd_target = %s\n",
1000 pstring (gdbarch->gcore_bfd_target));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1003 gdbarch_gdb_signal_from_target_p (gdbarch));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1006 host_address_to_string (gdbarch->gdb_signal_from_target));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1009 gdbarch_gdb_signal_to_target_p (gdbarch));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1012 host_address_to_string (gdbarch->gdb_signal_to_target));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: gen_return_address = <%s>\n",
1015 host_address_to_string (gdbarch->gen_return_address));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1018 gdbarch_get_longjmp_target_p (gdbarch));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: get_longjmp_target = <%s>\n",
1021 host_address_to_string (gdbarch->get_longjmp_target));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1024 gdbarch_get_siginfo_type_p (gdbarch));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: get_siginfo_type = <%s>\n",
1027 host_address_to_string (gdbarch->get_siginfo_type));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1030 gdbarch_get_syscall_number_p (gdbarch));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: get_syscall_number = <%s>\n",
1033 host_address_to_string (gdbarch->get_syscall_number));
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1036 host_address_to_string (gdbarch->gnu_triplet_regexp));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1039 host_address_to_string (gdbarch->guess_tracepoint_registers));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: half_bit = %s\n",
1042 plongest (gdbarch->half_bit));
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: half_format = %s\n",
1045 pformat (gdbarch->half_format));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
1048 gdbarch_handle_segmentation_fault_p (gdbarch));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: handle_segmentation_fault = <%s>\n",
1051 host_address_to_string (gdbarch->handle_segmentation_fault));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: has_dos_based_file_system = %s\n",
1054 plongest (gdbarch->has_dos_based_file_system));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: has_global_breakpoints = %s\n",
1057 plongest (gdbarch->has_global_breakpoints));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: has_global_solist = %s\n",
1060 plongest (gdbarch->has_global_solist));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: has_shared_address_space = <%s>\n",
1063 host_address_to_string (gdbarch->has_shared_address_space));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1066 plongest (gdbarch->have_nonsteppable_watchpoint));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1069 host_address_to_string (gdbarch->in_solib_return_trampoline));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: infcall_mmap = <%s>\n",
1072 host_address_to_string (gdbarch->infcall_mmap));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: infcall_munmap = <%s>\n",
1075 host_address_to_string (gdbarch->infcall_munmap));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1078 gdbarch_info_proc_p (gdbarch));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: info_proc = <%s>\n",
1081 host_address_to_string (gdbarch->info_proc));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: inner_than = <%s>\n",
1084 host_address_to_string (gdbarch->inner_than));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: insn_is_call = <%s>\n",
1087 host_address_to_string (gdbarch->insn_is_call));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: insn_is_jump = <%s>\n",
1090 host_address_to_string (gdbarch->insn_is_jump));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: insn_is_ret = <%s>\n",
1093 host_address_to_string (gdbarch->insn_is_ret));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: int_bit = %s\n",
1096 plongest (gdbarch->int_bit));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1099 gdbarch_integer_to_address_p (gdbarch));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: integer_to_address = <%s>\n",
1102 host_address_to_string (gdbarch->integer_to_address));
1103 fprintf_unfiltered (file,
1104 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1105 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1108 gdbarch_iterate_over_regset_sections_p (gdbarch));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1111 host_address_to_string (gdbarch->iterate_over_regset_sections));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: long_bit = %s\n",
1114 plongest (gdbarch->long_bit));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: long_double_bit = %s\n",
1117 plongest (gdbarch->long_double_bit));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: long_double_format = %s\n",
1120 pformat (gdbarch->long_double_format));
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: long_long_align_bit = %s\n",
1123 plongest (gdbarch->long_long_align_bit));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: long_long_bit = %s\n",
1126 plongest (gdbarch->long_long_bit));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1129 gdbarch_make_corefile_notes_p (gdbarch));
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: make_corefile_notes = <%s>\n",
1132 host_address_to_string (gdbarch->make_corefile_notes));
1133 fprintf_unfiltered (file,
1134 "gdbarch_dump: make_symbol_special = <%s>\n",
1135 host_address_to_string (gdbarch->make_symbol_special));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1138 gdbarch_max_insn_length_p (gdbarch));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: max_insn_length = %s\n",
1141 plongest (gdbarch->max_insn_length));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1144 host_address_to_string (gdbarch->memory_insert_breakpoint));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1147 host_address_to_string (gdbarch->memory_remove_breakpoint));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: num_pseudo_regs = %s\n",
1150 plongest (gdbarch->num_pseudo_regs));
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: num_regs = %s\n",
1153 plongest (gdbarch->num_regs));
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: osabi = %s\n",
1156 plongest (gdbarch->osabi));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1159 gdbarch_overlay_update_p (gdbarch));
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: overlay_update = <%s>\n",
1162 host_address_to_string (gdbarch->overlay_update));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: pc_regnum = %s\n",
1165 plongest (gdbarch->pc_regnum));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: pointer_to_address = <%s>\n",
1168 host_address_to_string (gdbarch->pointer_to_address));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: print_float_info = <%s>\n",
1171 host_address_to_string (gdbarch->print_float_info));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: print_insn = <%s>\n",
1174 host_address_to_string (gdbarch->print_insn));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: print_registers_info = <%s>\n",
1177 host_address_to_string (gdbarch->print_registers_info));
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1180 gdbarch_print_vector_info_p (gdbarch));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: print_vector_info = <%s>\n",
1183 host_address_to_string (gdbarch->print_vector_info));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1186 gdbarch_process_record_p (gdbarch));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: process_record = <%s>\n",
1189 host_address_to_string (gdbarch->process_record));
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1192 gdbarch_process_record_signal_p (gdbarch));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: process_record_signal = <%s>\n",
1195 host_address_to_string (gdbarch->process_record_signal));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: ps_regnum = %s\n",
1198 plongest (gdbarch->ps_regnum));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1201 gdbarch_pseudo_register_read_p (gdbarch));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: pseudo_register_read = <%s>\n",
1204 host_address_to_string (gdbarch->pseudo_register_read));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1207 gdbarch_pseudo_register_read_value_p (gdbarch));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1210 host_address_to_string (gdbarch->pseudo_register_read_value));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1213 gdbarch_pseudo_register_write_p (gdbarch));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: pseudo_register_write = <%s>\n",
1216 host_address_to_string (gdbarch->pseudo_register_write));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: ptr_bit = %s\n",
1219 plongest (gdbarch->ptr_bit));
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1222 gdbarch_push_dummy_call_p (gdbarch));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: push_dummy_call = <%s>\n",
1225 host_address_to_string (gdbarch->push_dummy_call));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1228 gdbarch_push_dummy_code_p (gdbarch));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: push_dummy_code = <%s>\n",
1231 host_address_to_string (gdbarch->push_dummy_code));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: ravenscar_ops = %s\n",
1234 host_address_to_string (gdbarch->ravenscar_ops));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1237 gdbarch_read_pc_p (gdbarch));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: read_pc = <%s>\n",
1240 host_address_to_string (gdbarch->read_pc));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1243 gdbarch_record_special_symbol_p (gdbarch));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: record_special_symbol = <%s>\n",
1246 host_address_to_string (gdbarch->record_special_symbol));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: register_name = <%s>\n",
1249 host_address_to_string (gdbarch->register_name));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: register_reggroup_p = <%s>\n",
1252 host_address_to_string (gdbarch->register_reggroup_p));
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: register_sim_regno = <%s>\n",
1255 host_address_to_string (gdbarch->register_sim_regno));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: register_to_value = <%s>\n",
1258 host_address_to_string (gdbarch->register_to_value));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1261 gdbarch_register_type_p (gdbarch));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: register_type = <%s>\n",
1264 host_address_to_string (gdbarch->register_type));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1267 gdbarch_relocate_instruction_p (gdbarch));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: relocate_instruction = <%s>\n",
1270 host_address_to_string (gdbarch->relocate_instruction));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1273 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: remote_register_number = <%s>\n",
1276 host_address_to_string (gdbarch->remote_register_number));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1279 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1282 gdbarch_return_value_p (gdbarch));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: return_value = <%s>\n",
1285 host_address_to_string (gdbarch->return_value));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1288 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: short_bit = %s\n",
1291 plongest (gdbarch->short_bit));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1294 gdbarch_single_step_through_delay_p (gdbarch));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: single_step_through_delay = <%s>\n",
1297 host_address_to_string (gdbarch->single_step_through_delay));
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1300 gdbarch_skip_entrypoint_p (gdbarch));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: skip_entrypoint = <%s>\n",
1303 host_address_to_string (gdbarch->skip_entrypoint));
1304 fprintf_unfiltered (file,
1305 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1306 gdbarch_skip_main_prologue_p (gdbarch));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: skip_main_prologue = <%s>\n",
1309 host_address_to_string (gdbarch->skip_main_prologue));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1312 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: skip_prologue = <%s>\n",
1315 host_address_to_string (gdbarch->skip_prologue));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1318 host_address_to_string (gdbarch->skip_solib_resolver));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1321 host_address_to_string (gdbarch->skip_trampoline_code));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1324 gdbarch_software_single_step_p (gdbarch));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: software_single_step = <%s>\n",
1327 host_address_to_string (gdbarch->software_single_step));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1330 plongest (gdbarch->sofun_address_maybe_missing));
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: solib_symbols_extension = %s\n",
1333 pstring (gdbarch->solib_symbols_extension));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: sp_regnum = %s\n",
1336 plongest (gdbarch->sp_regnum));
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1339 host_address_to_string (gdbarch->stab_reg_to_regnum));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1342 host_address_to_string (gdbarch->stabs_argument_has_addr));
1343 fprintf_unfiltered (file,
1344 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1345 host_address_to_string (gdbarch->stack_frame_destroyed_p));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1348 pstring (gdbarch->stap_gdb_register_prefix));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1351 pstring (gdbarch->stap_gdb_register_suffix));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: stap_integer_prefixes = %s\n",
1354 pstring_list (gdbarch->stap_integer_prefixes));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: stap_integer_suffixes = %s\n",
1357 pstring_list (gdbarch->stap_integer_suffixes));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1360 gdbarch_stap_is_single_operand_p (gdbarch));
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1363 host_address_to_string (gdbarch->stap_is_single_operand));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1366 gdbarch_stap_parse_special_token_p (gdbarch));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1369 host_address_to_string (gdbarch->stap_parse_special_token));
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1372 pstring_list (gdbarch->stap_register_indirection_prefixes));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1375 pstring_list (gdbarch->stap_register_indirection_suffixes));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: stap_register_prefixes = %s\n",
1378 pstring_list (gdbarch->stap_register_prefixes));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: stap_register_suffixes = %s\n",
1381 pstring_list (gdbarch->stap_register_suffixes));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1384 gdbarch_static_transform_name_p (gdbarch));
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: static_transform_name = <%s>\n",
1387 host_address_to_string (gdbarch->static_transform_name));
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: syscalls_info = %s\n",
1390 host_address_to_string (gdbarch->syscalls_info));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: target_desc = %s\n",
1393 host_address_to_string (gdbarch->target_desc));
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1396 gdbarch_unwind_pc_p (gdbarch));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: unwind_pc = <%s>\n",
1399 host_address_to_string (gdbarch->unwind_pc));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1402 gdbarch_unwind_sp_p (gdbarch));
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: unwind_sp = <%s>\n",
1405 host_address_to_string (gdbarch->unwind_sp));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: value_from_register = <%s>\n",
1408 host_address_to_string (gdbarch->value_from_register));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: value_to_register = <%s>\n",
1411 host_address_to_string (gdbarch->value_to_register));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: vbit_in_delta = %s\n",
1414 plongest (gdbarch->vbit_in_delta));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1417 host_address_to_string (gdbarch->virtual_frame_pointer));
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: vsyscall_range = <%s>\n",
1420 host_address_to_string (gdbarch->vsyscall_range));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: vtable_function_descriptors = %s\n",
1423 plongest (gdbarch->vtable_function_descriptors));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1426 gdbarch_write_pc_p (gdbarch));
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: write_pc = <%s>\n",
1429 host_address_to_string (gdbarch->write_pc));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: xml_syscall_file = %s\n",
1432 pstring (gdbarch->xml_syscall_file));
1433 if (gdbarch->dump_tdep != NULL)
1434 gdbarch->dump_tdep (gdbarch, file);
1435 }
1436
1437 struct gdbarch_tdep *
1438 gdbarch_tdep (struct gdbarch *gdbarch)
1439 {
1440 if (gdbarch_debug >= 2)
1441 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1442 return gdbarch->tdep;
1443 }
1444
1445
1446 const struct bfd_arch_info *
1447 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1448 {
1449 gdb_assert (gdbarch != NULL);
1450 if (gdbarch_debug >= 2)
1451 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1452 return gdbarch->bfd_arch_info;
1453 }
1454
1455 enum bfd_endian
1456 gdbarch_byte_order (struct gdbarch *gdbarch)
1457 {
1458 gdb_assert (gdbarch != NULL);
1459 if (gdbarch_debug >= 2)
1460 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1461 return gdbarch->byte_order;
1462 }
1463
1464 enum bfd_endian
1465 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1466 {
1467 gdb_assert (gdbarch != NULL);
1468 if (gdbarch_debug >= 2)
1469 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1470 return gdbarch->byte_order_for_code;
1471 }
1472
1473 enum gdb_osabi
1474 gdbarch_osabi (struct gdbarch *gdbarch)
1475 {
1476 gdb_assert (gdbarch != NULL);
1477 if (gdbarch_debug >= 2)
1478 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1479 return gdbarch->osabi;
1480 }
1481
1482 const struct target_desc *
1483 gdbarch_target_desc (struct gdbarch *gdbarch)
1484 {
1485 gdb_assert (gdbarch != NULL);
1486 if (gdbarch_debug >= 2)
1487 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1488 return gdbarch->target_desc;
1489 }
1490
1491 int
1492 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1493 {
1494 gdb_assert (gdbarch != NULL);
1495 /* Skip verify of bits_big_endian, invalid_p == 0 */
1496 if (gdbarch_debug >= 2)
1497 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1498 return gdbarch->bits_big_endian;
1499 }
1500
1501 void
1502 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1503 int bits_big_endian)
1504 {
1505 gdbarch->bits_big_endian = bits_big_endian;
1506 }
1507
1508 int
1509 gdbarch_short_bit (struct gdbarch *gdbarch)
1510 {
1511 gdb_assert (gdbarch != NULL);
1512 /* Skip verify of short_bit, invalid_p == 0 */
1513 if (gdbarch_debug >= 2)
1514 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1515 return gdbarch->short_bit;
1516 }
1517
1518 void
1519 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1520 int short_bit)
1521 {
1522 gdbarch->short_bit = short_bit;
1523 }
1524
1525 int
1526 gdbarch_int_bit (struct gdbarch *gdbarch)
1527 {
1528 gdb_assert (gdbarch != NULL);
1529 /* Skip verify of int_bit, invalid_p == 0 */
1530 if (gdbarch_debug >= 2)
1531 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1532 return gdbarch->int_bit;
1533 }
1534
1535 void
1536 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1537 int int_bit)
1538 {
1539 gdbarch->int_bit = int_bit;
1540 }
1541
1542 int
1543 gdbarch_long_bit (struct gdbarch *gdbarch)
1544 {
1545 gdb_assert (gdbarch != NULL);
1546 /* Skip verify of long_bit, invalid_p == 0 */
1547 if (gdbarch_debug >= 2)
1548 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1549 return gdbarch->long_bit;
1550 }
1551
1552 void
1553 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1554 int long_bit)
1555 {
1556 gdbarch->long_bit = long_bit;
1557 }
1558
1559 int
1560 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1561 {
1562 gdb_assert (gdbarch != NULL);
1563 /* Skip verify of long_long_bit, invalid_p == 0 */
1564 if (gdbarch_debug >= 2)
1565 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1566 return gdbarch->long_long_bit;
1567 }
1568
1569 void
1570 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1571 int long_long_bit)
1572 {
1573 gdbarch->long_long_bit = long_long_bit;
1574 }
1575
1576 int
1577 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1578 {
1579 gdb_assert (gdbarch != NULL);
1580 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1581 if (gdbarch_debug >= 2)
1582 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1583 return gdbarch->long_long_align_bit;
1584 }
1585
1586 void
1587 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1588 int long_long_align_bit)
1589 {
1590 gdbarch->long_long_align_bit = long_long_align_bit;
1591 }
1592
1593 int
1594 gdbarch_half_bit (struct gdbarch *gdbarch)
1595 {
1596 gdb_assert (gdbarch != NULL);
1597 /* Skip verify of half_bit, invalid_p == 0 */
1598 if (gdbarch_debug >= 2)
1599 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1600 return gdbarch->half_bit;
1601 }
1602
1603 void
1604 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1605 int half_bit)
1606 {
1607 gdbarch->half_bit = half_bit;
1608 }
1609
1610 const struct floatformat **
1611 gdbarch_half_format (struct gdbarch *gdbarch)
1612 {
1613 gdb_assert (gdbarch != NULL);
1614 if (gdbarch_debug >= 2)
1615 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1616 return gdbarch->half_format;
1617 }
1618
1619 void
1620 set_gdbarch_half_format (struct gdbarch *gdbarch,
1621 const struct floatformat ** half_format)
1622 {
1623 gdbarch->half_format = half_format;
1624 }
1625
1626 int
1627 gdbarch_float_bit (struct gdbarch *gdbarch)
1628 {
1629 gdb_assert (gdbarch != NULL);
1630 /* Skip verify of float_bit, invalid_p == 0 */
1631 if (gdbarch_debug >= 2)
1632 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1633 return gdbarch->float_bit;
1634 }
1635
1636 void
1637 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1638 int float_bit)
1639 {
1640 gdbarch->float_bit = float_bit;
1641 }
1642
1643 const struct floatformat **
1644 gdbarch_float_format (struct gdbarch *gdbarch)
1645 {
1646 gdb_assert (gdbarch != NULL);
1647 if (gdbarch_debug >= 2)
1648 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1649 return gdbarch->float_format;
1650 }
1651
1652 void
1653 set_gdbarch_float_format (struct gdbarch *gdbarch,
1654 const struct floatformat ** float_format)
1655 {
1656 gdbarch->float_format = float_format;
1657 }
1658
1659 int
1660 gdbarch_double_bit (struct gdbarch *gdbarch)
1661 {
1662 gdb_assert (gdbarch != NULL);
1663 /* Skip verify of double_bit, invalid_p == 0 */
1664 if (gdbarch_debug >= 2)
1665 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1666 return gdbarch->double_bit;
1667 }
1668
1669 void
1670 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1671 int double_bit)
1672 {
1673 gdbarch->double_bit = double_bit;
1674 }
1675
1676 const struct floatformat **
1677 gdbarch_double_format (struct gdbarch *gdbarch)
1678 {
1679 gdb_assert (gdbarch != NULL);
1680 if (gdbarch_debug >= 2)
1681 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1682 return gdbarch->double_format;
1683 }
1684
1685 void
1686 set_gdbarch_double_format (struct gdbarch *gdbarch,
1687 const struct floatformat ** double_format)
1688 {
1689 gdbarch->double_format = double_format;
1690 }
1691
1692 int
1693 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1694 {
1695 gdb_assert (gdbarch != NULL);
1696 /* Skip verify of long_double_bit, invalid_p == 0 */
1697 if (gdbarch_debug >= 2)
1698 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1699 return gdbarch->long_double_bit;
1700 }
1701
1702 void
1703 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1704 int long_double_bit)
1705 {
1706 gdbarch->long_double_bit = long_double_bit;
1707 }
1708
1709 const struct floatformat **
1710 gdbarch_long_double_format (struct gdbarch *gdbarch)
1711 {
1712 gdb_assert (gdbarch != NULL);
1713 if (gdbarch_debug >= 2)
1714 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1715 return gdbarch->long_double_format;
1716 }
1717
1718 void
1719 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1720 const struct floatformat ** long_double_format)
1721 {
1722 gdbarch->long_double_format = long_double_format;
1723 }
1724
1725 int
1726 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1727 {
1728 gdb_assert (gdbarch != NULL);
1729 /* Skip verify of ptr_bit, invalid_p == 0 */
1730 if (gdbarch_debug >= 2)
1731 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1732 return gdbarch->ptr_bit;
1733 }
1734
1735 void
1736 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1737 int ptr_bit)
1738 {
1739 gdbarch->ptr_bit = ptr_bit;
1740 }
1741
1742 int
1743 gdbarch_addr_bit (struct gdbarch *gdbarch)
1744 {
1745 gdb_assert (gdbarch != NULL);
1746 /* Check variable changed from pre-default. */
1747 gdb_assert (gdbarch->addr_bit != 0);
1748 if (gdbarch_debug >= 2)
1749 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1750 return gdbarch->addr_bit;
1751 }
1752
1753 void
1754 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1755 int addr_bit)
1756 {
1757 gdbarch->addr_bit = addr_bit;
1758 }
1759
1760 int
1761 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1762 {
1763 gdb_assert (gdbarch != NULL);
1764 /* Check variable changed from pre-default. */
1765 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1766 if (gdbarch_debug >= 2)
1767 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1768 return gdbarch->dwarf2_addr_size;
1769 }
1770
1771 void
1772 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1773 int dwarf2_addr_size)
1774 {
1775 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1776 }
1777
1778 int
1779 gdbarch_char_signed (struct gdbarch *gdbarch)
1780 {
1781 gdb_assert (gdbarch != NULL);
1782 /* Check variable changed from pre-default. */
1783 gdb_assert (gdbarch->char_signed != -1);
1784 if (gdbarch_debug >= 2)
1785 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1786 return gdbarch->char_signed;
1787 }
1788
1789 void
1790 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1791 int char_signed)
1792 {
1793 gdbarch->char_signed = char_signed;
1794 }
1795
1796 int
1797 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1798 {
1799 gdb_assert (gdbarch != NULL);
1800 return gdbarch->read_pc != NULL;
1801 }
1802
1803 CORE_ADDR
1804 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1805 {
1806 gdb_assert (gdbarch != NULL);
1807 gdb_assert (gdbarch->read_pc != NULL);
1808 if (gdbarch_debug >= 2)
1809 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1810 return gdbarch->read_pc (regcache);
1811 }
1812
1813 void
1814 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1815 gdbarch_read_pc_ftype read_pc)
1816 {
1817 gdbarch->read_pc = read_pc;
1818 }
1819
1820 int
1821 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1822 {
1823 gdb_assert (gdbarch != NULL);
1824 return gdbarch->write_pc != NULL;
1825 }
1826
1827 void
1828 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1829 {
1830 gdb_assert (gdbarch != NULL);
1831 gdb_assert (gdbarch->write_pc != NULL);
1832 if (gdbarch_debug >= 2)
1833 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1834 gdbarch->write_pc (regcache, val);
1835 }
1836
1837 void
1838 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1839 gdbarch_write_pc_ftype write_pc)
1840 {
1841 gdbarch->write_pc = write_pc;
1842 }
1843
1844 void
1845 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1846 {
1847 gdb_assert (gdbarch != NULL);
1848 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1849 if (gdbarch_debug >= 2)
1850 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1851 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1852 }
1853
1854 void
1855 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1856 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1857 {
1858 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1859 }
1860
1861 int
1862 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1863 {
1864 gdb_assert (gdbarch != NULL);
1865 return gdbarch->pseudo_register_read != NULL;
1866 }
1867
1868 enum register_status
1869 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1870 {
1871 gdb_assert (gdbarch != NULL);
1872 gdb_assert (gdbarch->pseudo_register_read != NULL);
1873 if (gdbarch_debug >= 2)
1874 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1875 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1876 }
1877
1878 void
1879 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1880 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1881 {
1882 gdbarch->pseudo_register_read = pseudo_register_read;
1883 }
1884
1885 int
1886 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1887 {
1888 gdb_assert (gdbarch != NULL);
1889 return gdbarch->pseudo_register_read_value != NULL;
1890 }
1891
1892 struct value *
1893 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1894 {
1895 gdb_assert (gdbarch != NULL);
1896 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1897 if (gdbarch_debug >= 2)
1898 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1899 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1900 }
1901
1902 void
1903 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1904 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1905 {
1906 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1907 }
1908
1909 int
1910 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1911 {
1912 gdb_assert (gdbarch != NULL);
1913 return gdbarch->pseudo_register_write != NULL;
1914 }
1915
1916 void
1917 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1918 {
1919 gdb_assert (gdbarch != NULL);
1920 gdb_assert (gdbarch->pseudo_register_write != NULL);
1921 if (gdbarch_debug >= 2)
1922 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1923 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1924 }
1925
1926 void
1927 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1928 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1929 {
1930 gdbarch->pseudo_register_write = pseudo_register_write;
1931 }
1932
1933 int
1934 gdbarch_num_regs (struct gdbarch *gdbarch)
1935 {
1936 gdb_assert (gdbarch != NULL);
1937 /* Check variable changed from pre-default. */
1938 gdb_assert (gdbarch->num_regs != -1);
1939 if (gdbarch_debug >= 2)
1940 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1941 return gdbarch->num_regs;
1942 }
1943
1944 void
1945 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1946 int num_regs)
1947 {
1948 gdbarch->num_regs = num_regs;
1949 }
1950
1951 int
1952 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1953 {
1954 gdb_assert (gdbarch != NULL);
1955 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1956 if (gdbarch_debug >= 2)
1957 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1958 return gdbarch->num_pseudo_regs;
1959 }
1960
1961 void
1962 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1963 int num_pseudo_regs)
1964 {
1965 gdbarch->num_pseudo_regs = num_pseudo_regs;
1966 }
1967
1968 int
1969 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1970 {
1971 gdb_assert (gdbarch != NULL);
1972 return gdbarch->ax_pseudo_register_collect != NULL;
1973 }
1974
1975 int
1976 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1977 {
1978 gdb_assert (gdbarch != NULL);
1979 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1980 if (gdbarch_debug >= 2)
1981 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1982 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1983 }
1984
1985 void
1986 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1987 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1988 {
1989 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1990 }
1991
1992 int
1993 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
1994 {
1995 gdb_assert (gdbarch != NULL);
1996 return gdbarch->ax_pseudo_register_push_stack != NULL;
1997 }
1998
1999 int
2000 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
2001 {
2002 gdb_assert (gdbarch != NULL);
2003 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
2004 if (gdbarch_debug >= 2)
2005 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
2006 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
2007 }
2008
2009 void
2010 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
2011 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
2012 {
2013 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
2014 }
2015
2016 int
2017 gdbarch_handle_segmentation_fault_p (struct gdbarch *gdbarch)
2018 {
2019 gdb_assert (gdbarch != NULL);
2020 return gdbarch->handle_segmentation_fault != NULL;
2021 }
2022
2023 void
2024 gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout)
2025 {
2026 gdb_assert (gdbarch != NULL);
2027 gdb_assert (gdbarch->handle_segmentation_fault != NULL);
2028 if (gdbarch_debug >= 2)
2029 fprintf_unfiltered (gdb_stdlog, "gdbarch_handle_segmentation_fault called\n");
2030 gdbarch->handle_segmentation_fault (gdbarch, uiout);
2031 }
2032
2033 void
2034 set_gdbarch_handle_segmentation_fault (struct gdbarch *gdbarch,
2035 gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault)
2036 {
2037 gdbarch->handle_segmentation_fault = handle_segmentation_fault;
2038 }
2039
2040 int
2041 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2042 {
2043 gdb_assert (gdbarch != NULL);
2044 /* Skip verify of sp_regnum, invalid_p == 0 */
2045 if (gdbarch_debug >= 2)
2046 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2047 return gdbarch->sp_regnum;
2048 }
2049
2050 void
2051 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2052 int sp_regnum)
2053 {
2054 gdbarch->sp_regnum = sp_regnum;
2055 }
2056
2057 int
2058 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2059 {
2060 gdb_assert (gdbarch != NULL);
2061 /* Skip verify of pc_regnum, invalid_p == 0 */
2062 if (gdbarch_debug >= 2)
2063 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2064 return gdbarch->pc_regnum;
2065 }
2066
2067 void
2068 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2069 int pc_regnum)
2070 {
2071 gdbarch->pc_regnum = pc_regnum;
2072 }
2073
2074 int
2075 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2076 {
2077 gdb_assert (gdbarch != NULL);
2078 /* Skip verify of ps_regnum, invalid_p == 0 */
2079 if (gdbarch_debug >= 2)
2080 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2081 return gdbarch->ps_regnum;
2082 }
2083
2084 void
2085 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2086 int ps_regnum)
2087 {
2088 gdbarch->ps_regnum = ps_regnum;
2089 }
2090
2091 int
2092 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2093 {
2094 gdb_assert (gdbarch != NULL);
2095 /* Skip verify of fp0_regnum, invalid_p == 0 */
2096 if (gdbarch_debug >= 2)
2097 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2098 return gdbarch->fp0_regnum;
2099 }
2100
2101 void
2102 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2103 int fp0_regnum)
2104 {
2105 gdbarch->fp0_regnum = fp0_regnum;
2106 }
2107
2108 int
2109 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2110 {
2111 gdb_assert (gdbarch != NULL);
2112 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2113 if (gdbarch_debug >= 2)
2114 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2115 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2116 }
2117
2118 void
2119 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2120 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2121 {
2122 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2123 }
2124
2125 int
2126 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2127 {
2128 gdb_assert (gdbarch != NULL);
2129 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2130 if (gdbarch_debug >= 2)
2131 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2132 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2133 }
2134
2135 void
2136 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2137 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2138 {
2139 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2140 }
2141
2142 int
2143 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2144 {
2145 gdb_assert (gdbarch != NULL);
2146 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2147 if (gdbarch_debug >= 2)
2148 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2149 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2150 }
2151
2152 void
2153 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2154 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2155 {
2156 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2157 }
2158
2159 int
2160 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2161 {
2162 gdb_assert (gdbarch != NULL);
2163 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2164 if (gdbarch_debug >= 2)
2165 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2166 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2167 }
2168
2169 void
2170 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2171 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2172 {
2173 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2174 }
2175
2176 const char *
2177 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2178 {
2179 gdb_assert (gdbarch != NULL);
2180 gdb_assert (gdbarch->register_name != NULL);
2181 if (gdbarch_debug >= 2)
2182 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2183 return gdbarch->register_name (gdbarch, regnr);
2184 }
2185
2186 void
2187 set_gdbarch_register_name (struct gdbarch *gdbarch,
2188 gdbarch_register_name_ftype register_name)
2189 {
2190 gdbarch->register_name = register_name;
2191 }
2192
2193 int
2194 gdbarch_register_type_p (struct gdbarch *gdbarch)
2195 {
2196 gdb_assert (gdbarch != NULL);
2197 return gdbarch->register_type != NULL;
2198 }
2199
2200 struct type *
2201 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2202 {
2203 gdb_assert (gdbarch != NULL);
2204 gdb_assert (gdbarch->register_type != NULL);
2205 if (gdbarch_debug >= 2)
2206 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2207 return gdbarch->register_type (gdbarch, reg_nr);
2208 }
2209
2210 void
2211 set_gdbarch_register_type (struct gdbarch *gdbarch,
2212 gdbarch_register_type_ftype register_type)
2213 {
2214 gdbarch->register_type = register_type;
2215 }
2216
2217 int
2218 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2219 {
2220 gdb_assert (gdbarch != NULL);
2221 return gdbarch->dummy_id != NULL;
2222 }
2223
2224 struct frame_id
2225 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2226 {
2227 gdb_assert (gdbarch != NULL);
2228 gdb_assert (gdbarch->dummy_id != NULL);
2229 if (gdbarch_debug >= 2)
2230 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2231 return gdbarch->dummy_id (gdbarch, this_frame);
2232 }
2233
2234 void
2235 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2236 gdbarch_dummy_id_ftype dummy_id)
2237 {
2238 gdbarch->dummy_id = dummy_id;
2239 }
2240
2241 int
2242 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2243 {
2244 gdb_assert (gdbarch != NULL);
2245 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2246 if (gdbarch_debug >= 2)
2247 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2248 return gdbarch->deprecated_fp_regnum;
2249 }
2250
2251 void
2252 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2253 int deprecated_fp_regnum)
2254 {
2255 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2256 }
2257
2258 int
2259 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2260 {
2261 gdb_assert (gdbarch != NULL);
2262 return gdbarch->push_dummy_call != NULL;
2263 }
2264
2265 CORE_ADDR
2266 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)
2267 {
2268 gdb_assert (gdbarch != NULL);
2269 gdb_assert (gdbarch->push_dummy_call != NULL);
2270 if (gdbarch_debug >= 2)
2271 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2272 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2273 }
2274
2275 void
2276 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2277 gdbarch_push_dummy_call_ftype push_dummy_call)
2278 {
2279 gdbarch->push_dummy_call = push_dummy_call;
2280 }
2281
2282 int
2283 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2284 {
2285 gdb_assert (gdbarch != NULL);
2286 /* Skip verify of call_dummy_location, invalid_p == 0 */
2287 if (gdbarch_debug >= 2)
2288 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2289 return gdbarch->call_dummy_location;
2290 }
2291
2292 void
2293 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2294 int call_dummy_location)
2295 {
2296 gdbarch->call_dummy_location = call_dummy_location;
2297 }
2298
2299 int
2300 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2301 {
2302 gdb_assert (gdbarch != NULL);
2303 return gdbarch->push_dummy_code != NULL;
2304 }
2305
2306 CORE_ADDR
2307 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)
2308 {
2309 gdb_assert (gdbarch != NULL);
2310 gdb_assert (gdbarch->push_dummy_code != NULL);
2311 if (gdbarch_debug >= 2)
2312 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2313 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2314 }
2315
2316 void
2317 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2318 gdbarch_push_dummy_code_ftype push_dummy_code)
2319 {
2320 gdbarch->push_dummy_code = push_dummy_code;
2321 }
2322
2323 int
2324 gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
2325 {
2326 gdb_assert (gdbarch != NULL);
2327 gdb_assert (gdbarch->code_of_frame_writable != NULL);
2328 if (gdbarch_debug >= 2)
2329 fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
2330 return gdbarch->code_of_frame_writable (gdbarch, frame);
2331 }
2332
2333 void
2334 set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
2335 gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
2336 {
2337 gdbarch->code_of_frame_writable = code_of_frame_writable;
2338 }
2339
2340 void
2341 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2342 {
2343 gdb_assert (gdbarch != NULL);
2344 gdb_assert (gdbarch->print_registers_info != NULL);
2345 if (gdbarch_debug >= 2)
2346 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2347 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2348 }
2349
2350 void
2351 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2352 gdbarch_print_registers_info_ftype print_registers_info)
2353 {
2354 gdbarch->print_registers_info = print_registers_info;
2355 }
2356
2357 void
2358 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2359 {
2360 gdb_assert (gdbarch != NULL);
2361 gdb_assert (gdbarch->print_float_info != NULL);
2362 if (gdbarch_debug >= 2)
2363 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2364 gdbarch->print_float_info (gdbarch, file, frame, args);
2365 }
2366
2367 void
2368 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2369 gdbarch_print_float_info_ftype print_float_info)
2370 {
2371 gdbarch->print_float_info = print_float_info;
2372 }
2373
2374 int
2375 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2376 {
2377 gdb_assert (gdbarch != NULL);
2378 return gdbarch->print_vector_info != NULL;
2379 }
2380
2381 void
2382 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2383 {
2384 gdb_assert (gdbarch != NULL);
2385 gdb_assert (gdbarch->print_vector_info != NULL);
2386 if (gdbarch_debug >= 2)
2387 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2388 gdbarch->print_vector_info (gdbarch, file, frame, args);
2389 }
2390
2391 void
2392 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2393 gdbarch_print_vector_info_ftype print_vector_info)
2394 {
2395 gdbarch->print_vector_info = print_vector_info;
2396 }
2397
2398 int
2399 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2400 {
2401 gdb_assert (gdbarch != NULL);
2402 gdb_assert (gdbarch->register_sim_regno != NULL);
2403 if (gdbarch_debug >= 2)
2404 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2405 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2406 }
2407
2408 void
2409 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2410 gdbarch_register_sim_regno_ftype register_sim_regno)
2411 {
2412 gdbarch->register_sim_regno = register_sim_regno;
2413 }
2414
2415 int
2416 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2417 {
2418 gdb_assert (gdbarch != NULL);
2419 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2420 if (gdbarch_debug >= 2)
2421 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2422 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2423 }
2424
2425 void
2426 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2427 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2428 {
2429 gdbarch->cannot_fetch_register = cannot_fetch_register;
2430 }
2431
2432 int
2433 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2434 {
2435 gdb_assert (gdbarch != NULL);
2436 gdb_assert (gdbarch->cannot_store_register != NULL);
2437 if (gdbarch_debug >= 2)
2438 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2439 return gdbarch->cannot_store_register (gdbarch, regnum);
2440 }
2441
2442 void
2443 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2444 gdbarch_cannot_store_register_ftype cannot_store_register)
2445 {
2446 gdbarch->cannot_store_register = cannot_store_register;
2447 }
2448
2449 int
2450 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2451 {
2452 gdb_assert (gdbarch != NULL);
2453 return gdbarch->get_longjmp_target != NULL;
2454 }
2455
2456 int
2457 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2458 {
2459 gdb_assert (gdbarch != NULL);
2460 gdb_assert (gdbarch->get_longjmp_target != NULL);
2461 if (gdbarch_debug >= 2)
2462 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2463 return gdbarch->get_longjmp_target (frame, pc);
2464 }
2465
2466 void
2467 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2468 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2469 {
2470 gdbarch->get_longjmp_target = get_longjmp_target;
2471 }
2472
2473 int
2474 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2475 {
2476 gdb_assert (gdbarch != NULL);
2477 if (gdbarch_debug >= 2)
2478 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2479 return gdbarch->believe_pcc_promotion;
2480 }
2481
2482 void
2483 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2484 int believe_pcc_promotion)
2485 {
2486 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2487 }
2488
2489 int
2490 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2491 {
2492 gdb_assert (gdbarch != NULL);
2493 gdb_assert (gdbarch->convert_register_p != NULL);
2494 if (gdbarch_debug >= 2)
2495 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2496 return gdbarch->convert_register_p (gdbarch, regnum, type);
2497 }
2498
2499 void
2500 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2501 gdbarch_convert_register_p_ftype convert_register_p)
2502 {
2503 gdbarch->convert_register_p = convert_register_p;
2504 }
2505
2506 int
2507 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2508 {
2509 gdb_assert (gdbarch != NULL);
2510 gdb_assert (gdbarch->register_to_value != NULL);
2511 if (gdbarch_debug >= 2)
2512 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2513 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2514 }
2515
2516 void
2517 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2518 gdbarch_register_to_value_ftype register_to_value)
2519 {
2520 gdbarch->register_to_value = register_to_value;
2521 }
2522
2523 void
2524 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2525 {
2526 gdb_assert (gdbarch != NULL);
2527 gdb_assert (gdbarch->value_to_register != NULL);
2528 if (gdbarch_debug >= 2)
2529 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2530 gdbarch->value_to_register (frame, regnum, type, buf);
2531 }
2532
2533 void
2534 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2535 gdbarch_value_to_register_ftype value_to_register)
2536 {
2537 gdbarch->value_to_register = value_to_register;
2538 }
2539
2540 struct value *
2541 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id)
2542 {
2543 gdb_assert (gdbarch != NULL);
2544 gdb_assert (gdbarch->value_from_register != NULL);
2545 if (gdbarch_debug >= 2)
2546 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2547 return gdbarch->value_from_register (gdbarch, type, regnum, frame_id);
2548 }
2549
2550 void
2551 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2552 gdbarch_value_from_register_ftype value_from_register)
2553 {
2554 gdbarch->value_from_register = value_from_register;
2555 }
2556
2557 CORE_ADDR
2558 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2559 {
2560 gdb_assert (gdbarch != NULL);
2561 gdb_assert (gdbarch->pointer_to_address != NULL);
2562 if (gdbarch_debug >= 2)
2563 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2564 return gdbarch->pointer_to_address (gdbarch, type, buf);
2565 }
2566
2567 void
2568 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2569 gdbarch_pointer_to_address_ftype pointer_to_address)
2570 {
2571 gdbarch->pointer_to_address = pointer_to_address;
2572 }
2573
2574 void
2575 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2576 {
2577 gdb_assert (gdbarch != NULL);
2578 gdb_assert (gdbarch->address_to_pointer != NULL);
2579 if (gdbarch_debug >= 2)
2580 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2581 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2582 }
2583
2584 void
2585 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2586 gdbarch_address_to_pointer_ftype address_to_pointer)
2587 {
2588 gdbarch->address_to_pointer = address_to_pointer;
2589 }
2590
2591 int
2592 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2593 {
2594 gdb_assert (gdbarch != NULL);
2595 return gdbarch->integer_to_address != NULL;
2596 }
2597
2598 CORE_ADDR
2599 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2600 {
2601 gdb_assert (gdbarch != NULL);
2602 gdb_assert (gdbarch->integer_to_address != NULL);
2603 if (gdbarch_debug >= 2)
2604 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2605 return gdbarch->integer_to_address (gdbarch, type, buf);
2606 }
2607
2608 void
2609 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2610 gdbarch_integer_to_address_ftype integer_to_address)
2611 {
2612 gdbarch->integer_to_address = integer_to_address;
2613 }
2614
2615 int
2616 gdbarch_return_value_p (struct gdbarch *gdbarch)
2617 {
2618 gdb_assert (gdbarch != NULL);
2619 return gdbarch->return_value != NULL;
2620 }
2621
2622 enum return_value_convention
2623 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2624 {
2625 gdb_assert (gdbarch != NULL);
2626 gdb_assert (gdbarch->return_value != NULL);
2627 if (gdbarch_debug >= 2)
2628 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2629 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2630 }
2631
2632 void
2633 set_gdbarch_return_value (struct gdbarch *gdbarch,
2634 gdbarch_return_value_ftype return_value)
2635 {
2636 gdbarch->return_value = return_value;
2637 }
2638
2639 int
2640 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2641 {
2642 gdb_assert (gdbarch != NULL);
2643 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2644 if (gdbarch_debug >= 2)
2645 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2646 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2647 }
2648
2649 void
2650 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2651 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2652 {
2653 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2654 }
2655
2656 CORE_ADDR
2657 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2658 {
2659 gdb_assert (gdbarch != NULL);
2660 gdb_assert (gdbarch->skip_prologue != NULL);
2661 if (gdbarch_debug >= 2)
2662 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2663 return gdbarch->skip_prologue (gdbarch, ip);
2664 }
2665
2666 void
2667 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2668 gdbarch_skip_prologue_ftype skip_prologue)
2669 {
2670 gdbarch->skip_prologue = skip_prologue;
2671 }
2672
2673 int
2674 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2675 {
2676 gdb_assert (gdbarch != NULL);
2677 return gdbarch->skip_main_prologue != NULL;
2678 }
2679
2680 CORE_ADDR
2681 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2682 {
2683 gdb_assert (gdbarch != NULL);
2684 gdb_assert (gdbarch->skip_main_prologue != NULL);
2685 if (gdbarch_debug >= 2)
2686 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2687 return gdbarch->skip_main_prologue (gdbarch, ip);
2688 }
2689
2690 void
2691 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2692 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2693 {
2694 gdbarch->skip_main_prologue = skip_main_prologue;
2695 }
2696
2697 int
2698 gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch)
2699 {
2700 gdb_assert (gdbarch != NULL);
2701 return gdbarch->skip_entrypoint != NULL;
2702 }
2703
2704 CORE_ADDR
2705 gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip)
2706 {
2707 gdb_assert (gdbarch != NULL);
2708 gdb_assert (gdbarch->skip_entrypoint != NULL);
2709 if (gdbarch_debug >= 2)
2710 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n");
2711 return gdbarch->skip_entrypoint (gdbarch, ip);
2712 }
2713
2714 void
2715 set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch,
2716 gdbarch_skip_entrypoint_ftype skip_entrypoint)
2717 {
2718 gdbarch->skip_entrypoint = skip_entrypoint;
2719 }
2720
2721 int
2722 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2723 {
2724 gdb_assert (gdbarch != NULL);
2725 gdb_assert (gdbarch->inner_than != NULL);
2726 if (gdbarch_debug >= 2)
2727 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2728 return gdbarch->inner_than (lhs, rhs);
2729 }
2730
2731 void
2732 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2733 gdbarch_inner_than_ftype inner_than)
2734 {
2735 gdbarch->inner_than = inner_than;
2736 }
2737
2738 const gdb_byte *
2739 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2740 {
2741 gdb_assert (gdbarch != NULL);
2742 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2743 if (gdbarch_debug >= 2)
2744 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2745 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2746 }
2747
2748 void
2749 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2750 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2751 {
2752 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2753 }
2754
2755 void
2756 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2757 {
2758 gdb_assert (gdbarch != NULL);
2759 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2760 if (gdbarch_debug >= 2)
2761 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2762 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2763 }
2764
2765 void
2766 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2767 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2768 {
2769 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2770 }
2771
2772 int
2773 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2774 {
2775 gdb_assert (gdbarch != NULL);
2776 return gdbarch->adjust_breakpoint_address != NULL;
2777 }
2778
2779 CORE_ADDR
2780 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2781 {
2782 gdb_assert (gdbarch != NULL);
2783 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2784 if (gdbarch_debug >= 2)
2785 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2786 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2787 }
2788
2789 void
2790 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2791 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2792 {
2793 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2794 }
2795
2796 int
2797 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2798 {
2799 gdb_assert (gdbarch != NULL);
2800 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2801 if (gdbarch_debug >= 2)
2802 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2803 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2804 }
2805
2806 void
2807 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2808 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2809 {
2810 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2811 }
2812
2813 int
2814 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2815 {
2816 gdb_assert (gdbarch != NULL);
2817 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2818 if (gdbarch_debug >= 2)
2819 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2820 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2821 }
2822
2823 void
2824 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2825 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2826 {
2827 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2828 }
2829
2830 CORE_ADDR
2831 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2832 {
2833 gdb_assert (gdbarch != NULL);
2834 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2835 if (gdbarch_debug >= 2)
2836 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2837 return gdbarch->decr_pc_after_break;
2838 }
2839
2840 void
2841 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2842 CORE_ADDR decr_pc_after_break)
2843 {
2844 gdbarch->decr_pc_after_break = decr_pc_after_break;
2845 }
2846
2847 CORE_ADDR
2848 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2849 {
2850 gdb_assert (gdbarch != NULL);
2851 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2852 if (gdbarch_debug >= 2)
2853 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2854 return gdbarch->deprecated_function_start_offset;
2855 }
2856
2857 void
2858 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2859 CORE_ADDR deprecated_function_start_offset)
2860 {
2861 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2862 }
2863
2864 int
2865 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2866 {
2867 gdb_assert (gdbarch != NULL);
2868 gdb_assert (gdbarch->remote_register_number != NULL);
2869 if (gdbarch_debug >= 2)
2870 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2871 return gdbarch->remote_register_number (gdbarch, regno);
2872 }
2873
2874 void
2875 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2876 gdbarch_remote_register_number_ftype remote_register_number)
2877 {
2878 gdbarch->remote_register_number = remote_register_number;
2879 }
2880
2881 int
2882 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2883 {
2884 gdb_assert (gdbarch != NULL);
2885 return gdbarch->fetch_tls_load_module_address != NULL;
2886 }
2887
2888 CORE_ADDR
2889 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2890 {
2891 gdb_assert (gdbarch != NULL);
2892 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2893 if (gdbarch_debug >= 2)
2894 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2895 return gdbarch->fetch_tls_load_module_address (objfile);
2896 }
2897
2898 void
2899 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2900 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2901 {
2902 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2903 }
2904
2905 CORE_ADDR
2906 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2907 {
2908 gdb_assert (gdbarch != NULL);
2909 /* Skip verify of frame_args_skip, invalid_p == 0 */
2910 if (gdbarch_debug >= 2)
2911 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2912 return gdbarch->frame_args_skip;
2913 }
2914
2915 void
2916 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2917 CORE_ADDR frame_args_skip)
2918 {
2919 gdbarch->frame_args_skip = frame_args_skip;
2920 }
2921
2922 int
2923 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2924 {
2925 gdb_assert (gdbarch != NULL);
2926 return gdbarch->unwind_pc != NULL;
2927 }
2928
2929 CORE_ADDR
2930 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2931 {
2932 gdb_assert (gdbarch != NULL);
2933 gdb_assert (gdbarch->unwind_pc != NULL);
2934 if (gdbarch_debug >= 2)
2935 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2936 return gdbarch->unwind_pc (gdbarch, next_frame);
2937 }
2938
2939 void
2940 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2941 gdbarch_unwind_pc_ftype unwind_pc)
2942 {
2943 gdbarch->unwind_pc = unwind_pc;
2944 }
2945
2946 int
2947 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2948 {
2949 gdb_assert (gdbarch != NULL);
2950 return gdbarch->unwind_sp != NULL;
2951 }
2952
2953 CORE_ADDR
2954 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2955 {
2956 gdb_assert (gdbarch != NULL);
2957 gdb_assert (gdbarch->unwind_sp != NULL);
2958 if (gdbarch_debug >= 2)
2959 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2960 return gdbarch->unwind_sp (gdbarch, next_frame);
2961 }
2962
2963 void
2964 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2965 gdbarch_unwind_sp_ftype unwind_sp)
2966 {
2967 gdbarch->unwind_sp = unwind_sp;
2968 }
2969
2970 int
2971 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2972 {
2973 gdb_assert (gdbarch != NULL);
2974 return gdbarch->frame_num_args != NULL;
2975 }
2976
2977 int
2978 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2979 {
2980 gdb_assert (gdbarch != NULL);
2981 gdb_assert (gdbarch->frame_num_args != NULL);
2982 if (gdbarch_debug >= 2)
2983 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2984 return gdbarch->frame_num_args (frame);
2985 }
2986
2987 void
2988 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2989 gdbarch_frame_num_args_ftype frame_num_args)
2990 {
2991 gdbarch->frame_num_args = frame_num_args;
2992 }
2993
2994 int
2995 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2996 {
2997 gdb_assert (gdbarch != NULL);
2998 return gdbarch->frame_align != NULL;
2999 }
3000
3001 CORE_ADDR
3002 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3003 {
3004 gdb_assert (gdbarch != NULL);
3005 gdb_assert (gdbarch->frame_align != NULL);
3006 if (gdbarch_debug >= 2)
3007 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3008 return gdbarch->frame_align (gdbarch, address);
3009 }
3010
3011 void
3012 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3013 gdbarch_frame_align_ftype frame_align)
3014 {
3015 gdbarch->frame_align = frame_align;
3016 }
3017
3018 int
3019 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3020 {
3021 gdb_assert (gdbarch != NULL);
3022 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3023 if (gdbarch_debug >= 2)
3024 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3025 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3026 }
3027
3028 void
3029 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3030 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3031 {
3032 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3033 }
3034
3035 int
3036 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3037 {
3038 gdb_assert (gdbarch != NULL);
3039 if (gdbarch_debug >= 2)
3040 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3041 return gdbarch->frame_red_zone_size;
3042 }
3043
3044 void
3045 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3046 int frame_red_zone_size)
3047 {
3048 gdbarch->frame_red_zone_size = frame_red_zone_size;
3049 }
3050
3051 CORE_ADDR
3052 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3053 {
3054 gdb_assert (gdbarch != NULL);
3055 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3056 if (gdbarch_debug >= 2)
3057 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3058 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3059 }
3060
3061 void
3062 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3063 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3064 {
3065 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3066 }
3067
3068 CORE_ADDR
3069 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3070 {
3071 gdb_assert (gdbarch != NULL);
3072 gdb_assert (gdbarch->addr_bits_remove != NULL);
3073 if (gdbarch_debug >= 2)
3074 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3075 return gdbarch->addr_bits_remove (gdbarch, addr);
3076 }
3077
3078 void
3079 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3080 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3081 {
3082 gdbarch->addr_bits_remove = addr_bits_remove;
3083 }
3084
3085 int
3086 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3087 {
3088 gdb_assert (gdbarch != NULL);
3089 return gdbarch->software_single_step != NULL;
3090 }
3091
3092 int
3093 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3094 {
3095 gdb_assert (gdbarch != NULL);
3096 gdb_assert (gdbarch->software_single_step != NULL);
3097 if (gdbarch_debug >= 2)
3098 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3099 return gdbarch->software_single_step (frame);
3100 }
3101
3102 void
3103 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3104 gdbarch_software_single_step_ftype software_single_step)
3105 {
3106 gdbarch->software_single_step = software_single_step;
3107 }
3108
3109 int
3110 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3111 {
3112 gdb_assert (gdbarch != NULL);
3113 return gdbarch->single_step_through_delay != NULL;
3114 }
3115
3116 int
3117 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3118 {
3119 gdb_assert (gdbarch != NULL);
3120 gdb_assert (gdbarch->single_step_through_delay != NULL);
3121 if (gdbarch_debug >= 2)
3122 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3123 return gdbarch->single_step_through_delay (gdbarch, frame);
3124 }
3125
3126 void
3127 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3128 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3129 {
3130 gdbarch->single_step_through_delay = single_step_through_delay;
3131 }
3132
3133 int
3134 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3135 {
3136 gdb_assert (gdbarch != NULL);
3137 gdb_assert (gdbarch->print_insn != NULL);
3138 if (gdbarch_debug >= 2)
3139 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3140 return gdbarch->print_insn (vma, info);
3141 }
3142
3143 void
3144 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3145 gdbarch_print_insn_ftype print_insn)
3146 {
3147 gdbarch->print_insn = print_insn;
3148 }
3149
3150 CORE_ADDR
3151 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3152 {
3153 gdb_assert (gdbarch != NULL);
3154 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3155 if (gdbarch_debug >= 2)
3156 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3157 return gdbarch->skip_trampoline_code (frame, pc);
3158 }
3159
3160 void
3161 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3162 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3163 {
3164 gdbarch->skip_trampoline_code = skip_trampoline_code;
3165 }
3166
3167 CORE_ADDR
3168 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3169 {
3170 gdb_assert (gdbarch != NULL);
3171 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3172 if (gdbarch_debug >= 2)
3173 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3174 return gdbarch->skip_solib_resolver (gdbarch, pc);
3175 }
3176
3177 void
3178 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3179 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3180 {
3181 gdbarch->skip_solib_resolver = skip_solib_resolver;
3182 }
3183
3184 int
3185 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3186 {
3187 gdb_assert (gdbarch != NULL);
3188 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3189 if (gdbarch_debug >= 2)
3190 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3191 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3192 }
3193
3194 void
3195 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3196 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3197 {
3198 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3199 }
3200
3201 int
3202 gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3203 {
3204 gdb_assert (gdbarch != NULL);
3205 gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
3208 return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
3209 }
3210
3211 void
3212 set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
3213 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
3214 {
3215 gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
3216 }
3217
3218 int
3219 gdbarch_elf_make_msymbol_special_p (struct gdbarch *gdbarch)
3220 {
3221 gdb_assert (gdbarch != NULL);
3222 return gdbarch->elf_make_msymbol_special != NULL;
3223 }
3224
3225 void
3226 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3227 {
3228 gdb_assert (gdbarch != NULL);
3229 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3230 if (gdbarch_debug >= 2)
3231 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3232 gdbarch->elf_make_msymbol_special (sym, msym);
3233 }
3234
3235 void
3236 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3237 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3238 {
3239 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3240 }
3241
3242 void
3243 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3244 {
3245 gdb_assert (gdbarch != NULL);
3246 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3247 if (gdbarch_debug >= 2)
3248 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3249 gdbarch->coff_make_msymbol_special (val, msym);
3250 }
3251
3252 void
3253 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3254 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3255 {
3256 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3257 }
3258
3259 void
3260 gdbarch_make_symbol_special (struct gdbarch *gdbarch, struct symbol *sym, struct objfile *objfile)
3261 {
3262 gdb_assert (gdbarch != NULL);
3263 gdb_assert (gdbarch->make_symbol_special != NULL);
3264 if (gdbarch_debug >= 2)
3265 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_symbol_special called\n");
3266 gdbarch->make_symbol_special (sym, objfile);
3267 }
3268
3269 void
3270 set_gdbarch_make_symbol_special (struct gdbarch *gdbarch,
3271 gdbarch_make_symbol_special_ftype make_symbol_special)
3272 {
3273 gdbarch->make_symbol_special = make_symbol_special;
3274 }
3275
3276 CORE_ADDR
3277 gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
3278 {
3279 gdb_assert (gdbarch != NULL);
3280 gdb_assert (gdbarch->adjust_dwarf2_addr != NULL);
3281 if (gdbarch_debug >= 2)
3282 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_addr called\n");
3283 return gdbarch->adjust_dwarf2_addr (pc);
3284 }
3285
3286 void
3287 set_gdbarch_adjust_dwarf2_addr (struct gdbarch *gdbarch,
3288 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr)
3289 {
3290 gdbarch->adjust_dwarf2_addr = adjust_dwarf2_addr;
3291 }
3292
3293 CORE_ADDR
3294 gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel)
3295 {
3296 gdb_assert (gdbarch != NULL);
3297 gdb_assert (gdbarch->adjust_dwarf2_line != NULL);
3298 if (gdbarch_debug >= 2)
3299 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_dwarf2_line called\n");
3300 return gdbarch->adjust_dwarf2_line (addr, rel);
3301 }
3302
3303 void
3304 set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
3305 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line)
3306 {
3307 gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
3308 }
3309
3310 int
3311 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3312 {
3313 gdb_assert (gdbarch != NULL);
3314 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3315 if (gdbarch_debug >= 2)
3316 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3317 return gdbarch->cannot_step_breakpoint;
3318 }
3319
3320 void
3321 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3322 int cannot_step_breakpoint)
3323 {
3324 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3325 }
3326
3327 int
3328 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3329 {
3330 gdb_assert (gdbarch != NULL);
3331 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3332 if (gdbarch_debug >= 2)
3333 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3334 return gdbarch->have_nonsteppable_watchpoint;
3335 }
3336
3337 void
3338 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3339 int have_nonsteppable_watchpoint)
3340 {
3341 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3342 }
3343
3344 int
3345 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3346 {
3347 gdb_assert (gdbarch != NULL);
3348 return gdbarch->address_class_type_flags != NULL;
3349 }
3350
3351 int
3352 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3353 {
3354 gdb_assert (gdbarch != NULL);
3355 gdb_assert (gdbarch->address_class_type_flags != NULL);
3356 if (gdbarch_debug >= 2)
3357 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3358 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3359 }
3360
3361 void
3362 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3363 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3364 {
3365 gdbarch->address_class_type_flags = address_class_type_flags;
3366 }
3367
3368 int
3369 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3370 {
3371 gdb_assert (gdbarch != NULL);
3372 return gdbarch->address_class_type_flags_to_name != NULL;
3373 }
3374
3375 const char *
3376 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3377 {
3378 gdb_assert (gdbarch != NULL);
3379 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3380 if (gdbarch_debug >= 2)
3381 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3382 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3383 }
3384
3385 void
3386 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3387 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3388 {
3389 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3390 }
3391
3392 int
3393 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3394 {
3395 gdb_assert (gdbarch != NULL);
3396 return gdbarch->address_class_name_to_type_flags != NULL;
3397 }
3398
3399 int
3400 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3401 {
3402 gdb_assert (gdbarch != NULL);
3403 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3404 if (gdbarch_debug >= 2)
3405 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3406 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3407 }
3408
3409 void
3410 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3411 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3412 {
3413 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3414 }
3415
3416 int
3417 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3418 {
3419 gdb_assert (gdbarch != NULL);
3420 gdb_assert (gdbarch->register_reggroup_p != NULL);
3421 if (gdbarch_debug >= 2)
3422 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3423 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3424 }
3425
3426 void
3427 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3428 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3429 {
3430 gdbarch->register_reggroup_p = register_reggroup_p;
3431 }
3432
3433 int
3434 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3435 {
3436 gdb_assert (gdbarch != NULL);
3437 return gdbarch->fetch_pointer_argument != NULL;
3438 }
3439
3440 CORE_ADDR
3441 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3442 {
3443 gdb_assert (gdbarch != NULL);
3444 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3445 if (gdbarch_debug >= 2)
3446 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3447 return gdbarch->fetch_pointer_argument (frame, argi, type);
3448 }
3449
3450 void
3451 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3452 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3453 {
3454 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3455 }
3456
3457 int
3458 gdbarch_iterate_over_regset_sections_p (struct gdbarch *gdbarch)
3459 {
3460 gdb_assert (gdbarch != NULL);
3461 return gdbarch->iterate_over_regset_sections != NULL;
3462 }
3463
3464 void
3465 gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
3466 {
3467 gdb_assert (gdbarch != NULL);
3468 gdb_assert (gdbarch->iterate_over_regset_sections != NULL);
3469 if (gdbarch_debug >= 2)
3470 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_regset_sections called\n");
3471 gdbarch->iterate_over_regset_sections (gdbarch, cb, cb_data, regcache);
3472 }
3473
3474 void
3475 set_gdbarch_iterate_over_regset_sections (struct gdbarch *gdbarch,
3476 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
3477 {
3478 gdbarch->iterate_over_regset_sections = iterate_over_regset_sections;
3479 }
3480
3481 int
3482 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3483 {
3484 gdb_assert (gdbarch != NULL);
3485 return gdbarch->make_corefile_notes != NULL;
3486 }
3487
3488 char *
3489 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3490 {
3491 gdb_assert (gdbarch != NULL);
3492 gdb_assert (gdbarch->make_corefile_notes != NULL);
3493 if (gdbarch_debug >= 2)
3494 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3495 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3496 }
3497
3498 void
3499 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3500 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3501 {
3502 gdbarch->make_corefile_notes = make_corefile_notes;
3503 }
3504
3505 int
3506 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch)
3507 {
3508 gdb_assert (gdbarch != NULL);
3509 return gdbarch->elfcore_write_linux_prpsinfo != NULL;
3510 }
3511
3512 char *
3513 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info)
3514 {
3515 gdb_assert (gdbarch != NULL);
3516 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL);
3517 if (gdbarch_debug >= 2)
3518 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3519 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info);
3520 }
3521
3522 void
3523 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch,
3524 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo)
3525 {
3526 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo;
3527 }
3528
3529 int
3530 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3531 {
3532 gdb_assert (gdbarch != NULL);
3533 return gdbarch->find_memory_regions != NULL;
3534 }
3535
3536 int
3537 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3538 {
3539 gdb_assert (gdbarch != NULL);
3540 gdb_assert (gdbarch->find_memory_regions != NULL);
3541 if (gdbarch_debug >= 2)
3542 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3543 return gdbarch->find_memory_regions (gdbarch, func, data);
3544 }
3545
3546 void
3547 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3548 gdbarch_find_memory_regions_ftype find_memory_regions)
3549 {
3550 gdbarch->find_memory_regions = find_memory_regions;
3551 }
3552
3553 int
3554 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3555 {
3556 gdb_assert (gdbarch != NULL);
3557 return gdbarch->core_xfer_shared_libraries != NULL;
3558 }
3559
3560 ULONGEST
3561 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3562 {
3563 gdb_assert (gdbarch != NULL);
3564 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3565 if (gdbarch_debug >= 2)
3566 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3567 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3568 }
3569
3570 void
3571 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3572 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3573 {
3574 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3575 }
3576
3577 int
3578 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
3579 {
3580 gdb_assert (gdbarch != NULL);
3581 return gdbarch->core_xfer_shared_libraries_aix != NULL;
3582 }
3583
3584 ULONGEST
3585 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
3586 {
3587 gdb_assert (gdbarch != NULL);
3588 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL);
3589 if (gdbarch_debug >= 2)
3590 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n");
3591 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len);
3592 }
3593
3594 void
3595 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
3596 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix)
3597 {
3598 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix;
3599 }
3600
3601 int
3602 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3603 {
3604 gdb_assert (gdbarch != NULL);
3605 return gdbarch->core_pid_to_str != NULL;
3606 }
3607
3608 char *
3609 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3610 {
3611 gdb_assert (gdbarch != NULL);
3612 gdb_assert (gdbarch->core_pid_to_str != NULL);
3613 if (gdbarch_debug >= 2)
3614 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3615 return gdbarch->core_pid_to_str (gdbarch, ptid);
3616 }
3617
3618 void
3619 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3620 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3621 {
3622 gdbarch->core_pid_to_str = core_pid_to_str;
3623 }
3624
3625 int
3626 gdbarch_core_thread_name_p (struct gdbarch *gdbarch)
3627 {
3628 gdb_assert (gdbarch != NULL);
3629 return gdbarch->core_thread_name != NULL;
3630 }
3631
3632 const char *
3633 gdbarch_core_thread_name (struct gdbarch *gdbarch, struct thread_info *thr)
3634 {
3635 gdb_assert (gdbarch != NULL);
3636 gdb_assert (gdbarch->core_thread_name != NULL);
3637 if (gdbarch_debug >= 2)
3638 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_thread_name called\n");
3639 return gdbarch->core_thread_name (gdbarch, thr);
3640 }
3641
3642 void
3643 set_gdbarch_core_thread_name (struct gdbarch *gdbarch,
3644 gdbarch_core_thread_name_ftype core_thread_name)
3645 {
3646 gdbarch->core_thread_name = core_thread_name;
3647 }
3648
3649 int
3650 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3651 {
3652 gdb_assert (gdbarch != NULL);
3653 return gdbarch->gcore_bfd_target != 0;
3654 }
3655
3656 const char *
3657 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3658 {
3659 gdb_assert (gdbarch != NULL);
3660 /* Check variable changed from pre-default. */
3661 gdb_assert (gdbarch->gcore_bfd_target != 0);
3662 if (gdbarch_debug >= 2)
3663 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3664 return gdbarch->gcore_bfd_target;
3665 }
3666
3667 void
3668 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3669 const char * gcore_bfd_target)
3670 {
3671 gdbarch->gcore_bfd_target = gcore_bfd_target;
3672 }
3673
3674 int
3675 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3676 {
3677 gdb_assert (gdbarch != NULL);
3678 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3679 if (gdbarch_debug >= 2)
3680 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3681 return gdbarch->vtable_function_descriptors;
3682 }
3683
3684 void
3685 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3686 int vtable_function_descriptors)
3687 {
3688 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3689 }
3690
3691 int
3692 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3693 {
3694 gdb_assert (gdbarch != NULL);
3695 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3696 if (gdbarch_debug >= 2)
3697 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3698 return gdbarch->vbit_in_delta;
3699 }
3700
3701 void
3702 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3703 int vbit_in_delta)
3704 {
3705 gdbarch->vbit_in_delta = vbit_in_delta;
3706 }
3707
3708 void
3709 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3710 {
3711 gdb_assert (gdbarch != NULL);
3712 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3713 if (gdbarch_debug >= 2)
3714 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3715 gdbarch->skip_permanent_breakpoint (regcache);
3716 }
3717
3718 void
3719 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3720 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3721 {
3722 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3723 }
3724
3725 int
3726 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3727 {
3728 gdb_assert (gdbarch != NULL);
3729 return gdbarch->max_insn_length != 0;
3730 }
3731
3732 ULONGEST
3733 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3734 {
3735 gdb_assert (gdbarch != NULL);
3736 /* Check variable changed from pre-default. */
3737 gdb_assert (gdbarch->max_insn_length != 0);
3738 if (gdbarch_debug >= 2)
3739 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3740 return gdbarch->max_insn_length;
3741 }
3742
3743 void
3744 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3745 ULONGEST max_insn_length)
3746 {
3747 gdbarch->max_insn_length = max_insn_length;
3748 }
3749
3750 int
3751 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3752 {
3753 gdb_assert (gdbarch != NULL);
3754 return gdbarch->displaced_step_copy_insn != NULL;
3755 }
3756
3757 struct displaced_step_closure *
3758 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3759 {
3760 gdb_assert (gdbarch != NULL);
3761 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3762 if (gdbarch_debug >= 2)
3763 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3764 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3765 }
3766
3767 void
3768 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3769 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3770 {
3771 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3772 }
3773
3774 int
3775 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3776 {
3777 gdb_assert (gdbarch != NULL);
3778 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3779 if (gdbarch_debug >= 2)
3780 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3781 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3782 }
3783
3784 void
3785 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3786 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3787 {
3788 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3789 }
3790
3791 int
3792 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3793 {
3794 gdb_assert (gdbarch != NULL);
3795 return gdbarch->displaced_step_fixup != NULL;
3796 }
3797
3798 void
3799 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3800 {
3801 gdb_assert (gdbarch != NULL);
3802 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3803 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3804 if (gdbarch_debug >= 2)
3805 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3806 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3807 }
3808
3809 void
3810 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3811 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3812 {
3813 gdbarch->displaced_step_fixup = displaced_step_fixup;
3814 }
3815
3816 void
3817 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3818 {
3819 gdb_assert (gdbarch != NULL);
3820 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3821 if (gdbarch_debug >= 2)
3822 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3823 gdbarch->displaced_step_free_closure (gdbarch, closure);
3824 }
3825
3826 void
3827 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3828 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3829 {
3830 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3831 }
3832
3833 CORE_ADDR
3834 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3835 {
3836 gdb_assert (gdbarch != NULL);
3837 gdb_assert (gdbarch->displaced_step_location != NULL);
3838 if (gdbarch_debug >= 2)
3839 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3840 return gdbarch->displaced_step_location (gdbarch);
3841 }
3842
3843 void
3844 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3845 gdbarch_displaced_step_location_ftype displaced_step_location)
3846 {
3847 gdbarch->displaced_step_location = displaced_step_location;
3848 }
3849
3850 int
3851 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3852 {
3853 gdb_assert (gdbarch != NULL);
3854 return gdbarch->relocate_instruction != NULL;
3855 }
3856
3857 void
3858 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3859 {
3860 gdb_assert (gdbarch != NULL);
3861 gdb_assert (gdbarch->relocate_instruction != NULL);
3862 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3863 if (gdbarch_debug >= 2)
3864 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3865 gdbarch->relocate_instruction (gdbarch, to, from);
3866 }
3867
3868 void
3869 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3870 gdbarch_relocate_instruction_ftype relocate_instruction)
3871 {
3872 gdbarch->relocate_instruction = relocate_instruction;
3873 }
3874
3875 int
3876 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3877 {
3878 gdb_assert (gdbarch != NULL);
3879 return gdbarch->overlay_update != NULL;
3880 }
3881
3882 void
3883 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3884 {
3885 gdb_assert (gdbarch != NULL);
3886 gdb_assert (gdbarch->overlay_update != NULL);
3887 if (gdbarch_debug >= 2)
3888 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3889 gdbarch->overlay_update (osect);
3890 }
3891
3892 void
3893 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3894 gdbarch_overlay_update_ftype overlay_update)
3895 {
3896 gdbarch->overlay_update = overlay_update;
3897 }
3898
3899 int
3900 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3901 {
3902 gdb_assert (gdbarch != NULL);
3903 return gdbarch->core_read_description != NULL;
3904 }
3905
3906 const struct target_desc *
3907 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3908 {
3909 gdb_assert (gdbarch != NULL);
3910 gdb_assert (gdbarch->core_read_description != NULL);
3911 if (gdbarch_debug >= 2)
3912 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3913 return gdbarch->core_read_description (gdbarch, target, abfd);
3914 }
3915
3916 void
3917 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3918 gdbarch_core_read_description_ftype core_read_description)
3919 {
3920 gdbarch->core_read_description = core_read_description;
3921 }
3922
3923 int
3924 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3925 {
3926 gdb_assert (gdbarch != NULL);
3927 return gdbarch->static_transform_name != NULL;
3928 }
3929
3930 const char *
3931 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3932 {
3933 gdb_assert (gdbarch != NULL);
3934 gdb_assert (gdbarch->static_transform_name != NULL);
3935 if (gdbarch_debug >= 2)
3936 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3937 return gdbarch->static_transform_name (name);
3938 }
3939
3940 void
3941 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3942 gdbarch_static_transform_name_ftype static_transform_name)
3943 {
3944 gdbarch->static_transform_name = static_transform_name;
3945 }
3946
3947 int
3948 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3949 {
3950 gdb_assert (gdbarch != NULL);
3951 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3954 return gdbarch->sofun_address_maybe_missing;
3955 }
3956
3957 void
3958 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3959 int sofun_address_maybe_missing)
3960 {
3961 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3962 }
3963
3964 int
3965 gdbarch_process_record_p (struct gdbarch *gdbarch)
3966 {
3967 gdb_assert (gdbarch != NULL);
3968 return gdbarch->process_record != NULL;
3969 }
3970
3971 int
3972 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3973 {
3974 gdb_assert (gdbarch != NULL);
3975 gdb_assert (gdbarch->process_record != NULL);
3976 if (gdbarch_debug >= 2)
3977 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3978 return gdbarch->process_record (gdbarch, regcache, addr);
3979 }
3980
3981 void
3982 set_gdbarch_process_record (struct gdbarch *gdbarch,
3983 gdbarch_process_record_ftype process_record)
3984 {
3985 gdbarch->process_record = process_record;
3986 }
3987
3988 int
3989 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3990 {
3991 gdb_assert (gdbarch != NULL);
3992 return gdbarch->process_record_signal != NULL;
3993 }
3994
3995 int
3996 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3997 {
3998 gdb_assert (gdbarch != NULL);
3999 gdb_assert (gdbarch->process_record_signal != NULL);
4000 if (gdbarch_debug >= 2)
4001 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
4002 return gdbarch->process_record_signal (gdbarch, regcache, signal);
4003 }
4004
4005 void
4006 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
4007 gdbarch_process_record_signal_ftype process_record_signal)
4008 {
4009 gdbarch->process_record_signal = process_record_signal;
4010 }
4011
4012 int
4013 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
4014 {
4015 gdb_assert (gdbarch != NULL);
4016 return gdbarch->gdb_signal_from_target != NULL;
4017 }
4018
4019 enum gdb_signal
4020 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
4021 {
4022 gdb_assert (gdbarch != NULL);
4023 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
4026 return gdbarch->gdb_signal_from_target (gdbarch, signo);
4027 }
4028
4029 void
4030 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
4031 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
4032 {
4033 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
4034 }
4035
4036 int
4037 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch)
4038 {
4039 gdb_assert (gdbarch != NULL);
4040 return gdbarch->gdb_signal_to_target != NULL;
4041 }
4042
4043 int
4044 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
4045 {
4046 gdb_assert (gdbarch != NULL);
4047 gdb_assert (gdbarch->gdb_signal_to_target != NULL);
4048 if (gdbarch_debug >= 2)
4049 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n");
4050 return gdbarch->gdb_signal_to_target (gdbarch, signal);
4051 }
4052
4053 void
4054 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch,
4055 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target)
4056 {
4057 gdbarch->gdb_signal_to_target = gdb_signal_to_target;
4058 }
4059
4060 int
4061 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
4062 {
4063 gdb_assert (gdbarch != NULL);
4064 return gdbarch->get_siginfo_type != NULL;
4065 }
4066
4067 struct type *
4068 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
4069 {
4070 gdb_assert (gdbarch != NULL);
4071 gdb_assert (gdbarch->get_siginfo_type != NULL);
4072 if (gdbarch_debug >= 2)
4073 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
4074 return gdbarch->get_siginfo_type (gdbarch);
4075 }
4076
4077 void
4078 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
4079 gdbarch_get_siginfo_type_ftype get_siginfo_type)
4080 {
4081 gdbarch->get_siginfo_type = get_siginfo_type;
4082 }
4083
4084 int
4085 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
4086 {
4087 gdb_assert (gdbarch != NULL);
4088 return gdbarch->record_special_symbol != NULL;
4089 }
4090
4091 void
4092 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
4093 {
4094 gdb_assert (gdbarch != NULL);
4095 gdb_assert (gdbarch->record_special_symbol != NULL);
4096 if (gdbarch_debug >= 2)
4097 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
4098 gdbarch->record_special_symbol (gdbarch, objfile, sym);
4099 }
4100
4101 void
4102 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
4103 gdbarch_record_special_symbol_ftype record_special_symbol)
4104 {
4105 gdbarch->record_special_symbol = record_special_symbol;
4106 }
4107
4108 int
4109 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
4110 {
4111 gdb_assert (gdbarch != NULL);
4112 return gdbarch->get_syscall_number != NULL;
4113 }
4114
4115 LONGEST
4116 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
4117 {
4118 gdb_assert (gdbarch != NULL);
4119 gdb_assert (gdbarch->get_syscall_number != NULL);
4120 if (gdbarch_debug >= 2)
4121 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
4122 return gdbarch->get_syscall_number (gdbarch, ptid);
4123 }
4124
4125 void
4126 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
4127 gdbarch_get_syscall_number_ftype get_syscall_number)
4128 {
4129 gdbarch->get_syscall_number = get_syscall_number;
4130 }
4131
4132 const char *
4133 gdbarch_xml_syscall_file (struct gdbarch *gdbarch)
4134 {
4135 gdb_assert (gdbarch != NULL);
4136 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4137 if (gdbarch_debug >= 2)
4138 fprintf_unfiltered (gdb_stdlog, "gdbarch_xml_syscall_file called\n");
4139 return gdbarch->xml_syscall_file;
4140 }
4141
4142 void
4143 set_gdbarch_xml_syscall_file (struct gdbarch *gdbarch,
4144 const char * xml_syscall_file)
4145 {
4146 gdbarch->xml_syscall_file = xml_syscall_file;
4147 }
4148
4149 struct syscalls_info *
4150 gdbarch_syscalls_info (struct gdbarch *gdbarch)
4151 {
4152 gdb_assert (gdbarch != NULL);
4153 /* Skip verify of syscalls_info, invalid_p == 0 */
4154 if (gdbarch_debug >= 2)
4155 fprintf_unfiltered (gdb_stdlog, "gdbarch_syscalls_info called\n");
4156 return gdbarch->syscalls_info;
4157 }
4158
4159 void
4160 set_gdbarch_syscalls_info (struct gdbarch *gdbarch,
4161 struct syscalls_info * syscalls_info)
4162 {
4163 gdbarch->syscalls_info = syscalls_info;
4164 }
4165
4166 const char *const *
4167 gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch)
4168 {
4169 gdb_assert (gdbarch != NULL);
4170 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4171 if (gdbarch_debug >= 2)
4172 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n");
4173 return gdbarch->stap_integer_prefixes;
4174 }
4175
4176 void
4177 set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch,
4178 const char *const * stap_integer_prefixes)
4179 {
4180 gdbarch->stap_integer_prefixes = stap_integer_prefixes;
4181 }
4182
4183 const char *const *
4184 gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch)
4185 {
4186 gdb_assert (gdbarch != NULL);
4187 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4188 if (gdbarch_debug >= 2)
4189 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n");
4190 return gdbarch->stap_integer_suffixes;
4191 }
4192
4193 void
4194 set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch,
4195 const char *const * stap_integer_suffixes)
4196 {
4197 gdbarch->stap_integer_suffixes = stap_integer_suffixes;
4198 }
4199
4200 const char *const *
4201 gdbarch_stap_register_prefixes (struct gdbarch *gdbarch)
4202 {
4203 gdb_assert (gdbarch != NULL);
4204 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4205 if (gdbarch_debug >= 2)
4206 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n");
4207 return gdbarch->stap_register_prefixes;
4208 }
4209
4210 void
4211 set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch,
4212 const char *const * stap_register_prefixes)
4213 {
4214 gdbarch->stap_register_prefixes = stap_register_prefixes;
4215 }
4216
4217 const char *const *
4218 gdbarch_stap_register_suffixes (struct gdbarch *gdbarch)
4219 {
4220 gdb_assert (gdbarch != NULL);
4221 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4222 if (gdbarch_debug >= 2)
4223 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n");
4224 return gdbarch->stap_register_suffixes;
4225 }
4226
4227 void
4228 set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch,
4229 const char *const * stap_register_suffixes)
4230 {
4231 gdbarch->stap_register_suffixes = stap_register_suffixes;
4232 }
4233
4234 const char *const *
4235 gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch)
4236 {
4237 gdb_assert (gdbarch != NULL);
4238 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4239 if (gdbarch_debug >= 2)
4240 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n");
4241 return gdbarch->stap_register_indirection_prefixes;
4242 }
4243
4244 void
4245 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch,
4246 const char *const * stap_register_indirection_prefixes)
4247 {
4248 gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes;
4249 }
4250
4251 const char *const *
4252 gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch)
4253 {
4254 gdb_assert (gdbarch != NULL);
4255 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4256 if (gdbarch_debug >= 2)
4257 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n");
4258 return gdbarch->stap_register_indirection_suffixes;
4259 }
4260
4261 void
4262 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch,
4263 const char *const * stap_register_indirection_suffixes)
4264 {
4265 gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes;
4266 }
4267
4268 const char *
4269 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4270 {
4271 gdb_assert (gdbarch != NULL);
4272 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4273 if (gdbarch_debug >= 2)
4274 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4275 return gdbarch->stap_gdb_register_prefix;
4276 }
4277
4278 void
4279 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4280 const char * stap_gdb_register_prefix)
4281 {
4282 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4283 }
4284
4285 const char *
4286 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4287 {
4288 gdb_assert (gdbarch != NULL);
4289 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4290 if (gdbarch_debug >= 2)
4291 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4292 return gdbarch->stap_gdb_register_suffix;
4293 }
4294
4295 void
4296 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4297 const char * stap_gdb_register_suffix)
4298 {
4299 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4300 }
4301
4302 int
4303 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4304 {
4305 gdb_assert (gdbarch != NULL);
4306 return gdbarch->stap_is_single_operand != NULL;
4307 }
4308
4309 int
4310 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4311 {
4312 gdb_assert (gdbarch != NULL);
4313 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4314 if (gdbarch_debug >= 2)
4315 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4316 return gdbarch->stap_is_single_operand (gdbarch, s);
4317 }
4318
4319 void
4320 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4321 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4322 {
4323 gdbarch->stap_is_single_operand = stap_is_single_operand;
4324 }
4325
4326 int
4327 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4328 {
4329 gdb_assert (gdbarch != NULL);
4330 return gdbarch->stap_parse_special_token != NULL;
4331 }
4332
4333 int
4334 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4335 {
4336 gdb_assert (gdbarch != NULL);
4337 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4338 if (gdbarch_debug >= 2)
4339 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4340 return gdbarch->stap_parse_special_token (gdbarch, p);
4341 }
4342
4343 void
4344 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4345 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4346 {
4347 gdbarch->stap_parse_special_token = stap_parse_special_token;
4348 }
4349
4350 int
4351 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
4352 {
4353 gdb_assert (gdbarch != NULL);
4354 return gdbarch->dtrace_parse_probe_argument != NULL;
4355 }
4356
4357 void
4358 gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
4359 {
4360 gdb_assert (gdbarch != NULL);
4361 gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
4362 if (gdbarch_debug >= 2)
4363 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
4364 gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
4365 }
4366
4367 void
4368 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch,
4369 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument)
4370 {
4371 gdbarch->dtrace_parse_probe_argument = dtrace_parse_probe_argument;
4372 }
4373
4374 int
4375 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch *gdbarch)
4376 {
4377 gdb_assert (gdbarch != NULL);
4378 return gdbarch->dtrace_probe_is_enabled != NULL;
4379 }
4380
4381 int
4382 gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch, CORE_ADDR addr)
4383 {
4384 gdb_assert (gdbarch != NULL);
4385 gdb_assert (gdbarch->dtrace_probe_is_enabled != NULL);
4386 if (gdbarch_debug >= 2)
4387 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_probe_is_enabled called\n");
4388 return gdbarch->dtrace_probe_is_enabled (gdbarch, addr);
4389 }
4390
4391 void
4392 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch *gdbarch,
4393 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled)
4394 {
4395 gdbarch->dtrace_probe_is_enabled = dtrace_probe_is_enabled;
4396 }
4397
4398 int
4399 gdbarch_dtrace_enable_probe_p (struct gdbarch *gdbarch)
4400 {
4401 gdb_assert (gdbarch != NULL);
4402 return gdbarch->dtrace_enable_probe != NULL;
4403 }
4404
4405 void
4406 gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4407 {
4408 gdb_assert (gdbarch != NULL);
4409 gdb_assert (gdbarch->dtrace_enable_probe != NULL);
4410 if (gdbarch_debug >= 2)
4411 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_enable_probe called\n");
4412 gdbarch->dtrace_enable_probe (gdbarch, addr);
4413 }
4414
4415 void
4416 set_gdbarch_dtrace_enable_probe (struct gdbarch *gdbarch,
4417 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe)
4418 {
4419 gdbarch->dtrace_enable_probe = dtrace_enable_probe;
4420 }
4421
4422 int
4423 gdbarch_dtrace_disable_probe_p (struct gdbarch *gdbarch)
4424 {
4425 gdb_assert (gdbarch != NULL);
4426 return gdbarch->dtrace_disable_probe != NULL;
4427 }
4428
4429 void
4430 gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch, CORE_ADDR addr)
4431 {
4432 gdb_assert (gdbarch != NULL);
4433 gdb_assert (gdbarch->dtrace_disable_probe != NULL);
4434 if (gdbarch_debug >= 2)
4435 fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_disable_probe called\n");
4436 gdbarch->dtrace_disable_probe (gdbarch, addr);
4437 }
4438
4439 void
4440 set_gdbarch_dtrace_disable_probe (struct gdbarch *gdbarch,
4441 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe)
4442 {
4443 gdbarch->dtrace_disable_probe = dtrace_disable_probe;
4444 }
4445
4446 int
4447 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4448 {
4449 gdb_assert (gdbarch != NULL);
4450 /* Skip verify of has_global_solist, invalid_p == 0 */
4451 if (gdbarch_debug >= 2)
4452 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4453 return gdbarch->has_global_solist;
4454 }
4455
4456 void
4457 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4458 int has_global_solist)
4459 {
4460 gdbarch->has_global_solist = has_global_solist;
4461 }
4462
4463 int
4464 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4465 {
4466 gdb_assert (gdbarch != NULL);
4467 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4468 if (gdbarch_debug >= 2)
4469 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4470 return gdbarch->has_global_breakpoints;
4471 }
4472
4473 void
4474 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4475 int has_global_breakpoints)
4476 {
4477 gdbarch->has_global_breakpoints = has_global_breakpoints;
4478 }
4479
4480 int
4481 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4482 {
4483 gdb_assert (gdbarch != NULL);
4484 gdb_assert (gdbarch->has_shared_address_space != NULL);
4485 if (gdbarch_debug >= 2)
4486 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4487 return gdbarch->has_shared_address_space (gdbarch);
4488 }
4489
4490 void
4491 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4492 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4493 {
4494 gdbarch->has_shared_address_space = has_shared_address_space;
4495 }
4496
4497 int
4498 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
4499 {
4500 gdb_assert (gdbarch != NULL);
4501 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4502 if (gdbarch_debug >= 2)
4503 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4504 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
4505 }
4506
4507 void
4508 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4509 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4510 {
4511 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4512 }
4513
4514 void
4515 gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
4516 {
4517 gdb_assert (gdbarch != NULL);
4518 gdb_assert (gdbarch->guess_tracepoint_registers != NULL);
4519 if (gdbarch_debug >= 2)
4520 fprintf_unfiltered (gdb_stdlog, "gdbarch_guess_tracepoint_registers called\n");
4521 gdbarch->guess_tracepoint_registers (gdbarch, regcache, addr);
4522 }
4523
4524 void
4525 set_gdbarch_guess_tracepoint_registers (struct gdbarch *gdbarch,
4526 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers)
4527 {
4528 gdbarch->guess_tracepoint_registers = guess_tracepoint_registers;
4529 }
4530
4531 const char *
4532 gdbarch_auto_charset (struct gdbarch *gdbarch)
4533 {
4534 gdb_assert (gdbarch != NULL);
4535 gdb_assert (gdbarch->auto_charset != NULL);
4536 if (gdbarch_debug >= 2)
4537 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4538 return gdbarch->auto_charset ();
4539 }
4540
4541 void
4542 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4543 gdbarch_auto_charset_ftype auto_charset)
4544 {
4545 gdbarch->auto_charset = auto_charset;
4546 }
4547
4548 const char *
4549 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4550 {
4551 gdb_assert (gdbarch != NULL);
4552 gdb_assert (gdbarch->auto_wide_charset != NULL);
4553 if (gdbarch_debug >= 2)
4554 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4555 return gdbarch->auto_wide_charset ();
4556 }
4557
4558 void
4559 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4560 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4561 {
4562 gdbarch->auto_wide_charset = auto_wide_charset;
4563 }
4564
4565 const char *
4566 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4567 {
4568 gdb_assert (gdbarch != NULL);
4569 if (gdbarch_debug >= 2)
4570 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4571 return gdbarch->solib_symbols_extension;
4572 }
4573
4574 void
4575 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4576 const char * solib_symbols_extension)
4577 {
4578 gdbarch->solib_symbols_extension = solib_symbols_extension;
4579 }
4580
4581 int
4582 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4583 {
4584 gdb_assert (gdbarch != NULL);
4585 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4586 if (gdbarch_debug >= 2)
4587 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4588 return gdbarch->has_dos_based_file_system;
4589 }
4590
4591 void
4592 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4593 int has_dos_based_file_system)
4594 {
4595 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4596 }
4597
4598 void
4599 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4600 {
4601 gdb_assert (gdbarch != NULL);
4602 gdb_assert (gdbarch->gen_return_address != NULL);
4603 if (gdbarch_debug >= 2)
4604 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4605 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4606 }
4607
4608 void
4609 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4610 gdbarch_gen_return_address_ftype gen_return_address)
4611 {
4612 gdbarch->gen_return_address = gen_return_address;
4613 }
4614
4615 int
4616 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4617 {
4618 gdb_assert (gdbarch != NULL);
4619 return gdbarch->info_proc != NULL;
4620 }
4621
4622 void
4623 gdbarch_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4624 {
4625 gdb_assert (gdbarch != NULL);
4626 gdb_assert (gdbarch->info_proc != NULL);
4627 if (gdbarch_debug >= 2)
4628 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4629 gdbarch->info_proc (gdbarch, args, what);
4630 }
4631
4632 void
4633 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4634 gdbarch_info_proc_ftype info_proc)
4635 {
4636 gdbarch->info_proc = info_proc;
4637 }
4638
4639 int
4640 gdbarch_core_info_proc_p (struct gdbarch *gdbarch)
4641 {
4642 gdb_assert (gdbarch != NULL);
4643 return gdbarch->core_info_proc != NULL;
4644 }
4645
4646 void
4647 gdbarch_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
4648 {
4649 gdb_assert (gdbarch != NULL);
4650 gdb_assert (gdbarch->core_info_proc != NULL);
4651 if (gdbarch_debug >= 2)
4652 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n");
4653 gdbarch->core_info_proc (gdbarch, args, what);
4654 }
4655
4656 void
4657 set_gdbarch_core_info_proc (struct gdbarch *gdbarch,
4658 gdbarch_core_info_proc_ftype core_info_proc)
4659 {
4660 gdbarch->core_info_proc = core_info_proc;
4661 }
4662
4663 void
4664 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)
4665 {
4666 gdb_assert (gdbarch != NULL);
4667 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4668 if (gdbarch_debug >= 2)
4669 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4670 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4671 }
4672
4673 void
4674 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4675 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4676 {
4677 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4678 }
4679
4680 struct ravenscar_arch_ops *
4681 gdbarch_ravenscar_ops (struct gdbarch *gdbarch)
4682 {
4683 gdb_assert (gdbarch != NULL);
4684 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4685 if (gdbarch_debug >= 2)
4686 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n");
4687 return gdbarch->ravenscar_ops;
4688 }
4689
4690 void
4691 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch,
4692 struct ravenscar_arch_ops * ravenscar_ops)
4693 {
4694 gdbarch->ravenscar_ops = ravenscar_ops;
4695 }
4696
4697 int
4698 gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr)
4699 {
4700 gdb_assert (gdbarch != NULL);
4701 gdb_assert (gdbarch->insn_is_call != NULL);
4702 if (gdbarch_debug >= 2)
4703 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n");
4704 return gdbarch->insn_is_call (gdbarch, addr);
4705 }
4706
4707 void
4708 set_gdbarch_insn_is_call (struct gdbarch *gdbarch,
4709 gdbarch_insn_is_call_ftype insn_is_call)
4710 {
4711 gdbarch->insn_is_call = insn_is_call;
4712 }
4713
4714 int
4715 gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr)
4716 {
4717 gdb_assert (gdbarch != NULL);
4718 gdb_assert (gdbarch->insn_is_ret != NULL);
4719 if (gdbarch_debug >= 2)
4720 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n");
4721 return gdbarch->insn_is_ret (gdbarch, addr);
4722 }
4723
4724 void
4725 set_gdbarch_insn_is_ret (struct gdbarch *gdbarch,
4726 gdbarch_insn_is_ret_ftype insn_is_ret)
4727 {
4728 gdbarch->insn_is_ret = insn_is_ret;
4729 }
4730
4731 int
4732 gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr)
4733 {
4734 gdb_assert (gdbarch != NULL);
4735 gdb_assert (gdbarch->insn_is_jump != NULL);
4736 if (gdbarch_debug >= 2)
4737 fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n");
4738 return gdbarch->insn_is_jump (gdbarch, addr);
4739 }
4740
4741 void
4742 set_gdbarch_insn_is_jump (struct gdbarch *gdbarch,
4743 gdbarch_insn_is_jump_ftype insn_is_jump)
4744 {
4745 gdbarch->insn_is_jump = insn_is_jump;
4746 }
4747
4748 int
4749 gdbarch_auxv_parse_p (struct gdbarch *gdbarch)
4750 {
4751 gdb_assert (gdbarch != NULL);
4752 return gdbarch->auxv_parse != NULL;
4753 }
4754
4755 int
4756 gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
4757 {
4758 gdb_assert (gdbarch != NULL);
4759 gdb_assert (gdbarch->auxv_parse != NULL);
4760 if (gdbarch_debug >= 2)
4761 fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n");
4762 return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp);
4763 }
4764
4765 void
4766 set_gdbarch_auxv_parse (struct gdbarch *gdbarch,
4767 gdbarch_auxv_parse_ftype auxv_parse)
4768 {
4769 gdbarch->auxv_parse = auxv_parse;
4770 }
4771
4772 int
4773 gdbarch_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
4774 {
4775 gdb_assert (gdbarch != NULL);
4776 gdb_assert (gdbarch->vsyscall_range != NULL);
4777 if (gdbarch_debug >= 2)
4778 fprintf_unfiltered (gdb_stdlog, "gdbarch_vsyscall_range called\n");
4779 return gdbarch->vsyscall_range (gdbarch, range);
4780 }
4781
4782 void
4783 set_gdbarch_vsyscall_range (struct gdbarch *gdbarch,
4784 gdbarch_vsyscall_range_ftype vsyscall_range)
4785 {
4786 gdbarch->vsyscall_range = vsyscall_range;
4787 }
4788
4789 CORE_ADDR
4790 gdbarch_infcall_mmap (struct gdbarch *gdbarch, CORE_ADDR size, unsigned prot)
4791 {
4792 gdb_assert (gdbarch != NULL);
4793 gdb_assert (gdbarch->infcall_mmap != NULL);
4794 if (gdbarch_debug >= 2)
4795 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_mmap called\n");
4796 return gdbarch->infcall_mmap (size, prot);
4797 }
4798
4799 void
4800 set_gdbarch_infcall_mmap (struct gdbarch *gdbarch,
4801 gdbarch_infcall_mmap_ftype infcall_mmap)
4802 {
4803 gdbarch->infcall_mmap = infcall_mmap;
4804 }
4805
4806 void
4807 gdbarch_infcall_munmap (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR size)
4808 {
4809 gdb_assert (gdbarch != NULL);
4810 gdb_assert (gdbarch->infcall_munmap != NULL);
4811 if (gdbarch_debug >= 2)
4812 fprintf_unfiltered (gdb_stdlog, "gdbarch_infcall_munmap called\n");
4813 gdbarch->infcall_munmap (addr, size);
4814 }
4815
4816 void
4817 set_gdbarch_infcall_munmap (struct gdbarch *gdbarch,
4818 gdbarch_infcall_munmap_ftype infcall_munmap)
4819 {
4820 gdbarch->infcall_munmap = infcall_munmap;
4821 }
4822
4823 char *
4824 gdbarch_gcc_target_options (struct gdbarch *gdbarch)
4825 {
4826 gdb_assert (gdbarch != NULL);
4827 gdb_assert (gdbarch->gcc_target_options != NULL);
4828 if (gdbarch_debug >= 2)
4829 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcc_target_options called\n");
4830 return gdbarch->gcc_target_options (gdbarch);
4831 }
4832
4833 void
4834 set_gdbarch_gcc_target_options (struct gdbarch *gdbarch,
4835 gdbarch_gcc_target_options_ftype gcc_target_options)
4836 {
4837 gdbarch->gcc_target_options = gcc_target_options;
4838 }
4839
4840 const char *
4841 gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch)
4842 {
4843 gdb_assert (gdbarch != NULL);
4844 gdb_assert (gdbarch->gnu_triplet_regexp != NULL);
4845 if (gdbarch_debug >= 2)
4846 fprintf_unfiltered (gdb_stdlog, "gdbarch_gnu_triplet_regexp called\n");
4847 return gdbarch->gnu_triplet_regexp (gdbarch);
4848 }
4849
4850 void
4851 set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch,
4852 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp)
4853 {
4854 gdbarch->gnu_triplet_regexp = gnu_triplet_regexp;
4855 }
4856
4857 int
4858 gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch)
4859 {
4860 gdb_assert (gdbarch != NULL);
4861 gdb_assert (gdbarch->addressable_memory_unit_size != NULL);
4862 if (gdbarch_debug >= 2)
4863 fprintf_unfiltered (gdb_stdlog, "gdbarch_addressable_memory_unit_size called\n");
4864 return gdbarch->addressable_memory_unit_size (gdbarch);
4865 }
4866
4867 void
4868 set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch,
4869 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size)
4870 {
4871 gdbarch->addressable_memory_unit_size = addressable_memory_unit_size;
4872 }
4873
4874
4875 /* Keep a registry of per-architecture data-pointers required by GDB
4876 modules. */
4877
4878 struct gdbarch_data
4879 {
4880 unsigned index;
4881 int init_p;
4882 gdbarch_data_pre_init_ftype *pre_init;
4883 gdbarch_data_post_init_ftype *post_init;
4884 };
4885
4886 struct gdbarch_data_registration
4887 {
4888 struct gdbarch_data *data;
4889 struct gdbarch_data_registration *next;
4890 };
4891
4892 struct gdbarch_data_registry
4893 {
4894 unsigned nr;
4895 struct gdbarch_data_registration *registrations;
4896 };
4897
4898 struct gdbarch_data_registry gdbarch_data_registry =
4899 {
4900 0, NULL,
4901 };
4902
4903 static struct gdbarch_data *
4904 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4905 gdbarch_data_post_init_ftype *post_init)
4906 {
4907 struct gdbarch_data_registration **curr;
4908
4909 /* Append the new registration. */
4910 for (curr = &gdbarch_data_registry.registrations;
4911 (*curr) != NULL;
4912 curr = &(*curr)->next);
4913 (*curr) = XNEW (struct gdbarch_data_registration);
4914 (*curr)->next = NULL;
4915 (*curr)->data = XNEW (struct gdbarch_data);
4916 (*curr)->data->index = gdbarch_data_registry.nr++;
4917 (*curr)->data->pre_init = pre_init;
4918 (*curr)->data->post_init = post_init;
4919 (*curr)->data->init_p = 1;
4920 return (*curr)->data;
4921 }
4922
4923 struct gdbarch_data *
4924 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4925 {
4926 return gdbarch_data_register (pre_init, NULL);
4927 }
4928
4929 struct gdbarch_data *
4930 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4931 {
4932 return gdbarch_data_register (NULL, post_init);
4933 }
4934
4935 /* Create/delete the gdbarch data vector. */
4936
4937 static void
4938 alloc_gdbarch_data (struct gdbarch *gdbarch)
4939 {
4940 gdb_assert (gdbarch->data == NULL);
4941 gdbarch->nr_data = gdbarch_data_registry.nr;
4942 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4943 }
4944
4945 /* Initialize the current value of the specified per-architecture
4946 data-pointer. */
4947
4948 void
4949 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4950 struct gdbarch_data *data,
4951 void *pointer)
4952 {
4953 gdb_assert (data->index < gdbarch->nr_data);
4954 gdb_assert (gdbarch->data[data->index] == NULL);
4955 gdb_assert (data->pre_init == NULL);
4956 gdbarch->data[data->index] = pointer;
4957 }
4958
4959 /* Return the current value of the specified per-architecture
4960 data-pointer. */
4961
4962 void *
4963 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4964 {
4965 gdb_assert (data->index < gdbarch->nr_data);
4966 if (gdbarch->data[data->index] == NULL)
4967 {
4968 /* The data-pointer isn't initialized, call init() to get a
4969 value. */
4970 if (data->pre_init != NULL)
4971 /* Mid architecture creation: pass just the obstack, and not
4972 the entire architecture, as that way it isn't possible for
4973 pre-init code to refer to undefined architecture
4974 fields. */
4975 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4976 else if (gdbarch->initialized_p
4977 && data->post_init != NULL)
4978 /* Post architecture creation: pass the entire architecture
4979 (as all fields are valid), but be careful to also detect
4980 recursive references. */
4981 {
4982 gdb_assert (data->init_p);
4983 data->init_p = 0;
4984 gdbarch->data[data->index] = data->post_init (gdbarch);
4985 data->init_p = 1;
4986 }
4987 else
4988 /* The architecture initialization hasn't completed - punt -
4989 hope that the caller knows what they are doing. Once
4990 deprecated_set_gdbarch_data has been initialized, this can be
4991 changed to an internal error. */
4992 return NULL;
4993 gdb_assert (gdbarch->data[data->index] != NULL);
4994 }
4995 return gdbarch->data[data->index];
4996 }
4997
4998
4999 /* Keep a registry of the architectures known by GDB. */
5000
5001 struct gdbarch_registration
5002 {
5003 enum bfd_architecture bfd_architecture;
5004 gdbarch_init_ftype *init;
5005 gdbarch_dump_tdep_ftype *dump_tdep;
5006 struct gdbarch_list *arches;
5007 struct gdbarch_registration *next;
5008 };
5009
5010 static struct gdbarch_registration *gdbarch_registry = NULL;
5011
5012 static void
5013 append_name (const char ***buf, int *nr, const char *name)
5014 {
5015 *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
5016 (*buf)[*nr] = name;
5017 *nr += 1;
5018 }
5019
5020 const char **
5021 gdbarch_printable_names (void)
5022 {
5023 /* Accumulate a list of names based on the registed list of
5024 architectures. */
5025 int nr_arches = 0;
5026 const char **arches = NULL;
5027 struct gdbarch_registration *rego;
5028
5029 for (rego = gdbarch_registry;
5030 rego != NULL;
5031 rego = rego->next)
5032 {
5033 const struct bfd_arch_info *ap;
5034 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5035 if (ap == NULL)
5036 internal_error (__FILE__, __LINE__,
5037 _("gdbarch_architecture_names: multi-arch unknown"));
5038 do
5039 {
5040 append_name (&arches, &nr_arches, ap->printable_name);
5041 ap = ap->next;
5042 }
5043 while (ap != NULL);
5044 }
5045 append_name (&arches, &nr_arches, NULL);
5046 return arches;
5047 }
5048
5049
5050 void
5051 gdbarch_register (enum bfd_architecture bfd_architecture,
5052 gdbarch_init_ftype *init,
5053 gdbarch_dump_tdep_ftype *dump_tdep)
5054 {
5055 struct gdbarch_registration **curr;
5056 const struct bfd_arch_info *bfd_arch_info;
5057
5058 /* Check that BFD recognizes this architecture */
5059 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5060 if (bfd_arch_info == NULL)
5061 {
5062 internal_error (__FILE__, __LINE__,
5063 _("gdbarch: Attempt to register "
5064 "unknown architecture (%d)"),
5065 bfd_architecture);
5066 }
5067 /* Check that we haven't seen this architecture before. */
5068 for (curr = &gdbarch_registry;
5069 (*curr) != NULL;
5070 curr = &(*curr)->next)
5071 {
5072 if (bfd_architecture == (*curr)->bfd_architecture)
5073 internal_error (__FILE__, __LINE__,
5074 _("gdbarch: Duplicate registration "
5075 "of architecture (%s)"),
5076 bfd_arch_info->printable_name);
5077 }
5078 /* log it */
5079 if (gdbarch_debug)
5080 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
5081 bfd_arch_info->printable_name,
5082 host_address_to_string (init));
5083 /* Append it */
5084 (*curr) = XNEW (struct gdbarch_registration);
5085 (*curr)->bfd_architecture = bfd_architecture;
5086 (*curr)->init = init;
5087 (*curr)->dump_tdep = dump_tdep;
5088 (*curr)->arches = NULL;
5089 (*curr)->next = NULL;
5090 }
5091
5092 void
5093 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5094 gdbarch_init_ftype *init)
5095 {
5096 gdbarch_register (bfd_architecture, init, NULL);
5097 }
5098
5099
5100 /* Look for an architecture using gdbarch_info. */
5101
5102 struct gdbarch_list *
5103 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5104 const struct gdbarch_info *info)
5105 {
5106 for (; arches != NULL; arches = arches->next)
5107 {
5108 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5109 continue;
5110 if (info->byte_order != arches->gdbarch->byte_order)
5111 continue;
5112 if (info->osabi != arches->gdbarch->osabi)
5113 continue;
5114 if (info->target_desc != arches->gdbarch->target_desc)
5115 continue;
5116 return arches;
5117 }
5118 return NULL;
5119 }
5120
5121
5122 /* Find an architecture that matches the specified INFO. Create a new
5123 architecture if needed. Return that new architecture. */
5124
5125 struct gdbarch *
5126 gdbarch_find_by_info (struct gdbarch_info info)
5127 {
5128 struct gdbarch *new_gdbarch;
5129 struct gdbarch_registration *rego;
5130
5131 /* Fill in missing parts of the INFO struct using a number of
5132 sources: "set ..."; INFOabfd supplied; and the global
5133 defaults. */
5134 gdbarch_info_fill (&info);
5135
5136 /* Must have found some sort of architecture. */
5137 gdb_assert (info.bfd_arch_info != NULL);
5138
5139 if (gdbarch_debug)
5140 {
5141 fprintf_unfiltered (gdb_stdlog,
5142 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5143 (info.bfd_arch_info != NULL
5144 ? info.bfd_arch_info->printable_name
5145 : "(null)"));
5146 fprintf_unfiltered (gdb_stdlog,
5147 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5148 info.byte_order,
5149 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5150 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5151 : "default"));
5152 fprintf_unfiltered (gdb_stdlog,
5153 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5154 info.osabi, gdbarch_osabi_name (info.osabi));
5155 fprintf_unfiltered (gdb_stdlog,
5156 "gdbarch_find_by_info: info.abfd %s\n",
5157 host_address_to_string (info.abfd));
5158 fprintf_unfiltered (gdb_stdlog,
5159 "gdbarch_find_by_info: info.tdep_info %s\n",
5160 host_address_to_string (info.tdep_info));
5161 }
5162
5163 /* Find the tdep code that knows about this architecture. */
5164 for (rego = gdbarch_registry;
5165 rego != NULL;
5166 rego = rego->next)
5167 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5168 break;
5169 if (rego == NULL)
5170 {
5171 if (gdbarch_debug)
5172 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5173 "No matching architecture\n");
5174 return 0;
5175 }
5176
5177 /* Ask the tdep code for an architecture that matches "info". */
5178 new_gdbarch = rego->init (info, rego->arches);
5179
5180 /* Did the tdep code like it? No. Reject the change and revert to
5181 the old architecture. */
5182 if (new_gdbarch == NULL)
5183 {
5184 if (gdbarch_debug)
5185 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5186 "Target rejected architecture\n");
5187 return NULL;
5188 }
5189
5190 /* Is this a pre-existing architecture (as determined by already
5191 being initialized)? Move it to the front of the architecture
5192 list (keeping the list sorted Most Recently Used). */
5193 if (new_gdbarch->initialized_p)
5194 {
5195 struct gdbarch_list **list;
5196 struct gdbarch_list *self;
5197 if (gdbarch_debug)
5198 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5199 "Previous architecture %s (%s) selected\n",
5200 host_address_to_string (new_gdbarch),
5201 new_gdbarch->bfd_arch_info->printable_name);
5202 /* Find the existing arch in the list. */
5203 for (list = &rego->arches;
5204 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5205 list = &(*list)->next);
5206 /* It had better be in the list of architectures. */
5207 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5208 /* Unlink SELF. */
5209 self = (*list);
5210 (*list) = self->next;
5211 /* Insert SELF at the front. */
5212 self->next = rego->arches;
5213 rego->arches = self;
5214 /* Return it. */
5215 return new_gdbarch;
5216 }
5217
5218 /* It's a new architecture. */
5219 if (gdbarch_debug)
5220 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
5221 "New architecture %s (%s) selected\n",
5222 host_address_to_string (new_gdbarch),
5223 new_gdbarch->bfd_arch_info->printable_name);
5224
5225 /* Insert the new architecture into the front of the architecture
5226 list (keep the list sorted Most Recently Used). */
5227 {
5228 struct gdbarch_list *self = XNEW (struct gdbarch_list);
5229 self->next = rego->arches;
5230 self->gdbarch = new_gdbarch;
5231 rego->arches = self;
5232 }
5233
5234 /* Check that the newly installed architecture is valid. Plug in
5235 any post init values. */
5236 new_gdbarch->dump_tdep = rego->dump_tdep;
5237 verify_gdbarch (new_gdbarch);
5238 new_gdbarch->initialized_p = 1;
5239
5240 if (gdbarch_debug)
5241 gdbarch_dump (new_gdbarch, gdb_stdlog);
5242
5243 return new_gdbarch;
5244 }
5245
5246 /* Make the specified architecture current. */
5247
5248 void
5249 set_target_gdbarch (struct gdbarch *new_gdbarch)
5250 {
5251 gdb_assert (new_gdbarch != NULL);
5252 gdb_assert (new_gdbarch->initialized_p);
5253 current_inferior ()->gdbarch = new_gdbarch;
5254 observer_notify_architecture_changed (new_gdbarch);
5255 registers_changed ();
5256 }
5257
5258 /* Return the current inferior's arch. */
5259
5260 struct gdbarch *
5261 target_gdbarch (void)
5262 {
5263 return current_inferior ()->gdbarch;
5264 }
5265
5266 extern void _initialize_gdbarch (void);
5267
5268 void
5269 _initialize_gdbarch (void)
5270 {
5271 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
5272 Set architecture debugging."), _("\
5273 Show architecture debugging."), _("\
5274 When non-zero, architecture debugging is enabled."),
5275 NULL,
5276 show_gdbarch_debug,
5277 &setdebuglist, &showdebuglist);
5278 }