1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2015 Free Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
43 #include "floatformat.h"
44 #include "reggroups.h"
46 #include "gdb_obstack.h"
51 /* Static function declarations */
53 static void alloc_gdbarch_data (struct gdbarch
*);
55 /* Non-zero if we want to trace architecture code. */
58 #define GDBARCH_DEBUG 0
60 unsigned int gdbarch_debug
= GDBARCH_DEBUG
;
62 show_gdbarch_debug (struct ui_file
*file
, int from_tty
,
63 struct cmd_list_element
*c
, const char *value
)
65 fprintf_filtered (file
, _("Architecture debugging is %s.\n"), value
);
69 pformat (const struct floatformat
**format
)
74 /* Just print out one of them - this is only for diagnostics. */
75 return format
[0]->name
;
79 pstring (const char *string
)
86 /* Helper function to print a list of strings, represented as "const
87 char *const *". The list is printed comma-separated. */
90 pstring_list (const char *const *list
)
100 for (p
= list
; *p
!= NULL
&& offset
< sizeof (ret
); ++p
)
102 size_t s
= xsnprintf (ret
+ offset
, sizeof (ret
) - offset
, "%s, ", *p
);
108 gdb_assert (offset
- 2 < sizeof (ret
));
109 ret
[offset
- 2] = '\0';
116 /* Maintain the struct gdbarch object. */
120 /* Has this architecture been fully initialized? */
123 /* An obstack bound to the lifetime of the architecture. */
124 struct obstack
*obstack
;
126 /* basic architectural information. */
127 const struct bfd_arch_info
* bfd_arch_info
;
128 enum bfd_endian byte_order
;
129 enum bfd_endian byte_order_for_code
;
130 enum gdb_osabi osabi
;
131 const struct target_desc
* target_desc
;
133 /* target specific vector. */
134 struct gdbarch_tdep
*tdep
;
135 gdbarch_dump_tdep_ftype
*dump_tdep
;
137 /* per-architecture data-pointers. */
141 /* Multi-arch values.
143 When extending this structure you must:
147 Declare set/get functions and define the corresponding
150 gdbarch_alloc(): If zero/NULL is not a suitable default,
151 initialize the new field.
153 verify_gdbarch(): Confirm that the target updated the field
156 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
159 get_gdbarch(): Implement the set/get functions (probably using
160 the macro's as shortcuts).
169 int long_long_align_bit
;
171 const struct floatformat
** half_format
;
173 const struct floatformat
** float_format
;
175 const struct floatformat
** double_format
;
177 const struct floatformat
** long_double_format
;
180 int dwarf2_addr_size
;
182 gdbarch_read_pc_ftype
*read_pc
;
183 gdbarch_write_pc_ftype
*write_pc
;
184 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
185 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
186 gdbarch_pseudo_register_read_value_ftype
*pseudo_register_read_value
;
187 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
190 gdbarch_ax_pseudo_register_collect_ftype
*ax_pseudo_register_collect
;
191 gdbarch_ax_pseudo_register_push_stack_ftype
*ax_pseudo_register_push_stack
;
196 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
197 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
198 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
199 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
200 gdbarch_register_name_ftype
*register_name
;
201 gdbarch_register_type_ftype
*register_type
;
202 gdbarch_dummy_id_ftype
*dummy_id
;
203 int deprecated_fp_regnum
;
204 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
205 int call_dummy_location
;
206 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
207 gdbarch_print_registers_info_ftype
*print_registers_info
;
208 gdbarch_print_float_info_ftype
*print_float_info
;
209 gdbarch_print_vector_info_ftype
*print_vector_info
;
210 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
211 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
212 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
213 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
214 int believe_pcc_promotion
;
215 gdbarch_convert_register_p_ftype
*convert_register_p
;
216 gdbarch_register_to_value_ftype
*register_to_value
;
217 gdbarch_value_to_register_ftype
*value_to_register
;
218 gdbarch_value_from_register_ftype
*value_from_register
;
219 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
220 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
221 gdbarch_integer_to_address_ftype
*integer_to_address
;
222 gdbarch_return_value_ftype
*return_value
;
223 gdbarch_return_in_first_hidden_param_p_ftype
*return_in_first_hidden_param_p
;
224 gdbarch_skip_prologue_ftype
*skip_prologue
;
225 gdbarch_skip_main_prologue_ftype
*skip_main_prologue
;
226 gdbarch_skip_entrypoint_ftype
*skip_entrypoint
;
227 gdbarch_inner_than_ftype
*inner_than
;
228 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
229 gdbarch_remote_breakpoint_from_pc_ftype
*remote_breakpoint_from_pc
;
230 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
231 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
232 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
233 CORE_ADDR decr_pc_after_break
;
234 CORE_ADDR deprecated_function_start_offset
;
235 gdbarch_remote_register_number_ftype
*remote_register_number
;
236 gdbarch_fetch_tls_load_module_address_ftype
*fetch_tls_load_module_address
;
237 CORE_ADDR frame_args_skip
;
238 gdbarch_unwind_pc_ftype
*unwind_pc
;
239 gdbarch_unwind_sp_ftype
*unwind_sp
;
240 gdbarch_frame_num_args_ftype
*frame_num_args
;
241 gdbarch_frame_align_ftype
*frame_align
;
242 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
243 int frame_red_zone_size
;
244 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
245 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
246 gdbarch_software_single_step_ftype
*software_single_step
;
247 gdbarch_single_step_through_delay_ftype
*single_step_through_delay
;
248 gdbarch_print_insn_ftype
*print_insn
;
249 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
250 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
251 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
252 gdbarch_stack_frame_destroyed_p_ftype
*stack_frame_destroyed_p
;
253 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
254 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
255 gdbarch_make_symbol_special_ftype
*make_symbol_special
;
256 gdbarch_adjust_dwarf2_addr_ftype
*adjust_dwarf2_addr
;
257 gdbarch_adjust_dwarf2_line_ftype
*adjust_dwarf2_line
;
258 int cannot_step_breakpoint
;
259 int have_nonsteppable_watchpoint
;
260 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
261 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
262 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
263 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
264 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
265 gdbarch_iterate_over_regset_sections_ftype
*iterate_over_regset_sections
;
266 gdbarch_make_corefile_notes_ftype
*make_corefile_notes
;
267 gdbarch_elfcore_write_linux_prpsinfo_ftype
*elfcore_write_linux_prpsinfo
;
268 gdbarch_find_memory_regions_ftype
*find_memory_regions
;
269 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
270 gdbarch_core_xfer_shared_libraries_aix_ftype
*core_xfer_shared_libraries_aix
;
271 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
272 const char * gcore_bfd_target
;
273 int vtable_function_descriptors
;
275 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
276 ULONGEST max_insn_length
;
277 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
278 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
279 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
280 gdbarch_displaced_step_free_closure_ftype
*displaced_step_free_closure
;
281 gdbarch_displaced_step_location_ftype
*displaced_step_location
;
282 gdbarch_relocate_instruction_ftype
*relocate_instruction
;
283 gdbarch_overlay_update_ftype
*overlay_update
;
284 gdbarch_core_read_description_ftype
*core_read_description
;
285 gdbarch_static_transform_name_ftype
*static_transform_name
;
286 int sofun_address_maybe_missing
;
287 gdbarch_process_record_ftype
*process_record
;
288 gdbarch_process_record_signal_ftype
*process_record_signal
;
289 gdbarch_gdb_signal_from_target_ftype
*gdb_signal_from_target
;
290 gdbarch_gdb_signal_to_target_ftype
*gdb_signal_to_target
;
291 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
292 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
293 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
294 const char * xml_syscall_file
;
295 struct syscalls_info
* syscalls_info
;
296 const char *const * stap_integer_prefixes
;
297 const char *const * stap_integer_suffixes
;
298 const char *const * stap_register_prefixes
;
299 const char *const * stap_register_suffixes
;
300 const char *const * stap_register_indirection_prefixes
;
301 const char *const * stap_register_indirection_suffixes
;
302 const char * stap_gdb_register_prefix
;
303 const char * stap_gdb_register_suffix
;
304 gdbarch_stap_is_single_operand_ftype
*stap_is_single_operand
;
305 gdbarch_stap_parse_special_token_ftype
*stap_parse_special_token
;
306 gdbarch_dtrace_parse_probe_argument_ftype
*dtrace_parse_probe_argument
;
307 gdbarch_dtrace_probe_is_enabled_ftype
*dtrace_probe_is_enabled
;
308 gdbarch_dtrace_enable_probe_ftype
*dtrace_enable_probe
;
309 gdbarch_dtrace_disable_probe_ftype
*dtrace_disable_probe
;
310 int has_global_solist
;
311 int has_global_breakpoints
;
312 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
313 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
314 gdbarch_auto_charset_ftype
*auto_charset
;
315 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
316 const char * solib_symbols_extension
;
317 int has_dos_based_file_system
;
318 gdbarch_gen_return_address_ftype
*gen_return_address
;
319 gdbarch_info_proc_ftype
*info_proc
;
320 gdbarch_core_info_proc_ftype
*core_info_proc
;
321 gdbarch_iterate_over_objfiles_in_search_order_ftype
*iterate_over_objfiles_in_search_order
;
322 struct ravenscar_arch_ops
* ravenscar_ops
;
323 gdbarch_insn_is_call_ftype
*insn_is_call
;
324 gdbarch_insn_is_ret_ftype
*insn_is_ret
;
325 gdbarch_insn_is_jump_ftype
*insn_is_jump
;
326 gdbarch_auxv_parse_ftype
*auxv_parse
;
327 gdbarch_vsyscall_range_ftype
*vsyscall_range
;
328 gdbarch_infcall_mmap_ftype
*infcall_mmap
;
329 gdbarch_infcall_munmap_ftype
*infcall_munmap
;
330 gdbarch_gcc_target_options_ftype
*gcc_target_options
;
331 gdbarch_gnu_triplet_regexp_ftype
*gnu_triplet_regexp
;
334 /* Create a new ``struct gdbarch'' based on information provided by
335 ``struct gdbarch_info''. */
338 gdbarch_alloc (const struct gdbarch_info
*info
,
339 struct gdbarch_tdep
*tdep
)
341 struct gdbarch
*gdbarch
;
343 /* Create an obstack for allocating all the per-architecture memory,
344 then use that to allocate the architecture vector. */
345 struct obstack
*obstack
= XNEW (struct obstack
);
346 obstack_init (obstack
);
347 gdbarch
= obstack_alloc (obstack
, sizeof (*gdbarch
));
348 memset (gdbarch
, 0, sizeof (*gdbarch
));
349 gdbarch
->obstack
= obstack
;
351 alloc_gdbarch_data (gdbarch
);
353 gdbarch
->tdep
= tdep
;
355 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
356 gdbarch
->byte_order
= info
->byte_order
;
357 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
358 gdbarch
->osabi
= info
->osabi
;
359 gdbarch
->target_desc
= info
->target_desc
;
361 /* Force the explicit initialization of these. */
362 gdbarch
->bits_big_endian
= (gdbarch
->byte_order
== BFD_ENDIAN_BIG
);
363 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
364 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
365 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
366 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
367 gdbarch
->long_long_align_bit
= 2*gdbarch
->long_bit
;
368 gdbarch
->half_bit
= 2*TARGET_CHAR_BIT
;
369 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
370 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
371 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
372 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
373 gdbarch
->char_signed
= -1;
374 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
375 gdbarch
->num_regs
= -1;
376 gdbarch
->sp_regnum
= -1;
377 gdbarch
->pc_regnum
= -1;
378 gdbarch
->ps_regnum
= -1;
379 gdbarch
->fp0_regnum
= -1;
380 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
381 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
382 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
383 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
384 gdbarch
->deprecated_fp_regnum
= -1;
385 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
386 gdbarch
->print_registers_info
= default_print_registers_info
;
387 gdbarch
->print_float_info
= default_print_float_info
;
388 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
389 gdbarch
->cannot_fetch_register
= cannot_register_not
;
390 gdbarch
->cannot_store_register
= cannot_register_not
;
391 gdbarch
->convert_register_p
= generic_convert_register_p
;
392 gdbarch
->value_from_register
= default_value_from_register
;
393 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
394 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
395 gdbarch
->return_in_first_hidden_param_p
= default_return_in_first_hidden_param_p
;
396 gdbarch
->remote_breakpoint_from_pc
= default_remote_breakpoint_from_pc
;
397 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
398 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
399 gdbarch
->remote_register_number
= default_remote_register_number
;
400 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
401 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
402 gdbarch
->addr_bits_remove
= core_addr_identity
;
403 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
404 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
405 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
406 gdbarch
->stack_frame_destroyed_p
= generic_stack_frame_destroyed_p
;
407 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
408 gdbarch
->make_symbol_special
= default_make_symbol_special
;
409 gdbarch
->adjust_dwarf2_addr
= default_adjust_dwarf2_addr
;
410 gdbarch
->adjust_dwarf2_line
= default_adjust_dwarf2_line
;
411 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
412 gdbarch
->skip_permanent_breakpoint
= default_skip_permanent_breakpoint
;
413 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
414 gdbarch
->displaced_step_fixup
= NULL
;
415 gdbarch
->displaced_step_free_closure
= NULL
;
416 gdbarch
->displaced_step_location
= NULL
;
417 gdbarch
->relocate_instruction
= NULL
;
418 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
419 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
420 gdbarch
->auto_charset
= default_auto_charset
;
421 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
422 gdbarch
->gen_return_address
= default_gen_return_address
;
423 gdbarch
->iterate_over_objfiles_in_search_order
= default_iterate_over_objfiles_in_search_order
;
424 gdbarch
->ravenscar_ops
= NULL
;
425 gdbarch
->insn_is_call
= default_insn_is_call
;
426 gdbarch
->insn_is_ret
= default_insn_is_ret
;
427 gdbarch
->insn_is_jump
= default_insn_is_jump
;
428 gdbarch
->vsyscall_range
= default_vsyscall_range
;
429 gdbarch
->infcall_mmap
= default_infcall_mmap
;
430 gdbarch
->infcall_munmap
= default_infcall_munmap
;
431 gdbarch
->gcc_target_options
= default_gcc_target_options
;
432 gdbarch
->gnu_triplet_regexp
= default_gnu_triplet_regexp
;
433 /* gdbarch_alloc() */
439 /* Allocate extra space using the per-architecture obstack. */
442 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
444 void *data
= obstack_alloc (arch
->obstack
, size
);
446 memset (data
, 0, size
);
451 /* Free a gdbarch struct. This should never happen in normal
452 operation --- once you've created a gdbarch, you keep it around.
453 However, if an architecture's init function encounters an error
454 building the structure, it may need to clean up a partially
455 constructed gdbarch. */
458 gdbarch_free (struct gdbarch
*arch
)
460 struct obstack
*obstack
;
462 gdb_assert (arch
!= NULL
);
463 gdb_assert (!arch
->initialized_p
);
464 obstack
= arch
->obstack
;
465 obstack_free (obstack
, 0); /* Includes the ARCH. */
470 /* Ensure that all values in a GDBARCH are reasonable. */
473 verify_gdbarch (struct gdbarch
*gdbarch
)
476 struct cleanup
*cleanups
;
480 log
= mem_fileopen ();
481 cleanups
= make_cleanup_ui_file_delete (log
);
483 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
484 fprintf_unfiltered (log
, "\n\tbyte-order");
485 if (gdbarch
->bfd_arch_info
== NULL
)
486 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
487 /* Check those that need to be defined for the given multi-arch level. */
488 /* Skip verify of bits_big_endian, invalid_p == 0 */
489 /* Skip verify of short_bit, invalid_p == 0 */
490 /* Skip verify of int_bit, invalid_p == 0 */
491 /* Skip verify of long_bit, invalid_p == 0 */
492 /* Skip verify of long_long_bit, invalid_p == 0 */
493 /* Skip verify of long_long_align_bit, invalid_p == 0 */
494 /* Skip verify of half_bit, invalid_p == 0 */
495 if (gdbarch
->half_format
== 0)
496 gdbarch
->half_format
= floatformats_ieee_half
;
497 /* Skip verify of float_bit, invalid_p == 0 */
498 if (gdbarch
->float_format
== 0)
499 gdbarch
->float_format
= floatformats_ieee_single
;
500 /* Skip verify of double_bit, invalid_p == 0 */
501 if (gdbarch
->double_format
== 0)
502 gdbarch
->double_format
= floatformats_ieee_double
;
503 /* Skip verify of long_double_bit, invalid_p == 0 */
504 if (gdbarch
->long_double_format
== 0)
505 gdbarch
->long_double_format
= floatformats_ieee_double
;
506 /* Skip verify of ptr_bit, invalid_p == 0 */
507 if (gdbarch
->addr_bit
== 0)
508 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
509 if (gdbarch
->dwarf2_addr_size
== 0)
510 gdbarch
->dwarf2_addr_size
= gdbarch_ptr_bit (gdbarch
) / TARGET_CHAR_BIT
;
511 if (gdbarch
->char_signed
== -1)
512 gdbarch
->char_signed
= 1;
513 /* Skip verify of read_pc, has predicate. */
514 /* Skip verify of write_pc, has predicate. */
515 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
516 /* Skip verify of pseudo_register_read, has predicate. */
517 /* Skip verify of pseudo_register_read_value, has predicate. */
518 /* Skip verify of pseudo_register_write, has predicate. */
519 if (gdbarch
->num_regs
== -1)
520 fprintf_unfiltered (log
, "\n\tnum_regs");
521 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
522 /* Skip verify of ax_pseudo_register_collect, has predicate. */
523 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
524 /* Skip verify of sp_regnum, invalid_p == 0 */
525 /* Skip verify of pc_regnum, invalid_p == 0 */
526 /* Skip verify of ps_regnum, invalid_p == 0 */
527 /* Skip verify of fp0_regnum, invalid_p == 0 */
528 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
529 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
530 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
531 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
532 if (gdbarch
->register_name
== 0)
533 fprintf_unfiltered (log
, "\n\tregister_name");
534 /* Skip verify of register_type, has predicate. */
535 /* Skip verify of dummy_id, has predicate. */
536 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
537 /* Skip verify of push_dummy_call, has predicate. */
538 /* Skip verify of call_dummy_location, invalid_p == 0 */
539 /* Skip verify of push_dummy_code, has predicate. */
540 /* Skip verify of print_registers_info, invalid_p == 0 */
541 /* Skip verify of print_float_info, invalid_p == 0 */
542 /* Skip verify of print_vector_info, has predicate. */
543 /* Skip verify of register_sim_regno, invalid_p == 0 */
544 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
545 /* Skip verify of cannot_store_register, invalid_p == 0 */
546 /* Skip verify of get_longjmp_target, has predicate. */
547 /* Skip verify of convert_register_p, invalid_p == 0 */
548 /* Skip verify of value_from_register, invalid_p == 0 */
549 /* Skip verify of pointer_to_address, invalid_p == 0 */
550 /* Skip verify of address_to_pointer, invalid_p == 0 */
551 /* Skip verify of integer_to_address, has predicate. */
552 /* Skip verify of return_value, has predicate. */
553 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
554 if (gdbarch
->skip_prologue
== 0)
555 fprintf_unfiltered (log
, "\n\tskip_prologue");
556 /* Skip verify of skip_main_prologue, has predicate. */
557 /* Skip verify of skip_entrypoint, has predicate. */
558 if (gdbarch
->inner_than
== 0)
559 fprintf_unfiltered (log
, "\n\tinner_than");
560 if (gdbarch
->breakpoint_from_pc
== 0)
561 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
562 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
563 /* Skip verify of adjust_breakpoint_address, has predicate. */
564 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
565 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
566 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
567 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
568 /* Skip verify of remote_register_number, invalid_p == 0 */
569 /* Skip verify of fetch_tls_load_module_address, has predicate. */
570 /* Skip verify of frame_args_skip, invalid_p == 0 */
571 /* Skip verify of unwind_pc, has predicate. */
572 /* Skip verify of unwind_sp, has predicate. */
573 /* Skip verify of frame_num_args, has predicate. */
574 /* Skip verify of frame_align, has predicate. */
575 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
576 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
577 /* Skip verify of addr_bits_remove, invalid_p == 0 */
578 /* Skip verify of software_single_step, has predicate. */
579 /* Skip verify of single_step_through_delay, has predicate. */
580 if (gdbarch
->print_insn
== 0)
581 fprintf_unfiltered (log
, "\n\tprint_insn");
582 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
583 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
584 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
585 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
586 /* Skip verify of elf_make_msymbol_special, has predicate. */
587 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
588 /* Skip verify of make_symbol_special, invalid_p == 0 */
589 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
590 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
591 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
592 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
593 /* Skip verify of address_class_type_flags, has predicate. */
594 /* Skip verify of address_class_type_flags_to_name, has predicate. */
595 /* Skip verify of address_class_name_to_type_flags, has predicate. */
596 /* Skip verify of register_reggroup_p, invalid_p == 0 */
597 /* Skip verify of fetch_pointer_argument, has predicate. */
598 /* Skip verify of iterate_over_regset_sections, has predicate. */
599 /* Skip verify of make_corefile_notes, has predicate. */
600 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
601 /* Skip verify of find_memory_regions, has predicate. */
602 /* Skip verify of core_xfer_shared_libraries, has predicate. */
603 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
604 /* Skip verify of core_pid_to_str, has predicate. */
605 /* Skip verify of gcore_bfd_target, has predicate. */
606 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
607 /* Skip verify of vbit_in_delta, invalid_p == 0 */
608 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
609 /* Skip verify of max_insn_length, has predicate. */
610 /* Skip verify of displaced_step_copy_insn, has predicate. */
611 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
612 /* Skip verify of displaced_step_fixup, has predicate. */
613 if ((! gdbarch
->displaced_step_free_closure
) != (! gdbarch
->displaced_step_copy_insn
))
614 fprintf_unfiltered (log
, "\n\tdisplaced_step_free_closure");
615 if ((! gdbarch
->displaced_step_location
) != (! gdbarch
->displaced_step_copy_insn
))
616 fprintf_unfiltered (log
, "\n\tdisplaced_step_location");
617 /* Skip verify of relocate_instruction, has predicate. */
618 /* Skip verify of overlay_update, has predicate. */
619 /* Skip verify of core_read_description, has predicate. */
620 /* Skip verify of static_transform_name, has predicate. */
621 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
622 /* Skip verify of process_record, has predicate. */
623 /* Skip verify of process_record_signal, has predicate. */
624 /* Skip verify of gdb_signal_from_target, has predicate. */
625 /* Skip verify of gdb_signal_to_target, has predicate. */
626 /* Skip verify of get_siginfo_type, has predicate. */
627 /* Skip verify of record_special_symbol, has predicate. */
628 /* Skip verify of get_syscall_number, has predicate. */
629 /* Skip verify of xml_syscall_file, invalid_p == 0 */
630 /* Skip verify of syscalls_info, invalid_p == 0 */
631 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
632 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
633 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
634 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
635 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
636 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
637 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
638 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
639 /* Skip verify of stap_is_single_operand, has predicate. */
640 /* Skip verify of stap_parse_special_token, has predicate. */
641 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
642 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
643 /* Skip verify of dtrace_enable_probe, has predicate. */
644 /* Skip verify of dtrace_disable_probe, has predicate. */
645 /* Skip verify of has_global_solist, invalid_p == 0 */
646 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
647 /* Skip verify of has_shared_address_space, invalid_p == 0 */
648 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
649 /* Skip verify of auto_charset, invalid_p == 0 */
650 /* Skip verify of auto_wide_charset, invalid_p == 0 */
651 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
652 /* Skip verify of gen_return_address, invalid_p == 0 */
653 /* Skip verify of info_proc, has predicate. */
654 /* Skip verify of core_info_proc, has predicate. */
655 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
656 /* Skip verify of ravenscar_ops, invalid_p == 0 */
657 /* Skip verify of insn_is_call, invalid_p == 0 */
658 /* Skip verify of insn_is_ret, invalid_p == 0 */
659 /* Skip verify of insn_is_jump, invalid_p == 0 */
660 /* Skip verify of auxv_parse, has predicate. */
661 /* Skip verify of vsyscall_range, invalid_p == 0 */
662 /* Skip verify of infcall_mmap, invalid_p == 0 */
663 /* Skip verify of infcall_munmap, invalid_p == 0 */
664 /* Skip verify of gcc_target_options, invalid_p == 0 */
665 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
666 buf
= ui_file_xstrdup (log
, &length
);
667 make_cleanup (xfree
, buf
);
669 internal_error (__FILE__
, __LINE__
,
670 _("verify_gdbarch: the following are invalid ...%s"),
672 do_cleanups (cleanups
);
676 /* Print out the details of the current architecture. */
679 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
681 const char *gdb_nm_file
= "<not-defined>";
683 #if defined (GDB_NM_FILE)
684 gdb_nm_file
= GDB_NM_FILE
;
686 fprintf_unfiltered (file
,
687 "gdbarch_dump: GDB_NM_FILE = %s\n",
689 fprintf_unfiltered (file
,
690 "gdbarch_dump: addr_bit = %s\n",
691 plongest (gdbarch
->addr_bit
));
692 fprintf_unfiltered (file
,
693 "gdbarch_dump: addr_bits_remove = <%s>\n",
694 host_address_to_string (gdbarch
->addr_bits_remove
));
695 fprintf_unfiltered (file
,
696 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
697 gdbarch_address_class_name_to_type_flags_p (gdbarch
));
698 fprintf_unfiltered (file
,
699 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
700 host_address_to_string (gdbarch
->address_class_name_to_type_flags
));
701 fprintf_unfiltered (file
,
702 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
703 gdbarch_address_class_type_flags_p (gdbarch
));
704 fprintf_unfiltered (file
,
705 "gdbarch_dump: address_class_type_flags = <%s>\n",
706 host_address_to_string (gdbarch
->address_class_type_flags
));
707 fprintf_unfiltered (file
,
708 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
709 gdbarch_address_class_type_flags_to_name_p (gdbarch
));
710 fprintf_unfiltered (file
,
711 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
712 host_address_to_string (gdbarch
->address_class_type_flags_to_name
));
713 fprintf_unfiltered (file
,
714 "gdbarch_dump: address_to_pointer = <%s>\n",
715 host_address_to_string (gdbarch
->address_to_pointer
));
716 fprintf_unfiltered (file
,
717 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
718 gdbarch_adjust_breakpoint_address_p (gdbarch
));
719 fprintf_unfiltered (file
,
720 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
721 host_address_to_string (gdbarch
->adjust_breakpoint_address
));
722 fprintf_unfiltered (file
,
723 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
724 host_address_to_string (gdbarch
->adjust_dwarf2_addr
));
725 fprintf_unfiltered (file
,
726 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
727 host_address_to_string (gdbarch
->adjust_dwarf2_line
));
728 fprintf_unfiltered (file
,
729 "gdbarch_dump: auto_charset = <%s>\n",
730 host_address_to_string (gdbarch
->auto_charset
));
731 fprintf_unfiltered (file
,
732 "gdbarch_dump: auto_wide_charset = <%s>\n",
733 host_address_to_string (gdbarch
->auto_wide_charset
));
734 fprintf_unfiltered (file
,
735 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
736 gdbarch_auxv_parse_p (gdbarch
));
737 fprintf_unfiltered (file
,
738 "gdbarch_dump: auxv_parse = <%s>\n",
739 host_address_to_string (gdbarch
->auxv_parse
));
740 fprintf_unfiltered (file
,
741 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
742 gdbarch_ax_pseudo_register_collect_p (gdbarch
));
743 fprintf_unfiltered (file
,
744 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
745 host_address_to_string (gdbarch
->ax_pseudo_register_collect
));
746 fprintf_unfiltered (file
,
747 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
748 gdbarch_ax_pseudo_register_push_stack_p (gdbarch
));
749 fprintf_unfiltered (file
,
750 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
751 host_address_to_string (gdbarch
->ax_pseudo_register_push_stack
));
752 fprintf_unfiltered (file
,
753 "gdbarch_dump: believe_pcc_promotion = %s\n",
754 plongest (gdbarch
->believe_pcc_promotion
));
755 fprintf_unfiltered (file
,
756 "gdbarch_dump: bfd_arch_info = %s\n",
757 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
758 fprintf_unfiltered (file
,
759 "gdbarch_dump: bits_big_endian = %s\n",
760 plongest (gdbarch
->bits_big_endian
));
761 fprintf_unfiltered (file
,
762 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
763 host_address_to_string (gdbarch
->breakpoint_from_pc
));
764 fprintf_unfiltered (file
,
765 "gdbarch_dump: byte_order = %s\n",
766 plongest (gdbarch
->byte_order
));
767 fprintf_unfiltered (file
,
768 "gdbarch_dump: byte_order_for_code = %s\n",
769 plongest (gdbarch
->byte_order_for_code
));
770 fprintf_unfiltered (file
,
771 "gdbarch_dump: call_dummy_location = %s\n",
772 plongest (gdbarch
->call_dummy_location
));
773 fprintf_unfiltered (file
,
774 "gdbarch_dump: cannot_fetch_register = <%s>\n",
775 host_address_to_string (gdbarch
->cannot_fetch_register
));
776 fprintf_unfiltered (file
,
777 "gdbarch_dump: cannot_step_breakpoint = %s\n",
778 plongest (gdbarch
->cannot_step_breakpoint
));
779 fprintf_unfiltered (file
,
780 "gdbarch_dump: cannot_store_register = <%s>\n",
781 host_address_to_string (gdbarch
->cannot_store_register
));
782 fprintf_unfiltered (file
,
783 "gdbarch_dump: char_signed = %s\n",
784 plongest (gdbarch
->char_signed
));
785 fprintf_unfiltered (file
,
786 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
787 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
788 fprintf_unfiltered (file
,
789 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
790 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: convert_register_p = <%s>\n",
793 host_address_to_string (gdbarch
->convert_register_p
));
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
796 gdbarch_core_info_proc_p (gdbarch
));
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: core_info_proc = <%s>\n",
799 host_address_to_string (gdbarch
->core_info_proc
));
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
802 gdbarch_core_pid_to_str_p (gdbarch
));
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: core_pid_to_str = <%s>\n",
805 host_address_to_string (gdbarch
->core_pid_to_str
));
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
808 gdbarch_core_read_description_p (gdbarch
));
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: core_read_description = <%s>\n",
811 host_address_to_string (gdbarch
->core_read_description
));
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
814 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
817 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
820 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch
));
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
823 host_address_to_string (gdbarch
->core_xfer_shared_libraries_aix
));
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: decr_pc_after_break = %s\n",
826 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: deprecated_fp_regnum = %s\n",
829 plongest (gdbarch
->deprecated_fp_regnum
));
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: deprecated_function_start_offset = %s\n",
832 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
835 gdbarch_displaced_step_copy_insn_p (gdbarch
));
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
838 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
841 gdbarch_displaced_step_fixup_p (gdbarch
));
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: displaced_step_fixup = <%s>\n",
844 host_address_to_string (gdbarch
->displaced_step_fixup
));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
847 host_address_to_string (gdbarch
->displaced_step_free_closure
));
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
850 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: displaced_step_location = <%s>\n",
853 host_address_to_string (gdbarch
->displaced_step_location
));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: double_bit = %s\n",
856 plongest (gdbarch
->double_bit
));
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: double_format = %s\n",
859 pformat (gdbarch
->double_format
));
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
862 gdbarch_dtrace_disable_probe_p (gdbarch
));
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
865 host_address_to_string (gdbarch
->dtrace_disable_probe
));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
868 gdbarch_dtrace_enable_probe_p (gdbarch
));
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
871 host_address_to_string (gdbarch
->dtrace_enable_probe
));
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
874 gdbarch_dtrace_parse_probe_argument_p (gdbarch
));
875 fprintf_unfiltered (file
,
876 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
877 host_address_to_string (gdbarch
->dtrace_parse_probe_argument
));
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
880 gdbarch_dtrace_probe_is_enabled_p (gdbarch
));
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
883 host_address_to_string (gdbarch
->dtrace_probe_is_enabled
));
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
886 gdbarch_dummy_id_p (gdbarch
));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: dummy_id = <%s>\n",
889 host_address_to_string (gdbarch
->dummy_id
));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: dwarf2_addr_size = %s\n",
892 plongest (gdbarch
->dwarf2_addr_size
));
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
895 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
898 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
901 gdbarch_elf_make_msymbol_special_p (gdbarch
));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
904 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
907 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch
));
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
910 host_address_to_string (gdbarch
->elfcore_write_linux_prpsinfo
));
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
913 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
916 gdbarch_fetch_pointer_argument_p (gdbarch
));
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
919 host_address_to_string (gdbarch
->fetch_pointer_argument
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
922 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
925 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
928 gdbarch_find_memory_regions_p (gdbarch
));
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: find_memory_regions = <%s>\n",
931 host_address_to_string (gdbarch
->find_memory_regions
));
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: float_bit = %s\n",
934 plongest (gdbarch
->float_bit
));
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: float_format = %s\n",
937 pformat (gdbarch
->float_format
));
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: fp0_regnum = %s\n",
940 plongest (gdbarch
->fp0_regnum
));
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
943 gdbarch_frame_align_p (gdbarch
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: frame_align = <%s>\n",
946 host_address_to_string (gdbarch
->frame_align
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: frame_args_skip = %s\n",
949 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
952 gdbarch_frame_num_args_p (gdbarch
));
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: frame_num_args = <%s>\n",
955 host_address_to_string (gdbarch
->frame_num_args
));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: frame_red_zone_size = %s\n",
958 plongest (gdbarch
->frame_red_zone_size
));
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: gcc_target_options = <%s>\n",
961 host_address_to_string (gdbarch
->gcc_target_options
));
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
964 gdbarch_gcore_bfd_target_p (gdbarch
));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: gcore_bfd_target = %s\n",
967 pstring (gdbarch
->gcore_bfd_target
));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
970 gdbarch_gdb_signal_from_target_p (gdbarch
));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
973 host_address_to_string (gdbarch
->gdb_signal_from_target
));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
976 gdbarch_gdb_signal_to_target_p (gdbarch
));
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
979 host_address_to_string (gdbarch
->gdb_signal_to_target
));
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: gen_return_address = <%s>\n",
982 host_address_to_string (gdbarch
->gen_return_address
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
985 gdbarch_get_longjmp_target_p (gdbarch
));
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: get_longjmp_target = <%s>\n",
988 host_address_to_string (gdbarch
->get_longjmp_target
));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
991 gdbarch_get_siginfo_type_p (gdbarch
));
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: get_siginfo_type = <%s>\n",
994 host_address_to_string (gdbarch
->get_siginfo_type
));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
997 gdbarch_get_syscall_number_p (gdbarch
));
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: get_syscall_number = <%s>\n",
1000 host_address_to_string (gdbarch
->get_syscall_number
));
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1003 host_address_to_string (gdbarch
->gnu_triplet_regexp
));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: half_bit = %s\n",
1006 plongest (gdbarch
->half_bit
));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: half_format = %s\n",
1009 pformat (gdbarch
->half_format
));
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: has_dos_based_file_system = %s\n",
1012 plongest (gdbarch
->has_dos_based_file_system
));
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: has_global_breakpoints = %s\n",
1015 plongest (gdbarch
->has_global_breakpoints
));
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: has_global_solist = %s\n",
1018 plongest (gdbarch
->has_global_solist
));
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: has_shared_address_space = <%s>\n",
1021 host_address_to_string (gdbarch
->has_shared_address_space
));
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1024 plongest (gdbarch
->have_nonsteppable_watchpoint
));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1027 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: infcall_mmap = <%s>\n",
1030 host_address_to_string (gdbarch
->infcall_mmap
));
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: infcall_munmap = <%s>\n",
1033 host_address_to_string (gdbarch
->infcall_munmap
));
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1036 gdbarch_info_proc_p (gdbarch
));
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: info_proc = <%s>\n",
1039 host_address_to_string (gdbarch
->info_proc
));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: inner_than = <%s>\n",
1042 host_address_to_string (gdbarch
->inner_than
));
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: insn_is_call = <%s>\n",
1045 host_address_to_string (gdbarch
->insn_is_call
));
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: insn_is_jump = <%s>\n",
1048 host_address_to_string (gdbarch
->insn_is_jump
));
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: insn_is_ret = <%s>\n",
1051 host_address_to_string (gdbarch
->insn_is_ret
));
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: int_bit = %s\n",
1054 plongest (gdbarch
->int_bit
));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1057 gdbarch_integer_to_address_p (gdbarch
));
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: integer_to_address = <%s>\n",
1060 host_address_to_string (gdbarch
->integer_to_address
));
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1063 host_address_to_string (gdbarch
->iterate_over_objfiles_in_search_order
));
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1066 gdbarch_iterate_over_regset_sections_p (gdbarch
));
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1069 host_address_to_string (gdbarch
->iterate_over_regset_sections
));
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: long_bit = %s\n",
1072 plongest (gdbarch
->long_bit
));
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: long_double_bit = %s\n",
1075 plongest (gdbarch
->long_double_bit
));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: long_double_format = %s\n",
1078 pformat (gdbarch
->long_double_format
));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: long_long_align_bit = %s\n",
1081 plongest (gdbarch
->long_long_align_bit
));
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: long_long_bit = %s\n",
1084 plongest (gdbarch
->long_long_bit
));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1087 gdbarch_make_corefile_notes_p (gdbarch
));
1088 fprintf_unfiltered (file
,
1089 "gdbarch_dump: make_corefile_notes = <%s>\n",
1090 host_address_to_string (gdbarch
->make_corefile_notes
));
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: make_symbol_special = <%s>\n",
1093 host_address_to_string (gdbarch
->make_symbol_special
));
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1096 gdbarch_max_insn_length_p (gdbarch
));
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: max_insn_length = %s\n",
1099 plongest (gdbarch
->max_insn_length
));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1102 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1105 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: num_pseudo_regs = %s\n",
1108 plongest (gdbarch
->num_pseudo_regs
));
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: num_regs = %s\n",
1111 plongest (gdbarch
->num_regs
));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: osabi = %s\n",
1114 plongest (gdbarch
->osabi
));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1117 gdbarch_overlay_update_p (gdbarch
));
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: overlay_update = <%s>\n",
1120 host_address_to_string (gdbarch
->overlay_update
));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: pc_regnum = %s\n",
1123 plongest (gdbarch
->pc_regnum
));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: pointer_to_address = <%s>\n",
1126 host_address_to_string (gdbarch
->pointer_to_address
));
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: print_float_info = <%s>\n",
1129 host_address_to_string (gdbarch
->print_float_info
));
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: print_insn = <%s>\n",
1132 host_address_to_string (gdbarch
->print_insn
));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: print_registers_info = <%s>\n",
1135 host_address_to_string (gdbarch
->print_registers_info
));
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1138 gdbarch_print_vector_info_p (gdbarch
));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: print_vector_info = <%s>\n",
1141 host_address_to_string (gdbarch
->print_vector_info
));
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1144 gdbarch_process_record_p (gdbarch
));
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: process_record = <%s>\n",
1147 host_address_to_string (gdbarch
->process_record
));
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1150 gdbarch_process_record_signal_p (gdbarch
));
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: process_record_signal = <%s>\n",
1153 host_address_to_string (gdbarch
->process_record_signal
));
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: ps_regnum = %s\n",
1156 plongest (gdbarch
->ps_regnum
));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1159 gdbarch_pseudo_register_read_p (gdbarch
));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: pseudo_register_read = <%s>\n",
1162 host_address_to_string (gdbarch
->pseudo_register_read
));
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1165 gdbarch_pseudo_register_read_value_p (gdbarch
));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1168 host_address_to_string (gdbarch
->pseudo_register_read_value
));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1171 gdbarch_pseudo_register_write_p (gdbarch
));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: pseudo_register_write = <%s>\n",
1174 host_address_to_string (gdbarch
->pseudo_register_write
));
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: ptr_bit = %s\n",
1177 plongest (gdbarch
->ptr_bit
));
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1180 gdbarch_push_dummy_call_p (gdbarch
));
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: push_dummy_call = <%s>\n",
1183 host_address_to_string (gdbarch
->push_dummy_call
));
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1186 gdbarch_push_dummy_code_p (gdbarch
));
1187 fprintf_unfiltered (file
,
1188 "gdbarch_dump: push_dummy_code = <%s>\n",
1189 host_address_to_string (gdbarch
->push_dummy_code
));
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: ravenscar_ops = %s\n",
1192 host_address_to_string (gdbarch
->ravenscar_ops
));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1195 gdbarch_read_pc_p (gdbarch
));
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: read_pc = <%s>\n",
1198 host_address_to_string (gdbarch
->read_pc
));
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1201 gdbarch_record_special_symbol_p (gdbarch
));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: record_special_symbol = <%s>\n",
1204 host_address_to_string (gdbarch
->record_special_symbol
));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: register_name = <%s>\n",
1207 host_address_to_string (gdbarch
->register_name
));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: register_reggroup_p = <%s>\n",
1210 host_address_to_string (gdbarch
->register_reggroup_p
));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: register_sim_regno = <%s>\n",
1213 host_address_to_string (gdbarch
->register_sim_regno
));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: register_to_value = <%s>\n",
1216 host_address_to_string (gdbarch
->register_to_value
));
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1219 gdbarch_register_type_p (gdbarch
));
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: register_type = <%s>\n",
1222 host_address_to_string (gdbarch
->register_type
));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1225 gdbarch_relocate_instruction_p (gdbarch
));
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: relocate_instruction = <%s>\n",
1228 host_address_to_string (gdbarch
->relocate_instruction
));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1231 host_address_to_string (gdbarch
->remote_breakpoint_from_pc
));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: remote_register_number = <%s>\n",
1234 host_address_to_string (gdbarch
->remote_register_number
));
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1237 host_address_to_string (gdbarch
->return_in_first_hidden_param_p
));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1240 gdbarch_return_value_p (gdbarch
));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: return_value = <%s>\n",
1243 host_address_to_string (gdbarch
->return_value
));
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1246 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: short_bit = %s\n",
1249 plongest (gdbarch
->short_bit
));
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1252 gdbarch_single_step_through_delay_p (gdbarch
));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: single_step_through_delay = <%s>\n",
1255 host_address_to_string (gdbarch
->single_step_through_delay
));
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1258 gdbarch_skip_entrypoint_p (gdbarch
));
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: skip_entrypoint = <%s>\n",
1261 host_address_to_string (gdbarch
->skip_entrypoint
));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1264 gdbarch_skip_main_prologue_p (gdbarch
));
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: skip_main_prologue = <%s>\n",
1267 host_address_to_string (gdbarch
->skip_main_prologue
));
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1270 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: skip_prologue = <%s>\n",
1273 host_address_to_string (gdbarch
->skip_prologue
));
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1276 host_address_to_string (gdbarch
->skip_solib_resolver
));
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1279 host_address_to_string (gdbarch
->skip_trampoline_code
));
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1282 gdbarch_software_single_step_p (gdbarch
));
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: software_single_step = <%s>\n",
1285 host_address_to_string (gdbarch
->software_single_step
));
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1288 plongest (gdbarch
->sofun_address_maybe_missing
));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: solib_symbols_extension = %s\n",
1291 pstring (gdbarch
->solib_symbols_extension
));
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: sp_regnum = %s\n",
1294 plongest (gdbarch
->sp_regnum
));
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1297 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1300 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1303 host_address_to_string (gdbarch
->stack_frame_destroyed_p
));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1306 pstring (gdbarch
->stap_gdb_register_prefix
));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1309 pstring (gdbarch
->stap_gdb_register_suffix
));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: stap_integer_prefixes = %s\n",
1312 pstring_list (gdbarch
->stap_integer_prefixes
));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: stap_integer_suffixes = %s\n",
1315 pstring_list (gdbarch
->stap_integer_suffixes
));
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1318 gdbarch_stap_is_single_operand_p (gdbarch
));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1321 host_address_to_string (gdbarch
->stap_is_single_operand
));
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1324 gdbarch_stap_parse_special_token_p (gdbarch
));
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1327 host_address_to_string (gdbarch
->stap_parse_special_token
));
1328 fprintf_unfiltered (file
,
1329 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1330 pstring_list (gdbarch
->stap_register_indirection_prefixes
));
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1333 pstring_list (gdbarch
->stap_register_indirection_suffixes
));
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: stap_register_prefixes = %s\n",
1336 pstring_list (gdbarch
->stap_register_prefixes
));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: stap_register_suffixes = %s\n",
1339 pstring_list (gdbarch
->stap_register_suffixes
));
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1342 gdbarch_static_transform_name_p (gdbarch
));
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: static_transform_name = <%s>\n",
1345 host_address_to_string (gdbarch
->static_transform_name
));
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: syscalls_info = %s\n",
1348 host_address_to_string (gdbarch
->syscalls_info
));
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: target_desc = %s\n",
1351 host_address_to_string (gdbarch
->target_desc
));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1354 gdbarch_unwind_pc_p (gdbarch
));
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: unwind_pc = <%s>\n",
1357 host_address_to_string (gdbarch
->unwind_pc
));
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1360 gdbarch_unwind_sp_p (gdbarch
));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: unwind_sp = <%s>\n",
1363 host_address_to_string (gdbarch
->unwind_sp
));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: value_from_register = <%s>\n",
1366 host_address_to_string (gdbarch
->value_from_register
));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: value_to_register = <%s>\n",
1369 host_address_to_string (gdbarch
->value_to_register
));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: vbit_in_delta = %s\n",
1372 plongest (gdbarch
->vbit_in_delta
));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1375 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: vsyscall_range = <%s>\n",
1378 host_address_to_string (gdbarch
->vsyscall_range
));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: vtable_function_descriptors = %s\n",
1381 plongest (gdbarch
->vtable_function_descriptors
));
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1384 gdbarch_write_pc_p (gdbarch
));
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: write_pc = <%s>\n",
1387 host_address_to_string (gdbarch
->write_pc
));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: xml_syscall_file = %s\n",
1390 pstring (gdbarch
->xml_syscall_file
));
1391 if (gdbarch
->dump_tdep
!= NULL
)
1392 gdbarch
->dump_tdep (gdbarch
, file
);
1395 struct gdbarch_tdep
*
1396 gdbarch_tdep (struct gdbarch
*gdbarch
)
1398 if (gdbarch_debug
>= 2)
1399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1400 return gdbarch
->tdep
;
1404 const struct bfd_arch_info
*
1405 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1407 gdb_assert (gdbarch
!= NULL
);
1408 if (gdbarch_debug
>= 2)
1409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1410 return gdbarch
->bfd_arch_info
;
1414 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1416 gdb_assert (gdbarch
!= NULL
);
1417 if (gdbarch_debug
>= 2)
1418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1419 return gdbarch
->byte_order
;
1423 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1425 gdb_assert (gdbarch
!= NULL
);
1426 if (gdbarch_debug
>= 2)
1427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1428 return gdbarch
->byte_order_for_code
;
1432 gdbarch_osabi (struct gdbarch
*gdbarch
)
1434 gdb_assert (gdbarch
!= NULL
);
1435 if (gdbarch_debug
>= 2)
1436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1437 return gdbarch
->osabi
;
1440 const struct target_desc
*
1441 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1443 gdb_assert (gdbarch
!= NULL
);
1444 if (gdbarch_debug
>= 2)
1445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1446 return gdbarch
->target_desc
;
1450 gdbarch_bits_big_endian (struct gdbarch
*gdbarch
)
1452 gdb_assert (gdbarch
!= NULL
);
1453 /* Skip verify of bits_big_endian, invalid_p == 0 */
1454 if (gdbarch_debug
>= 2)
1455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bits_big_endian called\n");
1456 return gdbarch
->bits_big_endian
;
1460 set_gdbarch_bits_big_endian (struct gdbarch
*gdbarch
,
1461 int bits_big_endian
)
1463 gdbarch
->bits_big_endian
= bits_big_endian
;
1467 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1469 gdb_assert (gdbarch
!= NULL
);
1470 /* Skip verify of short_bit, invalid_p == 0 */
1471 if (gdbarch_debug
>= 2)
1472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1473 return gdbarch
->short_bit
;
1477 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1480 gdbarch
->short_bit
= short_bit
;
1484 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1486 gdb_assert (gdbarch
!= NULL
);
1487 /* Skip verify of int_bit, invalid_p == 0 */
1488 if (gdbarch_debug
>= 2)
1489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1490 return gdbarch
->int_bit
;
1494 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1497 gdbarch
->int_bit
= int_bit
;
1501 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1503 gdb_assert (gdbarch
!= NULL
);
1504 /* Skip verify of long_bit, invalid_p == 0 */
1505 if (gdbarch_debug
>= 2)
1506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1507 return gdbarch
->long_bit
;
1511 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1514 gdbarch
->long_bit
= long_bit
;
1518 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1520 gdb_assert (gdbarch
!= NULL
);
1521 /* Skip verify of long_long_bit, invalid_p == 0 */
1522 if (gdbarch_debug
>= 2)
1523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1524 return gdbarch
->long_long_bit
;
1528 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1531 gdbarch
->long_long_bit
= long_long_bit
;
1535 gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
)
1537 gdb_assert (gdbarch
!= NULL
);
1538 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1539 if (gdbarch_debug
>= 2)
1540 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_align_bit called\n");
1541 return gdbarch
->long_long_align_bit
;
1545 set_gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
,
1546 int long_long_align_bit
)
1548 gdbarch
->long_long_align_bit
= long_long_align_bit
;
1552 gdbarch_half_bit (struct gdbarch
*gdbarch
)
1554 gdb_assert (gdbarch
!= NULL
);
1555 /* Skip verify of half_bit, invalid_p == 0 */
1556 if (gdbarch_debug
>= 2)
1557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_bit called\n");
1558 return gdbarch
->half_bit
;
1562 set_gdbarch_half_bit (struct gdbarch
*gdbarch
,
1565 gdbarch
->half_bit
= half_bit
;
1568 const struct floatformat
**
1569 gdbarch_half_format (struct gdbarch
*gdbarch
)
1571 gdb_assert (gdbarch
!= NULL
);
1572 if (gdbarch_debug
>= 2)
1573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_format called\n");
1574 return gdbarch
->half_format
;
1578 set_gdbarch_half_format (struct gdbarch
*gdbarch
,
1579 const struct floatformat
** half_format
)
1581 gdbarch
->half_format
= half_format
;
1585 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1587 gdb_assert (gdbarch
!= NULL
);
1588 /* Skip verify of float_bit, invalid_p == 0 */
1589 if (gdbarch_debug
>= 2)
1590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1591 return gdbarch
->float_bit
;
1595 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1598 gdbarch
->float_bit
= float_bit
;
1601 const struct floatformat
**
1602 gdbarch_float_format (struct gdbarch
*gdbarch
)
1604 gdb_assert (gdbarch
!= NULL
);
1605 if (gdbarch_debug
>= 2)
1606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1607 return gdbarch
->float_format
;
1611 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1612 const struct floatformat
** float_format
)
1614 gdbarch
->float_format
= float_format
;
1618 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1620 gdb_assert (gdbarch
!= NULL
);
1621 /* Skip verify of double_bit, invalid_p == 0 */
1622 if (gdbarch_debug
>= 2)
1623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1624 return gdbarch
->double_bit
;
1628 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1631 gdbarch
->double_bit
= double_bit
;
1634 const struct floatformat
**
1635 gdbarch_double_format (struct gdbarch
*gdbarch
)
1637 gdb_assert (gdbarch
!= NULL
);
1638 if (gdbarch_debug
>= 2)
1639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1640 return gdbarch
->double_format
;
1644 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1645 const struct floatformat
** double_format
)
1647 gdbarch
->double_format
= double_format
;
1651 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1653 gdb_assert (gdbarch
!= NULL
);
1654 /* Skip verify of long_double_bit, invalid_p == 0 */
1655 if (gdbarch_debug
>= 2)
1656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1657 return gdbarch
->long_double_bit
;
1661 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1662 int long_double_bit
)
1664 gdbarch
->long_double_bit
= long_double_bit
;
1667 const struct floatformat
**
1668 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1670 gdb_assert (gdbarch
!= NULL
);
1671 if (gdbarch_debug
>= 2)
1672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1673 return gdbarch
->long_double_format
;
1677 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1678 const struct floatformat
** long_double_format
)
1680 gdbarch
->long_double_format
= long_double_format
;
1684 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1686 gdb_assert (gdbarch
!= NULL
);
1687 /* Skip verify of ptr_bit, invalid_p == 0 */
1688 if (gdbarch_debug
>= 2)
1689 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1690 return gdbarch
->ptr_bit
;
1694 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1697 gdbarch
->ptr_bit
= ptr_bit
;
1701 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1703 gdb_assert (gdbarch
!= NULL
);
1704 /* Check variable changed from pre-default. */
1705 gdb_assert (gdbarch
->addr_bit
!= 0);
1706 if (gdbarch_debug
>= 2)
1707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1708 return gdbarch
->addr_bit
;
1712 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1715 gdbarch
->addr_bit
= addr_bit
;
1719 gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
)
1721 gdb_assert (gdbarch
!= NULL
);
1722 /* Check variable changed from pre-default. */
1723 gdb_assert (gdbarch
->dwarf2_addr_size
!= 0);
1724 if (gdbarch_debug
>= 2)
1725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_addr_size called\n");
1726 return gdbarch
->dwarf2_addr_size
;
1730 set_gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
,
1731 int dwarf2_addr_size
)
1733 gdbarch
->dwarf2_addr_size
= dwarf2_addr_size
;
1737 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1739 gdb_assert (gdbarch
!= NULL
);
1740 /* Check variable changed from pre-default. */
1741 gdb_assert (gdbarch
->char_signed
!= -1);
1742 if (gdbarch_debug
>= 2)
1743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1744 return gdbarch
->char_signed
;
1748 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1751 gdbarch
->char_signed
= char_signed
;
1755 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1757 gdb_assert (gdbarch
!= NULL
);
1758 return gdbarch
->read_pc
!= NULL
;
1762 gdbarch_read_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
1764 gdb_assert (gdbarch
!= NULL
);
1765 gdb_assert (gdbarch
->read_pc
!= NULL
);
1766 if (gdbarch_debug
>= 2)
1767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1768 return gdbarch
->read_pc (regcache
);
1772 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1773 gdbarch_read_pc_ftype read_pc
)
1775 gdbarch
->read_pc
= read_pc
;
1779 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1781 gdb_assert (gdbarch
!= NULL
);
1782 return gdbarch
->write_pc
!= NULL
;
1786 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1788 gdb_assert (gdbarch
!= NULL
);
1789 gdb_assert (gdbarch
->write_pc
!= NULL
);
1790 if (gdbarch_debug
>= 2)
1791 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1792 gdbarch
->write_pc (regcache
, val
);
1796 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1797 gdbarch_write_pc_ftype write_pc
)
1799 gdbarch
->write_pc
= write_pc
;
1803 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1805 gdb_assert (gdbarch
!= NULL
);
1806 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1807 if (gdbarch_debug
>= 2)
1808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1809 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
1813 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
1814 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
1816 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
1820 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
1822 gdb_assert (gdbarch
!= NULL
);
1823 return gdbarch
->pseudo_register_read
!= NULL
;
1826 enum register_status
1827 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
1829 gdb_assert (gdbarch
!= NULL
);
1830 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
1831 if (gdbarch_debug
>= 2)
1832 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
1833 return gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
1837 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
1838 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
1840 gdbarch
->pseudo_register_read
= pseudo_register_read
;
1844 gdbarch_pseudo_register_read_value_p (struct gdbarch
*gdbarch
)
1846 gdb_assert (gdbarch
!= NULL
);
1847 return gdbarch
->pseudo_register_read_value
!= NULL
;
1851 gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
)
1853 gdb_assert (gdbarch
!= NULL
);
1854 gdb_assert (gdbarch
->pseudo_register_read_value
!= NULL
);
1855 if (gdbarch_debug
>= 2)
1856 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read_value called\n");
1857 return gdbarch
->pseudo_register_read_value (gdbarch
, regcache
, cookednum
);
1861 set_gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
,
1862 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value
)
1864 gdbarch
->pseudo_register_read_value
= pseudo_register_read_value
;
1868 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
1870 gdb_assert (gdbarch
!= NULL
);
1871 return gdbarch
->pseudo_register_write
!= NULL
;
1875 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
1877 gdb_assert (gdbarch
!= NULL
);
1878 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
1879 if (gdbarch_debug
>= 2)
1880 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
1881 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
1885 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
1886 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
1888 gdbarch
->pseudo_register_write
= pseudo_register_write
;
1892 gdbarch_num_regs (struct gdbarch
*gdbarch
)
1894 gdb_assert (gdbarch
!= NULL
);
1895 /* Check variable changed from pre-default. */
1896 gdb_assert (gdbarch
->num_regs
!= -1);
1897 if (gdbarch_debug
>= 2)
1898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
1899 return gdbarch
->num_regs
;
1903 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
1906 gdbarch
->num_regs
= num_regs
;
1910 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
1912 gdb_assert (gdbarch
!= NULL
);
1913 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1914 if (gdbarch_debug
>= 2)
1915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
1916 return gdbarch
->num_pseudo_regs
;
1920 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
1921 int num_pseudo_regs
)
1923 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
1927 gdbarch_ax_pseudo_register_collect_p (struct gdbarch
*gdbarch
)
1929 gdb_assert (gdbarch
!= NULL
);
1930 return gdbarch
->ax_pseudo_register_collect
!= NULL
;
1934 gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1936 gdb_assert (gdbarch
!= NULL
);
1937 gdb_assert (gdbarch
->ax_pseudo_register_collect
!= NULL
);
1938 if (gdbarch_debug
>= 2)
1939 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_collect called\n");
1940 return gdbarch
->ax_pseudo_register_collect (gdbarch
, ax
, reg
);
1944 set_gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
,
1945 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect
)
1947 gdbarch
->ax_pseudo_register_collect
= ax_pseudo_register_collect
;
1951 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch
*gdbarch
)
1953 gdb_assert (gdbarch
!= NULL
);
1954 return gdbarch
->ax_pseudo_register_push_stack
!= NULL
;
1958 gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1960 gdb_assert (gdbarch
!= NULL
);
1961 gdb_assert (gdbarch
->ax_pseudo_register_push_stack
!= NULL
);
1962 if (gdbarch_debug
>= 2)
1963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_push_stack called\n");
1964 return gdbarch
->ax_pseudo_register_push_stack (gdbarch
, ax
, reg
);
1968 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
,
1969 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack
)
1971 gdbarch
->ax_pseudo_register_push_stack
= ax_pseudo_register_push_stack
;
1975 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
1977 gdb_assert (gdbarch
!= NULL
);
1978 /* Skip verify of sp_regnum, invalid_p == 0 */
1979 if (gdbarch_debug
>= 2)
1980 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
1981 return gdbarch
->sp_regnum
;
1985 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
1988 gdbarch
->sp_regnum
= sp_regnum
;
1992 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
1994 gdb_assert (gdbarch
!= NULL
);
1995 /* Skip verify of pc_regnum, invalid_p == 0 */
1996 if (gdbarch_debug
>= 2)
1997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
1998 return gdbarch
->pc_regnum
;
2002 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2005 gdbarch
->pc_regnum
= pc_regnum
;
2009 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2011 gdb_assert (gdbarch
!= NULL
);
2012 /* Skip verify of ps_regnum, invalid_p == 0 */
2013 if (gdbarch_debug
>= 2)
2014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2015 return gdbarch
->ps_regnum
;
2019 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2022 gdbarch
->ps_regnum
= ps_regnum
;
2026 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2028 gdb_assert (gdbarch
!= NULL
);
2029 /* Skip verify of fp0_regnum, invalid_p == 0 */
2030 if (gdbarch_debug
>= 2)
2031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2032 return gdbarch
->fp0_regnum
;
2036 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2039 gdbarch
->fp0_regnum
= fp0_regnum
;
2043 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2045 gdb_assert (gdbarch
!= NULL
);
2046 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2047 if (gdbarch_debug
>= 2)
2048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2049 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
2053 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2054 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2056 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2060 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2062 gdb_assert (gdbarch
!= NULL
);
2063 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2064 if (gdbarch_debug
>= 2)
2065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2066 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
2070 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2071 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2073 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2077 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2079 gdb_assert (gdbarch
!= NULL
);
2080 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2081 if (gdbarch_debug
>= 2)
2082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2083 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
2087 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2088 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2090 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2094 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2096 gdb_assert (gdbarch
!= NULL
);
2097 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2098 if (gdbarch_debug
>= 2)
2099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2100 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
2104 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2105 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2107 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2111 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2113 gdb_assert (gdbarch
!= NULL
);
2114 gdb_assert (gdbarch
->register_name
!= NULL
);
2115 if (gdbarch_debug
>= 2)
2116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2117 return gdbarch
->register_name (gdbarch
, regnr
);
2121 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2122 gdbarch_register_name_ftype register_name
)
2124 gdbarch
->register_name
= register_name
;
2128 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2130 gdb_assert (gdbarch
!= NULL
);
2131 return gdbarch
->register_type
!= NULL
;
2135 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2137 gdb_assert (gdbarch
!= NULL
);
2138 gdb_assert (gdbarch
->register_type
!= NULL
);
2139 if (gdbarch_debug
>= 2)
2140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2141 return gdbarch
->register_type (gdbarch
, reg_nr
);
2145 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2146 gdbarch_register_type_ftype register_type
)
2148 gdbarch
->register_type
= register_type
;
2152 gdbarch_dummy_id_p (struct gdbarch
*gdbarch
)
2154 gdb_assert (gdbarch
!= NULL
);
2155 return gdbarch
->dummy_id
!= NULL
;
2159 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
2161 gdb_assert (gdbarch
!= NULL
);
2162 gdb_assert (gdbarch
->dummy_id
!= NULL
);
2163 if (gdbarch_debug
>= 2)
2164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
2165 return gdbarch
->dummy_id (gdbarch
, this_frame
);
2169 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
2170 gdbarch_dummy_id_ftype dummy_id
)
2172 gdbarch
->dummy_id
= dummy_id
;
2176 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2178 gdb_assert (gdbarch
!= NULL
);
2179 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2180 if (gdbarch_debug
>= 2)
2181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2182 return gdbarch
->deprecated_fp_regnum
;
2186 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2187 int deprecated_fp_regnum
)
2189 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2193 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2195 gdb_assert (gdbarch
!= NULL
);
2196 return gdbarch
->push_dummy_call
!= NULL
;
2200 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
)
2202 gdb_assert (gdbarch
!= NULL
);
2203 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2204 if (gdbarch_debug
>= 2)
2205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2206 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
2210 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2211 gdbarch_push_dummy_call_ftype push_dummy_call
)
2213 gdbarch
->push_dummy_call
= push_dummy_call
;
2217 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2219 gdb_assert (gdbarch
!= NULL
);
2220 /* Skip verify of call_dummy_location, invalid_p == 0 */
2221 if (gdbarch_debug
>= 2)
2222 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2223 return gdbarch
->call_dummy_location
;
2227 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2228 int call_dummy_location
)
2230 gdbarch
->call_dummy_location
= call_dummy_location
;
2234 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2236 gdb_assert (gdbarch
!= NULL
);
2237 return gdbarch
->push_dummy_code
!= NULL
;
2241 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
)
2243 gdb_assert (gdbarch
!= NULL
);
2244 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2245 if (gdbarch_debug
>= 2)
2246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2247 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
2251 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2252 gdbarch_push_dummy_code_ftype push_dummy_code
)
2254 gdbarch
->push_dummy_code
= push_dummy_code
;
2258 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2260 gdb_assert (gdbarch
!= NULL
);
2261 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2262 if (gdbarch_debug
>= 2)
2263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2264 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2268 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2269 gdbarch_print_registers_info_ftype print_registers_info
)
2271 gdbarch
->print_registers_info
= print_registers_info
;
2275 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2277 gdb_assert (gdbarch
!= NULL
);
2278 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2279 if (gdbarch_debug
>= 2)
2280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2281 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2285 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2286 gdbarch_print_float_info_ftype print_float_info
)
2288 gdbarch
->print_float_info
= print_float_info
;
2292 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2294 gdb_assert (gdbarch
!= NULL
);
2295 return gdbarch
->print_vector_info
!= NULL
;
2299 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2301 gdb_assert (gdbarch
!= NULL
);
2302 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2303 if (gdbarch_debug
>= 2)
2304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2305 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2309 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2310 gdbarch_print_vector_info_ftype print_vector_info
)
2312 gdbarch
->print_vector_info
= print_vector_info
;
2316 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2318 gdb_assert (gdbarch
!= NULL
);
2319 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2320 if (gdbarch_debug
>= 2)
2321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2322 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2326 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2327 gdbarch_register_sim_regno_ftype register_sim_regno
)
2329 gdbarch
->register_sim_regno
= register_sim_regno
;
2333 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2335 gdb_assert (gdbarch
!= NULL
);
2336 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2337 if (gdbarch_debug
>= 2)
2338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2339 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2343 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2344 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2346 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2350 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2352 gdb_assert (gdbarch
!= NULL
);
2353 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2354 if (gdbarch_debug
>= 2)
2355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2356 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2360 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2361 gdbarch_cannot_store_register_ftype cannot_store_register
)
2363 gdbarch
->cannot_store_register
= cannot_store_register
;
2367 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2369 gdb_assert (gdbarch
!= NULL
);
2370 return gdbarch
->get_longjmp_target
!= NULL
;
2374 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2376 gdb_assert (gdbarch
!= NULL
);
2377 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2378 if (gdbarch_debug
>= 2)
2379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2380 return gdbarch
->get_longjmp_target (frame
, pc
);
2384 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2385 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2387 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2391 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2393 gdb_assert (gdbarch
!= NULL
);
2394 if (gdbarch_debug
>= 2)
2395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2396 return gdbarch
->believe_pcc_promotion
;
2400 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2401 int believe_pcc_promotion
)
2403 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2407 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2409 gdb_assert (gdbarch
!= NULL
);
2410 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2411 if (gdbarch_debug
>= 2)
2412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2413 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2417 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2418 gdbarch_convert_register_p_ftype convert_register_p
)
2420 gdbarch
->convert_register_p
= convert_register_p
;
2424 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
, int *optimizedp
, int *unavailablep
)
2426 gdb_assert (gdbarch
!= NULL
);
2427 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2428 if (gdbarch_debug
>= 2)
2429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2430 return gdbarch
->register_to_value (frame
, regnum
, type
, buf
, optimizedp
, unavailablep
);
2434 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2435 gdbarch_register_to_value_ftype register_to_value
)
2437 gdbarch
->register_to_value
= register_to_value
;
2441 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2443 gdb_assert (gdbarch
!= NULL
);
2444 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2445 if (gdbarch_debug
>= 2)
2446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2447 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2451 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2452 gdbarch_value_to_register_ftype value_to_register
)
2454 gdbarch
->value_to_register
= value_to_register
;
2458 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_id frame_id
)
2460 gdb_assert (gdbarch
!= NULL
);
2461 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2462 if (gdbarch_debug
>= 2)
2463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2464 return gdbarch
->value_from_register (gdbarch
, type
, regnum
, frame_id
);
2468 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2469 gdbarch_value_from_register_ftype value_from_register
)
2471 gdbarch
->value_from_register
= value_from_register
;
2475 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2477 gdb_assert (gdbarch
!= NULL
);
2478 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2479 if (gdbarch_debug
>= 2)
2480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2481 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2485 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2486 gdbarch_pointer_to_address_ftype pointer_to_address
)
2488 gdbarch
->pointer_to_address
= pointer_to_address
;
2492 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2494 gdb_assert (gdbarch
!= NULL
);
2495 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2496 if (gdbarch_debug
>= 2)
2497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2498 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2502 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2503 gdbarch_address_to_pointer_ftype address_to_pointer
)
2505 gdbarch
->address_to_pointer
= address_to_pointer
;
2509 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2511 gdb_assert (gdbarch
!= NULL
);
2512 return gdbarch
->integer_to_address
!= NULL
;
2516 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2518 gdb_assert (gdbarch
!= NULL
);
2519 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2520 if (gdbarch_debug
>= 2)
2521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2522 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2526 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2527 gdbarch_integer_to_address_ftype integer_to_address
)
2529 gdbarch
->integer_to_address
= integer_to_address
;
2533 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2535 gdb_assert (gdbarch
!= NULL
);
2536 return gdbarch
->return_value
!= NULL
;
2539 enum return_value_convention
2540 gdbarch_return_value (struct gdbarch
*gdbarch
, struct value
*function
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2542 gdb_assert (gdbarch
!= NULL
);
2543 gdb_assert (gdbarch
->return_value
!= NULL
);
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2546 return gdbarch
->return_value (gdbarch
, function
, valtype
, regcache
, readbuf
, writebuf
);
2550 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2551 gdbarch_return_value_ftype return_value
)
2553 gdbarch
->return_value
= return_value
;
2557 gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
, struct type
*type
)
2559 gdb_assert (gdbarch
!= NULL
);
2560 gdb_assert (gdbarch
->return_in_first_hidden_param_p
!= NULL
);
2561 if (gdbarch_debug
>= 2)
2562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_in_first_hidden_param_p called\n");
2563 return gdbarch
->return_in_first_hidden_param_p (gdbarch
, type
);
2567 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
,
2568 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p
)
2570 gdbarch
->return_in_first_hidden_param_p
= return_in_first_hidden_param_p
;
2574 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2576 gdb_assert (gdbarch
!= NULL
);
2577 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2580 return gdbarch
->skip_prologue (gdbarch
, ip
);
2584 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2585 gdbarch_skip_prologue_ftype skip_prologue
)
2587 gdbarch
->skip_prologue
= skip_prologue
;
2591 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2593 gdb_assert (gdbarch
!= NULL
);
2594 return gdbarch
->skip_main_prologue
!= NULL
;
2598 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2600 gdb_assert (gdbarch
!= NULL
);
2601 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2602 if (gdbarch_debug
>= 2)
2603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2604 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2608 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2609 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2611 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2615 gdbarch_skip_entrypoint_p (struct gdbarch
*gdbarch
)
2617 gdb_assert (gdbarch
!= NULL
);
2618 return gdbarch
->skip_entrypoint
!= NULL
;
2622 gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2624 gdb_assert (gdbarch
!= NULL
);
2625 gdb_assert (gdbarch
->skip_entrypoint
!= NULL
);
2626 if (gdbarch_debug
>= 2)
2627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_entrypoint called\n");
2628 return gdbarch
->skip_entrypoint (gdbarch
, ip
);
2632 set_gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
,
2633 gdbarch_skip_entrypoint_ftype skip_entrypoint
)
2635 gdbarch
->skip_entrypoint
= skip_entrypoint
;
2639 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2641 gdb_assert (gdbarch
!= NULL
);
2642 gdb_assert (gdbarch
->inner_than
!= NULL
);
2643 if (gdbarch_debug
>= 2)
2644 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2645 return gdbarch
->inner_than (lhs
, rhs
);
2649 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2650 gdbarch_inner_than_ftype inner_than
)
2652 gdbarch
->inner_than
= inner_than
;
2656 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2658 gdb_assert (gdbarch
!= NULL
);
2659 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2660 if (gdbarch_debug
>= 2)
2661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2662 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2666 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2667 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2669 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2673 gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *kindptr
)
2675 gdb_assert (gdbarch
!= NULL
);
2676 gdb_assert (gdbarch
->remote_breakpoint_from_pc
!= NULL
);
2677 if (gdbarch_debug
>= 2)
2678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_breakpoint_from_pc called\n");
2679 gdbarch
->remote_breakpoint_from_pc (gdbarch
, pcptr
, kindptr
);
2683 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2684 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc
)
2686 gdbarch
->remote_breakpoint_from_pc
= remote_breakpoint_from_pc
;
2690 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2692 gdb_assert (gdbarch
!= NULL
);
2693 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2697 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2699 gdb_assert (gdbarch
!= NULL
);
2700 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2703 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2707 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2708 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2710 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2714 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2716 gdb_assert (gdbarch
!= NULL
);
2717 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2718 if (gdbarch_debug
>= 2)
2719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2720 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2724 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2725 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2727 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2731 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2733 gdb_assert (gdbarch
!= NULL
);
2734 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2735 if (gdbarch_debug
>= 2)
2736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2737 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2741 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2742 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
2744 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
2748 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
2750 gdb_assert (gdbarch
!= NULL
);
2751 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2752 if (gdbarch_debug
>= 2)
2753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
2754 return gdbarch
->decr_pc_after_break
;
2758 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
2759 CORE_ADDR decr_pc_after_break
)
2761 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
2765 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
2767 gdb_assert (gdbarch
!= NULL
);
2768 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2769 if (gdbarch_debug
>= 2)
2770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
2771 return gdbarch
->deprecated_function_start_offset
;
2775 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
2776 CORE_ADDR deprecated_function_start_offset
)
2778 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
2782 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
2784 gdb_assert (gdbarch
!= NULL
);
2785 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
2786 if (gdbarch_debug
>= 2)
2787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
2788 return gdbarch
->remote_register_number (gdbarch
, regno
);
2792 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
2793 gdbarch_remote_register_number_ftype remote_register_number
)
2795 gdbarch
->remote_register_number
= remote_register_number
;
2799 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
2801 gdb_assert (gdbarch
!= NULL
);
2802 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
2806 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
2808 gdb_assert (gdbarch
!= NULL
);
2809 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
2810 if (gdbarch_debug
>= 2)
2811 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
2812 return gdbarch
->fetch_tls_load_module_address (objfile
);
2816 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
2817 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
2819 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
2823 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
2825 gdb_assert (gdbarch
!= NULL
);
2826 /* Skip verify of frame_args_skip, invalid_p == 0 */
2827 if (gdbarch_debug
>= 2)
2828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
2829 return gdbarch
->frame_args_skip
;
2833 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
2834 CORE_ADDR frame_args_skip
)
2836 gdbarch
->frame_args_skip
= frame_args_skip
;
2840 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
2842 gdb_assert (gdbarch
!= NULL
);
2843 return gdbarch
->unwind_pc
!= NULL
;
2847 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2849 gdb_assert (gdbarch
!= NULL
);
2850 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
2851 if (gdbarch_debug
>= 2)
2852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
2853 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
2857 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
2858 gdbarch_unwind_pc_ftype unwind_pc
)
2860 gdbarch
->unwind_pc
= unwind_pc
;
2864 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
2866 gdb_assert (gdbarch
!= NULL
);
2867 return gdbarch
->unwind_sp
!= NULL
;
2871 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2873 gdb_assert (gdbarch
!= NULL
);
2874 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
2875 if (gdbarch_debug
>= 2)
2876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
2877 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
2881 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
2882 gdbarch_unwind_sp_ftype unwind_sp
)
2884 gdbarch
->unwind_sp
= unwind_sp
;
2888 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
2890 gdb_assert (gdbarch
!= NULL
);
2891 return gdbarch
->frame_num_args
!= NULL
;
2895 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2897 gdb_assert (gdbarch
!= NULL
);
2898 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
2899 if (gdbarch_debug
>= 2)
2900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
2901 return gdbarch
->frame_num_args (frame
);
2905 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
2906 gdbarch_frame_num_args_ftype frame_num_args
)
2908 gdbarch
->frame_num_args
= frame_num_args
;
2912 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
2914 gdb_assert (gdbarch
!= NULL
);
2915 return gdbarch
->frame_align
!= NULL
;
2919 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
2921 gdb_assert (gdbarch
!= NULL
);
2922 gdb_assert (gdbarch
->frame_align
!= NULL
);
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
2925 return gdbarch
->frame_align (gdbarch
, address
);
2929 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
2930 gdbarch_frame_align_ftype frame_align
)
2932 gdbarch
->frame_align
= frame_align
;
2936 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
2938 gdb_assert (gdbarch
!= NULL
);
2939 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
2940 if (gdbarch_debug
>= 2)
2941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
2942 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
2946 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
2947 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
2949 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
2953 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
2955 gdb_assert (gdbarch
!= NULL
);
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
2958 return gdbarch
->frame_red_zone_size
;
2962 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
2963 int frame_red_zone_size
)
2965 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
2969 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
2971 gdb_assert (gdbarch
!= NULL
);
2972 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
2973 if (gdbarch_debug
>= 2)
2974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
2975 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
2979 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
2980 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
2982 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
2986 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2988 gdb_assert (gdbarch
!= NULL
);
2989 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
2990 if (gdbarch_debug
>= 2)
2991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
2992 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
2996 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
2997 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
2999 gdbarch
->addr_bits_remove
= addr_bits_remove
;
3003 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
3005 gdb_assert (gdbarch
!= NULL
);
3006 return gdbarch
->software_single_step
!= NULL
;
3010 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3012 gdb_assert (gdbarch
!= NULL
);
3013 gdb_assert (gdbarch
->software_single_step
!= NULL
);
3014 if (gdbarch_debug
>= 2)
3015 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
3016 return gdbarch
->software_single_step (frame
);
3020 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
3021 gdbarch_software_single_step_ftype software_single_step
)
3023 gdbarch
->software_single_step
= software_single_step
;
3027 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
3029 gdb_assert (gdbarch
!= NULL
);
3030 return gdbarch
->single_step_through_delay
!= NULL
;
3034 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3036 gdb_assert (gdbarch
!= NULL
);
3037 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
3038 if (gdbarch_debug
>= 2)
3039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
3040 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
3044 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
3045 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
3047 gdbarch
->single_step_through_delay
= single_step_through_delay
;
3051 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
3053 gdb_assert (gdbarch
!= NULL
);
3054 gdb_assert (gdbarch
->print_insn
!= NULL
);
3055 if (gdbarch_debug
>= 2)
3056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
3057 return gdbarch
->print_insn (vma
, info
);
3061 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
3062 gdbarch_print_insn_ftype print_insn
)
3064 gdbarch
->print_insn
= print_insn
;
3068 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
3070 gdb_assert (gdbarch
!= NULL
);
3071 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
3072 if (gdbarch_debug
>= 2)
3073 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
3074 return gdbarch
->skip_trampoline_code (frame
, pc
);
3078 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
3079 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
3081 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3085 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3087 gdb_assert (gdbarch
!= NULL
);
3088 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3089 if (gdbarch_debug
>= 2)
3090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3091 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3095 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3096 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3098 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3102 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, const char *name
)
3104 gdb_assert (gdbarch
!= NULL
);
3105 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3106 if (gdbarch_debug
>= 2)
3107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3108 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
3112 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3113 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3115 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3119 gdbarch_stack_frame_destroyed_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3121 gdb_assert (gdbarch
!= NULL
);
3122 gdb_assert (gdbarch
->stack_frame_destroyed_p
!= NULL
);
3123 if (gdbarch_debug
>= 2)
3124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_frame_destroyed_p called\n");
3125 return gdbarch
->stack_frame_destroyed_p (gdbarch
, addr
);
3129 set_gdbarch_stack_frame_destroyed_p (struct gdbarch
*gdbarch
,
3130 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p
)
3132 gdbarch
->stack_frame_destroyed_p
= stack_frame_destroyed_p
;
3136 gdbarch_elf_make_msymbol_special_p (struct gdbarch
*gdbarch
)
3138 gdb_assert (gdbarch
!= NULL
);
3139 return gdbarch
->elf_make_msymbol_special
!= NULL
;
3143 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3145 gdb_assert (gdbarch
!= NULL
);
3146 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3147 if (gdbarch_debug
>= 2)
3148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3149 gdbarch
->elf_make_msymbol_special (sym
, msym
);
3153 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
3154 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
3156 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
3160 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
3162 gdb_assert (gdbarch
!= NULL
);
3163 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
3164 if (gdbarch_debug
>= 2)
3165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
3166 gdbarch
->coff_make_msymbol_special (val
, msym
);
3170 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
3171 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
3173 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
3177 gdbarch_make_symbol_special (struct gdbarch
*gdbarch
, struct symbol
*sym
, struct objfile
*objfile
)
3179 gdb_assert (gdbarch
!= NULL
);
3180 gdb_assert (gdbarch
->make_symbol_special
!= NULL
);
3181 if (gdbarch_debug
>= 2)
3182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_symbol_special called\n");
3183 gdbarch
->make_symbol_special (sym
, objfile
);
3187 set_gdbarch_make_symbol_special (struct gdbarch
*gdbarch
,
3188 gdbarch_make_symbol_special_ftype make_symbol_special
)
3190 gdbarch
->make_symbol_special
= make_symbol_special
;
3194 gdbarch_adjust_dwarf2_addr (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3196 gdb_assert (gdbarch
!= NULL
);
3197 gdb_assert (gdbarch
->adjust_dwarf2_addr
!= NULL
);
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_dwarf2_addr called\n");
3200 return gdbarch
->adjust_dwarf2_addr (pc
);
3204 set_gdbarch_adjust_dwarf2_addr (struct gdbarch
*gdbarch
,
3205 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr
)
3207 gdbarch
->adjust_dwarf2_addr
= adjust_dwarf2_addr
;
3211 gdbarch_adjust_dwarf2_line (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int rel
)
3213 gdb_assert (gdbarch
!= NULL
);
3214 gdb_assert (gdbarch
->adjust_dwarf2_line
!= NULL
);
3215 if (gdbarch_debug
>= 2)
3216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_dwarf2_line called\n");
3217 return gdbarch
->adjust_dwarf2_line (addr
, rel
);
3221 set_gdbarch_adjust_dwarf2_line (struct gdbarch
*gdbarch
,
3222 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line
)
3224 gdbarch
->adjust_dwarf2_line
= adjust_dwarf2_line
;
3228 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
3230 gdb_assert (gdbarch
!= NULL
);
3231 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3232 if (gdbarch_debug
>= 2)
3233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
3234 return gdbarch
->cannot_step_breakpoint
;
3238 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
3239 int cannot_step_breakpoint
)
3241 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
3245 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
3247 gdb_assert (gdbarch
!= NULL
);
3248 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3249 if (gdbarch_debug
>= 2)
3250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
3251 return gdbarch
->have_nonsteppable_watchpoint
;
3255 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
3256 int have_nonsteppable_watchpoint
)
3258 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
3262 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
3264 gdb_assert (gdbarch
!= NULL
);
3265 return gdbarch
->address_class_type_flags
!= NULL
;
3269 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
3271 gdb_assert (gdbarch
!= NULL
);
3272 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
3273 if (gdbarch_debug
>= 2)
3274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
3275 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
3279 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
3280 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
3282 gdbarch
->address_class_type_flags
= address_class_type_flags
;
3286 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
3288 gdb_assert (gdbarch
!= NULL
);
3289 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
3293 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
3295 gdb_assert (gdbarch
!= NULL
);
3296 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
3297 if (gdbarch_debug
>= 2)
3298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
3299 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
3303 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
3304 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
3306 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
3310 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
3312 gdb_assert (gdbarch
!= NULL
);
3313 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
3317 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
3319 gdb_assert (gdbarch
!= NULL
);
3320 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
3321 if (gdbarch_debug
>= 2)
3322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
3323 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
3327 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
3328 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
3330 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
3334 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
3336 gdb_assert (gdbarch
!= NULL
);
3337 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
3338 if (gdbarch_debug
>= 2)
3339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
3340 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
3344 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
3345 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
3347 gdbarch
->register_reggroup_p
= register_reggroup_p
;
3351 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
3353 gdb_assert (gdbarch
!= NULL
);
3354 return gdbarch
->fetch_pointer_argument
!= NULL
;
3358 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
3360 gdb_assert (gdbarch
!= NULL
);
3361 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
3362 if (gdbarch_debug
>= 2)
3363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
3364 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
3368 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
3369 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
3371 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
3375 gdbarch_iterate_over_regset_sections_p (struct gdbarch
*gdbarch
)
3377 gdb_assert (gdbarch
!= NULL
);
3378 return gdbarch
->iterate_over_regset_sections
!= NULL
;
3382 gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
, iterate_over_regset_sections_cb
*cb
, void *cb_data
, const struct regcache
*regcache
)
3384 gdb_assert (gdbarch
!= NULL
);
3385 gdb_assert (gdbarch
->iterate_over_regset_sections
!= NULL
);
3386 if (gdbarch_debug
>= 2)
3387 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_regset_sections called\n");
3388 gdbarch
->iterate_over_regset_sections (gdbarch
, cb
, cb_data
, regcache
);
3392 set_gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
,
3393 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections
)
3395 gdbarch
->iterate_over_regset_sections
= iterate_over_regset_sections
;
3399 gdbarch_make_corefile_notes_p (struct gdbarch
*gdbarch
)
3401 gdb_assert (gdbarch
!= NULL
);
3402 return gdbarch
->make_corefile_notes
!= NULL
;
3406 gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
, bfd
*obfd
, int *note_size
)
3408 gdb_assert (gdbarch
!= NULL
);
3409 gdb_assert (gdbarch
->make_corefile_notes
!= NULL
);
3410 if (gdbarch_debug
>= 2)
3411 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_corefile_notes called\n");
3412 return gdbarch
->make_corefile_notes (gdbarch
, obfd
, note_size
);
3416 set_gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
,
3417 gdbarch_make_corefile_notes_ftype make_corefile_notes
)
3419 gdbarch
->make_corefile_notes
= make_corefile_notes
;
3423 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch
*gdbarch
)
3425 gdb_assert (gdbarch
!= NULL
);
3426 return gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
;
3430 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
, bfd
*obfd
, char *note_data
, int *note_size
, const struct elf_internal_linux_prpsinfo
*info
)
3432 gdb_assert (gdbarch
!= NULL
);
3433 gdb_assert (gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
);
3434 if (gdbarch_debug
>= 2)
3435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3436 return gdbarch
->elfcore_write_linux_prpsinfo (obfd
, note_data
, note_size
, info
);
3440 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
,
3441 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo
)
3443 gdbarch
->elfcore_write_linux_prpsinfo
= elfcore_write_linux_prpsinfo
;
3447 gdbarch_find_memory_regions_p (struct gdbarch
*gdbarch
)
3449 gdb_assert (gdbarch
!= NULL
);
3450 return gdbarch
->find_memory_regions
!= NULL
;
3454 gdbarch_find_memory_regions (struct gdbarch
*gdbarch
, find_memory_region_ftype func
, void *data
)
3456 gdb_assert (gdbarch
!= NULL
);
3457 gdb_assert (gdbarch
->find_memory_regions
!= NULL
);
3458 if (gdbarch_debug
>= 2)
3459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_memory_regions called\n");
3460 return gdbarch
->find_memory_regions (gdbarch
, func
, data
);
3464 set_gdbarch_find_memory_regions (struct gdbarch
*gdbarch
,
3465 gdbarch_find_memory_regions_ftype find_memory_regions
)
3467 gdbarch
->find_memory_regions
= find_memory_regions
;
3471 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3473 gdb_assert (gdbarch
!= NULL
);
3474 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3478 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3480 gdb_assert (gdbarch
!= NULL
);
3481 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3482 if (gdbarch_debug
>= 2)
3483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3484 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3488 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3489 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3491 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3495 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch
*gdbarch
)
3497 gdb_assert (gdbarch
!= NULL
);
3498 return gdbarch
->core_xfer_shared_libraries_aix
!= NULL
;
3502 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3504 gdb_assert (gdbarch
!= NULL
);
3505 gdb_assert (gdbarch
->core_xfer_shared_libraries_aix
!= NULL
);
3506 if (gdbarch_debug
>= 2)
3507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries_aix called\n");
3508 return gdbarch
->core_xfer_shared_libraries_aix (gdbarch
, readbuf
, offset
, len
);
3512 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
,
3513 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix
)
3515 gdbarch
->core_xfer_shared_libraries_aix
= core_xfer_shared_libraries_aix
;
3519 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3521 gdb_assert (gdbarch
!= NULL
);
3522 return gdbarch
->core_pid_to_str
!= NULL
;
3526 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3532 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3536 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3537 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3539 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3543 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3545 gdb_assert (gdbarch
!= NULL
);
3546 return gdbarch
->gcore_bfd_target
!= 0;
3550 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3552 gdb_assert (gdbarch
!= NULL
);
3553 /* Check variable changed from pre-default. */
3554 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3555 if (gdbarch_debug
>= 2)
3556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3557 return gdbarch
->gcore_bfd_target
;
3561 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3562 const char * gcore_bfd_target
)
3564 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3568 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3570 gdb_assert (gdbarch
!= NULL
);
3571 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3572 if (gdbarch_debug
>= 2)
3573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3574 return gdbarch
->vtable_function_descriptors
;
3578 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3579 int vtable_function_descriptors
)
3581 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3585 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3587 gdb_assert (gdbarch
!= NULL
);
3588 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3589 if (gdbarch_debug
>= 2)
3590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3591 return gdbarch
->vbit_in_delta
;
3595 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3598 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3602 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3604 gdb_assert (gdbarch
!= NULL
);
3605 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3608 gdbarch
->skip_permanent_breakpoint (regcache
);
3612 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3613 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3615 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3619 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3621 gdb_assert (gdbarch
!= NULL
);
3622 return gdbarch
->max_insn_length
!= 0;
3626 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3628 gdb_assert (gdbarch
!= NULL
);
3629 /* Check variable changed from pre-default. */
3630 gdb_assert (gdbarch
->max_insn_length
!= 0);
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3633 return gdbarch
->max_insn_length
;
3637 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3638 ULONGEST max_insn_length
)
3640 gdbarch
->max_insn_length
= max_insn_length
;
3644 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3650 struct displaced_step_closure
*
3651 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3653 gdb_assert (gdbarch
!= NULL
);
3654 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3655 if (gdbarch_debug
>= 2)
3656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3657 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
3661 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
3662 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
3664 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
3668 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3670 gdb_assert (gdbarch
!= NULL
);
3671 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
3674 return gdbarch
->displaced_step_hw_singlestep (gdbarch
, closure
);
3678 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
3679 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
3681 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
3685 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
3687 gdb_assert (gdbarch
!= NULL
);
3688 return gdbarch
->displaced_step_fixup
!= NULL
;
3692 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3694 gdb_assert (gdbarch
!= NULL
);
3695 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
3696 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3697 if (gdbarch_debug
>= 2)
3698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
3699 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
3703 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
3704 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
3706 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
3710 gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3712 gdb_assert (gdbarch
!= NULL
);
3713 gdb_assert (gdbarch
->displaced_step_free_closure
!= NULL
);
3714 if (gdbarch_debug
>= 2)
3715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_free_closure called\n");
3716 gdbarch
->displaced_step_free_closure (gdbarch
, closure
);
3720 set_gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
,
3721 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure
)
3723 gdbarch
->displaced_step_free_closure
= displaced_step_free_closure
;
3727 gdbarch_displaced_step_location (struct gdbarch
*gdbarch
)
3729 gdb_assert (gdbarch
!= NULL
);
3730 gdb_assert (gdbarch
->displaced_step_location
!= NULL
);
3731 if (gdbarch_debug
>= 2)
3732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_location called\n");
3733 return gdbarch
->displaced_step_location (gdbarch
);
3737 set_gdbarch_displaced_step_location (struct gdbarch
*gdbarch
,
3738 gdbarch_displaced_step_location_ftype displaced_step_location
)
3740 gdbarch
->displaced_step_location
= displaced_step_location
;
3744 gdbarch_relocate_instruction_p (struct gdbarch
*gdbarch
)
3746 gdb_assert (gdbarch
!= NULL
);
3747 return gdbarch
->relocate_instruction
!= NULL
;
3751 gdbarch_relocate_instruction (struct gdbarch
*gdbarch
, CORE_ADDR
*to
, CORE_ADDR from
)
3753 gdb_assert (gdbarch
!= NULL
);
3754 gdb_assert (gdbarch
->relocate_instruction
!= NULL
);
3755 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3756 if (gdbarch_debug
>= 2)
3757 fprintf_unfiltered (gdb_stdlog
, "gdbarch_relocate_instruction called\n");
3758 gdbarch
->relocate_instruction (gdbarch
, to
, from
);
3762 set_gdbarch_relocate_instruction (struct gdbarch
*gdbarch
,
3763 gdbarch_relocate_instruction_ftype relocate_instruction
)
3765 gdbarch
->relocate_instruction
= relocate_instruction
;
3769 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
3771 gdb_assert (gdbarch
!= NULL
);
3772 return gdbarch
->overlay_update
!= NULL
;
3776 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
3778 gdb_assert (gdbarch
!= NULL
);
3779 gdb_assert (gdbarch
->overlay_update
!= NULL
);
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
3782 gdbarch
->overlay_update (osect
);
3786 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
3787 gdbarch_overlay_update_ftype overlay_update
)
3789 gdbarch
->overlay_update
= overlay_update
;
3793 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
3795 gdb_assert (gdbarch
!= NULL
);
3796 return gdbarch
->core_read_description
!= NULL
;
3799 const struct target_desc
*
3800 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
3802 gdb_assert (gdbarch
!= NULL
);
3803 gdb_assert (gdbarch
->core_read_description
!= NULL
);
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
3806 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
3810 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
3811 gdbarch_core_read_description_ftype core_read_description
)
3813 gdbarch
->core_read_description
= core_read_description
;
3817 gdbarch_static_transform_name_p (struct gdbarch
*gdbarch
)
3819 gdb_assert (gdbarch
!= NULL
);
3820 return gdbarch
->static_transform_name
!= NULL
;
3824 gdbarch_static_transform_name (struct gdbarch
*gdbarch
, const char *name
)
3826 gdb_assert (gdbarch
!= NULL
);
3827 gdb_assert (gdbarch
->static_transform_name
!= NULL
);
3828 if (gdbarch_debug
>= 2)
3829 fprintf_unfiltered (gdb_stdlog
, "gdbarch_static_transform_name called\n");
3830 return gdbarch
->static_transform_name (name
);
3834 set_gdbarch_static_transform_name (struct gdbarch
*gdbarch
,
3835 gdbarch_static_transform_name_ftype static_transform_name
)
3837 gdbarch
->static_transform_name
= static_transform_name
;
3841 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
3843 gdb_assert (gdbarch
!= NULL
);
3844 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3845 if (gdbarch_debug
>= 2)
3846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
3847 return gdbarch
->sofun_address_maybe_missing
;
3851 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
3852 int sofun_address_maybe_missing
)
3854 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
3858 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
3860 gdb_assert (gdbarch
!= NULL
);
3861 return gdbarch
->process_record
!= NULL
;
3865 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
3867 gdb_assert (gdbarch
!= NULL
);
3868 gdb_assert (gdbarch
->process_record
!= NULL
);
3869 if (gdbarch_debug
>= 2)
3870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
3871 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
3875 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
3876 gdbarch_process_record_ftype process_record
)
3878 gdbarch
->process_record
= process_record
;
3882 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
3884 gdb_assert (gdbarch
!= NULL
);
3885 return gdbarch
->process_record_signal
!= NULL
;
3889 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum gdb_signal signal
)
3891 gdb_assert (gdbarch
!= NULL
);
3892 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
3893 if (gdbarch_debug
>= 2)
3894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
3895 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
3899 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
3900 gdbarch_process_record_signal_ftype process_record_signal
)
3902 gdbarch
->process_record_signal
= process_record_signal
;
3906 gdbarch_gdb_signal_from_target_p (struct gdbarch
*gdbarch
)
3908 gdb_assert (gdbarch
!= NULL
);
3909 return gdbarch
->gdb_signal_from_target
!= NULL
;
3913 gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
, int signo
)
3915 gdb_assert (gdbarch
!= NULL
);
3916 gdb_assert (gdbarch
->gdb_signal_from_target
!= NULL
);
3917 if (gdbarch_debug
>= 2)
3918 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_from_target called\n");
3919 return gdbarch
->gdb_signal_from_target (gdbarch
, signo
);
3923 set_gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
,
3924 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target
)
3926 gdbarch
->gdb_signal_from_target
= gdb_signal_from_target
;
3930 gdbarch_gdb_signal_to_target_p (struct gdbarch
*gdbarch
)
3932 gdb_assert (gdbarch
!= NULL
);
3933 return gdbarch
->gdb_signal_to_target
!= NULL
;
3937 gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
, enum gdb_signal signal
)
3939 gdb_assert (gdbarch
!= NULL
);
3940 gdb_assert (gdbarch
->gdb_signal_to_target
!= NULL
);
3941 if (gdbarch_debug
>= 2)
3942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_to_target called\n");
3943 return gdbarch
->gdb_signal_to_target (gdbarch
, signal
);
3947 set_gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
,
3948 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target
)
3950 gdbarch
->gdb_signal_to_target
= gdb_signal_to_target
;
3954 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
3956 gdb_assert (gdbarch
!= NULL
);
3957 return gdbarch
->get_siginfo_type
!= NULL
;
3961 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
3963 gdb_assert (gdbarch
!= NULL
);
3964 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
3965 if (gdbarch_debug
>= 2)
3966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
3967 return gdbarch
->get_siginfo_type (gdbarch
);
3971 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
3972 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
3974 gdbarch
->get_siginfo_type
= get_siginfo_type
;
3978 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
3980 gdb_assert (gdbarch
!= NULL
);
3981 return gdbarch
->record_special_symbol
!= NULL
;
3985 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
3987 gdb_assert (gdbarch
!= NULL
);
3988 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
3989 if (gdbarch_debug
>= 2)
3990 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
3991 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
3995 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
3996 gdbarch_record_special_symbol_ftype record_special_symbol
)
3998 gdbarch
->record_special_symbol
= record_special_symbol
;
4002 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
4004 gdb_assert (gdbarch
!= NULL
);
4005 return gdbarch
->get_syscall_number
!= NULL
;
4009 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, ptid_t ptid
)
4011 gdb_assert (gdbarch
!= NULL
);
4012 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
4013 if (gdbarch_debug
>= 2)
4014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
4015 return gdbarch
->get_syscall_number (gdbarch
, ptid
);
4019 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
4020 gdbarch_get_syscall_number_ftype get_syscall_number
)
4022 gdbarch
->get_syscall_number
= get_syscall_number
;
4026 gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
)
4028 gdb_assert (gdbarch
!= NULL
);
4029 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4030 if (gdbarch_debug
>= 2)
4031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_xml_syscall_file called\n");
4032 return gdbarch
->xml_syscall_file
;
4036 set_gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
,
4037 const char * xml_syscall_file
)
4039 gdbarch
->xml_syscall_file
= xml_syscall_file
;
4042 struct syscalls_info
*
4043 gdbarch_syscalls_info (struct gdbarch
*gdbarch
)
4045 gdb_assert (gdbarch
!= NULL
);
4046 /* Skip verify of syscalls_info, invalid_p == 0 */
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_syscalls_info called\n");
4049 return gdbarch
->syscalls_info
;
4053 set_gdbarch_syscalls_info (struct gdbarch
*gdbarch
,
4054 struct syscalls_info
* syscalls_info
)
4056 gdbarch
->syscalls_info
= syscalls_info
;
4060 gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
)
4062 gdb_assert (gdbarch
!= NULL
);
4063 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4064 if (gdbarch_debug
>= 2)
4065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_prefixes called\n");
4066 return gdbarch
->stap_integer_prefixes
;
4070 set_gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
,
4071 const char *const * stap_integer_prefixes
)
4073 gdbarch
->stap_integer_prefixes
= stap_integer_prefixes
;
4077 gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
)
4079 gdb_assert (gdbarch
!= NULL
);
4080 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4081 if (gdbarch_debug
>= 2)
4082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_suffixes called\n");
4083 return gdbarch
->stap_integer_suffixes
;
4087 set_gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
,
4088 const char *const * stap_integer_suffixes
)
4090 gdbarch
->stap_integer_suffixes
= stap_integer_suffixes
;
4094 gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
)
4096 gdb_assert (gdbarch
!= NULL
);
4097 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4098 if (gdbarch_debug
>= 2)
4099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_prefixes called\n");
4100 return gdbarch
->stap_register_prefixes
;
4104 set_gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
,
4105 const char *const * stap_register_prefixes
)
4107 gdbarch
->stap_register_prefixes
= stap_register_prefixes
;
4111 gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
)
4113 gdb_assert (gdbarch
!= NULL
);
4114 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4115 if (gdbarch_debug
>= 2)
4116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_suffixes called\n");
4117 return gdbarch
->stap_register_suffixes
;
4121 set_gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
,
4122 const char *const * stap_register_suffixes
)
4124 gdbarch
->stap_register_suffixes
= stap_register_suffixes
;
4128 gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
)
4130 gdb_assert (gdbarch
!= NULL
);
4131 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4132 if (gdbarch_debug
>= 2)
4133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_prefixes called\n");
4134 return gdbarch
->stap_register_indirection_prefixes
;
4138 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
,
4139 const char *const * stap_register_indirection_prefixes
)
4141 gdbarch
->stap_register_indirection_prefixes
= stap_register_indirection_prefixes
;
4145 gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
)
4147 gdb_assert (gdbarch
!= NULL
);
4148 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4149 if (gdbarch_debug
>= 2)
4150 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_suffixes called\n");
4151 return gdbarch
->stap_register_indirection_suffixes
;
4155 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
,
4156 const char *const * stap_register_indirection_suffixes
)
4158 gdbarch
->stap_register_indirection_suffixes
= stap_register_indirection_suffixes
;
4162 gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
)
4164 gdb_assert (gdbarch
!= NULL
);
4165 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4166 if (gdbarch_debug
>= 2)
4167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_prefix called\n");
4168 return gdbarch
->stap_gdb_register_prefix
;
4172 set_gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
,
4173 const char * stap_gdb_register_prefix
)
4175 gdbarch
->stap_gdb_register_prefix
= stap_gdb_register_prefix
;
4179 gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
)
4181 gdb_assert (gdbarch
!= NULL
);
4182 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4183 if (gdbarch_debug
>= 2)
4184 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_suffix called\n");
4185 return gdbarch
->stap_gdb_register_suffix
;
4189 set_gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
,
4190 const char * stap_gdb_register_suffix
)
4192 gdbarch
->stap_gdb_register_suffix
= stap_gdb_register_suffix
;
4196 gdbarch_stap_is_single_operand_p (struct gdbarch
*gdbarch
)
4198 gdb_assert (gdbarch
!= NULL
);
4199 return gdbarch
->stap_is_single_operand
!= NULL
;
4203 gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
, const char *s
)
4205 gdb_assert (gdbarch
!= NULL
);
4206 gdb_assert (gdbarch
->stap_is_single_operand
!= NULL
);
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_is_single_operand called\n");
4209 return gdbarch
->stap_is_single_operand (gdbarch
, s
);
4213 set_gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
,
4214 gdbarch_stap_is_single_operand_ftype stap_is_single_operand
)
4216 gdbarch
->stap_is_single_operand
= stap_is_single_operand
;
4220 gdbarch_stap_parse_special_token_p (struct gdbarch
*gdbarch
)
4222 gdb_assert (gdbarch
!= NULL
);
4223 return gdbarch
->stap_parse_special_token
!= NULL
;
4227 gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
)
4229 gdb_assert (gdbarch
!= NULL
);
4230 gdb_assert (gdbarch
->stap_parse_special_token
!= NULL
);
4231 if (gdbarch_debug
>= 2)
4232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_parse_special_token called\n");
4233 return gdbarch
->stap_parse_special_token (gdbarch
, p
);
4237 set_gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
,
4238 gdbarch_stap_parse_special_token_ftype stap_parse_special_token
)
4240 gdbarch
->stap_parse_special_token
= stap_parse_special_token
;
4244 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch
*gdbarch
)
4246 gdb_assert (gdbarch
!= NULL
);
4247 return gdbarch
->dtrace_parse_probe_argument
!= NULL
;
4251 gdbarch_dtrace_parse_probe_argument (struct gdbarch
*gdbarch
, struct parser_state
*pstate
, int narg
)
4253 gdb_assert (gdbarch
!= NULL
);
4254 gdb_assert (gdbarch
->dtrace_parse_probe_argument
!= NULL
);
4255 if (gdbarch_debug
>= 2)
4256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_parse_probe_argument called\n");
4257 gdbarch
->dtrace_parse_probe_argument (gdbarch
, pstate
, narg
);
4261 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch
*gdbarch
,
4262 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument
)
4264 gdbarch
->dtrace_parse_probe_argument
= dtrace_parse_probe_argument
;
4268 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch
*gdbarch
)
4270 gdb_assert (gdbarch
!= NULL
);
4271 return gdbarch
->dtrace_probe_is_enabled
!= NULL
;
4275 gdbarch_dtrace_probe_is_enabled (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4277 gdb_assert (gdbarch
!= NULL
);
4278 gdb_assert (gdbarch
->dtrace_probe_is_enabled
!= NULL
);
4279 if (gdbarch_debug
>= 2)
4280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_probe_is_enabled called\n");
4281 return gdbarch
->dtrace_probe_is_enabled (gdbarch
, addr
);
4285 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch
*gdbarch
,
4286 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled
)
4288 gdbarch
->dtrace_probe_is_enabled
= dtrace_probe_is_enabled
;
4292 gdbarch_dtrace_enable_probe_p (struct gdbarch
*gdbarch
)
4294 gdb_assert (gdbarch
!= NULL
);
4295 return gdbarch
->dtrace_enable_probe
!= NULL
;
4299 gdbarch_dtrace_enable_probe (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4301 gdb_assert (gdbarch
!= NULL
);
4302 gdb_assert (gdbarch
->dtrace_enable_probe
!= NULL
);
4303 if (gdbarch_debug
>= 2)
4304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_enable_probe called\n");
4305 gdbarch
->dtrace_enable_probe (gdbarch
, addr
);
4309 set_gdbarch_dtrace_enable_probe (struct gdbarch
*gdbarch
,
4310 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe
)
4312 gdbarch
->dtrace_enable_probe
= dtrace_enable_probe
;
4316 gdbarch_dtrace_disable_probe_p (struct gdbarch
*gdbarch
)
4318 gdb_assert (gdbarch
!= NULL
);
4319 return gdbarch
->dtrace_disable_probe
!= NULL
;
4323 gdbarch_dtrace_disable_probe (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4325 gdb_assert (gdbarch
!= NULL
);
4326 gdb_assert (gdbarch
->dtrace_disable_probe
!= NULL
);
4327 if (gdbarch_debug
>= 2)
4328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_disable_probe called\n");
4329 gdbarch
->dtrace_disable_probe (gdbarch
, addr
);
4333 set_gdbarch_dtrace_disable_probe (struct gdbarch
*gdbarch
,
4334 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe
)
4336 gdbarch
->dtrace_disable_probe
= dtrace_disable_probe
;
4340 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
4342 gdb_assert (gdbarch
!= NULL
);
4343 /* Skip verify of has_global_solist, invalid_p == 0 */
4344 if (gdbarch_debug
>= 2)
4345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
4346 return gdbarch
->has_global_solist
;
4350 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
4351 int has_global_solist
)
4353 gdbarch
->has_global_solist
= has_global_solist
;
4357 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
4359 gdb_assert (gdbarch
!= NULL
);
4360 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4361 if (gdbarch_debug
>= 2)
4362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
4363 return gdbarch
->has_global_breakpoints
;
4367 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
4368 int has_global_breakpoints
)
4370 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
4374 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
4376 gdb_assert (gdbarch
!= NULL
);
4377 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
4378 if (gdbarch_debug
>= 2)
4379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
4380 return gdbarch
->has_shared_address_space (gdbarch
);
4384 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
4385 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
4387 gdbarch
->has_shared_address_space
= has_shared_address_space
;
4391 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int *isize
, char **msg
)
4393 gdb_assert (gdbarch
!= NULL
);
4394 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
4395 if (gdbarch_debug
>= 2)
4396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
4397 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, isize
, msg
);
4401 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
4402 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
4404 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
4408 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
4410 gdb_assert (gdbarch
!= NULL
);
4411 gdb_assert (gdbarch
->auto_charset
!= NULL
);
4412 if (gdbarch_debug
>= 2)
4413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
4414 return gdbarch
->auto_charset ();
4418 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
4419 gdbarch_auto_charset_ftype auto_charset
)
4421 gdbarch
->auto_charset
= auto_charset
;
4425 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
4427 gdb_assert (gdbarch
!= NULL
);
4428 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
4429 if (gdbarch_debug
>= 2)
4430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
4431 return gdbarch
->auto_wide_charset ();
4435 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
4436 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
4438 gdbarch
->auto_wide_charset
= auto_wide_charset
;
4442 gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
)
4444 gdb_assert (gdbarch
!= NULL
);
4445 if (gdbarch_debug
>= 2)
4446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_solib_symbols_extension called\n");
4447 return gdbarch
->solib_symbols_extension
;
4451 set_gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
,
4452 const char * solib_symbols_extension
)
4454 gdbarch
->solib_symbols_extension
= solib_symbols_extension
;
4458 gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
)
4460 gdb_assert (gdbarch
!= NULL
);
4461 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4462 if (gdbarch_debug
>= 2)
4463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_dos_based_file_system called\n");
4464 return gdbarch
->has_dos_based_file_system
;
4468 set_gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
,
4469 int has_dos_based_file_system
)
4471 gdbarch
->has_dos_based_file_system
= has_dos_based_file_system
;
4475 gdbarch_gen_return_address (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, struct axs_value
*value
, CORE_ADDR scope
)
4477 gdb_assert (gdbarch
!= NULL
);
4478 gdb_assert (gdbarch
->gen_return_address
!= NULL
);
4479 if (gdbarch_debug
>= 2)
4480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gen_return_address called\n");
4481 gdbarch
->gen_return_address (gdbarch
, ax
, value
, scope
);
4485 set_gdbarch_gen_return_address (struct gdbarch
*gdbarch
,
4486 gdbarch_gen_return_address_ftype gen_return_address
)
4488 gdbarch
->gen_return_address
= gen_return_address
;
4492 gdbarch_info_proc_p (struct gdbarch
*gdbarch
)
4494 gdb_assert (gdbarch
!= NULL
);
4495 return gdbarch
->info_proc
!= NULL
;
4499 gdbarch_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4501 gdb_assert (gdbarch
!= NULL
);
4502 gdb_assert (gdbarch
->info_proc
!= NULL
);
4503 if (gdbarch_debug
>= 2)
4504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_info_proc called\n");
4505 gdbarch
->info_proc (gdbarch
, args
, what
);
4509 set_gdbarch_info_proc (struct gdbarch
*gdbarch
,
4510 gdbarch_info_proc_ftype info_proc
)
4512 gdbarch
->info_proc
= info_proc
;
4516 gdbarch_core_info_proc_p (struct gdbarch
*gdbarch
)
4518 gdb_assert (gdbarch
!= NULL
);
4519 return gdbarch
->core_info_proc
!= NULL
;
4523 gdbarch_core_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4525 gdb_assert (gdbarch
!= NULL
);
4526 gdb_assert (gdbarch
->core_info_proc
!= NULL
);
4527 if (gdbarch_debug
>= 2)
4528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_info_proc called\n");
4529 gdbarch
->core_info_proc (gdbarch
, args
, what
);
4533 set_gdbarch_core_info_proc (struct gdbarch
*gdbarch
,
4534 gdbarch_core_info_proc_ftype core_info_proc
)
4536 gdbarch
->core_info_proc
= core_info_proc
;
4540 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
)
4542 gdb_assert (gdbarch
!= NULL
);
4543 gdb_assert (gdbarch
->iterate_over_objfiles_in_search_order
!= NULL
);
4544 if (gdbarch_debug
>= 2)
4545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4546 gdbarch
->iterate_over_objfiles_in_search_order (gdbarch
, cb
, cb_data
, current_objfile
);
4550 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch
*gdbarch
,
4551 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order
)
4553 gdbarch
->iterate_over_objfiles_in_search_order
= iterate_over_objfiles_in_search_order
;
4556 struct ravenscar_arch_ops
*
4557 gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
)
4559 gdb_assert (gdbarch
!= NULL
);
4560 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4561 if (gdbarch_debug
>= 2)
4562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ravenscar_ops called\n");
4563 return gdbarch
->ravenscar_ops
;
4567 set_gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
,
4568 struct ravenscar_arch_ops
* ravenscar_ops
)
4570 gdbarch
->ravenscar_ops
= ravenscar_ops
;
4574 gdbarch_insn_is_call (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4576 gdb_assert (gdbarch
!= NULL
);
4577 gdb_assert (gdbarch
->insn_is_call
!= NULL
);
4578 if (gdbarch_debug
>= 2)
4579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_call called\n");
4580 return gdbarch
->insn_is_call (gdbarch
, addr
);
4584 set_gdbarch_insn_is_call (struct gdbarch
*gdbarch
,
4585 gdbarch_insn_is_call_ftype insn_is_call
)
4587 gdbarch
->insn_is_call
= insn_is_call
;
4591 gdbarch_insn_is_ret (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4593 gdb_assert (gdbarch
!= NULL
);
4594 gdb_assert (gdbarch
->insn_is_ret
!= NULL
);
4595 if (gdbarch_debug
>= 2)
4596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_ret called\n");
4597 return gdbarch
->insn_is_ret (gdbarch
, addr
);
4601 set_gdbarch_insn_is_ret (struct gdbarch
*gdbarch
,
4602 gdbarch_insn_is_ret_ftype insn_is_ret
)
4604 gdbarch
->insn_is_ret
= insn_is_ret
;
4608 gdbarch_insn_is_jump (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4610 gdb_assert (gdbarch
!= NULL
);
4611 gdb_assert (gdbarch
->insn_is_jump
!= NULL
);
4612 if (gdbarch_debug
>= 2)
4613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_jump called\n");
4614 return gdbarch
->insn_is_jump (gdbarch
, addr
);
4618 set_gdbarch_insn_is_jump (struct gdbarch
*gdbarch
,
4619 gdbarch_insn_is_jump_ftype insn_is_jump
)
4621 gdbarch
->insn_is_jump
= insn_is_jump
;
4625 gdbarch_auxv_parse_p (struct gdbarch
*gdbarch
)
4627 gdb_assert (gdbarch
!= NULL
);
4628 return gdbarch
->auxv_parse
!= NULL
;
4632 gdbarch_auxv_parse (struct gdbarch
*gdbarch
, gdb_byte
**readptr
, gdb_byte
*endptr
, CORE_ADDR
*typep
, CORE_ADDR
*valp
)
4634 gdb_assert (gdbarch
!= NULL
);
4635 gdb_assert (gdbarch
->auxv_parse
!= NULL
);
4636 if (gdbarch_debug
>= 2)
4637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auxv_parse called\n");
4638 return gdbarch
->auxv_parse (gdbarch
, readptr
, endptr
, typep
, valp
);
4642 set_gdbarch_auxv_parse (struct gdbarch
*gdbarch
,
4643 gdbarch_auxv_parse_ftype auxv_parse
)
4645 gdbarch
->auxv_parse
= auxv_parse
;
4649 gdbarch_vsyscall_range (struct gdbarch
*gdbarch
, struct mem_range
*range
)
4651 gdb_assert (gdbarch
!= NULL
);
4652 gdb_assert (gdbarch
->vsyscall_range
!= NULL
);
4653 if (gdbarch_debug
>= 2)
4654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vsyscall_range called\n");
4655 return gdbarch
->vsyscall_range (gdbarch
, range
);
4659 set_gdbarch_vsyscall_range (struct gdbarch
*gdbarch
,
4660 gdbarch_vsyscall_range_ftype vsyscall_range
)
4662 gdbarch
->vsyscall_range
= vsyscall_range
;
4666 gdbarch_infcall_mmap (struct gdbarch
*gdbarch
, CORE_ADDR size
, unsigned prot
)
4668 gdb_assert (gdbarch
!= NULL
);
4669 gdb_assert (gdbarch
->infcall_mmap
!= NULL
);
4670 if (gdbarch_debug
>= 2)
4671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_infcall_mmap called\n");
4672 return gdbarch
->infcall_mmap (size
, prot
);
4676 set_gdbarch_infcall_mmap (struct gdbarch
*gdbarch
,
4677 gdbarch_infcall_mmap_ftype infcall_mmap
)
4679 gdbarch
->infcall_mmap
= infcall_mmap
;
4683 gdbarch_infcall_munmap (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR size
)
4685 gdb_assert (gdbarch
!= NULL
);
4686 gdb_assert (gdbarch
->infcall_munmap
!= NULL
);
4687 if (gdbarch_debug
>= 2)
4688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_infcall_munmap called\n");
4689 gdbarch
->infcall_munmap (addr
, size
);
4693 set_gdbarch_infcall_munmap (struct gdbarch
*gdbarch
,
4694 gdbarch_infcall_munmap_ftype infcall_munmap
)
4696 gdbarch
->infcall_munmap
= infcall_munmap
;
4700 gdbarch_gcc_target_options (struct gdbarch
*gdbarch
)
4702 gdb_assert (gdbarch
!= NULL
);
4703 gdb_assert (gdbarch
->gcc_target_options
!= NULL
);
4704 if (gdbarch_debug
>= 2)
4705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcc_target_options called\n");
4706 return gdbarch
->gcc_target_options (gdbarch
);
4710 set_gdbarch_gcc_target_options (struct gdbarch
*gdbarch
,
4711 gdbarch_gcc_target_options_ftype gcc_target_options
)
4713 gdbarch
->gcc_target_options
= gcc_target_options
;
4717 gdbarch_gnu_triplet_regexp (struct gdbarch
*gdbarch
)
4719 gdb_assert (gdbarch
!= NULL
);
4720 gdb_assert (gdbarch
->gnu_triplet_regexp
!= NULL
);
4721 if (gdbarch_debug
>= 2)
4722 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gnu_triplet_regexp called\n");
4723 return gdbarch
->gnu_triplet_regexp (gdbarch
);
4727 set_gdbarch_gnu_triplet_regexp (struct gdbarch
*gdbarch
,
4728 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp
)
4730 gdbarch
->gnu_triplet_regexp
= gnu_triplet_regexp
;
4734 /* Keep a registry of per-architecture data-pointers required by GDB
4741 gdbarch_data_pre_init_ftype
*pre_init
;
4742 gdbarch_data_post_init_ftype
*post_init
;
4745 struct gdbarch_data_registration
4747 struct gdbarch_data
*data
;
4748 struct gdbarch_data_registration
*next
;
4751 struct gdbarch_data_registry
4754 struct gdbarch_data_registration
*registrations
;
4757 struct gdbarch_data_registry gdbarch_data_registry
=
4762 static struct gdbarch_data
*
4763 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4764 gdbarch_data_post_init_ftype
*post_init
)
4766 struct gdbarch_data_registration
**curr
;
4768 /* Append the new registration. */
4769 for (curr
= &gdbarch_data_registry
.registrations
;
4771 curr
= &(*curr
)->next
);
4772 (*curr
) = XNEW (struct gdbarch_data_registration
);
4773 (*curr
)->next
= NULL
;
4774 (*curr
)->data
= XNEW (struct gdbarch_data
);
4775 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4776 (*curr
)->data
->pre_init
= pre_init
;
4777 (*curr
)->data
->post_init
= post_init
;
4778 (*curr
)->data
->init_p
= 1;
4779 return (*curr
)->data
;
4782 struct gdbarch_data
*
4783 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4785 return gdbarch_data_register (pre_init
, NULL
);
4788 struct gdbarch_data
*
4789 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
4791 return gdbarch_data_register (NULL
, post_init
);
4794 /* Create/delete the gdbarch data vector. */
4797 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4799 gdb_assert (gdbarch
->data
== NULL
);
4800 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4801 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
4804 /* Initialize the current value of the specified per-architecture
4808 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
4809 struct gdbarch_data
*data
,
4812 gdb_assert (data
->index
< gdbarch
->nr_data
);
4813 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
4814 gdb_assert (data
->pre_init
== NULL
);
4815 gdbarch
->data
[data
->index
] = pointer
;
4818 /* Return the current value of the specified per-architecture
4822 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4824 gdb_assert (data
->index
< gdbarch
->nr_data
);
4825 if (gdbarch
->data
[data
->index
] == NULL
)
4827 /* The data-pointer isn't initialized, call init() to get a
4829 if (data
->pre_init
!= NULL
)
4830 /* Mid architecture creation: pass just the obstack, and not
4831 the entire architecture, as that way it isn't possible for
4832 pre-init code to refer to undefined architecture
4834 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
4835 else if (gdbarch
->initialized_p
4836 && data
->post_init
!= NULL
)
4837 /* Post architecture creation: pass the entire architecture
4838 (as all fields are valid), but be careful to also detect
4839 recursive references. */
4841 gdb_assert (data
->init_p
);
4843 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
4847 /* The architecture initialization hasn't completed - punt -
4848 hope that the caller knows what they are doing. Once
4849 deprecated_set_gdbarch_data has been initialized, this can be
4850 changed to an internal error. */
4852 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4854 return gdbarch
->data
[data
->index
];
4858 /* Keep a registry of the architectures known by GDB. */
4860 struct gdbarch_registration
4862 enum bfd_architecture bfd_architecture
;
4863 gdbarch_init_ftype
*init
;
4864 gdbarch_dump_tdep_ftype
*dump_tdep
;
4865 struct gdbarch_list
*arches
;
4866 struct gdbarch_registration
*next
;
4869 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4872 append_name (const char ***buf
, int *nr
, const char *name
)
4874 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4880 gdbarch_printable_names (void)
4882 /* Accumulate a list of names based on the registed list of
4885 const char **arches
= NULL
;
4886 struct gdbarch_registration
*rego
;
4888 for (rego
= gdbarch_registry
;
4892 const struct bfd_arch_info
*ap
;
4893 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4895 internal_error (__FILE__
, __LINE__
,
4896 _("gdbarch_architecture_names: multi-arch unknown"));
4899 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4904 append_name (&arches
, &nr_arches
, NULL
);
4910 gdbarch_register (enum bfd_architecture bfd_architecture
,
4911 gdbarch_init_ftype
*init
,
4912 gdbarch_dump_tdep_ftype
*dump_tdep
)
4914 struct gdbarch_registration
**curr
;
4915 const struct bfd_arch_info
*bfd_arch_info
;
4917 /* Check that BFD recognizes this architecture */
4918 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4919 if (bfd_arch_info
== NULL
)
4921 internal_error (__FILE__
, __LINE__
,
4922 _("gdbarch: Attempt to register "
4923 "unknown architecture (%d)"),
4926 /* Check that we haven't seen this architecture before. */
4927 for (curr
= &gdbarch_registry
;
4929 curr
= &(*curr
)->next
)
4931 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4932 internal_error (__FILE__
, __LINE__
,
4933 _("gdbarch: Duplicate registration "
4934 "of architecture (%s)"),
4935 bfd_arch_info
->printable_name
);
4939 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
4940 bfd_arch_info
->printable_name
,
4941 host_address_to_string (init
));
4943 (*curr
) = XNEW (struct gdbarch_registration
);
4944 (*curr
)->bfd_architecture
= bfd_architecture
;
4945 (*curr
)->init
= init
;
4946 (*curr
)->dump_tdep
= dump_tdep
;
4947 (*curr
)->arches
= NULL
;
4948 (*curr
)->next
= NULL
;
4952 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4953 gdbarch_init_ftype
*init
)
4955 gdbarch_register (bfd_architecture
, init
, NULL
);
4959 /* Look for an architecture using gdbarch_info. */
4961 struct gdbarch_list
*
4962 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4963 const struct gdbarch_info
*info
)
4965 for (; arches
!= NULL
; arches
= arches
->next
)
4967 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4969 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4971 if (info
->osabi
!= arches
->gdbarch
->osabi
)
4973 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
4981 /* Find an architecture that matches the specified INFO. Create a new
4982 architecture if needed. Return that new architecture. */
4985 gdbarch_find_by_info (struct gdbarch_info info
)
4987 struct gdbarch
*new_gdbarch
;
4988 struct gdbarch_registration
*rego
;
4990 /* Fill in missing parts of the INFO struct using a number of
4991 sources: "set ..."; INFOabfd supplied; and the global
4993 gdbarch_info_fill (&info
);
4995 /* Must have found some sort of architecture. */
4996 gdb_assert (info
.bfd_arch_info
!= NULL
);
5000 fprintf_unfiltered (gdb_stdlog
,
5001 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5002 (info
.bfd_arch_info
!= NULL
5003 ? info
.bfd_arch_info
->printable_name
5005 fprintf_unfiltered (gdb_stdlog
,
5006 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5008 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5009 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5011 fprintf_unfiltered (gdb_stdlog
,
5012 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5013 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5014 fprintf_unfiltered (gdb_stdlog
,
5015 "gdbarch_find_by_info: info.abfd %s\n",
5016 host_address_to_string (info
.abfd
));
5017 fprintf_unfiltered (gdb_stdlog
,
5018 "gdbarch_find_by_info: info.tdep_info %s\n",
5019 host_address_to_string (info
.tdep_info
));
5022 /* Find the tdep code that knows about this architecture. */
5023 for (rego
= gdbarch_registry
;
5026 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5032 "No matching architecture\n");
5036 /* Ask the tdep code for an architecture that matches "info". */
5037 new_gdbarch
= rego
->init (info
, rego
->arches
);
5039 /* Did the tdep code like it? No. Reject the change and revert to
5040 the old architecture. */
5041 if (new_gdbarch
== NULL
)
5044 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5045 "Target rejected architecture\n");
5049 /* Is this a pre-existing architecture (as determined by already
5050 being initialized)? Move it to the front of the architecture
5051 list (keeping the list sorted Most Recently Used). */
5052 if (new_gdbarch
->initialized_p
)
5054 struct gdbarch_list
**list
;
5055 struct gdbarch_list
*self
;
5057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5058 "Previous architecture %s (%s) selected\n",
5059 host_address_to_string (new_gdbarch
),
5060 new_gdbarch
->bfd_arch_info
->printable_name
);
5061 /* Find the existing arch in the list. */
5062 for (list
= ®o
->arches
;
5063 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5064 list
= &(*list
)->next
);
5065 /* It had better be in the list of architectures. */
5066 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5069 (*list
) = self
->next
;
5070 /* Insert SELF at the front. */
5071 self
->next
= rego
->arches
;
5072 rego
->arches
= self
;
5077 /* It's a new architecture. */
5079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5080 "New architecture %s (%s) selected\n",
5081 host_address_to_string (new_gdbarch
),
5082 new_gdbarch
->bfd_arch_info
->printable_name
);
5084 /* Insert the new architecture into the front of the architecture
5085 list (keep the list sorted Most Recently Used). */
5087 struct gdbarch_list
*self
= XNEW (struct gdbarch_list
);
5088 self
->next
= rego
->arches
;
5089 self
->gdbarch
= new_gdbarch
;
5090 rego
->arches
= self
;
5093 /* Check that the newly installed architecture is valid. Plug in
5094 any post init values. */
5095 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5096 verify_gdbarch (new_gdbarch
);
5097 new_gdbarch
->initialized_p
= 1;
5100 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5105 /* Make the specified architecture current. */
5108 set_target_gdbarch (struct gdbarch
*new_gdbarch
)
5110 gdb_assert (new_gdbarch
!= NULL
);
5111 gdb_assert (new_gdbarch
->initialized_p
);
5112 current_inferior ()->gdbarch
= new_gdbarch
;
5113 observer_notify_architecture_changed (new_gdbarch
);
5114 registers_changed ();
5117 /* Return the current inferior's arch. */
5120 target_gdbarch (void)
5122 return current_inferior ()->gdbarch
;
5125 extern void _initialize_gdbarch (void);
5128 _initialize_gdbarch (void)
5130 add_setshow_zuinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
5131 Set architecture debugging."), _("\
5132 Show architecture debugging."), _("\
5133 When non-zero, architecture debugging is enabled."),
5136 &setdebuglist
, &showdebuglist
);