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