1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2014 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_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
253 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
254 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
255 int cannot_step_breakpoint
;
256 int have_nonsteppable_watchpoint
;
257 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
258 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
259 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
260 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
261 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
262 gdbarch_iterate_over_regset_sections_ftype
*iterate_over_regset_sections
;
263 gdbarch_make_corefile_notes_ftype
*make_corefile_notes
;
264 gdbarch_elfcore_write_linux_prpsinfo_ftype
*elfcore_write_linux_prpsinfo
;
265 gdbarch_find_memory_regions_ftype
*find_memory_regions
;
266 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
267 gdbarch_core_xfer_shared_libraries_aix_ftype
*core_xfer_shared_libraries_aix
;
268 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
269 const char * gcore_bfd_target
;
270 int vtable_function_descriptors
;
272 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
273 ULONGEST max_insn_length
;
274 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
275 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
276 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
277 gdbarch_displaced_step_free_closure_ftype
*displaced_step_free_closure
;
278 gdbarch_displaced_step_location_ftype
*displaced_step_location
;
279 gdbarch_relocate_instruction_ftype
*relocate_instruction
;
280 gdbarch_overlay_update_ftype
*overlay_update
;
281 gdbarch_core_read_description_ftype
*core_read_description
;
282 gdbarch_static_transform_name_ftype
*static_transform_name
;
283 int sofun_address_maybe_missing
;
284 gdbarch_process_record_ftype
*process_record
;
285 gdbarch_process_record_signal_ftype
*process_record_signal
;
286 gdbarch_gdb_signal_from_target_ftype
*gdb_signal_from_target
;
287 gdbarch_gdb_signal_to_target_ftype
*gdb_signal_to_target
;
288 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
289 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
290 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
291 const char * xml_syscall_file
;
292 struct syscalls_info
* syscalls_info
;
293 const char *const * stap_integer_prefixes
;
294 const char *const * stap_integer_suffixes
;
295 const char *const * stap_register_prefixes
;
296 const char *const * stap_register_suffixes
;
297 const char *const * stap_register_indirection_prefixes
;
298 const char *const * stap_register_indirection_suffixes
;
299 const char * stap_gdb_register_prefix
;
300 const char * stap_gdb_register_suffix
;
301 gdbarch_stap_is_single_operand_ftype
*stap_is_single_operand
;
302 gdbarch_stap_parse_special_token_ftype
*stap_parse_special_token
;
303 int has_global_solist
;
304 int has_global_breakpoints
;
305 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
306 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
307 gdbarch_auto_charset_ftype
*auto_charset
;
308 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
309 const char * solib_symbols_extension
;
310 int has_dos_based_file_system
;
311 gdbarch_gen_return_address_ftype
*gen_return_address
;
312 gdbarch_info_proc_ftype
*info_proc
;
313 gdbarch_core_info_proc_ftype
*core_info_proc
;
314 gdbarch_iterate_over_objfiles_in_search_order_ftype
*iterate_over_objfiles_in_search_order
;
315 struct ravenscar_arch_ops
* ravenscar_ops
;
316 gdbarch_insn_is_call_ftype
*insn_is_call
;
317 gdbarch_insn_is_ret_ftype
*insn_is_ret
;
318 gdbarch_insn_is_jump_ftype
*insn_is_jump
;
319 gdbarch_auxv_parse_ftype
*auxv_parse
;
320 gdbarch_vsyscall_range_ftype
*vsyscall_range
;
323 /* Create a new ``struct gdbarch'' based on information provided by
324 ``struct gdbarch_info''. */
327 gdbarch_alloc (const struct gdbarch_info
*info
,
328 struct gdbarch_tdep
*tdep
)
330 struct gdbarch
*gdbarch
;
332 /* Create an obstack for allocating all the per-architecture memory,
333 then use that to allocate the architecture vector. */
334 struct obstack
*obstack
= XNEW (struct obstack
);
335 obstack_init (obstack
);
336 gdbarch
= obstack_alloc (obstack
, sizeof (*gdbarch
));
337 memset (gdbarch
, 0, sizeof (*gdbarch
));
338 gdbarch
->obstack
= obstack
;
340 alloc_gdbarch_data (gdbarch
);
342 gdbarch
->tdep
= tdep
;
344 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
345 gdbarch
->byte_order
= info
->byte_order
;
346 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
347 gdbarch
->osabi
= info
->osabi
;
348 gdbarch
->target_desc
= info
->target_desc
;
350 /* Force the explicit initialization of these. */
351 gdbarch
->bits_big_endian
= (gdbarch
->byte_order
== BFD_ENDIAN_BIG
);
352 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
353 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
354 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
355 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
356 gdbarch
->long_long_align_bit
= 2*gdbarch
->long_bit
;
357 gdbarch
->half_bit
= 2*TARGET_CHAR_BIT
;
358 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
359 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
360 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
361 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
362 gdbarch
->char_signed
= -1;
363 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
364 gdbarch
->num_regs
= -1;
365 gdbarch
->sp_regnum
= -1;
366 gdbarch
->pc_regnum
= -1;
367 gdbarch
->ps_regnum
= -1;
368 gdbarch
->fp0_regnum
= -1;
369 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
370 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
371 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
372 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
373 gdbarch
->deprecated_fp_regnum
= -1;
374 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
375 gdbarch
->print_registers_info
= default_print_registers_info
;
376 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
377 gdbarch
->cannot_fetch_register
= cannot_register_not
;
378 gdbarch
->cannot_store_register
= cannot_register_not
;
379 gdbarch
->convert_register_p
= generic_convert_register_p
;
380 gdbarch
->value_from_register
= default_value_from_register
;
381 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
382 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
383 gdbarch
->return_in_first_hidden_param_p
= default_return_in_first_hidden_param_p
;
384 gdbarch
->remote_breakpoint_from_pc
= default_remote_breakpoint_from_pc
;
385 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
386 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
387 gdbarch
->remote_register_number
= default_remote_register_number
;
388 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
389 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
390 gdbarch
->addr_bits_remove
= core_addr_identity
;
391 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
392 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
393 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
394 gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
395 gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
396 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
397 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
398 gdbarch
->skip_permanent_breakpoint
= default_skip_permanent_breakpoint
;
399 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
400 gdbarch
->displaced_step_fixup
= NULL
;
401 gdbarch
->displaced_step_free_closure
= NULL
;
402 gdbarch
->displaced_step_location
= NULL
;
403 gdbarch
->relocate_instruction
= NULL
;
404 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
405 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
406 gdbarch
->auto_charset
= default_auto_charset
;
407 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
408 gdbarch
->gen_return_address
= default_gen_return_address
;
409 gdbarch
->iterate_over_objfiles_in_search_order
= default_iterate_over_objfiles_in_search_order
;
410 gdbarch
->ravenscar_ops
= NULL
;
411 gdbarch
->insn_is_call
= default_insn_is_call
;
412 gdbarch
->insn_is_ret
= default_insn_is_ret
;
413 gdbarch
->insn_is_jump
= default_insn_is_jump
;
414 gdbarch
->vsyscall_range
= default_vsyscall_range
;
415 /* gdbarch_alloc() */
421 /* Allocate extra space using the per-architecture obstack. */
424 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
426 void *data
= obstack_alloc (arch
->obstack
, size
);
428 memset (data
, 0, size
);
433 /* Free a gdbarch struct. This should never happen in normal
434 operation --- once you've created a gdbarch, you keep it around.
435 However, if an architecture's init function encounters an error
436 building the structure, it may need to clean up a partially
437 constructed gdbarch. */
440 gdbarch_free (struct gdbarch
*arch
)
442 struct obstack
*obstack
;
444 gdb_assert (arch
!= NULL
);
445 gdb_assert (!arch
->initialized_p
);
446 obstack
= arch
->obstack
;
447 obstack_free (obstack
, 0); /* Includes the ARCH. */
452 /* Ensure that all values in a GDBARCH are reasonable. */
455 verify_gdbarch (struct gdbarch
*gdbarch
)
458 struct cleanup
*cleanups
;
462 log
= mem_fileopen ();
463 cleanups
= make_cleanup_ui_file_delete (log
);
465 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
466 fprintf_unfiltered (log
, "\n\tbyte-order");
467 if (gdbarch
->bfd_arch_info
== NULL
)
468 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
469 /* Check those that need to be defined for the given multi-arch level. */
470 /* Skip verify of bits_big_endian, invalid_p == 0 */
471 /* Skip verify of short_bit, invalid_p == 0 */
472 /* Skip verify of int_bit, invalid_p == 0 */
473 /* Skip verify of long_bit, invalid_p == 0 */
474 /* Skip verify of long_long_bit, invalid_p == 0 */
475 /* Skip verify of long_long_align_bit, invalid_p == 0 */
476 /* Skip verify of half_bit, invalid_p == 0 */
477 if (gdbarch
->half_format
== 0)
478 gdbarch
->half_format
= floatformats_ieee_half
;
479 /* Skip verify of float_bit, invalid_p == 0 */
480 if (gdbarch
->float_format
== 0)
481 gdbarch
->float_format
= floatformats_ieee_single
;
482 /* Skip verify of double_bit, invalid_p == 0 */
483 if (gdbarch
->double_format
== 0)
484 gdbarch
->double_format
= floatformats_ieee_double
;
485 /* Skip verify of long_double_bit, invalid_p == 0 */
486 if (gdbarch
->long_double_format
== 0)
487 gdbarch
->long_double_format
= floatformats_ieee_double
;
488 /* Skip verify of ptr_bit, invalid_p == 0 */
489 if (gdbarch
->addr_bit
== 0)
490 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
491 if (gdbarch
->dwarf2_addr_size
== 0)
492 gdbarch
->dwarf2_addr_size
= gdbarch_ptr_bit (gdbarch
) / TARGET_CHAR_BIT
;
493 if (gdbarch
->char_signed
== -1)
494 gdbarch
->char_signed
= 1;
495 /* Skip verify of read_pc, has predicate. */
496 /* Skip verify of write_pc, has predicate. */
497 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
498 /* Skip verify of pseudo_register_read, has predicate. */
499 /* Skip verify of pseudo_register_read_value, has predicate. */
500 /* Skip verify of pseudo_register_write, has predicate. */
501 if (gdbarch
->num_regs
== -1)
502 fprintf_unfiltered (log
, "\n\tnum_regs");
503 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
504 /* Skip verify of ax_pseudo_register_collect, has predicate. */
505 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
506 /* Skip verify of sp_regnum, invalid_p == 0 */
507 /* Skip verify of pc_regnum, invalid_p == 0 */
508 /* Skip verify of ps_regnum, invalid_p == 0 */
509 /* Skip verify of fp0_regnum, invalid_p == 0 */
510 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
511 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
512 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
513 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
514 if (gdbarch
->register_name
== 0)
515 fprintf_unfiltered (log
, "\n\tregister_name");
516 /* Skip verify of register_type, has predicate. */
517 /* Skip verify of dummy_id, has predicate. */
518 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
519 /* Skip verify of push_dummy_call, has predicate. */
520 /* Skip verify of call_dummy_location, invalid_p == 0 */
521 /* Skip verify of push_dummy_code, has predicate. */
522 /* Skip verify of print_registers_info, invalid_p == 0 */
523 /* Skip verify of print_float_info, has predicate. */
524 /* Skip verify of print_vector_info, has predicate. */
525 /* Skip verify of register_sim_regno, invalid_p == 0 */
526 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
527 /* Skip verify of cannot_store_register, invalid_p == 0 */
528 /* Skip verify of get_longjmp_target, has predicate. */
529 /* Skip verify of convert_register_p, invalid_p == 0 */
530 /* Skip verify of value_from_register, invalid_p == 0 */
531 /* Skip verify of pointer_to_address, invalid_p == 0 */
532 /* Skip verify of address_to_pointer, invalid_p == 0 */
533 /* Skip verify of integer_to_address, has predicate. */
534 /* Skip verify of return_value, has predicate. */
535 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
536 if (gdbarch
->skip_prologue
== 0)
537 fprintf_unfiltered (log
, "\n\tskip_prologue");
538 /* Skip verify of skip_main_prologue, has predicate. */
539 /* Skip verify of skip_entrypoint, has predicate. */
540 if (gdbarch
->inner_than
== 0)
541 fprintf_unfiltered (log
, "\n\tinner_than");
542 if (gdbarch
->breakpoint_from_pc
== 0)
543 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
544 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
545 /* Skip verify of adjust_breakpoint_address, has predicate. */
546 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
547 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
548 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
549 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
550 /* Skip verify of remote_register_number, invalid_p == 0 */
551 /* Skip verify of fetch_tls_load_module_address, has predicate. */
552 /* Skip verify of frame_args_skip, invalid_p == 0 */
553 /* Skip verify of unwind_pc, has predicate. */
554 /* Skip verify of unwind_sp, has predicate. */
555 /* Skip verify of frame_num_args, has predicate. */
556 /* Skip verify of frame_align, has predicate. */
557 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
558 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
559 /* Skip verify of addr_bits_remove, invalid_p == 0 */
560 /* Skip verify of software_single_step, has predicate. */
561 /* Skip verify of single_step_through_delay, has predicate. */
562 if (gdbarch
->print_insn
== 0)
563 fprintf_unfiltered (log
, "\n\tprint_insn");
564 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
565 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
566 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
567 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
568 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
569 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
570 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
571 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
572 /* Skip verify of address_class_type_flags, has predicate. */
573 /* Skip verify of address_class_type_flags_to_name, has predicate. */
574 /* Skip verify of address_class_name_to_type_flags, has predicate. */
575 /* Skip verify of register_reggroup_p, invalid_p == 0 */
576 /* Skip verify of fetch_pointer_argument, has predicate. */
577 /* Skip verify of iterate_over_regset_sections, has predicate. */
578 /* Skip verify of make_corefile_notes, has predicate. */
579 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
580 /* Skip verify of find_memory_regions, has predicate. */
581 /* Skip verify of core_xfer_shared_libraries, has predicate. */
582 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
583 /* Skip verify of core_pid_to_str, has predicate. */
584 /* Skip verify of gcore_bfd_target, has predicate. */
585 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
586 /* Skip verify of vbit_in_delta, invalid_p == 0 */
587 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
588 /* Skip verify of max_insn_length, has predicate. */
589 /* Skip verify of displaced_step_copy_insn, has predicate. */
590 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
591 /* Skip verify of displaced_step_fixup, has predicate. */
592 if ((! gdbarch
->displaced_step_free_closure
) != (! gdbarch
->displaced_step_copy_insn
))
593 fprintf_unfiltered (log
, "\n\tdisplaced_step_free_closure");
594 if ((! gdbarch
->displaced_step_location
) != (! gdbarch
->displaced_step_copy_insn
))
595 fprintf_unfiltered (log
, "\n\tdisplaced_step_location");
596 /* Skip verify of relocate_instruction, has predicate. */
597 /* Skip verify of overlay_update, has predicate. */
598 /* Skip verify of core_read_description, has predicate. */
599 /* Skip verify of static_transform_name, has predicate. */
600 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
601 /* Skip verify of process_record, has predicate. */
602 /* Skip verify of process_record_signal, has predicate. */
603 /* Skip verify of gdb_signal_from_target, has predicate. */
604 /* Skip verify of gdb_signal_to_target, has predicate. */
605 /* Skip verify of get_siginfo_type, has predicate. */
606 /* Skip verify of record_special_symbol, has predicate. */
607 /* Skip verify of get_syscall_number, has predicate. */
608 /* Skip verify of xml_syscall_file, invalid_p == 0 */
609 /* Skip verify of syscalls_info, invalid_p == 0 */
610 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
611 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
612 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
613 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
614 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
615 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
616 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
617 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
618 /* Skip verify of stap_is_single_operand, has predicate. */
619 /* Skip verify of stap_parse_special_token, has predicate. */
620 /* Skip verify of has_global_solist, invalid_p == 0 */
621 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
622 /* Skip verify of has_shared_address_space, invalid_p == 0 */
623 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
624 /* Skip verify of auto_charset, invalid_p == 0 */
625 /* Skip verify of auto_wide_charset, invalid_p == 0 */
626 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
627 /* Skip verify of gen_return_address, invalid_p == 0 */
628 /* Skip verify of info_proc, has predicate. */
629 /* Skip verify of core_info_proc, has predicate. */
630 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
631 /* Skip verify of ravenscar_ops, invalid_p == 0 */
632 /* Skip verify of insn_is_call, invalid_p == 0 */
633 /* Skip verify of insn_is_ret, invalid_p == 0 */
634 /* Skip verify of insn_is_jump, invalid_p == 0 */
635 /* Skip verify of auxv_parse, has predicate. */
636 /* Skip verify of vsyscall_range, invalid_p == 0 */
637 buf
= ui_file_xstrdup (log
, &length
);
638 make_cleanup (xfree
, buf
);
640 internal_error (__FILE__
, __LINE__
,
641 _("verify_gdbarch: the following are invalid ...%s"),
643 do_cleanups (cleanups
);
647 /* Print out the details of the current architecture. */
650 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
652 const char *gdb_nm_file
= "<not-defined>";
654 #if defined (GDB_NM_FILE)
655 gdb_nm_file
= GDB_NM_FILE
;
657 fprintf_unfiltered (file
,
658 "gdbarch_dump: GDB_NM_FILE = %s\n",
660 fprintf_unfiltered (file
,
661 "gdbarch_dump: addr_bit = %s\n",
662 plongest (gdbarch
->addr_bit
));
663 fprintf_unfiltered (file
,
664 "gdbarch_dump: addr_bits_remove = <%s>\n",
665 host_address_to_string (gdbarch
->addr_bits_remove
));
666 fprintf_unfiltered (file
,
667 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
668 gdbarch_address_class_name_to_type_flags_p (gdbarch
));
669 fprintf_unfiltered (file
,
670 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
671 host_address_to_string (gdbarch
->address_class_name_to_type_flags
));
672 fprintf_unfiltered (file
,
673 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
674 gdbarch_address_class_type_flags_p (gdbarch
));
675 fprintf_unfiltered (file
,
676 "gdbarch_dump: address_class_type_flags = <%s>\n",
677 host_address_to_string (gdbarch
->address_class_type_flags
));
678 fprintf_unfiltered (file
,
679 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
680 gdbarch_address_class_type_flags_to_name_p (gdbarch
));
681 fprintf_unfiltered (file
,
682 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
683 host_address_to_string (gdbarch
->address_class_type_flags_to_name
));
684 fprintf_unfiltered (file
,
685 "gdbarch_dump: address_to_pointer = <%s>\n",
686 host_address_to_string (gdbarch
->address_to_pointer
));
687 fprintf_unfiltered (file
,
688 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
689 gdbarch_adjust_breakpoint_address_p (gdbarch
));
690 fprintf_unfiltered (file
,
691 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
692 host_address_to_string (gdbarch
->adjust_breakpoint_address
));
693 fprintf_unfiltered (file
,
694 "gdbarch_dump: auto_charset = <%s>\n",
695 host_address_to_string (gdbarch
->auto_charset
));
696 fprintf_unfiltered (file
,
697 "gdbarch_dump: auto_wide_charset = <%s>\n",
698 host_address_to_string (gdbarch
->auto_wide_charset
));
699 fprintf_unfiltered (file
,
700 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
701 gdbarch_auxv_parse_p (gdbarch
));
702 fprintf_unfiltered (file
,
703 "gdbarch_dump: auxv_parse = <%s>\n",
704 host_address_to_string (gdbarch
->auxv_parse
));
705 fprintf_unfiltered (file
,
706 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
707 gdbarch_ax_pseudo_register_collect_p (gdbarch
));
708 fprintf_unfiltered (file
,
709 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
710 host_address_to_string (gdbarch
->ax_pseudo_register_collect
));
711 fprintf_unfiltered (file
,
712 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
713 gdbarch_ax_pseudo_register_push_stack_p (gdbarch
));
714 fprintf_unfiltered (file
,
715 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
716 host_address_to_string (gdbarch
->ax_pseudo_register_push_stack
));
717 fprintf_unfiltered (file
,
718 "gdbarch_dump: believe_pcc_promotion = %s\n",
719 plongest (gdbarch
->believe_pcc_promotion
));
720 fprintf_unfiltered (file
,
721 "gdbarch_dump: bfd_arch_info = %s\n",
722 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
723 fprintf_unfiltered (file
,
724 "gdbarch_dump: bits_big_endian = %s\n",
725 plongest (gdbarch
->bits_big_endian
));
726 fprintf_unfiltered (file
,
727 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
728 host_address_to_string (gdbarch
->breakpoint_from_pc
));
729 fprintf_unfiltered (file
,
730 "gdbarch_dump: byte_order = %s\n",
731 plongest (gdbarch
->byte_order
));
732 fprintf_unfiltered (file
,
733 "gdbarch_dump: byte_order_for_code = %s\n",
734 plongest (gdbarch
->byte_order_for_code
));
735 fprintf_unfiltered (file
,
736 "gdbarch_dump: call_dummy_location = %s\n",
737 plongest (gdbarch
->call_dummy_location
));
738 fprintf_unfiltered (file
,
739 "gdbarch_dump: cannot_fetch_register = <%s>\n",
740 host_address_to_string (gdbarch
->cannot_fetch_register
));
741 fprintf_unfiltered (file
,
742 "gdbarch_dump: cannot_step_breakpoint = %s\n",
743 plongest (gdbarch
->cannot_step_breakpoint
));
744 fprintf_unfiltered (file
,
745 "gdbarch_dump: cannot_store_register = <%s>\n",
746 host_address_to_string (gdbarch
->cannot_store_register
));
747 fprintf_unfiltered (file
,
748 "gdbarch_dump: char_signed = %s\n",
749 plongest (gdbarch
->char_signed
));
750 fprintf_unfiltered (file
,
751 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
752 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
753 fprintf_unfiltered (file
,
754 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
755 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
756 fprintf_unfiltered (file
,
757 "gdbarch_dump: convert_register_p = <%s>\n",
758 host_address_to_string (gdbarch
->convert_register_p
));
759 fprintf_unfiltered (file
,
760 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
761 gdbarch_core_info_proc_p (gdbarch
));
762 fprintf_unfiltered (file
,
763 "gdbarch_dump: core_info_proc = <%s>\n",
764 host_address_to_string (gdbarch
->core_info_proc
));
765 fprintf_unfiltered (file
,
766 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
767 gdbarch_core_pid_to_str_p (gdbarch
));
768 fprintf_unfiltered (file
,
769 "gdbarch_dump: core_pid_to_str = <%s>\n",
770 host_address_to_string (gdbarch
->core_pid_to_str
));
771 fprintf_unfiltered (file
,
772 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
773 gdbarch_core_read_description_p (gdbarch
));
774 fprintf_unfiltered (file
,
775 "gdbarch_dump: core_read_description = <%s>\n",
776 host_address_to_string (gdbarch
->core_read_description
));
777 fprintf_unfiltered (file
,
778 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
779 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
780 fprintf_unfiltered (file
,
781 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
782 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
783 fprintf_unfiltered (file
,
784 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
785 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch
));
786 fprintf_unfiltered (file
,
787 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
788 host_address_to_string (gdbarch
->core_xfer_shared_libraries_aix
));
789 fprintf_unfiltered (file
,
790 "gdbarch_dump: decr_pc_after_break = %s\n",
791 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: deprecated_fp_regnum = %s\n",
794 plongest (gdbarch
->deprecated_fp_regnum
));
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: deprecated_function_start_offset = %s\n",
797 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
800 gdbarch_displaced_step_copy_insn_p (gdbarch
));
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
803 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
806 gdbarch_displaced_step_fixup_p (gdbarch
));
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: displaced_step_fixup = <%s>\n",
809 host_address_to_string (gdbarch
->displaced_step_fixup
));
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
812 host_address_to_string (gdbarch
->displaced_step_free_closure
));
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
815 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: displaced_step_location = <%s>\n",
818 host_address_to_string (gdbarch
->displaced_step_location
));
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: double_bit = %s\n",
821 plongest (gdbarch
->double_bit
));
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: double_format = %s\n",
824 pformat (gdbarch
->double_format
));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
827 gdbarch_dummy_id_p (gdbarch
));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: dummy_id = <%s>\n",
830 host_address_to_string (gdbarch
->dummy_id
));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: dwarf2_addr_size = %s\n",
833 plongest (gdbarch
->dwarf2_addr_size
));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
836 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
839 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
842 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
845 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch
));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
848 host_address_to_string (gdbarch
->elfcore_write_linux_prpsinfo
));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
851 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
854 gdbarch_fetch_pointer_argument_p (gdbarch
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
857 host_address_to_string (gdbarch
->fetch_pointer_argument
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
860 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
863 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
866 gdbarch_find_memory_regions_p (gdbarch
));
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: find_memory_regions = <%s>\n",
869 host_address_to_string (gdbarch
->find_memory_regions
));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: float_bit = %s\n",
872 plongest (gdbarch
->float_bit
));
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: float_format = %s\n",
875 pformat (gdbarch
->float_format
));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: fp0_regnum = %s\n",
878 plongest (gdbarch
->fp0_regnum
));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
881 gdbarch_frame_align_p (gdbarch
));
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: frame_align = <%s>\n",
884 host_address_to_string (gdbarch
->frame_align
));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: frame_args_skip = %s\n",
887 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
890 gdbarch_frame_num_args_p (gdbarch
));
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: frame_num_args = <%s>\n",
893 host_address_to_string (gdbarch
->frame_num_args
));
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: frame_red_zone_size = %s\n",
896 plongest (gdbarch
->frame_red_zone_size
));
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
899 gdbarch_gcore_bfd_target_p (gdbarch
));
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: gcore_bfd_target = %s\n",
902 pstring (gdbarch
->gcore_bfd_target
));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
905 gdbarch_gdb_signal_from_target_p (gdbarch
));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
908 host_address_to_string (gdbarch
->gdb_signal_from_target
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
911 gdbarch_gdb_signal_to_target_p (gdbarch
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
914 host_address_to_string (gdbarch
->gdb_signal_to_target
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: gen_return_address = <%s>\n",
917 host_address_to_string (gdbarch
->gen_return_address
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
920 gdbarch_get_longjmp_target_p (gdbarch
));
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: get_longjmp_target = <%s>\n",
923 host_address_to_string (gdbarch
->get_longjmp_target
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
926 gdbarch_get_siginfo_type_p (gdbarch
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: get_siginfo_type = <%s>\n",
929 host_address_to_string (gdbarch
->get_siginfo_type
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
932 gdbarch_get_syscall_number_p (gdbarch
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: get_syscall_number = <%s>\n",
935 host_address_to_string (gdbarch
->get_syscall_number
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: half_bit = %s\n",
938 plongest (gdbarch
->half_bit
));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: half_format = %s\n",
941 pformat (gdbarch
->half_format
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: has_dos_based_file_system = %s\n",
944 plongest (gdbarch
->has_dos_based_file_system
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: has_global_breakpoints = %s\n",
947 plongest (gdbarch
->has_global_breakpoints
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: has_global_solist = %s\n",
950 plongest (gdbarch
->has_global_solist
));
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: has_shared_address_space = <%s>\n",
953 host_address_to_string (gdbarch
->has_shared_address_space
));
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
956 plongest (gdbarch
->have_nonsteppable_watchpoint
));
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
959 host_address_to_string (gdbarch
->in_function_epilogue_p
));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
962 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
965 gdbarch_info_proc_p (gdbarch
));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: info_proc = <%s>\n",
968 host_address_to_string (gdbarch
->info_proc
));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: inner_than = <%s>\n",
971 host_address_to_string (gdbarch
->inner_than
));
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: insn_is_call = <%s>\n",
974 host_address_to_string (gdbarch
->insn_is_call
));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: insn_is_jump = <%s>\n",
977 host_address_to_string (gdbarch
->insn_is_jump
));
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: insn_is_ret = <%s>\n",
980 host_address_to_string (gdbarch
->insn_is_ret
));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: int_bit = %s\n",
983 plongest (gdbarch
->int_bit
));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
986 gdbarch_integer_to_address_p (gdbarch
));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: integer_to_address = <%s>\n",
989 host_address_to_string (gdbarch
->integer_to_address
));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
992 host_address_to_string (gdbarch
->iterate_over_objfiles_in_search_order
));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
995 gdbarch_iterate_over_regset_sections_p (gdbarch
));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
998 host_address_to_string (gdbarch
->iterate_over_regset_sections
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: long_bit = %s\n",
1001 plongest (gdbarch
->long_bit
));
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: long_double_bit = %s\n",
1004 plongest (gdbarch
->long_double_bit
));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: long_double_format = %s\n",
1007 pformat (gdbarch
->long_double_format
));
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: long_long_align_bit = %s\n",
1010 plongest (gdbarch
->long_long_align_bit
));
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: long_long_bit = %s\n",
1013 plongest (gdbarch
->long_long_bit
));
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1016 gdbarch_make_corefile_notes_p (gdbarch
));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: make_corefile_notes = <%s>\n",
1019 host_address_to_string (gdbarch
->make_corefile_notes
));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1022 gdbarch_max_insn_length_p (gdbarch
));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: max_insn_length = %s\n",
1025 plongest (gdbarch
->max_insn_length
));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1028 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1031 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: num_pseudo_regs = %s\n",
1034 plongest (gdbarch
->num_pseudo_regs
));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: num_regs = %s\n",
1037 plongest (gdbarch
->num_regs
));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: osabi = %s\n",
1040 plongest (gdbarch
->osabi
));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1043 gdbarch_overlay_update_p (gdbarch
));
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: overlay_update = <%s>\n",
1046 host_address_to_string (gdbarch
->overlay_update
));
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: pc_regnum = %s\n",
1049 plongest (gdbarch
->pc_regnum
));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: pointer_to_address = <%s>\n",
1052 host_address_to_string (gdbarch
->pointer_to_address
));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1055 gdbarch_print_float_info_p (gdbarch
));
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: print_float_info = <%s>\n",
1058 host_address_to_string (gdbarch
->print_float_info
));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: print_insn = <%s>\n",
1061 host_address_to_string (gdbarch
->print_insn
));
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: print_registers_info = <%s>\n",
1064 host_address_to_string (gdbarch
->print_registers_info
));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1067 gdbarch_print_vector_info_p (gdbarch
));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: print_vector_info = <%s>\n",
1070 host_address_to_string (gdbarch
->print_vector_info
));
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1073 gdbarch_process_record_p (gdbarch
));
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: process_record = <%s>\n",
1076 host_address_to_string (gdbarch
->process_record
));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1079 gdbarch_process_record_signal_p (gdbarch
));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: process_record_signal = <%s>\n",
1082 host_address_to_string (gdbarch
->process_record_signal
));
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: ps_regnum = %s\n",
1085 plongest (gdbarch
->ps_regnum
));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1088 gdbarch_pseudo_register_read_p (gdbarch
));
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: pseudo_register_read = <%s>\n",
1091 host_address_to_string (gdbarch
->pseudo_register_read
));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1094 gdbarch_pseudo_register_read_value_p (gdbarch
));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1097 host_address_to_string (gdbarch
->pseudo_register_read_value
));
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1100 gdbarch_pseudo_register_write_p (gdbarch
));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: pseudo_register_write = <%s>\n",
1103 host_address_to_string (gdbarch
->pseudo_register_write
));
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: ptr_bit = %s\n",
1106 plongest (gdbarch
->ptr_bit
));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1109 gdbarch_push_dummy_call_p (gdbarch
));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: push_dummy_call = <%s>\n",
1112 host_address_to_string (gdbarch
->push_dummy_call
));
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1115 gdbarch_push_dummy_code_p (gdbarch
));
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: push_dummy_code = <%s>\n",
1118 host_address_to_string (gdbarch
->push_dummy_code
));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: ravenscar_ops = %s\n",
1121 host_address_to_string (gdbarch
->ravenscar_ops
));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1124 gdbarch_read_pc_p (gdbarch
));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: read_pc = <%s>\n",
1127 host_address_to_string (gdbarch
->read_pc
));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1130 gdbarch_record_special_symbol_p (gdbarch
));
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: record_special_symbol = <%s>\n",
1133 host_address_to_string (gdbarch
->record_special_symbol
));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: register_name = <%s>\n",
1136 host_address_to_string (gdbarch
->register_name
));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: register_reggroup_p = <%s>\n",
1139 host_address_to_string (gdbarch
->register_reggroup_p
));
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: register_sim_regno = <%s>\n",
1142 host_address_to_string (gdbarch
->register_sim_regno
));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: register_to_value = <%s>\n",
1145 host_address_to_string (gdbarch
->register_to_value
));
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1148 gdbarch_register_type_p (gdbarch
));
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: register_type = <%s>\n",
1151 host_address_to_string (gdbarch
->register_type
));
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1154 gdbarch_relocate_instruction_p (gdbarch
));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: relocate_instruction = <%s>\n",
1157 host_address_to_string (gdbarch
->relocate_instruction
));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1160 host_address_to_string (gdbarch
->remote_breakpoint_from_pc
));
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: remote_register_number = <%s>\n",
1163 host_address_to_string (gdbarch
->remote_register_number
));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1166 host_address_to_string (gdbarch
->return_in_first_hidden_param_p
));
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1169 gdbarch_return_value_p (gdbarch
));
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: return_value = <%s>\n",
1172 host_address_to_string (gdbarch
->return_value
));
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1175 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: short_bit = %s\n",
1178 plongest (gdbarch
->short_bit
));
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1181 gdbarch_single_step_through_delay_p (gdbarch
));
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: single_step_through_delay = <%s>\n",
1184 host_address_to_string (gdbarch
->single_step_through_delay
));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1187 gdbarch_skip_entrypoint_p (gdbarch
));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: skip_entrypoint = <%s>\n",
1190 host_address_to_string (gdbarch
->skip_entrypoint
));
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1193 gdbarch_skip_main_prologue_p (gdbarch
));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: skip_main_prologue = <%s>\n",
1196 host_address_to_string (gdbarch
->skip_main_prologue
));
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1199 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: skip_prologue = <%s>\n",
1202 host_address_to_string (gdbarch
->skip_prologue
));
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1205 host_address_to_string (gdbarch
->skip_solib_resolver
));
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1208 host_address_to_string (gdbarch
->skip_trampoline_code
));
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1211 gdbarch_software_single_step_p (gdbarch
));
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: software_single_step = <%s>\n",
1214 host_address_to_string (gdbarch
->software_single_step
));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1217 plongest (gdbarch
->sofun_address_maybe_missing
));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: solib_symbols_extension = %s\n",
1220 pstring (gdbarch
->solib_symbols_extension
));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: sp_regnum = %s\n",
1223 plongest (gdbarch
->sp_regnum
));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1226 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1229 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1232 pstring (gdbarch
->stap_gdb_register_prefix
));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1235 pstring (gdbarch
->stap_gdb_register_suffix
));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: stap_integer_prefixes = %s\n",
1238 pstring_list (gdbarch
->stap_integer_prefixes
));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: stap_integer_suffixes = %s\n",
1241 pstring_list (gdbarch
->stap_integer_suffixes
));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1244 gdbarch_stap_is_single_operand_p (gdbarch
));
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1247 host_address_to_string (gdbarch
->stap_is_single_operand
));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1250 gdbarch_stap_parse_special_token_p (gdbarch
));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1253 host_address_to_string (gdbarch
->stap_parse_special_token
));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1256 pstring_list (gdbarch
->stap_register_indirection_prefixes
));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1259 pstring_list (gdbarch
->stap_register_indirection_suffixes
));
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: stap_register_prefixes = %s\n",
1262 pstring_list (gdbarch
->stap_register_prefixes
));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: stap_register_suffixes = %s\n",
1265 pstring_list (gdbarch
->stap_register_suffixes
));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1268 gdbarch_static_transform_name_p (gdbarch
));
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: static_transform_name = <%s>\n",
1271 host_address_to_string (gdbarch
->static_transform_name
));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: syscalls_info = %s\n",
1274 host_address_to_string (gdbarch
->syscalls_info
));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: target_desc = %s\n",
1277 host_address_to_string (gdbarch
->target_desc
));
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1280 gdbarch_unwind_pc_p (gdbarch
));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: unwind_pc = <%s>\n",
1283 host_address_to_string (gdbarch
->unwind_pc
));
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1286 gdbarch_unwind_sp_p (gdbarch
));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: unwind_sp = <%s>\n",
1289 host_address_to_string (gdbarch
->unwind_sp
));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: value_from_register = <%s>\n",
1292 host_address_to_string (gdbarch
->value_from_register
));
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: value_to_register = <%s>\n",
1295 host_address_to_string (gdbarch
->value_to_register
));
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: vbit_in_delta = %s\n",
1298 plongest (gdbarch
->vbit_in_delta
));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1301 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: vsyscall_range = <%s>\n",
1304 host_address_to_string (gdbarch
->vsyscall_range
));
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: vtable_function_descriptors = %s\n",
1307 plongest (gdbarch
->vtable_function_descriptors
));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1310 gdbarch_write_pc_p (gdbarch
));
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: write_pc = <%s>\n",
1313 host_address_to_string (gdbarch
->write_pc
));
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: xml_syscall_file = %s\n",
1316 pstring (gdbarch
->xml_syscall_file
));
1317 if (gdbarch
->dump_tdep
!= NULL
)
1318 gdbarch
->dump_tdep (gdbarch
, file
);
1321 struct gdbarch_tdep
*
1322 gdbarch_tdep (struct gdbarch
*gdbarch
)
1324 if (gdbarch_debug
>= 2)
1325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1326 return gdbarch
->tdep
;
1330 const struct bfd_arch_info
*
1331 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1333 gdb_assert (gdbarch
!= NULL
);
1334 if (gdbarch_debug
>= 2)
1335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1336 return gdbarch
->bfd_arch_info
;
1340 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1342 gdb_assert (gdbarch
!= NULL
);
1343 if (gdbarch_debug
>= 2)
1344 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1345 return gdbarch
->byte_order
;
1349 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1351 gdb_assert (gdbarch
!= NULL
);
1352 if (gdbarch_debug
>= 2)
1353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1354 return gdbarch
->byte_order_for_code
;
1358 gdbarch_osabi (struct gdbarch
*gdbarch
)
1360 gdb_assert (gdbarch
!= NULL
);
1361 if (gdbarch_debug
>= 2)
1362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1363 return gdbarch
->osabi
;
1366 const struct target_desc
*
1367 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1369 gdb_assert (gdbarch
!= NULL
);
1370 if (gdbarch_debug
>= 2)
1371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1372 return gdbarch
->target_desc
;
1376 gdbarch_bits_big_endian (struct gdbarch
*gdbarch
)
1378 gdb_assert (gdbarch
!= NULL
);
1379 /* Skip verify of bits_big_endian, invalid_p == 0 */
1380 if (gdbarch_debug
>= 2)
1381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bits_big_endian called\n");
1382 return gdbarch
->bits_big_endian
;
1386 set_gdbarch_bits_big_endian (struct gdbarch
*gdbarch
,
1387 int bits_big_endian
)
1389 gdbarch
->bits_big_endian
= bits_big_endian
;
1393 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1395 gdb_assert (gdbarch
!= NULL
);
1396 /* Skip verify of short_bit, invalid_p == 0 */
1397 if (gdbarch_debug
>= 2)
1398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1399 return gdbarch
->short_bit
;
1403 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1406 gdbarch
->short_bit
= short_bit
;
1410 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1412 gdb_assert (gdbarch
!= NULL
);
1413 /* Skip verify of int_bit, invalid_p == 0 */
1414 if (gdbarch_debug
>= 2)
1415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1416 return gdbarch
->int_bit
;
1420 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1423 gdbarch
->int_bit
= int_bit
;
1427 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1429 gdb_assert (gdbarch
!= NULL
);
1430 /* Skip verify of long_bit, invalid_p == 0 */
1431 if (gdbarch_debug
>= 2)
1432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1433 return gdbarch
->long_bit
;
1437 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1440 gdbarch
->long_bit
= long_bit
;
1444 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1446 gdb_assert (gdbarch
!= NULL
);
1447 /* Skip verify of long_long_bit, invalid_p == 0 */
1448 if (gdbarch_debug
>= 2)
1449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1450 return gdbarch
->long_long_bit
;
1454 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1457 gdbarch
->long_long_bit
= long_long_bit
;
1461 gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
)
1463 gdb_assert (gdbarch
!= NULL
);
1464 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1465 if (gdbarch_debug
>= 2)
1466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_align_bit called\n");
1467 return gdbarch
->long_long_align_bit
;
1471 set_gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
,
1472 int long_long_align_bit
)
1474 gdbarch
->long_long_align_bit
= long_long_align_bit
;
1478 gdbarch_half_bit (struct gdbarch
*gdbarch
)
1480 gdb_assert (gdbarch
!= NULL
);
1481 /* Skip verify of half_bit, invalid_p == 0 */
1482 if (gdbarch_debug
>= 2)
1483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_bit called\n");
1484 return gdbarch
->half_bit
;
1488 set_gdbarch_half_bit (struct gdbarch
*gdbarch
,
1491 gdbarch
->half_bit
= half_bit
;
1494 const struct floatformat
**
1495 gdbarch_half_format (struct gdbarch
*gdbarch
)
1497 gdb_assert (gdbarch
!= NULL
);
1498 if (gdbarch_debug
>= 2)
1499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_format called\n");
1500 return gdbarch
->half_format
;
1504 set_gdbarch_half_format (struct gdbarch
*gdbarch
,
1505 const struct floatformat
** half_format
)
1507 gdbarch
->half_format
= half_format
;
1511 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1513 gdb_assert (gdbarch
!= NULL
);
1514 /* Skip verify of float_bit, invalid_p == 0 */
1515 if (gdbarch_debug
>= 2)
1516 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1517 return gdbarch
->float_bit
;
1521 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1524 gdbarch
->float_bit
= float_bit
;
1527 const struct floatformat
**
1528 gdbarch_float_format (struct gdbarch
*gdbarch
)
1530 gdb_assert (gdbarch
!= NULL
);
1531 if (gdbarch_debug
>= 2)
1532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1533 return gdbarch
->float_format
;
1537 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1538 const struct floatformat
** float_format
)
1540 gdbarch
->float_format
= float_format
;
1544 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1546 gdb_assert (gdbarch
!= NULL
);
1547 /* Skip verify of double_bit, invalid_p == 0 */
1548 if (gdbarch_debug
>= 2)
1549 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1550 return gdbarch
->double_bit
;
1554 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1557 gdbarch
->double_bit
= double_bit
;
1560 const struct floatformat
**
1561 gdbarch_double_format (struct gdbarch
*gdbarch
)
1563 gdb_assert (gdbarch
!= NULL
);
1564 if (gdbarch_debug
>= 2)
1565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1566 return gdbarch
->double_format
;
1570 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1571 const struct floatformat
** double_format
)
1573 gdbarch
->double_format
= double_format
;
1577 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1579 gdb_assert (gdbarch
!= NULL
);
1580 /* Skip verify of long_double_bit, invalid_p == 0 */
1581 if (gdbarch_debug
>= 2)
1582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1583 return gdbarch
->long_double_bit
;
1587 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1588 int long_double_bit
)
1590 gdbarch
->long_double_bit
= long_double_bit
;
1593 const struct floatformat
**
1594 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1596 gdb_assert (gdbarch
!= NULL
);
1597 if (gdbarch_debug
>= 2)
1598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1599 return gdbarch
->long_double_format
;
1603 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1604 const struct floatformat
** long_double_format
)
1606 gdbarch
->long_double_format
= long_double_format
;
1610 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1612 gdb_assert (gdbarch
!= NULL
);
1613 /* Skip verify of ptr_bit, invalid_p == 0 */
1614 if (gdbarch_debug
>= 2)
1615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1616 return gdbarch
->ptr_bit
;
1620 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1623 gdbarch
->ptr_bit
= ptr_bit
;
1627 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1629 gdb_assert (gdbarch
!= NULL
);
1630 /* Check variable changed from pre-default. */
1631 gdb_assert (gdbarch
->addr_bit
!= 0);
1632 if (gdbarch_debug
>= 2)
1633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1634 return gdbarch
->addr_bit
;
1638 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1641 gdbarch
->addr_bit
= addr_bit
;
1645 gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
)
1647 gdb_assert (gdbarch
!= NULL
);
1648 /* Check variable changed from pre-default. */
1649 gdb_assert (gdbarch
->dwarf2_addr_size
!= 0);
1650 if (gdbarch_debug
>= 2)
1651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_addr_size called\n");
1652 return gdbarch
->dwarf2_addr_size
;
1656 set_gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
,
1657 int dwarf2_addr_size
)
1659 gdbarch
->dwarf2_addr_size
= dwarf2_addr_size
;
1663 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1665 gdb_assert (gdbarch
!= NULL
);
1666 /* Check variable changed from pre-default. */
1667 gdb_assert (gdbarch
->char_signed
!= -1);
1668 if (gdbarch_debug
>= 2)
1669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1670 return gdbarch
->char_signed
;
1674 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1677 gdbarch
->char_signed
= char_signed
;
1681 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1683 gdb_assert (gdbarch
!= NULL
);
1684 return gdbarch
->read_pc
!= NULL
;
1688 gdbarch_read_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
1690 gdb_assert (gdbarch
!= NULL
);
1691 gdb_assert (gdbarch
->read_pc
!= NULL
);
1692 if (gdbarch_debug
>= 2)
1693 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1694 return gdbarch
->read_pc (regcache
);
1698 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1699 gdbarch_read_pc_ftype read_pc
)
1701 gdbarch
->read_pc
= read_pc
;
1705 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1707 gdb_assert (gdbarch
!= NULL
);
1708 return gdbarch
->write_pc
!= NULL
;
1712 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1714 gdb_assert (gdbarch
!= NULL
);
1715 gdb_assert (gdbarch
->write_pc
!= NULL
);
1716 if (gdbarch_debug
>= 2)
1717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1718 gdbarch
->write_pc (regcache
, val
);
1722 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1723 gdbarch_write_pc_ftype write_pc
)
1725 gdbarch
->write_pc
= write_pc
;
1729 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1731 gdb_assert (gdbarch
!= NULL
);
1732 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1733 if (gdbarch_debug
>= 2)
1734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1735 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
1739 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
1740 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
1742 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
1746 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
1748 gdb_assert (gdbarch
!= NULL
);
1749 return gdbarch
->pseudo_register_read
!= NULL
;
1752 enum register_status
1753 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
1755 gdb_assert (gdbarch
!= NULL
);
1756 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
1757 if (gdbarch_debug
>= 2)
1758 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
1759 return gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
1763 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
1764 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
1766 gdbarch
->pseudo_register_read
= pseudo_register_read
;
1770 gdbarch_pseudo_register_read_value_p (struct gdbarch
*gdbarch
)
1772 gdb_assert (gdbarch
!= NULL
);
1773 return gdbarch
->pseudo_register_read_value
!= NULL
;
1777 gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
)
1779 gdb_assert (gdbarch
!= NULL
);
1780 gdb_assert (gdbarch
->pseudo_register_read_value
!= NULL
);
1781 if (gdbarch_debug
>= 2)
1782 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read_value called\n");
1783 return gdbarch
->pseudo_register_read_value (gdbarch
, regcache
, cookednum
);
1787 set_gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
,
1788 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value
)
1790 gdbarch
->pseudo_register_read_value
= pseudo_register_read_value
;
1794 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
1796 gdb_assert (gdbarch
!= NULL
);
1797 return gdbarch
->pseudo_register_write
!= NULL
;
1801 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
1803 gdb_assert (gdbarch
!= NULL
);
1804 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
1805 if (gdbarch_debug
>= 2)
1806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
1807 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
1811 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
1812 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
1814 gdbarch
->pseudo_register_write
= pseudo_register_write
;
1818 gdbarch_num_regs (struct gdbarch
*gdbarch
)
1820 gdb_assert (gdbarch
!= NULL
);
1821 /* Check variable changed from pre-default. */
1822 gdb_assert (gdbarch
->num_regs
!= -1);
1823 if (gdbarch_debug
>= 2)
1824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
1825 return gdbarch
->num_regs
;
1829 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
1832 gdbarch
->num_regs
= num_regs
;
1836 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
1838 gdb_assert (gdbarch
!= NULL
);
1839 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1840 if (gdbarch_debug
>= 2)
1841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
1842 return gdbarch
->num_pseudo_regs
;
1846 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
1847 int num_pseudo_regs
)
1849 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
1853 gdbarch_ax_pseudo_register_collect_p (struct gdbarch
*gdbarch
)
1855 gdb_assert (gdbarch
!= NULL
);
1856 return gdbarch
->ax_pseudo_register_collect
!= NULL
;
1860 gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1862 gdb_assert (gdbarch
!= NULL
);
1863 gdb_assert (gdbarch
->ax_pseudo_register_collect
!= NULL
);
1864 if (gdbarch_debug
>= 2)
1865 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_collect called\n");
1866 return gdbarch
->ax_pseudo_register_collect (gdbarch
, ax
, reg
);
1870 set_gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
,
1871 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect
)
1873 gdbarch
->ax_pseudo_register_collect
= ax_pseudo_register_collect
;
1877 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch
*gdbarch
)
1879 gdb_assert (gdbarch
!= NULL
);
1880 return gdbarch
->ax_pseudo_register_push_stack
!= NULL
;
1884 gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1886 gdb_assert (gdbarch
!= NULL
);
1887 gdb_assert (gdbarch
->ax_pseudo_register_push_stack
!= NULL
);
1888 if (gdbarch_debug
>= 2)
1889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_push_stack called\n");
1890 return gdbarch
->ax_pseudo_register_push_stack (gdbarch
, ax
, reg
);
1894 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
,
1895 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack
)
1897 gdbarch
->ax_pseudo_register_push_stack
= ax_pseudo_register_push_stack
;
1901 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
1903 gdb_assert (gdbarch
!= NULL
);
1904 /* Skip verify of sp_regnum, invalid_p == 0 */
1905 if (gdbarch_debug
>= 2)
1906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
1907 return gdbarch
->sp_regnum
;
1911 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
1914 gdbarch
->sp_regnum
= sp_regnum
;
1918 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
1920 gdb_assert (gdbarch
!= NULL
);
1921 /* Skip verify of pc_regnum, invalid_p == 0 */
1922 if (gdbarch_debug
>= 2)
1923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
1924 return gdbarch
->pc_regnum
;
1928 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
1931 gdbarch
->pc_regnum
= pc_regnum
;
1935 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
1937 gdb_assert (gdbarch
!= NULL
);
1938 /* Skip verify of ps_regnum, invalid_p == 0 */
1939 if (gdbarch_debug
>= 2)
1940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
1941 return gdbarch
->ps_regnum
;
1945 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
1948 gdbarch
->ps_regnum
= ps_regnum
;
1952 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
1954 gdb_assert (gdbarch
!= NULL
);
1955 /* Skip verify of fp0_regnum, invalid_p == 0 */
1956 if (gdbarch_debug
>= 2)
1957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
1958 return gdbarch
->fp0_regnum
;
1962 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
1965 gdbarch
->fp0_regnum
= fp0_regnum
;
1969 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
1971 gdb_assert (gdbarch
!= NULL
);
1972 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
1973 if (gdbarch_debug
>= 2)
1974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
1975 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
1979 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
1980 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
1982 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
1986 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
1988 gdb_assert (gdbarch
!= NULL
);
1989 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
1990 if (gdbarch_debug
>= 2)
1991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
1992 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
1996 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
1997 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
1999 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2003 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2005 gdb_assert (gdbarch
!= NULL
);
2006 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2007 if (gdbarch_debug
>= 2)
2008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2009 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
2013 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2014 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2016 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2020 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2022 gdb_assert (gdbarch
!= NULL
);
2023 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2024 if (gdbarch_debug
>= 2)
2025 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2026 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
2030 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2031 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2033 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2037 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2039 gdb_assert (gdbarch
!= NULL
);
2040 gdb_assert (gdbarch
->register_name
!= NULL
);
2041 if (gdbarch_debug
>= 2)
2042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2043 return gdbarch
->register_name (gdbarch
, regnr
);
2047 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2048 gdbarch_register_name_ftype register_name
)
2050 gdbarch
->register_name
= register_name
;
2054 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2056 gdb_assert (gdbarch
!= NULL
);
2057 return gdbarch
->register_type
!= NULL
;
2061 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2063 gdb_assert (gdbarch
!= NULL
);
2064 gdb_assert (gdbarch
->register_type
!= NULL
);
2065 if (gdbarch_debug
>= 2)
2066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2067 return gdbarch
->register_type (gdbarch
, reg_nr
);
2071 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2072 gdbarch_register_type_ftype register_type
)
2074 gdbarch
->register_type
= register_type
;
2078 gdbarch_dummy_id_p (struct gdbarch
*gdbarch
)
2080 gdb_assert (gdbarch
!= NULL
);
2081 return gdbarch
->dummy_id
!= NULL
;
2085 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
2087 gdb_assert (gdbarch
!= NULL
);
2088 gdb_assert (gdbarch
->dummy_id
!= NULL
);
2089 if (gdbarch_debug
>= 2)
2090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
2091 return gdbarch
->dummy_id (gdbarch
, this_frame
);
2095 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
2096 gdbarch_dummy_id_ftype dummy_id
)
2098 gdbarch
->dummy_id
= dummy_id
;
2102 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2104 gdb_assert (gdbarch
!= NULL
);
2105 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2106 if (gdbarch_debug
>= 2)
2107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2108 return gdbarch
->deprecated_fp_regnum
;
2112 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2113 int deprecated_fp_regnum
)
2115 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2119 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2121 gdb_assert (gdbarch
!= NULL
);
2122 return gdbarch
->push_dummy_call
!= NULL
;
2126 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
)
2128 gdb_assert (gdbarch
!= NULL
);
2129 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2130 if (gdbarch_debug
>= 2)
2131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2132 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
2136 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2137 gdbarch_push_dummy_call_ftype push_dummy_call
)
2139 gdbarch
->push_dummy_call
= push_dummy_call
;
2143 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2145 gdb_assert (gdbarch
!= NULL
);
2146 /* Skip verify of call_dummy_location, invalid_p == 0 */
2147 if (gdbarch_debug
>= 2)
2148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2149 return gdbarch
->call_dummy_location
;
2153 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2154 int call_dummy_location
)
2156 gdbarch
->call_dummy_location
= call_dummy_location
;
2160 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2162 gdb_assert (gdbarch
!= NULL
);
2163 return gdbarch
->push_dummy_code
!= NULL
;
2167 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
)
2169 gdb_assert (gdbarch
!= NULL
);
2170 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2171 if (gdbarch_debug
>= 2)
2172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2173 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
2177 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2178 gdbarch_push_dummy_code_ftype push_dummy_code
)
2180 gdbarch
->push_dummy_code
= push_dummy_code
;
2184 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2186 gdb_assert (gdbarch
!= NULL
);
2187 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2188 if (gdbarch_debug
>= 2)
2189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2190 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2194 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2195 gdbarch_print_registers_info_ftype print_registers_info
)
2197 gdbarch
->print_registers_info
= print_registers_info
;
2201 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
2203 gdb_assert (gdbarch
!= NULL
);
2204 return gdbarch
->print_float_info
!= NULL
;
2208 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2210 gdb_assert (gdbarch
!= NULL
);
2211 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2212 if (gdbarch_debug
>= 2)
2213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2214 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2218 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2219 gdbarch_print_float_info_ftype print_float_info
)
2221 gdbarch
->print_float_info
= print_float_info
;
2225 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2227 gdb_assert (gdbarch
!= NULL
);
2228 return gdbarch
->print_vector_info
!= NULL
;
2232 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2234 gdb_assert (gdbarch
!= NULL
);
2235 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2236 if (gdbarch_debug
>= 2)
2237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2238 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2242 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2243 gdbarch_print_vector_info_ftype print_vector_info
)
2245 gdbarch
->print_vector_info
= print_vector_info
;
2249 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2251 gdb_assert (gdbarch
!= NULL
);
2252 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2253 if (gdbarch_debug
>= 2)
2254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2255 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2259 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2260 gdbarch_register_sim_regno_ftype register_sim_regno
)
2262 gdbarch
->register_sim_regno
= register_sim_regno
;
2266 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2268 gdb_assert (gdbarch
!= NULL
);
2269 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2270 if (gdbarch_debug
>= 2)
2271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2272 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2276 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2277 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2279 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2283 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2285 gdb_assert (gdbarch
!= NULL
);
2286 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2287 if (gdbarch_debug
>= 2)
2288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2289 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2293 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2294 gdbarch_cannot_store_register_ftype cannot_store_register
)
2296 gdbarch
->cannot_store_register
= cannot_store_register
;
2300 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2302 gdb_assert (gdbarch
!= NULL
);
2303 return gdbarch
->get_longjmp_target
!= NULL
;
2307 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2309 gdb_assert (gdbarch
!= NULL
);
2310 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2311 if (gdbarch_debug
>= 2)
2312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2313 return gdbarch
->get_longjmp_target (frame
, pc
);
2317 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2318 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2320 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2324 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2326 gdb_assert (gdbarch
!= NULL
);
2327 if (gdbarch_debug
>= 2)
2328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2329 return gdbarch
->believe_pcc_promotion
;
2333 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2334 int believe_pcc_promotion
)
2336 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2340 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2342 gdb_assert (gdbarch
!= NULL
);
2343 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2344 if (gdbarch_debug
>= 2)
2345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2346 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2350 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2351 gdbarch_convert_register_p_ftype convert_register_p
)
2353 gdbarch
->convert_register_p
= convert_register_p
;
2357 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
, int *optimizedp
, int *unavailablep
)
2359 gdb_assert (gdbarch
!= NULL
);
2360 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2361 if (gdbarch_debug
>= 2)
2362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2363 return gdbarch
->register_to_value (frame
, regnum
, type
, buf
, optimizedp
, unavailablep
);
2367 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2368 gdbarch_register_to_value_ftype register_to_value
)
2370 gdbarch
->register_to_value
= register_to_value
;
2374 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2376 gdb_assert (gdbarch
!= NULL
);
2377 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2378 if (gdbarch_debug
>= 2)
2379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2380 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2384 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2385 gdbarch_value_to_register_ftype value_to_register
)
2387 gdbarch
->value_to_register
= value_to_register
;
2391 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_id frame_id
)
2393 gdb_assert (gdbarch
!= NULL
);
2394 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2395 if (gdbarch_debug
>= 2)
2396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2397 return gdbarch
->value_from_register (gdbarch
, type
, regnum
, frame_id
);
2401 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2402 gdbarch_value_from_register_ftype value_from_register
)
2404 gdbarch
->value_from_register
= value_from_register
;
2408 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2410 gdb_assert (gdbarch
!= NULL
);
2411 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2412 if (gdbarch_debug
>= 2)
2413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2414 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2418 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2419 gdbarch_pointer_to_address_ftype pointer_to_address
)
2421 gdbarch
->pointer_to_address
= pointer_to_address
;
2425 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2427 gdb_assert (gdbarch
!= NULL
);
2428 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2429 if (gdbarch_debug
>= 2)
2430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2431 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2435 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2436 gdbarch_address_to_pointer_ftype address_to_pointer
)
2438 gdbarch
->address_to_pointer
= address_to_pointer
;
2442 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2444 gdb_assert (gdbarch
!= NULL
);
2445 return gdbarch
->integer_to_address
!= NULL
;
2449 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2451 gdb_assert (gdbarch
!= NULL
);
2452 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2453 if (gdbarch_debug
>= 2)
2454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2455 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2459 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2460 gdbarch_integer_to_address_ftype integer_to_address
)
2462 gdbarch
->integer_to_address
= integer_to_address
;
2466 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2468 gdb_assert (gdbarch
!= NULL
);
2469 return gdbarch
->return_value
!= NULL
;
2472 enum return_value_convention
2473 gdbarch_return_value (struct gdbarch
*gdbarch
, struct value
*function
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2475 gdb_assert (gdbarch
!= NULL
);
2476 gdb_assert (gdbarch
->return_value
!= NULL
);
2477 if (gdbarch_debug
>= 2)
2478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2479 return gdbarch
->return_value (gdbarch
, function
, valtype
, regcache
, readbuf
, writebuf
);
2483 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2484 gdbarch_return_value_ftype return_value
)
2486 gdbarch
->return_value
= return_value
;
2490 gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
, struct type
*type
)
2492 gdb_assert (gdbarch
!= NULL
);
2493 gdb_assert (gdbarch
->return_in_first_hidden_param_p
!= NULL
);
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_in_first_hidden_param_p called\n");
2496 return gdbarch
->return_in_first_hidden_param_p (gdbarch
, type
);
2500 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
,
2501 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p
)
2503 gdbarch
->return_in_first_hidden_param_p
= return_in_first_hidden_param_p
;
2507 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2509 gdb_assert (gdbarch
!= NULL
);
2510 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2513 return gdbarch
->skip_prologue (gdbarch
, ip
);
2517 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2518 gdbarch_skip_prologue_ftype skip_prologue
)
2520 gdbarch
->skip_prologue
= skip_prologue
;
2524 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2526 gdb_assert (gdbarch
!= NULL
);
2527 return gdbarch
->skip_main_prologue
!= NULL
;
2531 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2533 gdb_assert (gdbarch
!= NULL
);
2534 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2535 if (gdbarch_debug
>= 2)
2536 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2537 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2541 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2542 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2544 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2548 gdbarch_skip_entrypoint_p (struct gdbarch
*gdbarch
)
2550 gdb_assert (gdbarch
!= NULL
);
2551 return gdbarch
->skip_entrypoint
!= NULL
;
2555 gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2557 gdb_assert (gdbarch
!= NULL
);
2558 gdb_assert (gdbarch
->skip_entrypoint
!= NULL
);
2559 if (gdbarch_debug
>= 2)
2560 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_entrypoint called\n");
2561 return gdbarch
->skip_entrypoint (gdbarch
, ip
);
2565 set_gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
,
2566 gdbarch_skip_entrypoint_ftype skip_entrypoint
)
2568 gdbarch
->skip_entrypoint
= skip_entrypoint
;
2572 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2574 gdb_assert (gdbarch
!= NULL
);
2575 gdb_assert (gdbarch
->inner_than
!= NULL
);
2576 if (gdbarch_debug
>= 2)
2577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2578 return gdbarch
->inner_than (lhs
, rhs
);
2582 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2583 gdbarch_inner_than_ftype inner_than
)
2585 gdbarch
->inner_than
= inner_than
;
2589 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2591 gdb_assert (gdbarch
!= NULL
);
2592 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2593 if (gdbarch_debug
>= 2)
2594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2595 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2599 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2600 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2602 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2606 gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *kindptr
)
2608 gdb_assert (gdbarch
!= NULL
);
2609 gdb_assert (gdbarch
->remote_breakpoint_from_pc
!= NULL
);
2610 if (gdbarch_debug
>= 2)
2611 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_breakpoint_from_pc called\n");
2612 gdbarch
->remote_breakpoint_from_pc (gdbarch
, pcptr
, kindptr
);
2616 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2617 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc
)
2619 gdbarch
->remote_breakpoint_from_pc
= remote_breakpoint_from_pc
;
2623 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2625 gdb_assert (gdbarch
!= NULL
);
2626 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2630 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2632 gdb_assert (gdbarch
!= NULL
);
2633 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2634 if (gdbarch_debug
>= 2)
2635 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2636 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2640 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2641 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2643 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2647 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2649 gdb_assert (gdbarch
!= NULL
);
2650 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2651 if (gdbarch_debug
>= 2)
2652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2653 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2657 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2658 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2660 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2664 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2666 gdb_assert (gdbarch
!= NULL
);
2667 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2670 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2674 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2675 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
2677 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
2681 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
2683 gdb_assert (gdbarch
!= NULL
);
2684 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2685 if (gdbarch_debug
>= 2)
2686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
2687 return gdbarch
->decr_pc_after_break
;
2691 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
2692 CORE_ADDR decr_pc_after_break
)
2694 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
2698 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
2700 gdb_assert (gdbarch
!= NULL
);
2701 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2702 if (gdbarch_debug
>= 2)
2703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
2704 return gdbarch
->deprecated_function_start_offset
;
2708 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
2709 CORE_ADDR deprecated_function_start_offset
)
2711 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
2715 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
2717 gdb_assert (gdbarch
!= NULL
);
2718 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
2721 return gdbarch
->remote_register_number (gdbarch
, regno
);
2725 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
2726 gdbarch_remote_register_number_ftype remote_register_number
)
2728 gdbarch
->remote_register_number
= remote_register_number
;
2732 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
2734 gdb_assert (gdbarch
!= NULL
);
2735 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
2739 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
2741 gdb_assert (gdbarch
!= NULL
);
2742 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
2743 if (gdbarch_debug
>= 2)
2744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
2745 return gdbarch
->fetch_tls_load_module_address (objfile
);
2749 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
2750 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
2752 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
2756 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
2758 gdb_assert (gdbarch
!= NULL
);
2759 /* Skip verify of frame_args_skip, invalid_p == 0 */
2760 if (gdbarch_debug
>= 2)
2761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
2762 return gdbarch
->frame_args_skip
;
2766 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
2767 CORE_ADDR frame_args_skip
)
2769 gdbarch
->frame_args_skip
= frame_args_skip
;
2773 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
2775 gdb_assert (gdbarch
!= NULL
);
2776 return gdbarch
->unwind_pc
!= NULL
;
2780 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2782 gdb_assert (gdbarch
!= NULL
);
2783 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
2784 if (gdbarch_debug
>= 2)
2785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
2786 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
2790 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
2791 gdbarch_unwind_pc_ftype unwind_pc
)
2793 gdbarch
->unwind_pc
= unwind_pc
;
2797 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
2799 gdb_assert (gdbarch
!= NULL
);
2800 return gdbarch
->unwind_sp
!= NULL
;
2804 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2806 gdb_assert (gdbarch
!= NULL
);
2807 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
2808 if (gdbarch_debug
>= 2)
2809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
2810 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
2814 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
2815 gdbarch_unwind_sp_ftype unwind_sp
)
2817 gdbarch
->unwind_sp
= unwind_sp
;
2821 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
2823 gdb_assert (gdbarch
!= NULL
);
2824 return gdbarch
->frame_num_args
!= NULL
;
2828 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2830 gdb_assert (gdbarch
!= NULL
);
2831 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
2832 if (gdbarch_debug
>= 2)
2833 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
2834 return gdbarch
->frame_num_args (frame
);
2838 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
2839 gdbarch_frame_num_args_ftype frame_num_args
)
2841 gdbarch
->frame_num_args
= frame_num_args
;
2845 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
2847 gdb_assert (gdbarch
!= NULL
);
2848 return gdbarch
->frame_align
!= NULL
;
2852 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
2854 gdb_assert (gdbarch
!= NULL
);
2855 gdb_assert (gdbarch
->frame_align
!= NULL
);
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
2858 return gdbarch
->frame_align (gdbarch
, address
);
2862 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
2863 gdbarch_frame_align_ftype frame_align
)
2865 gdbarch
->frame_align
= frame_align
;
2869 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
2871 gdb_assert (gdbarch
!= NULL
);
2872 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
2875 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
2879 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
2880 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
2882 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
2886 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
2888 gdb_assert (gdbarch
!= NULL
);
2889 if (gdbarch_debug
>= 2)
2890 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
2891 return gdbarch
->frame_red_zone_size
;
2895 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
2896 int frame_red_zone_size
)
2898 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
2902 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
2904 gdb_assert (gdbarch
!= NULL
);
2905 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
2906 if (gdbarch_debug
>= 2)
2907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
2908 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
2912 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
2913 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
2915 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
2919 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2921 gdb_assert (gdbarch
!= NULL
);
2922 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
2925 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
2929 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
2930 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
2932 gdbarch
->addr_bits_remove
= addr_bits_remove
;
2936 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
2938 gdb_assert (gdbarch
!= NULL
);
2939 return gdbarch
->software_single_step
!= NULL
;
2943 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2945 gdb_assert (gdbarch
!= NULL
);
2946 gdb_assert (gdbarch
->software_single_step
!= NULL
);
2947 if (gdbarch_debug
>= 2)
2948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
2949 return gdbarch
->software_single_step (frame
);
2953 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
2954 gdbarch_software_single_step_ftype software_single_step
)
2956 gdbarch
->software_single_step
= software_single_step
;
2960 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
2962 gdb_assert (gdbarch
!= NULL
);
2963 return gdbarch
->single_step_through_delay
!= NULL
;
2967 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2969 gdb_assert (gdbarch
!= NULL
);
2970 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
2971 if (gdbarch_debug
>= 2)
2972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
2973 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
2977 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
2978 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
2980 gdbarch
->single_step_through_delay
= single_step_through_delay
;
2984 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
2986 gdb_assert (gdbarch
!= NULL
);
2987 gdb_assert (gdbarch
->print_insn
!= NULL
);
2988 if (gdbarch_debug
>= 2)
2989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
2990 return gdbarch
->print_insn (vma
, info
);
2994 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
2995 gdbarch_print_insn_ftype print_insn
)
2997 gdbarch
->print_insn
= print_insn
;
3001 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
3003 gdb_assert (gdbarch
!= NULL
);
3004 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
3005 if (gdbarch_debug
>= 2)
3006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
3007 return gdbarch
->skip_trampoline_code (frame
, pc
);
3011 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
3012 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
3014 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3018 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3020 gdb_assert (gdbarch
!= NULL
);
3021 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3022 if (gdbarch_debug
>= 2)
3023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3024 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3028 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3029 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3031 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3035 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, const char *name
)
3037 gdb_assert (gdbarch
!= NULL
);
3038 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3039 if (gdbarch_debug
>= 2)
3040 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3041 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
3045 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3046 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3048 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3052 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3054 gdb_assert (gdbarch
!= NULL
);
3055 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
3058 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
3062 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
3063 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
3065 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
3069 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3071 gdb_assert (gdbarch
!= NULL
);
3072 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3073 if (gdbarch_debug
>= 2)
3074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3075 gdbarch
->elf_make_msymbol_special (sym
, msym
);
3079 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
3080 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
3082 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
3086 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
3088 gdb_assert (gdbarch
!= NULL
);
3089 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
3090 if (gdbarch_debug
>= 2)
3091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
3092 gdbarch
->coff_make_msymbol_special (val
, msym
);
3096 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
3097 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
3099 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
3103 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
3105 gdb_assert (gdbarch
!= NULL
);
3106 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3107 if (gdbarch_debug
>= 2)
3108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
3109 return gdbarch
->cannot_step_breakpoint
;
3113 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
3114 int cannot_step_breakpoint
)
3116 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
3120 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
3122 gdb_assert (gdbarch
!= NULL
);
3123 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3124 if (gdbarch_debug
>= 2)
3125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
3126 return gdbarch
->have_nonsteppable_watchpoint
;
3130 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
3131 int have_nonsteppable_watchpoint
)
3133 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
3137 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
3139 gdb_assert (gdbarch
!= NULL
);
3140 return gdbarch
->address_class_type_flags
!= NULL
;
3144 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
3146 gdb_assert (gdbarch
!= NULL
);
3147 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
3148 if (gdbarch_debug
>= 2)
3149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
3150 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
3154 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
3155 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
3157 gdbarch
->address_class_type_flags
= address_class_type_flags
;
3161 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
3163 gdb_assert (gdbarch
!= NULL
);
3164 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
3168 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
3170 gdb_assert (gdbarch
!= NULL
);
3171 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
3172 if (gdbarch_debug
>= 2)
3173 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
3174 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
3178 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
3179 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
3181 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
3185 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
3187 gdb_assert (gdbarch
!= NULL
);
3188 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
3192 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
3194 gdb_assert (gdbarch
!= NULL
);
3195 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
3196 if (gdbarch_debug
>= 2)
3197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
3198 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
3202 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
3203 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
3205 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
3209 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
3211 gdb_assert (gdbarch
!= NULL
);
3212 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
3213 if (gdbarch_debug
>= 2)
3214 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
3215 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
3219 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
3220 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
3222 gdbarch
->register_reggroup_p
= register_reggroup_p
;
3226 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
3228 gdb_assert (gdbarch
!= NULL
);
3229 return gdbarch
->fetch_pointer_argument
!= NULL
;
3233 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
3235 gdb_assert (gdbarch
!= NULL
);
3236 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
3237 if (gdbarch_debug
>= 2)
3238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
3239 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
3243 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
3244 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
3246 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
3250 gdbarch_iterate_over_regset_sections_p (struct gdbarch
*gdbarch
)
3252 gdb_assert (gdbarch
!= NULL
);
3253 return gdbarch
->iterate_over_regset_sections
!= NULL
;
3257 gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
, iterate_over_regset_sections_cb
*cb
, void *cb_data
, const struct regcache
*regcache
)
3259 gdb_assert (gdbarch
!= NULL
);
3260 gdb_assert (gdbarch
->iterate_over_regset_sections
!= NULL
);
3261 if (gdbarch_debug
>= 2)
3262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_regset_sections called\n");
3263 gdbarch
->iterate_over_regset_sections (gdbarch
, cb
, cb_data
, regcache
);
3267 set_gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
,
3268 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections
)
3270 gdbarch
->iterate_over_regset_sections
= iterate_over_regset_sections
;
3274 gdbarch_make_corefile_notes_p (struct gdbarch
*gdbarch
)
3276 gdb_assert (gdbarch
!= NULL
);
3277 return gdbarch
->make_corefile_notes
!= NULL
;
3281 gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
, bfd
*obfd
, int *note_size
)
3283 gdb_assert (gdbarch
!= NULL
);
3284 gdb_assert (gdbarch
->make_corefile_notes
!= NULL
);
3285 if (gdbarch_debug
>= 2)
3286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_corefile_notes called\n");
3287 return gdbarch
->make_corefile_notes (gdbarch
, obfd
, note_size
);
3291 set_gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
,
3292 gdbarch_make_corefile_notes_ftype make_corefile_notes
)
3294 gdbarch
->make_corefile_notes
= make_corefile_notes
;
3298 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch
*gdbarch
)
3300 gdb_assert (gdbarch
!= NULL
);
3301 return gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
;
3305 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
, bfd
*obfd
, char *note_data
, int *note_size
, const struct elf_internal_linux_prpsinfo
*info
)
3307 gdb_assert (gdbarch
!= NULL
);
3308 gdb_assert (gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
);
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3311 return gdbarch
->elfcore_write_linux_prpsinfo (obfd
, note_data
, note_size
, info
);
3315 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
,
3316 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo
)
3318 gdbarch
->elfcore_write_linux_prpsinfo
= elfcore_write_linux_prpsinfo
;
3322 gdbarch_find_memory_regions_p (struct gdbarch
*gdbarch
)
3324 gdb_assert (gdbarch
!= NULL
);
3325 return gdbarch
->find_memory_regions
!= NULL
;
3329 gdbarch_find_memory_regions (struct gdbarch
*gdbarch
, find_memory_region_ftype func
, void *data
)
3331 gdb_assert (gdbarch
!= NULL
);
3332 gdb_assert (gdbarch
->find_memory_regions
!= NULL
);
3333 if (gdbarch_debug
>= 2)
3334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_memory_regions called\n");
3335 return gdbarch
->find_memory_regions (gdbarch
, func
, data
);
3339 set_gdbarch_find_memory_regions (struct gdbarch
*gdbarch
,
3340 gdbarch_find_memory_regions_ftype find_memory_regions
)
3342 gdbarch
->find_memory_regions
= find_memory_regions
;
3346 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3348 gdb_assert (gdbarch
!= NULL
);
3349 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3353 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3355 gdb_assert (gdbarch
!= NULL
);
3356 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3357 if (gdbarch_debug
>= 2)
3358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3359 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3363 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3364 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3366 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3370 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch
*gdbarch
)
3372 gdb_assert (gdbarch
!= NULL
);
3373 return gdbarch
->core_xfer_shared_libraries_aix
!= NULL
;
3377 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3379 gdb_assert (gdbarch
!= NULL
);
3380 gdb_assert (gdbarch
->core_xfer_shared_libraries_aix
!= NULL
);
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries_aix called\n");
3383 return gdbarch
->core_xfer_shared_libraries_aix (gdbarch
, readbuf
, offset
, len
);
3387 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
,
3388 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix
)
3390 gdbarch
->core_xfer_shared_libraries_aix
= core_xfer_shared_libraries_aix
;
3394 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3396 gdb_assert (gdbarch
!= NULL
);
3397 return gdbarch
->core_pid_to_str
!= NULL
;
3401 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3403 gdb_assert (gdbarch
!= NULL
);
3404 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3405 if (gdbarch_debug
>= 2)
3406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3407 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3411 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3412 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3414 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3418 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3420 gdb_assert (gdbarch
!= NULL
);
3421 return gdbarch
->gcore_bfd_target
!= 0;
3425 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3427 gdb_assert (gdbarch
!= NULL
);
3428 /* Check variable changed from pre-default. */
3429 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3430 if (gdbarch_debug
>= 2)
3431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3432 return gdbarch
->gcore_bfd_target
;
3436 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3437 const char * gcore_bfd_target
)
3439 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3443 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3445 gdb_assert (gdbarch
!= NULL
);
3446 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3447 if (gdbarch_debug
>= 2)
3448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3449 return gdbarch
->vtable_function_descriptors
;
3453 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3454 int vtable_function_descriptors
)
3456 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3460 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3462 gdb_assert (gdbarch
!= NULL
);
3463 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3464 if (gdbarch_debug
>= 2)
3465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3466 return gdbarch
->vbit_in_delta
;
3470 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3473 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3477 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3479 gdb_assert (gdbarch
!= NULL
);
3480 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3481 if (gdbarch_debug
>= 2)
3482 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3483 gdbarch
->skip_permanent_breakpoint (regcache
);
3487 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3488 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3490 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3494 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3496 gdb_assert (gdbarch
!= NULL
);
3497 return gdbarch
->max_insn_length
!= 0;
3501 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3503 gdb_assert (gdbarch
!= NULL
);
3504 /* Check variable changed from pre-default. */
3505 gdb_assert (gdbarch
->max_insn_length
!= 0);
3506 if (gdbarch_debug
>= 2)
3507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3508 return gdbarch
->max_insn_length
;
3512 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3513 ULONGEST max_insn_length
)
3515 gdbarch
->max_insn_length
= max_insn_length
;
3519 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3521 gdb_assert (gdbarch
!= NULL
);
3522 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3525 struct displaced_step_closure
*
3526 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3532 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
3536 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
3537 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
3539 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
3543 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3545 gdb_assert (gdbarch
!= NULL
);
3546 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
3547 if (gdbarch_debug
>= 2)
3548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
3549 return gdbarch
->displaced_step_hw_singlestep (gdbarch
, closure
);
3553 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
3554 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
3556 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
3560 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
3562 gdb_assert (gdbarch
!= NULL
);
3563 return gdbarch
->displaced_step_fixup
!= NULL
;
3567 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3569 gdb_assert (gdbarch
!= NULL
);
3570 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
3571 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3572 if (gdbarch_debug
>= 2)
3573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
3574 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
3578 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
3579 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
3581 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
3585 gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3587 gdb_assert (gdbarch
!= NULL
);
3588 gdb_assert (gdbarch
->displaced_step_free_closure
!= NULL
);
3589 if (gdbarch_debug
>= 2)
3590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_free_closure called\n");
3591 gdbarch
->displaced_step_free_closure (gdbarch
, closure
);
3595 set_gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
,
3596 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure
)
3598 gdbarch
->displaced_step_free_closure
= displaced_step_free_closure
;
3602 gdbarch_displaced_step_location (struct gdbarch
*gdbarch
)
3604 gdb_assert (gdbarch
!= NULL
);
3605 gdb_assert (gdbarch
->displaced_step_location
!= NULL
);
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_location called\n");
3608 return gdbarch
->displaced_step_location (gdbarch
);
3612 set_gdbarch_displaced_step_location (struct gdbarch
*gdbarch
,
3613 gdbarch_displaced_step_location_ftype displaced_step_location
)
3615 gdbarch
->displaced_step_location
= displaced_step_location
;
3619 gdbarch_relocate_instruction_p (struct gdbarch
*gdbarch
)
3621 gdb_assert (gdbarch
!= NULL
);
3622 return gdbarch
->relocate_instruction
!= NULL
;
3626 gdbarch_relocate_instruction (struct gdbarch
*gdbarch
, CORE_ADDR
*to
, CORE_ADDR from
)
3628 gdb_assert (gdbarch
!= NULL
);
3629 gdb_assert (gdbarch
->relocate_instruction
!= NULL
);
3630 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_relocate_instruction called\n");
3633 gdbarch
->relocate_instruction (gdbarch
, to
, from
);
3637 set_gdbarch_relocate_instruction (struct gdbarch
*gdbarch
,
3638 gdbarch_relocate_instruction_ftype relocate_instruction
)
3640 gdbarch
->relocate_instruction
= relocate_instruction
;
3644 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 return gdbarch
->overlay_update
!= NULL
;
3651 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
3653 gdb_assert (gdbarch
!= NULL
);
3654 gdb_assert (gdbarch
->overlay_update
!= NULL
);
3655 if (gdbarch_debug
>= 2)
3656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
3657 gdbarch
->overlay_update (osect
);
3661 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
3662 gdbarch_overlay_update_ftype overlay_update
)
3664 gdbarch
->overlay_update
= overlay_update
;
3668 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
3670 gdb_assert (gdbarch
!= NULL
);
3671 return gdbarch
->core_read_description
!= NULL
;
3674 const struct target_desc
*
3675 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
3677 gdb_assert (gdbarch
!= NULL
);
3678 gdb_assert (gdbarch
->core_read_description
!= NULL
);
3679 if (gdbarch_debug
>= 2)
3680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
3681 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
3685 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
3686 gdbarch_core_read_description_ftype core_read_description
)
3688 gdbarch
->core_read_description
= core_read_description
;
3692 gdbarch_static_transform_name_p (struct gdbarch
*gdbarch
)
3694 gdb_assert (gdbarch
!= NULL
);
3695 return gdbarch
->static_transform_name
!= NULL
;
3699 gdbarch_static_transform_name (struct gdbarch
*gdbarch
, const char *name
)
3701 gdb_assert (gdbarch
!= NULL
);
3702 gdb_assert (gdbarch
->static_transform_name
!= NULL
);
3703 if (gdbarch_debug
>= 2)
3704 fprintf_unfiltered (gdb_stdlog
, "gdbarch_static_transform_name called\n");
3705 return gdbarch
->static_transform_name (name
);
3709 set_gdbarch_static_transform_name (struct gdbarch
*gdbarch
,
3710 gdbarch_static_transform_name_ftype static_transform_name
)
3712 gdbarch
->static_transform_name
= static_transform_name
;
3716 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
3718 gdb_assert (gdbarch
!= NULL
);
3719 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3720 if (gdbarch_debug
>= 2)
3721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
3722 return gdbarch
->sofun_address_maybe_missing
;
3726 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
3727 int sofun_address_maybe_missing
)
3729 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
3733 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
3735 gdb_assert (gdbarch
!= NULL
);
3736 return gdbarch
->process_record
!= NULL
;
3740 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
3742 gdb_assert (gdbarch
!= NULL
);
3743 gdb_assert (gdbarch
->process_record
!= NULL
);
3744 if (gdbarch_debug
>= 2)
3745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
3746 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
3750 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
3751 gdbarch_process_record_ftype process_record
)
3753 gdbarch
->process_record
= process_record
;
3757 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
3759 gdb_assert (gdbarch
!= NULL
);
3760 return gdbarch
->process_record_signal
!= NULL
;
3764 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum gdb_signal signal
)
3766 gdb_assert (gdbarch
!= NULL
);
3767 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
3770 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
3774 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
3775 gdbarch_process_record_signal_ftype process_record_signal
)
3777 gdbarch
->process_record_signal
= process_record_signal
;
3781 gdbarch_gdb_signal_from_target_p (struct gdbarch
*gdbarch
)
3783 gdb_assert (gdbarch
!= NULL
);
3784 return gdbarch
->gdb_signal_from_target
!= NULL
;
3788 gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
, int signo
)
3790 gdb_assert (gdbarch
!= NULL
);
3791 gdb_assert (gdbarch
->gdb_signal_from_target
!= NULL
);
3792 if (gdbarch_debug
>= 2)
3793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_from_target called\n");
3794 return gdbarch
->gdb_signal_from_target (gdbarch
, signo
);
3798 set_gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
,
3799 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target
)
3801 gdbarch
->gdb_signal_from_target
= gdb_signal_from_target
;
3805 gdbarch_gdb_signal_to_target_p (struct gdbarch
*gdbarch
)
3807 gdb_assert (gdbarch
!= NULL
);
3808 return gdbarch
->gdb_signal_to_target
!= NULL
;
3812 gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
, enum gdb_signal signal
)
3814 gdb_assert (gdbarch
!= NULL
);
3815 gdb_assert (gdbarch
->gdb_signal_to_target
!= NULL
);
3816 if (gdbarch_debug
>= 2)
3817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_to_target called\n");
3818 return gdbarch
->gdb_signal_to_target (gdbarch
, signal
);
3822 set_gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
,
3823 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target
)
3825 gdbarch
->gdb_signal_to_target
= gdb_signal_to_target
;
3829 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
3831 gdb_assert (gdbarch
!= NULL
);
3832 return gdbarch
->get_siginfo_type
!= NULL
;
3836 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
3838 gdb_assert (gdbarch
!= NULL
);
3839 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
3842 return gdbarch
->get_siginfo_type (gdbarch
);
3846 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
3847 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
3849 gdbarch
->get_siginfo_type
= get_siginfo_type
;
3853 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
3855 gdb_assert (gdbarch
!= NULL
);
3856 return gdbarch
->record_special_symbol
!= NULL
;
3860 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
3862 gdb_assert (gdbarch
!= NULL
);
3863 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
3864 if (gdbarch_debug
>= 2)
3865 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
3866 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
3870 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
3871 gdbarch_record_special_symbol_ftype record_special_symbol
)
3873 gdbarch
->record_special_symbol
= record_special_symbol
;
3877 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
3879 gdb_assert (gdbarch
!= NULL
);
3880 return gdbarch
->get_syscall_number
!= NULL
;
3884 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, ptid_t ptid
)
3886 gdb_assert (gdbarch
!= NULL
);
3887 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
3888 if (gdbarch_debug
>= 2)
3889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
3890 return gdbarch
->get_syscall_number (gdbarch
, ptid
);
3894 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
3895 gdbarch_get_syscall_number_ftype get_syscall_number
)
3897 gdbarch
->get_syscall_number
= get_syscall_number
;
3901 gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
)
3903 gdb_assert (gdbarch
!= NULL
);
3904 /* Skip verify of xml_syscall_file, invalid_p == 0 */
3905 if (gdbarch_debug
>= 2)
3906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_xml_syscall_file called\n");
3907 return gdbarch
->xml_syscall_file
;
3911 set_gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
,
3912 const char * xml_syscall_file
)
3914 gdbarch
->xml_syscall_file
= xml_syscall_file
;
3917 struct syscalls_info
*
3918 gdbarch_syscalls_info (struct gdbarch
*gdbarch
)
3920 gdb_assert (gdbarch
!= NULL
);
3921 /* Skip verify of syscalls_info, invalid_p == 0 */
3922 if (gdbarch_debug
>= 2)
3923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_syscalls_info called\n");
3924 return gdbarch
->syscalls_info
;
3928 set_gdbarch_syscalls_info (struct gdbarch
*gdbarch
,
3929 struct syscalls_info
* syscalls_info
)
3931 gdbarch
->syscalls_info
= syscalls_info
;
3935 gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
)
3937 gdb_assert (gdbarch
!= NULL
);
3938 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_prefixes called\n");
3941 return gdbarch
->stap_integer_prefixes
;
3945 set_gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
,
3946 const char *const * stap_integer_prefixes
)
3948 gdbarch
->stap_integer_prefixes
= stap_integer_prefixes
;
3952 gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
)
3954 gdb_assert (gdbarch
!= NULL
);
3955 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
3956 if (gdbarch_debug
>= 2)
3957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_suffixes called\n");
3958 return gdbarch
->stap_integer_suffixes
;
3962 set_gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
,
3963 const char *const * stap_integer_suffixes
)
3965 gdbarch
->stap_integer_suffixes
= stap_integer_suffixes
;
3969 gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
)
3971 gdb_assert (gdbarch
!= NULL
);
3972 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
3973 if (gdbarch_debug
>= 2)
3974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_prefixes called\n");
3975 return gdbarch
->stap_register_prefixes
;
3979 set_gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
,
3980 const char *const * stap_register_prefixes
)
3982 gdbarch
->stap_register_prefixes
= stap_register_prefixes
;
3986 gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
)
3988 gdb_assert (gdbarch
!= NULL
);
3989 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
3990 if (gdbarch_debug
>= 2)
3991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_suffixes called\n");
3992 return gdbarch
->stap_register_suffixes
;
3996 set_gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
,
3997 const char *const * stap_register_suffixes
)
3999 gdbarch
->stap_register_suffixes
= stap_register_suffixes
;
4003 gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
)
4005 gdb_assert (gdbarch
!= NULL
);
4006 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4007 if (gdbarch_debug
>= 2)
4008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_prefixes called\n");
4009 return gdbarch
->stap_register_indirection_prefixes
;
4013 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
,
4014 const char *const * stap_register_indirection_prefixes
)
4016 gdbarch
->stap_register_indirection_prefixes
= stap_register_indirection_prefixes
;
4020 gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
)
4022 gdb_assert (gdbarch
!= NULL
);
4023 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4024 if (gdbarch_debug
>= 2)
4025 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_suffixes called\n");
4026 return gdbarch
->stap_register_indirection_suffixes
;
4030 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
,
4031 const char *const * stap_register_indirection_suffixes
)
4033 gdbarch
->stap_register_indirection_suffixes
= stap_register_indirection_suffixes
;
4037 gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
)
4039 gdb_assert (gdbarch
!= NULL
);
4040 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_prefix called\n");
4043 return gdbarch
->stap_gdb_register_prefix
;
4047 set_gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
,
4048 const char * stap_gdb_register_prefix
)
4050 gdbarch
->stap_gdb_register_prefix
= stap_gdb_register_prefix
;
4054 gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
)
4056 gdb_assert (gdbarch
!= NULL
);
4057 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4058 if (gdbarch_debug
>= 2)
4059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_suffix called\n");
4060 return gdbarch
->stap_gdb_register_suffix
;
4064 set_gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
,
4065 const char * stap_gdb_register_suffix
)
4067 gdbarch
->stap_gdb_register_suffix
= stap_gdb_register_suffix
;
4071 gdbarch_stap_is_single_operand_p (struct gdbarch
*gdbarch
)
4073 gdb_assert (gdbarch
!= NULL
);
4074 return gdbarch
->stap_is_single_operand
!= NULL
;
4078 gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
, const char *s
)
4080 gdb_assert (gdbarch
!= NULL
);
4081 gdb_assert (gdbarch
->stap_is_single_operand
!= NULL
);
4082 if (gdbarch_debug
>= 2)
4083 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_is_single_operand called\n");
4084 return gdbarch
->stap_is_single_operand (gdbarch
, s
);
4088 set_gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
,
4089 gdbarch_stap_is_single_operand_ftype stap_is_single_operand
)
4091 gdbarch
->stap_is_single_operand
= stap_is_single_operand
;
4095 gdbarch_stap_parse_special_token_p (struct gdbarch
*gdbarch
)
4097 gdb_assert (gdbarch
!= NULL
);
4098 return gdbarch
->stap_parse_special_token
!= NULL
;
4102 gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
)
4104 gdb_assert (gdbarch
!= NULL
);
4105 gdb_assert (gdbarch
->stap_parse_special_token
!= NULL
);
4106 if (gdbarch_debug
>= 2)
4107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_parse_special_token called\n");
4108 return gdbarch
->stap_parse_special_token (gdbarch
, p
);
4112 set_gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
,
4113 gdbarch_stap_parse_special_token_ftype stap_parse_special_token
)
4115 gdbarch
->stap_parse_special_token
= stap_parse_special_token
;
4119 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
4121 gdb_assert (gdbarch
!= NULL
);
4122 /* Skip verify of has_global_solist, invalid_p == 0 */
4123 if (gdbarch_debug
>= 2)
4124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
4125 return gdbarch
->has_global_solist
;
4129 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
4130 int has_global_solist
)
4132 gdbarch
->has_global_solist
= has_global_solist
;
4136 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
4138 gdb_assert (gdbarch
!= NULL
);
4139 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4140 if (gdbarch_debug
>= 2)
4141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
4142 return gdbarch
->has_global_breakpoints
;
4146 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
4147 int has_global_breakpoints
)
4149 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
4153 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
4155 gdb_assert (gdbarch
!= NULL
);
4156 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
4157 if (gdbarch_debug
>= 2)
4158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
4159 return gdbarch
->has_shared_address_space (gdbarch
);
4163 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
4164 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
4166 gdbarch
->has_shared_address_space
= has_shared_address_space
;
4170 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int *isize
, char **msg
)
4172 gdb_assert (gdbarch
!= NULL
);
4173 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
4174 if (gdbarch_debug
>= 2)
4175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
4176 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, isize
, msg
);
4180 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
4181 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
4183 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
4187 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
4189 gdb_assert (gdbarch
!= NULL
);
4190 gdb_assert (gdbarch
->auto_charset
!= NULL
);
4191 if (gdbarch_debug
>= 2)
4192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
4193 return gdbarch
->auto_charset ();
4197 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
4198 gdbarch_auto_charset_ftype auto_charset
)
4200 gdbarch
->auto_charset
= auto_charset
;
4204 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
4206 gdb_assert (gdbarch
!= NULL
);
4207 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
4208 if (gdbarch_debug
>= 2)
4209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
4210 return gdbarch
->auto_wide_charset ();
4214 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
4215 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
4217 gdbarch
->auto_wide_charset
= auto_wide_charset
;
4221 gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
)
4223 gdb_assert (gdbarch
!= NULL
);
4224 if (gdbarch_debug
>= 2)
4225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_solib_symbols_extension called\n");
4226 return gdbarch
->solib_symbols_extension
;
4230 set_gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
,
4231 const char * solib_symbols_extension
)
4233 gdbarch
->solib_symbols_extension
= solib_symbols_extension
;
4237 gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
)
4239 gdb_assert (gdbarch
!= NULL
);
4240 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4241 if (gdbarch_debug
>= 2)
4242 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_dos_based_file_system called\n");
4243 return gdbarch
->has_dos_based_file_system
;
4247 set_gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
,
4248 int has_dos_based_file_system
)
4250 gdbarch
->has_dos_based_file_system
= has_dos_based_file_system
;
4254 gdbarch_gen_return_address (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, struct axs_value
*value
, CORE_ADDR scope
)
4256 gdb_assert (gdbarch
!= NULL
);
4257 gdb_assert (gdbarch
->gen_return_address
!= NULL
);
4258 if (gdbarch_debug
>= 2)
4259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gen_return_address called\n");
4260 gdbarch
->gen_return_address (gdbarch
, ax
, value
, scope
);
4264 set_gdbarch_gen_return_address (struct gdbarch
*gdbarch
,
4265 gdbarch_gen_return_address_ftype gen_return_address
)
4267 gdbarch
->gen_return_address
= gen_return_address
;
4271 gdbarch_info_proc_p (struct gdbarch
*gdbarch
)
4273 gdb_assert (gdbarch
!= NULL
);
4274 return gdbarch
->info_proc
!= NULL
;
4278 gdbarch_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4280 gdb_assert (gdbarch
!= NULL
);
4281 gdb_assert (gdbarch
->info_proc
!= NULL
);
4282 if (gdbarch_debug
>= 2)
4283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_info_proc called\n");
4284 gdbarch
->info_proc (gdbarch
, args
, what
);
4288 set_gdbarch_info_proc (struct gdbarch
*gdbarch
,
4289 gdbarch_info_proc_ftype info_proc
)
4291 gdbarch
->info_proc
= info_proc
;
4295 gdbarch_core_info_proc_p (struct gdbarch
*gdbarch
)
4297 gdb_assert (gdbarch
!= NULL
);
4298 return gdbarch
->core_info_proc
!= NULL
;
4302 gdbarch_core_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4304 gdb_assert (gdbarch
!= NULL
);
4305 gdb_assert (gdbarch
->core_info_proc
!= NULL
);
4306 if (gdbarch_debug
>= 2)
4307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_info_proc called\n");
4308 gdbarch
->core_info_proc (gdbarch
, args
, what
);
4312 set_gdbarch_core_info_proc (struct gdbarch
*gdbarch
,
4313 gdbarch_core_info_proc_ftype core_info_proc
)
4315 gdbarch
->core_info_proc
= core_info_proc
;
4319 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
)
4321 gdb_assert (gdbarch
!= NULL
);
4322 gdb_assert (gdbarch
->iterate_over_objfiles_in_search_order
!= NULL
);
4323 if (gdbarch_debug
>= 2)
4324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4325 gdbarch
->iterate_over_objfiles_in_search_order (gdbarch
, cb
, cb_data
, current_objfile
);
4329 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch
*gdbarch
,
4330 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order
)
4332 gdbarch
->iterate_over_objfiles_in_search_order
= iterate_over_objfiles_in_search_order
;
4335 struct ravenscar_arch_ops
*
4336 gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
)
4338 gdb_assert (gdbarch
!= NULL
);
4339 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4340 if (gdbarch_debug
>= 2)
4341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ravenscar_ops called\n");
4342 return gdbarch
->ravenscar_ops
;
4346 set_gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
,
4347 struct ravenscar_arch_ops
* ravenscar_ops
)
4349 gdbarch
->ravenscar_ops
= ravenscar_ops
;
4353 gdbarch_insn_is_call (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4355 gdb_assert (gdbarch
!= NULL
);
4356 gdb_assert (gdbarch
->insn_is_call
!= NULL
);
4357 if (gdbarch_debug
>= 2)
4358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_call called\n");
4359 return gdbarch
->insn_is_call (gdbarch
, addr
);
4363 set_gdbarch_insn_is_call (struct gdbarch
*gdbarch
,
4364 gdbarch_insn_is_call_ftype insn_is_call
)
4366 gdbarch
->insn_is_call
= insn_is_call
;
4370 gdbarch_insn_is_ret (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4372 gdb_assert (gdbarch
!= NULL
);
4373 gdb_assert (gdbarch
->insn_is_ret
!= NULL
);
4374 if (gdbarch_debug
>= 2)
4375 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_ret called\n");
4376 return gdbarch
->insn_is_ret (gdbarch
, addr
);
4380 set_gdbarch_insn_is_ret (struct gdbarch
*gdbarch
,
4381 gdbarch_insn_is_ret_ftype insn_is_ret
)
4383 gdbarch
->insn_is_ret
= insn_is_ret
;
4387 gdbarch_insn_is_jump (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4389 gdb_assert (gdbarch
!= NULL
);
4390 gdb_assert (gdbarch
->insn_is_jump
!= NULL
);
4391 if (gdbarch_debug
>= 2)
4392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_jump called\n");
4393 return gdbarch
->insn_is_jump (gdbarch
, addr
);
4397 set_gdbarch_insn_is_jump (struct gdbarch
*gdbarch
,
4398 gdbarch_insn_is_jump_ftype insn_is_jump
)
4400 gdbarch
->insn_is_jump
= insn_is_jump
;
4404 gdbarch_auxv_parse_p (struct gdbarch
*gdbarch
)
4406 gdb_assert (gdbarch
!= NULL
);
4407 return gdbarch
->auxv_parse
!= NULL
;
4411 gdbarch_auxv_parse (struct gdbarch
*gdbarch
, gdb_byte
**readptr
, gdb_byte
*endptr
, CORE_ADDR
*typep
, CORE_ADDR
*valp
)
4413 gdb_assert (gdbarch
!= NULL
);
4414 gdb_assert (gdbarch
->auxv_parse
!= NULL
);
4415 if (gdbarch_debug
>= 2)
4416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auxv_parse called\n");
4417 return gdbarch
->auxv_parse (gdbarch
, readptr
, endptr
, typep
, valp
);
4421 set_gdbarch_auxv_parse (struct gdbarch
*gdbarch
,
4422 gdbarch_auxv_parse_ftype auxv_parse
)
4424 gdbarch
->auxv_parse
= auxv_parse
;
4428 gdbarch_vsyscall_range (struct gdbarch
*gdbarch
, struct mem_range
*range
)
4430 gdb_assert (gdbarch
!= NULL
);
4431 gdb_assert (gdbarch
->vsyscall_range
!= NULL
);
4432 if (gdbarch_debug
>= 2)
4433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vsyscall_range called\n");
4434 return gdbarch
->vsyscall_range (gdbarch
, range
);
4438 set_gdbarch_vsyscall_range (struct gdbarch
*gdbarch
,
4439 gdbarch_vsyscall_range_ftype vsyscall_range
)
4441 gdbarch
->vsyscall_range
= vsyscall_range
;
4445 /* Keep a registry of per-architecture data-pointers required by GDB
4452 gdbarch_data_pre_init_ftype
*pre_init
;
4453 gdbarch_data_post_init_ftype
*post_init
;
4456 struct gdbarch_data_registration
4458 struct gdbarch_data
*data
;
4459 struct gdbarch_data_registration
*next
;
4462 struct gdbarch_data_registry
4465 struct gdbarch_data_registration
*registrations
;
4468 struct gdbarch_data_registry gdbarch_data_registry
=
4473 static struct gdbarch_data
*
4474 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4475 gdbarch_data_post_init_ftype
*post_init
)
4477 struct gdbarch_data_registration
**curr
;
4479 /* Append the new registration. */
4480 for (curr
= &gdbarch_data_registry
.registrations
;
4482 curr
= &(*curr
)->next
);
4483 (*curr
) = XNEW (struct gdbarch_data_registration
);
4484 (*curr
)->next
= NULL
;
4485 (*curr
)->data
= XNEW (struct gdbarch_data
);
4486 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4487 (*curr
)->data
->pre_init
= pre_init
;
4488 (*curr
)->data
->post_init
= post_init
;
4489 (*curr
)->data
->init_p
= 1;
4490 return (*curr
)->data
;
4493 struct gdbarch_data
*
4494 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4496 return gdbarch_data_register (pre_init
, NULL
);
4499 struct gdbarch_data
*
4500 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
4502 return gdbarch_data_register (NULL
, post_init
);
4505 /* Create/delete the gdbarch data vector. */
4508 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4510 gdb_assert (gdbarch
->data
== NULL
);
4511 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4512 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
4515 /* Initialize the current value of the specified per-architecture
4519 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
4520 struct gdbarch_data
*data
,
4523 gdb_assert (data
->index
< gdbarch
->nr_data
);
4524 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
4525 gdb_assert (data
->pre_init
== NULL
);
4526 gdbarch
->data
[data
->index
] = pointer
;
4529 /* Return the current value of the specified per-architecture
4533 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4535 gdb_assert (data
->index
< gdbarch
->nr_data
);
4536 if (gdbarch
->data
[data
->index
] == NULL
)
4538 /* The data-pointer isn't initialized, call init() to get a
4540 if (data
->pre_init
!= NULL
)
4541 /* Mid architecture creation: pass just the obstack, and not
4542 the entire architecture, as that way it isn't possible for
4543 pre-init code to refer to undefined architecture
4545 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
4546 else if (gdbarch
->initialized_p
4547 && data
->post_init
!= NULL
)
4548 /* Post architecture creation: pass the entire architecture
4549 (as all fields are valid), but be careful to also detect
4550 recursive references. */
4552 gdb_assert (data
->init_p
);
4554 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
4558 /* The architecture initialization hasn't completed - punt -
4559 hope that the caller knows what they are doing. Once
4560 deprecated_set_gdbarch_data has been initialized, this can be
4561 changed to an internal error. */
4563 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4565 return gdbarch
->data
[data
->index
];
4569 /* Keep a registry of the architectures known by GDB. */
4571 struct gdbarch_registration
4573 enum bfd_architecture bfd_architecture
;
4574 gdbarch_init_ftype
*init
;
4575 gdbarch_dump_tdep_ftype
*dump_tdep
;
4576 struct gdbarch_list
*arches
;
4577 struct gdbarch_registration
*next
;
4580 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4583 append_name (const char ***buf
, int *nr
, const char *name
)
4585 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4591 gdbarch_printable_names (void)
4593 /* Accumulate a list of names based on the registed list of
4596 const char **arches
= NULL
;
4597 struct gdbarch_registration
*rego
;
4599 for (rego
= gdbarch_registry
;
4603 const struct bfd_arch_info
*ap
;
4604 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4606 internal_error (__FILE__
, __LINE__
,
4607 _("gdbarch_architecture_names: multi-arch unknown"));
4610 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4615 append_name (&arches
, &nr_arches
, NULL
);
4621 gdbarch_register (enum bfd_architecture bfd_architecture
,
4622 gdbarch_init_ftype
*init
,
4623 gdbarch_dump_tdep_ftype
*dump_tdep
)
4625 struct gdbarch_registration
**curr
;
4626 const struct bfd_arch_info
*bfd_arch_info
;
4628 /* Check that BFD recognizes this architecture */
4629 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4630 if (bfd_arch_info
== NULL
)
4632 internal_error (__FILE__
, __LINE__
,
4633 _("gdbarch: Attempt to register "
4634 "unknown architecture (%d)"),
4637 /* Check that we haven't seen this architecture before. */
4638 for (curr
= &gdbarch_registry
;
4640 curr
= &(*curr
)->next
)
4642 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4643 internal_error (__FILE__
, __LINE__
,
4644 _("gdbarch: Duplicate registration "
4645 "of architecture (%s)"),
4646 bfd_arch_info
->printable_name
);
4650 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
4651 bfd_arch_info
->printable_name
,
4652 host_address_to_string (init
));
4654 (*curr
) = XNEW (struct gdbarch_registration
);
4655 (*curr
)->bfd_architecture
= bfd_architecture
;
4656 (*curr
)->init
= init
;
4657 (*curr
)->dump_tdep
= dump_tdep
;
4658 (*curr
)->arches
= NULL
;
4659 (*curr
)->next
= NULL
;
4663 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4664 gdbarch_init_ftype
*init
)
4666 gdbarch_register (bfd_architecture
, init
, NULL
);
4670 /* Look for an architecture using gdbarch_info. */
4672 struct gdbarch_list
*
4673 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4674 const struct gdbarch_info
*info
)
4676 for (; arches
!= NULL
; arches
= arches
->next
)
4678 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4680 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4682 if (info
->osabi
!= arches
->gdbarch
->osabi
)
4684 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
4692 /* Find an architecture that matches the specified INFO. Create a new
4693 architecture if needed. Return that new architecture. */
4696 gdbarch_find_by_info (struct gdbarch_info info
)
4698 struct gdbarch
*new_gdbarch
;
4699 struct gdbarch_registration
*rego
;
4701 /* Fill in missing parts of the INFO struct using a number of
4702 sources: "set ..."; INFOabfd supplied; and the global
4704 gdbarch_info_fill (&info
);
4706 /* Must have found some sort of architecture. */
4707 gdb_assert (info
.bfd_arch_info
!= NULL
);
4711 fprintf_unfiltered (gdb_stdlog
,
4712 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4713 (info
.bfd_arch_info
!= NULL
4714 ? info
.bfd_arch_info
->printable_name
4716 fprintf_unfiltered (gdb_stdlog
,
4717 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4719 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4720 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4722 fprintf_unfiltered (gdb_stdlog
,
4723 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4724 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
4725 fprintf_unfiltered (gdb_stdlog
,
4726 "gdbarch_find_by_info: info.abfd %s\n",
4727 host_address_to_string (info
.abfd
));
4728 fprintf_unfiltered (gdb_stdlog
,
4729 "gdbarch_find_by_info: info.tdep_info %s\n",
4730 host_address_to_string (info
.tdep_info
));
4733 /* Find the tdep code that knows about this architecture. */
4734 for (rego
= gdbarch_registry
;
4737 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4743 "No matching architecture\n");
4747 /* Ask the tdep code for an architecture that matches "info". */
4748 new_gdbarch
= rego
->init (info
, rego
->arches
);
4750 /* Did the tdep code like it? No. Reject the change and revert to
4751 the old architecture. */
4752 if (new_gdbarch
== NULL
)
4755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4756 "Target rejected architecture\n");
4760 /* Is this a pre-existing architecture (as determined by already
4761 being initialized)? Move it to the front of the architecture
4762 list (keeping the list sorted Most Recently Used). */
4763 if (new_gdbarch
->initialized_p
)
4765 struct gdbarch_list
**list
;
4766 struct gdbarch_list
*this;
4768 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4769 "Previous architecture %s (%s) selected\n",
4770 host_address_to_string (new_gdbarch
),
4771 new_gdbarch
->bfd_arch_info
->printable_name
);
4772 /* Find the existing arch in the list. */
4773 for (list
= ®o
->arches
;
4774 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
4775 list
= &(*list
)->next
);
4776 /* It had better be in the list of architectures. */
4777 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
4780 (*list
) = this->next
;
4781 /* Insert THIS at the front. */
4782 this->next
= rego
->arches
;
4783 rego
->arches
= this;
4788 /* It's a new architecture. */
4790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4791 "New architecture %s (%s) selected\n",
4792 host_address_to_string (new_gdbarch
),
4793 new_gdbarch
->bfd_arch_info
->printable_name
);
4795 /* Insert the new architecture into the front of the architecture
4796 list (keep the list sorted Most Recently Used). */
4798 struct gdbarch_list
*this = XNEW (struct gdbarch_list
);
4799 this->next
= rego
->arches
;
4800 this->gdbarch
= new_gdbarch
;
4801 rego
->arches
= this;
4804 /* Check that the newly installed architecture is valid. Plug in
4805 any post init values. */
4806 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4807 verify_gdbarch (new_gdbarch
);
4808 new_gdbarch
->initialized_p
= 1;
4811 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
4816 /* Make the specified architecture current. */
4819 set_target_gdbarch (struct gdbarch
*new_gdbarch
)
4821 gdb_assert (new_gdbarch
!= NULL
);
4822 gdb_assert (new_gdbarch
->initialized_p
);
4823 current_inferior ()->gdbarch
= new_gdbarch
;
4824 observer_notify_architecture_changed (new_gdbarch
);
4825 registers_changed ();
4828 /* Return the current inferior's arch. */
4831 target_gdbarch (void)
4833 return current_inferior ()->gdbarch
;
4836 extern void _initialize_gdbarch (void);
4839 _initialize_gdbarch (void)
4841 add_setshow_zuinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
4842 Set architecture debugging."), _("\
4843 Show architecture debugging."), _("\
4844 When non-zero, architecture debugging is enabled."),
4847 &setdebuglist
, &showdebuglist
);