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