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