1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2021 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''. */
27 #include "arch-utils.h"
33 #include "floatformat.h"
34 #include "reggroups.h"
36 #include "gdb_obstack.h"
37 #include "observable.h"
41 #include "frame-unwind.h"
42 #include "dummy-frame.h"
44 /* Static function declarations */
46 static void alloc_gdbarch_data (struct gdbarch
*);
48 /* Non-zero if we want to trace architecture code. */
51 #define GDBARCH_DEBUG 0
53 unsigned int gdbarch_debug
= GDBARCH_DEBUG
;
55 show_gdbarch_debug (struct ui_file
*file
, int from_tty
,
56 struct cmd_list_element
*c
, const char *value
)
58 fprintf_filtered (file
, _("Architecture debugging is %s.\n"), value
);
62 pformat (const struct floatformat
**format
)
67 /* Just print out one of them - this is only for diagnostics. */
68 return format
[0]->name
;
72 pstring (const char *string
)
80 pstring_ptr (char **string
)
82 if (string
== NULL
|| *string
== NULL
)
87 /* Helper function to print a list of strings, represented as "const
88 char *const *". The list is printed comma-separated. */
91 pstring_list (const char *const *list
)
101 for (p
= list
; *p
!= NULL
&& offset
< sizeof (ret
); ++p
)
103 size_t s
= xsnprintf (ret
+ offset
, sizeof (ret
) - offset
, "%s, ", *p
);
109 gdb_assert (offset
- 2 < sizeof (ret
));
110 ret
[offset
- 2] = '\0';
117 /* Maintain the struct gdbarch object. */
121 /* Has this architecture been fully initialized? */
124 /* An obstack bound to the lifetime of the architecture. */
125 struct obstack
*obstack
;
127 /* basic architectural information. */
128 const struct bfd_arch_info
* bfd_arch_info
;
129 enum bfd_endian byte_order
;
130 enum bfd_endian byte_order_for_code
;
131 enum gdb_osabi osabi
;
132 const struct target_desc
* target_desc
;
134 /* target specific vector. */
135 struct gdbarch_tdep
*tdep
;
136 gdbarch_dump_tdep_ftype
*dump_tdep
;
138 /* per-architecture data-pointers. */
142 /* Multi-arch values.
144 When extending this structure you must:
148 Declare set/get functions and define the corresponding
151 gdbarch_alloc(): If zero/NULL is not a suitable default,
152 initialize the new field.
154 verify_gdbarch(): Confirm that the target updated the field
157 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
160 get_gdbarch(): Implement the set/get functions (probably using
161 the macro's as shortcuts).
170 const struct floatformat
** bfloat16_format
;
172 const struct floatformat
** half_format
;
174 const struct floatformat
** float_format
;
176 const struct floatformat
** double_format
;
178 const struct floatformat
** long_double_format
;
181 gdbarch_floatformat_for_type_ftype
*floatformat_for_type
;
184 int dwarf2_addr_size
;
186 gdbarch_read_pc_ftype
*read_pc
;
187 gdbarch_write_pc_ftype
*write_pc
;
188 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
189 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
190 gdbarch_pseudo_register_read_value_ftype
*pseudo_register_read_value
;
191 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
194 gdbarch_ax_pseudo_register_collect_ftype
*ax_pseudo_register_collect
;
195 gdbarch_ax_pseudo_register_push_stack_ftype
*ax_pseudo_register_push_stack
;
196 gdbarch_report_signal_info_ftype
*report_signal_info
;
201 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
202 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
203 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
204 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
205 gdbarch_register_name_ftype
*register_name
;
206 gdbarch_register_type_ftype
*register_type
;
207 gdbarch_dummy_id_ftype
*dummy_id
;
208 int deprecated_fp_regnum
;
209 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
210 int call_dummy_location
;
211 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
212 gdbarch_code_of_frame_writable_ftype
*code_of_frame_writable
;
213 gdbarch_print_registers_info_ftype
*print_registers_info
;
214 gdbarch_print_float_info_ftype
*print_float_info
;
215 gdbarch_print_vector_info_ftype
*print_vector_info
;
216 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
217 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
218 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
219 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
220 int believe_pcc_promotion
;
221 gdbarch_convert_register_p_ftype
*convert_register_p
;
222 gdbarch_register_to_value_ftype
*register_to_value
;
223 gdbarch_value_to_register_ftype
*value_to_register
;
224 gdbarch_value_from_register_ftype
*value_from_register
;
225 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
226 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
227 gdbarch_integer_to_address_ftype
*integer_to_address
;
228 gdbarch_return_value_ftype
*return_value
;
229 gdbarch_return_in_first_hidden_param_p_ftype
*return_in_first_hidden_param_p
;
230 gdbarch_skip_prologue_ftype
*skip_prologue
;
231 gdbarch_skip_main_prologue_ftype
*skip_main_prologue
;
232 gdbarch_skip_entrypoint_ftype
*skip_entrypoint
;
233 gdbarch_inner_than_ftype
*inner_than
;
234 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
235 gdbarch_breakpoint_kind_from_pc_ftype
*breakpoint_kind_from_pc
;
236 gdbarch_sw_breakpoint_from_kind_ftype
*sw_breakpoint_from_kind
;
237 gdbarch_breakpoint_kind_from_current_state_ftype
*breakpoint_kind_from_current_state
;
238 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
239 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
240 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
241 CORE_ADDR decr_pc_after_break
;
242 CORE_ADDR deprecated_function_start_offset
;
243 gdbarch_remote_register_number_ftype
*remote_register_number
;
244 gdbarch_fetch_tls_load_module_address_ftype
*fetch_tls_load_module_address
;
245 gdbarch_get_thread_local_address_ftype
*get_thread_local_address
;
246 CORE_ADDR frame_args_skip
;
247 gdbarch_unwind_pc_ftype
*unwind_pc
;
248 gdbarch_unwind_sp_ftype
*unwind_sp
;
249 gdbarch_frame_num_args_ftype
*frame_num_args
;
250 gdbarch_frame_align_ftype
*frame_align
;
251 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
252 int frame_red_zone_size
;
253 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
254 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
255 int significant_addr_bit
;
256 gdbarch_software_single_step_ftype
*software_single_step
;
257 gdbarch_single_step_through_delay_ftype
*single_step_through_delay
;
258 gdbarch_print_insn_ftype
*print_insn
;
259 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
260 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
261 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
262 gdbarch_in_indirect_branch_thunk_ftype
*in_indirect_branch_thunk
;
263 gdbarch_stack_frame_destroyed_p_ftype
*stack_frame_destroyed_p
;
264 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
265 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
266 gdbarch_make_symbol_special_ftype
*make_symbol_special
;
267 gdbarch_adjust_dwarf2_addr_ftype
*adjust_dwarf2_addr
;
268 gdbarch_adjust_dwarf2_line_ftype
*adjust_dwarf2_line
;
269 int cannot_step_breakpoint
;
270 int have_nonsteppable_watchpoint
;
271 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
272 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
273 gdbarch_execute_dwarf_cfa_vendor_op_ftype
*execute_dwarf_cfa_vendor_op
;
274 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
275 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
276 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
277 gdbarch_iterate_over_regset_sections_ftype
*iterate_over_regset_sections
;
278 gdbarch_make_corefile_notes_ftype
*make_corefile_notes
;
279 gdbarch_find_memory_regions_ftype
*find_memory_regions
;
280 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
281 gdbarch_core_xfer_shared_libraries_aix_ftype
*core_xfer_shared_libraries_aix
;
282 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
283 gdbarch_core_thread_name_ftype
*core_thread_name
;
284 gdbarch_core_xfer_siginfo_ftype
*core_xfer_siginfo
;
285 const char * gcore_bfd_target
;
286 int vtable_function_descriptors
;
288 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
289 ULONGEST max_insn_length
;
290 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
291 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
292 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
293 gdbarch_displaced_step_prepare_ftype
*displaced_step_prepare
;
294 gdbarch_displaced_step_finish_ftype
*displaced_step_finish
;
295 gdbarch_displaced_step_copy_insn_closure_by_addr_ftype
*displaced_step_copy_insn_closure_by_addr
;
296 gdbarch_displaced_step_restore_all_in_ptid_ftype
*displaced_step_restore_all_in_ptid
;
297 gdbarch_relocate_instruction_ftype
*relocate_instruction
;
298 gdbarch_overlay_update_ftype
*overlay_update
;
299 gdbarch_core_read_description_ftype
*core_read_description
;
300 int sofun_address_maybe_missing
;
301 gdbarch_process_record_ftype
*process_record
;
302 gdbarch_process_record_signal_ftype
*process_record_signal
;
303 gdbarch_gdb_signal_from_target_ftype
*gdb_signal_from_target
;
304 gdbarch_gdb_signal_to_target_ftype
*gdb_signal_to_target
;
305 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
306 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
307 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
308 const char * xml_syscall_file
;
309 struct syscalls_info
* syscalls_info
;
310 const char *const * stap_integer_prefixes
;
311 const char *const * stap_integer_suffixes
;
312 const char *const * stap_register_prefixes
;
313 const char *const * stap_register_suffixes
;
314 const char *const * stap_register_indirection_prefixes
;
315 const char *const * stap_register_indirection_suffixes
;
316 const char * stap_gdb_register_prefix
;
317 const char * stap_gdb_register_suffix
;
318 gdbarch_stap_is_single_operand_ftype
*stap_is_single_operand
;
319 gdbarch_stap_parse_special_token_ftype
*stap_parse_special_token
;
320 gdbarch_stap_adjust_register_ftype
*stap_adjust_register
;
321 gdbarch_dtrace_parse_probe_argument_ftype
*dtrace_parse_probe_argument
;
322 gdbarch_dtrace_probe_is_enabled_ftype
*dtrace_probe_is_enabled
;
323 gdbarch_dtrace_enable_probe_ftype
*dtrace_enable_probe
;
324 gdbarch_dtrace_disable_probe_ftype
*dtrace_disable_probe
;
325 int has_global_solist
;
326 int has_global_breakpoints
;
327 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
328 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
329 gdbarch_guess_tracepoint_registers_ftype
*guess_tracepoint_registers
;
330 gdbarch_auto_charset_ftype
*auto_charset
;
331 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
332 const char * solib_symbols_extension
;
333 int has_dos_based_file_system
;
334 gdbarch_gen_return_address_ftype
*gen_return_address
;
335 gdbarch_info_proc_ftype
*info_proc
;
336 gdbarch_core_info_proc_ftype
*core_info_proc
;
337 gdbarch_iterate_over_objfiles_in_search_order_ftype
*iterate_over_objfiles_in_search_order
;
338 struct ravenscar_arch_ops
* ravenscar_ops
;
339 gdbarch_insn_is_call_ftype
*insn_is_call
;
340 gdbarch_insn_is_ret_ftype
*insn_is_ret
;
341 gdbarch_insn_is_jump_ftype
*insn_is_jump
;
342 gdbarch_program_breakpoint_here_p_ftype
*program_breakpoint_here_p
;
343 gdbarch_auxv_parse_ftype
*auxv_parse
;
344 gdbarch_print_auxv_entry_ftype
*print_auxv_entry
;
345 gdbarch_vsyscall_range_ftype
*vsyscall_range
;
346 gdbarch_infcall_mmap_ftype
*infcall_mmap
;
347 gdbarch_infcall_munmap_ftype
*infcall_munmap
;
348 gdbarch_gcc_target_options_ftype
*gcc_target_options
;
349 gdbarch_gnu_triplet_regexp_ftype
*gnu_triplet_regexp
;
350 gdbarch_addressable_memory_unit_size_ftype
*addressable_memory_unit_size
;
351 const char * disassembler_options_implicit
;
352 char ** disassembler_options
;
353 const disasm_options_and_args_t
* valid_disassembler_options
;
354 gdbarch_type_align_ftype
*type_align
;
355 gdbarch_get_pc_address_flags_ftype
*get_pc_address_flags
;
356 gdbarch_read_core_file_mappings_ftype
*read_core_file_mappings
;
359 /* Create a new ``struct gdbarch'' based on information provided by
360 ``struct gdbarch_info''. */
363 gdbarch_alloc (const struct gdbarch_info
*info
,
364 struct gdbarch_tdep
*tdep
)
366 struct gdbarch
*gdbarch
;
368 /* Create an obstack for allocating all the per-architecture memory,
369 then use that to allocate the architecture vector. */
370 struct obstack
*obstack
= XNEW (struct obstack
);
371 obstack_init (obstack
);
372 gdbarch
= XOBNEW (obstack
, struct gdbarch
);
373 memset (gdbarch
, 0, sizeof (*gdbarch
));
374 gdbarch
->obstack
= obstack
;
376 alloc_gdbarch_data (gdbarch
);
378 gdbarch
->tdep
= tdep
;
380 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
381 gdbarch
->byte_order
= info
->byte_order
;
382 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
383 gdbarch
->osabi
= info
->osabi
;
384 gdbarch
->target_desc
= info
->target_desc
;
386 /* Force the explicit initialization of these. */
387 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
388 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
389 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
390 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
391 gdbarch
->bfloat16_bit
= 2*TARGET_CHAR_BIT
;
392 gdbarch
->half_bit
= 2*TARGET_CHAR_BIT
;
393 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
394 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
395 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
396 gdbarch
->wchar_bit
= 4*TARGET_CHAR_BIT
;
397 gdbarch
->wchar_signed
= -1;
398 gdbarch
->floatformat_for_type
= default_floatformat_for_type
;
399 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
400 gdbarch
->char_signed
= -1;
401 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
402 gdbarch
->num_regs
= -1;
403 gdbarch
->sp_regnum
= -1;
404 gdbarch
->pc_regnum
= -1;
405 gdbarch
->ps_regnum
= -1;
406 gdbarch
->fp0_regnum
= -1;
407 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
408 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
409 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
410 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
411 gdbarch
->dummy_id
= default_dummy_id
;
412 gdbarch
->deprecated_fp_regnum
= -1;
413 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
414 gdbarch
->code_of_frame_writable
= default_code_of_frame_writable
;
415 gdbarch
->print_registers_info
= default_print_registers_info
;
416 gdbarch
->print_float_info
= default_print_float_info
;
417 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
418 gdbarch
->cannot_fetch_register
= cannot_register_not
;
419 gdbarch
->cannot_store_register
= cannot_register_not
;
420 gdbarch
->convert_register_p
= generic_convert_register_p
;
421 gdbarch
->value_from_register
= default_value_from_register
;
422 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
423 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
424 gdbarch
->return_in_first_hidden_param_p
= default_return_in_first_hidden_param_p
;
425 gdbarch
->breakpoint_from_pc
= default_breakpoint_from_pc
;
426 gdbarch
->sw_breakpoint_from_kind
= NULL
;
427 gdbarch
->breakpoint_kind_from_current_state
= default_breakpoint_kind_from_current_state
;
428 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
429 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
430 gdbarch
->remote_register_number
= default_remote_register_number
;
431 gdbarch
->unwind_pc
= default_unwind_pc
;
432 gdbarch
->unwind_sp
= default_unwind_sp
;
433 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
434 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
435 gdbarch
->addr_bits_remove
= core_addr_identity
;
436 gdbarch
->print_insn
= default_print_insn
;
437 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
438 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
439 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
440 gdbarch
->in_indirect_branch_thunk
= default_in_indirect_branch_thunk
;
441 gdbarch
->stack_frame_destroyed_p
= generic_stack_frame_destroyed_p
;
442 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
443 gdbarch
->make_symbol_special
= default_make_symbol_special
;
444 gdbarch
->adjust_dwarf2_addr
= default_adjust_dwarf2_addr
;
445 gdbarch
->adjust_dwarf2_line
= default_adjust_dwarf2_line
;
446 gdbarch
->execute_dwarf_cfa_vendor_op
= default_execute_dwarf_cfa_vendor_op
;
447 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
448 gdbarch
->skip_permanent_breakpoint
= default_skip_permanent_breakpoint
;
449 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
450 gdbarch
->displaced_step_fixup
= NULL
;
451 gdbarch
->displaced_step_finish
= NULL
;
452 gdbarch
->relocate_instruction
= NULL
;
453 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
454 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
455 gdbarch
->guess_tracepoint_registers
= default_guess_tracepoint_registers
;
456 gdbarch
->auto_charset
= default_auto_charset
;
457 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
458 gdbarch
->gen_return_address
= default_gen_return_address
;
459 gdbarch
->iterate_over_objfiles_in_search_order
= default_iterate_over_objfiles_in_search_order
;
460 gdbarch
->ravenscar_ops
= NULL
;
461 gdbarch
->insn_is_call
= default_insn_is_call
;
462 gdbarch
->insn_is_ret
= default_insn_is_ret
;
463 gdbarch
->insn_is_jump
= default_insn_is_jump
;
464 gdbarch
->program_breakpoint_here_p
= default_program_breakpoint_here_p
;
465 gdbarch
->print_auxv_entry
= default_print_auxv_entry
;
466 gdbarch
->vsyscall_range
= default_vsyscall_range
;
467 gdbarch
->infcall_mmap
= default_infcall_mmap
;
468 gdbarch
->infcall_munmap
= default_infcall_munmap
;
469 gdbarch
->gcc_target_options
= default_gcc_target_options
;
470 gdbarch
->gnu_triplet_regexp
= default_gnu_triplet_regexp
;
471 gdbarch
->addressable_memory_unit_size
= default_addressable_memory_unit_size
;
472 gdbarch
->type_align
= default_type_align
;
473 gdbarch
->get_pc_address_flags
= default_get_pc_address_flags
;
474 gdbarch
->read_core_file_mappings
= default_read_core_file_mappings
;
475 /* gdbarch_alloc() */
482 obstack
*gdbarch_obstack (gdbarch
*arch
)
484 return arch
->obstack
;
490 gdbarch_obstack_strdup (struct gdbarch
*arch
, const char *string
)
492 return obstack_strdup (arch
->obstack
, string
);
496 /* Free a gdbarch struct. This should never happen in normal
497 operation --- once you've created a gdbarch, you keep it around.
498 However, if an architecture's init function encounters an error
499 building the structure, it may need to clean up a partially
500 constructed gdbarch. */
503 gdbarch_free (struct gdbarch
*arch
)
505 struct obstack
*obstack
;
507 gdb_assert (arch
!= NULL
);
508 gdb_assert (!arch
->initialized_p
);
509 obstack
= arch
->obstack
;
510 obstack_free (obstack
, 0); /* Includes the ARCH. */
515 /* Ensure that all values in a GDBARCH are reasonable. */
518 verify_gdbarch (struct gdbarch
*gdbarch
)
523 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
524 log
.puts ("\n\tbyte-order");
525 if (gdbarch
->bfd_arch_info
== NULL
)
526 log
.puts ("\n\tbfd_arch_info");
527 /* Check those that need to be defined for the given multi-arch level. */
528 /* Skip verify of short_bit, invalid_p == 0 */
529 /* Skip verify of int_bit, invalid_p == 0 */
530 /* Skip verify of long_bit, invalid_p == 0 */
531 /* Skip verify of long_long_bit, invalid_p == 0 */
532 /* Skip verify of bfloat16_bit, invalid_p == 0 */
533 if (gdbarch
->bfloat16_format
== 0)
534 gdbarch
->bfloat16_format
= floatformats_bfloat16
;
535 /* Skip verify of half_bit, invalid_p == 0 */
536 if (gdbarch
->half_format
== 0)
537 gdbarch
->half_format
= floatformats_ieee_half
;
538 /* Skip verify of float_bit, invalid_p == 0 */
539 if (gdbarch
->float_format
== 0)
540 gdbarch
->float_format
= floatformats_ieee_single
;
541 /* Skip verify of double_bit, invalid_p == 0 */
542 if (gdbarch
->double_format
== 0)
543 gdbarch
->double_format
= floatformats_ieee_double
;
544 /* Skip verify of long_double_bit, invalid_p == 0 */
545 if (gdbarch
->long_double_format
== 0)
546 gdbarch
->long_double_format
= floatformats_ieee_double
;
547 /* Skip verify of wchar_bit, invalid_p == 0 */
548 if (gdbarch
->wchar_signed
== -1)
549 gdbarch
->wchar_signed
= 1;
550 /* Skip verify of floatformat_for_type, invalid_p == 0 */
551 /* Skip verify of ptr_bit, invalid_p == 0 */
552 if (gdbarch
->addr_bit
== 0)
553 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
554 if (gdbarch
->dwarf2_addr_size
== 0)
555 gdbarch
->dwarf2_addr_size
= gdbarch_ptr_bit (gdbarch
) / TARGET_CHAR_BIT
;
556 if (gdbarch
->char_signed
== -1)
557 gdbarch
->char_signed
= 1;
558 /* Skip verify of read_pc, has predicate. */
559 /* Skip verify of write_pc, has predicate. */
560 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
561 /* Skip verify of pseudo_register_read, has predicate. */
562 /* Skip verify of pseudo_register_read_value, has predicate. */
563 /* Skip verify of pseudo_register_write, has predicate. */
564 if (gdbarch
->num_regs
== -1)
565 log
.puts ("\n\tnum_regs");
566 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
567 /* Skip verify of ax_pseudo_register_collect, has predicate. */
568 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
569 /* Skip verify of report_signal_info, has predicate. */
570 /* Skip verify of sp_regnum, invalid_p == 0 */
571 /* Skip verify of pc_regnum, invalid_p == 0 */
572 /* Skip verify of ps_regnum, invalid_p == 0 */
573 /* Skip verify of fp0_regnum, invalid_p == 0 */
574 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
575 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
576 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
577 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
578 if (gdbarch
->register_name
== 0)
579 log
.puts ("\n\tregister_name");
580 /* Skip verify of register_type, has predicate. */
581 /* Skip verify of dummy_id, invalid_p == 0 */
582 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
583 /* Skip verify of push_dummy_call, has predicate. */
584 /* Skip verify of call_dummy_location, invalid_p == 0 */
585 /* Skip verify of push_dummy_code, has predicate. */
586 /* Skip verify of code_of_frame_writable, invalid_p == 0 */
587 /* Skip verify of print_registers_info, invalid_p == 0 */
588 /* Skip verify of print_float_info, invalid_p == 0 */
589 /* Skip verify of print_vector_info, has predicate. */
590 /* Skip verify of register_sim_regno, invalid_p == 0 */
591 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
592 /* Skip verify of cannot_store_register, invalid_p == 0 */
593 /* Skip verify of get_longjmp_target, has predicate. */
594 /* Skip verify of convert_register_p, invalid_p == 0 */
595 /* Skip verify of value_from_register, invalid_p == 0 */
596 /* Skip verify of pointer_to_address, invalid_p == 0 */
597 /* Skip verify of address_to_pointer, invalid_p == 0 */
598 /* Skip verify of integer_to_address, has predicate. */
599 /* Skip verify of return_value, has predicate. */
600 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
601 if (gdbarch
->skip_prologue
== 0)
602 log
.puts ("\n\tskip_prologue");
603 /* Skip verify of skip_main_prologue, has predicate. */
604 /* Skip verify of skip_entrypoint, has predicate. */
605 if (gdbarch
->inner_than
== 0)
606 log
.puts ("\n\tinner_than");
607 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
608 if (gdbarch
->breakpoint_kind_from_pc
== 0)
609 log
.puts ("\n\tbreakpoint_kind_from_pc");
610 /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
611 /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */
612 /* Skip verify of adjust_breakpoint_address, has predicate. */
613 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
614 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
615 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
616 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
617 /* Skip verify of remote_register_number, invalid_p == 0 */
618 /* Skip verify of fetch_tls_load_module_address, has predicate. */
619 /* Skip verify of get_thread_local_address, has predicate. */
620 /* Skip verify of frame_args_skip, invalid_p == 0 */
621 /* Skip verify of unwind_pc, invalid_p == 0 */
622 /* Skip verify of unwind_sp, invalid_p == 0 */
623 /* Skip verify of frame_num_args, has predicate. */
624 /* Skip verify of frame_align, has predicate. */
625 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
626 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
627 /* Skip verify of addr_bits_remove, invalid_p == 0 */
628 /* Skip verify of significant_addr_bit, invalid_p == 0 */
629 /* Skip verify of software_single_step, has predicate. */
630 /* Skip verify of single_step_through_delay, has predicate. */
631 /* Skip verify of print_insn, invalid_p == 0 */
632 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
633 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
634 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
635 /* Skip verify of in_indirect_branch_thunk, invalid_p == 0 */
636 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
637 /* Skip verify of elf_make_msymbol_special, has predicate. */
638 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
639 /* Skip verify of make_symbol_special, invalid_p == 0 */
640 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
641 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
642 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
643 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
644 /* Skip verify of address_class_type_flags, has predicate. */
645 /* Skip verify of address_class_type_flags_to_name, has predicate. */
646 /* Skip verify of execute_dwarf_cfa_vendor_op, invalid_p == 0 */
647 /* Skip verify of address_class_name_to_type_flags, has predicate. */
648 /* Skip verify of register_reggroup_p, invalid_p == 0 */
649 /* Skip verify of fetch_pointer_argument, has predicate. */
650 /* Skip verify of iterate_over_regset_sections, has predicate. */
651 /* Skip verify of make_corefile_notes, has predicate. */
652 /* Skip verify of find_memory_regions, has predicate. */
653 /* Skip verify of core_xfer_shared_libraries, has predicate. */
654 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
655 /* Skip verify of core_pid_to_str, has predicate. */
656 /* Skip verify of core_thread_name, has predicate. */
657 /* Skip verify of core_xfer_siginfo, has predicate. */
658 /* Skip verify of gcore_bfd_target, has predicate. */
659 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
660 /* Skip verify of vbit_in_delta, invalid_p == 0 */
661 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
662 /* Skip verify of max_insn_length, has predicate. */
663 /* Skip verify of displaced_step_copy_insn, has predicate. */
664 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
665 /* Skip verify of displaced_step_fixup, has predicate. */
666 /* Skip verify of displaced_step_prepare, has predicate. */
667 if ((! gdbarch
->displaced_step_finish
) != (! gdbarch
->displaced_step_prepare
))
668 log
.puts ("\n\tdisplaced_step_finish");
669 /* Skip verify of displaced_step_copy_insn_closure_by_addr, has predicate. */
670 /* Skip verify of relocate_instruction, has predicate. */
671 /* Skip verify of overlay_update, has predicate. */
672 /* Skip verify of core_read_description, has predicate. */
673 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
674 /* Skip verify of process_record, has predicate. */
675 /* Skip verify of process_record_signal, has predicate. */
676 /* Skip verify of gdb_signal_from_target, has predicate. */
677 /* Skip verify of gdb_signal_to_target, has predicate. */
678 /* Skip verify of get_siginfo_type, has predicate. */
679 /* Skip verify of record_special_symbol, has predicate. */
680 /* Skip verify of get_syscall_number, has predicate. */
681 /* Skip verify of xml_syscall_file, invalid_p == 0 */
682 /* Skip verify of syscalls_info, invalid_p == 0 */
683 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
684 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
685 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
686 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
687 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
688 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
689 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
690 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
691 /* Skip verify of stap_is_single_operand, has predicate. */
692 /* Skip verify of stap_parse_special_token, has predicate. */
693 /* Skip verify of stap_adjust_register, has predicate. */
694 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
695 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
696 /* Skip verify of dtrace_enable_probe, has predicate. */
697 /* Skip verify of dtrace_disable_probe, has predicate. */
698 /* Skip verify of has_global_solist, invalid_p == 0 */
699 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
700 /* Skip verify of has_shared_address_space, invalid_p == 0 */
701 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
702 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
703 /* Skip verify of auto_charset, invalid_p == 0 */
704 /* Skip verify of auto_wide_charset, invalid_p == 0 */
705 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
706 /* Skip verify of gen_return_address, invalid_p == 0 */
707 /* Skip verify of info_proc, has predicate. */
708 /* Skip verify of core_info_proc, has predicate. */
709 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
710 /* Skip verify of ravenscar_ops, invalid_p == 0 */
711 /* Skip verify of insn_is_call, invalid_p == 0 */
712 /* Skip verify of insn_is_ret, invalid_p == 0 */
713 /* Skip verify of insn_is_jump, invalid_p == 0 */
714 /* Skip verify of program_breakpoint_here_p, invalid_p == 0 */
715 /* Skip verify of auxv_parse, has predicate. */
716 /* Skip verify of print_auxv_entry, invalid_p == 0 */
717 /* Skip verify of vsyscall_range, invalid_p == 0 */
718 /* Skip verify of infcall_mmap, invalid_p == 0 */
719 /* Skip verify of infcall_munmap, invalid_p == 0 */
720 /* Skip verify of gcc_target_options, invalid_p == 0 */
721 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
722 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
723 /* Skip verify of disassembler_options_implicit, invalid_p == 0 */
724 /* Skip verify of disassembler_options, invalid_p == 0 */
725 /* Skip verify of valid_disassembler_options, invalid_p == 0 */
726 /* Skip verify of type_align, invalid_p == 0 */
727 /* Skip verify of get_pc_address_flags, invalid_p == 0 */
728 /* Skip verify of read_core_file_mappings, invalid_p == 0 */
730 internal_error (__FILE__
, __LINE__
,
731 _("verify_gdbarch: the following are invalid ...%s"),
736 /* Print out the details of the current architecture. */
739 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
741 const char *gdb_nm_file
= "<not-defined>";
743 #if defined (GDB_NM_FILE)
744 gdb_nm_file
= GDB_NM_FILE
;
746 fprintf_unfiltered (file
,
747 "gdbarch_dump: GDB_NM_FILE = %s\n",
749 fprintf_unfiltered (file
,
750 "gdbarch_dump: addr_bit = %s\n",
751 plongest (gdbarch
->addr_bit
));
752 fprintf_unfiltered (file
,
753 "gdbarch_dump: addr_bits_remove = <%s>\n",
754 host_address_to_string (gdbarch
->addr_bits_remove
));
755 fprintf_unfiltered (file
,
756 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
757 gdbarch_address_class_name_to_type_flags_p (gdbarch
));
758 fprintf_unfiltered (file
,
759 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
760 host_address_to_string (gdbarch
->address_class_name_to_type_flags
));
761 fprintf_unfiltered (file
,
762 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
763 gdbarch_address_class_type_flags_p (gdbarch
));
764 fprintf_unfiltered (file
,
765 "gdbarch_dump: address_class_type_flags = <%s>\n",
766 host_address_to_string (gdbarch
->address_class_type_flags
));
767 fprintf_unfiltered (file
,
768 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
769 gdbarch_address_class_type_flags_to_name_p (gdbarch
));
770 fprintf_unfiltered (file
,
771 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
772 host_address_to_string (gdbarch
->address_class_type_flags_to_name
));
773 fprintf_unfiltered (file
,
774 "gdbarch_dump: address_to_pointer = <%s>\n",
775 host_address_to_string (gdbarch
->address_to_pointer
));
776 fprintf_unfiltered (file
,
777 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
778 host_address_to_string (gdbarch
->addressable_memory_unit_size
));
779 fprintf_unfiltered (file
,
780 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
781 gdbarch_adjust_breakpoint_address_p (gdbarch
));
782 fprintf_unfiltered (file
,
783 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
784 host_address_to_string (gdbarch
->adjust_breakpoint_address
));
785 fprintf_unfiltered (file
,
786 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
787 host_address_to_string (gdbarch
->adjust_dwarf2_addr
));
788 fprintf_unfiltered (file
,
789 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
790 host_address_to_string (gdbarch
->adjust_dwarf2_line
));
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: auto_charset = <%s>\n",
793 host_address_to_string (gdbarch
->auto_charset
));
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: auto_wide_charset = <%s>\n",
796 host_address_to_string (gdbarch
->auto_wide_charset
));
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
799 gdbarch_auxv_parse_p (gdbarch
));
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: auxv_parse = <%s>\n",
802 host_address_to_string (gdbarch
->auxv_parse
));
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
805 gdbarch_ax_pseudo_register_collect_p (gdbarch
));
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
808 host_address_to_string (gdbarch
->ax_pseudo_register_collect
));
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
811 gdbarch_ax_pseudo_register_push_stack_p (gdbarch
));
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
814 host_address_to_string (gdbarch
->ax_pseudo_register_push_stack
));
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: believe_pcc_promotion = %s\n",
817 plongest (gdbarch
->believe_pcc_promotion
));
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: bfd_arch_info = %s\n",
820 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: bfloat16_bit = %s\n",
823 plongest (gdbarch
->bfloat16_bit
));
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: bfloat16_format = %s\n",
826 pformat (gdbarch
->bfloat16_format
));
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
829 host_address_to_string (gdbarch
->breakpoint_from_pc
));
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n",
832 host_address_to_string (gdbarch
->breakpoint_kind_from_current_state
));
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
835 host_address_to_string (gdbarch
->breakpoint_kind_from_pc
));
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: byte_order = %s\n",
838 plongest (gdbarch
->byte_order
));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: byte_order_for_code = %s\n",
841 plongest (gdbarch
->byte_order_for_code
));
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: call_dummy_location = %s\n",
844 plongest (gdbarch
->call_dummy_location
));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: cannot_fetch_register = <%s>\n",
847 host_address_to_string (gdbarch
->cannot_fetch_register
));
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: cannot_step_breakpoint = %s\n",
850 plongest (gdbarch
->cannot_step_breakpoint
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: cannot_store_register = <%s>\n",
853 host_address_to_string (gdbarch
->cannot_store_register
));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: char_signed = %s\n",
856 plongest (gdbarch
->char_signed
));
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: code_of_frame_writable = <%s>\n",
859 host_address_to_string (gdbarch
->code_of_frame_writable
));
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
862 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
865 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: convert_register_p = <%s>\n",
868 host_address_to_string (gdbarch
->convert_register_p
));
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
871 gdbarch_core_info_proc_p (gdbarch
));
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: core_info_proc = <%s>\n",
874 host_address_to_string (gdbarch
->core_info_proc
));
875 fprintf_unfiltered (file
,
876 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
877 gdbarch_core_pid_to_str_p (gdbarch
));
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: core_pid_to_str = <%s>\n",
880 host_address_to_string (gdbarch
->core_pid_to_str
));
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
883 gdbarch_core_read_description_p (gdbarch
));
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: core_read_description = <%s>\n",
886 host_address_to_string (gdbarch
->core_read_description
));
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
889 gdbarch_core_thread_name_p (gdbarch
));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: core_thread_name = <%s>\n",
892 host_address_to_string (gdbarch
->core_thread_name
));
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
895 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
898 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
901 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch
));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
904 host_address_to_string (gdbarch
->core_xfer_shared_libraries_aix
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: gdbarch_core_xfer_siginfo_p() = %d\n",
907 gdbarch_core_xfer_siginfo_p (gdbarch
));
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: core_xfer_siginfo = <%s>\n",
910 host_address_to_string (gdbarch
->core_xfer_siginfo
));
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: decr_pc_after_break = %s\n",
913 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: deprecated_fp_regnum = %s\n",
916 plongest (gdbarch
->deprecated_fp_regnum
));
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: deprecated_function_start_offset = %s\n",
919 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: disassembler_options = %s\n",
922 pstring_ptr (gdbarch
->disassembler_options
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: disassembler_options_implicit = %s\n",
925 pstring (gdbarch
->disassembler_options_implicit
));
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
928 gdbarch_displaced_step_copy_insn_p (gdbarch
));
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
931 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: gdbarch_displaced_step_copy_insn_closure_by_addr_p() = %d\n",
934 gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch
));
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: displaced_step_copy_insn_closure_by_addr = <%s>\n",
937 host_address_to_string (gdbarch
->displaced_step_copy_insn_closure_by_addr
));
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: displaced_step_finish = <%s>\n",
940 host_address_to_string (gdbarch
->displaced_step_finish
));
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
943 gdbarch_displaced_step_fixup_p (gdbarch
));
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: displaced_step_fixup = <%s>\n",
946 host_address_to_string (gdbarch
->displaced_step_fixup
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
949 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: gdbarch_displaced_step_prepare_p() = %d\n",
952 gdbarch_displaced_step_prepare_p (gdbarch
));
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: displaced_step_prepare = <%s>\n",
955 host_address_to_string (gdbarch
->displaced_step_prepare
));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: displaced_step_restore_all_in_ptid = <%s>\n",
958 host_address_to_string (gdbarch
->displaced_step_restore_all_in_ptid
));
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: double_bit = %s\n",
961 plongest (gdbarch
->double_bit
));
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: double_format = %s\n",
964 pformat (gdbarch
->double_format
));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
967 gdbarch_dtrace_disable_probe_p (gdbarch
));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
970 host_address_to_string (gdbarch
->dtrace_disable_probe
));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
973 gdbarch_dtrace_enable_probe_p (gdbarch
));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
976 host_address_to_string (gdbarch
->dtrace_enable_probe
));
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
979 gdbarch_dtrace_parse_probe_argument_p (gdbarch
));
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
982 host_address_to_string (gdbarch
->dtrace_parse_probe_argument
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
985 gdbarch_dtrace_probe_is_enabled_p (gdbarch
));
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
988 host_address_to_string (gdbarch
->dtrace_probe_is_enabled
));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: dummy_id = <%s>\n",
991 host_address_to_string (gdbarch
->dummy_id
));
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: dwarf2_addr_size = %s\n",
994 plongest (gdbarch
->dwarf2_addr_size
));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
997 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
1000 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
1003 gdbarch_elf_make_msymbol_special_p (gdbarch
));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
1006 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: execute_dwarf_cfa_vendor_op = <%s>\n",
1009 host_address_to_string (gdbarch
->execute_dwarf_cfa_vendor_op
));
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
1012 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1015 gdbarch_fetch_pointer_argument_p (gdbarch
));
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
1018 host_address_to_string (gdbarch
->fetch_pointer_argument
));
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1021 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
1024 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
1027 gdbarch_find_memory_regions_p (gdbarch
));
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: find_memory_regions = <%s>\n",
1030 host_address_to_string (gdbarch
->find_memory_regions
));
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: float_bit = %s\n",
1033 plongest (gdbarch
->float_bit
));
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: float_format = %s\n",
1036 pformat (gdbarch
->float_format
));
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: floatformat_for_type = <%s>\n",
1039 host_address_to_string (gdbarch
->floatformat_for_type
));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: fp0_regnum = %s\n",
1042 plongest (gdbarch
->fp0_regnum
));
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1045 gdbarch_frame_align_p (gdbarch
));
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: frame_align = <%s>\n",
1048 host_address_to_string (gdbarch
->frame_align
));
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: frame_args_skip = %s\n",
1051 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1054 gdbarch_frame_num_args_p (gdbarch
));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: frame_num_args = <%s>\n",
1057 host_address_to_string (gdbarch
->frame_num_args
));
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: frame_red_zone_size = %s\n",
1060 plongest (gdbarch
->frame_red_zone_size
));
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: gcc_target_options = <%s>\n",
1063 host_address_to_string (gdbarch
->gcc_target_options
));
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1066 gdbarch_gcore_bfd_target_p (gdbarch
));
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: gcore_bfd_target = %s\n",
1069 pstring (gdbarch
->gcore_bfd_target
));
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1072 gdbarch_gdb_signal_from_target_p (gdbarch
));
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1075 host_address_to_string (gdbarch
->gdb_signal_from_target
));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1078 gdbarch_gdb_signal_to_target_p (gdbarch
));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1081 host_address_to_string (gdbarch
->gdb_signal_to_target
));
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: gen_return_address = <%s>\n",
1084 host_address_to_string (gdbarch
->gen_return_address
));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1087 gdbarch_get_longjmp_target_p (gdbarch
));
1088 fprintf_unfiltered (file
,
1089 "gdbarch_dump: get_longjmp_target = <%s>\n",
1090 host_address_to_string (gdbarch
->get_longjmp_target
));
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: get_pc_address_flags = <%s>\n",
1093 host_address_to_string (gdbarch
->get_pc_address_flags
));
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1096 gdbarch_get_siginfo_type_p (gdbarch
));
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: get_siginfo_type = <%s>\n",
1099 host_address_to_string (gdbarch
->get_siginfo_type
));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1102 gdbarch_get_syscall_number_p (gdbarch
));
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: get_syscall_number = <%s>\n",
1105 host_address_to_string (gdbarch
->get_syscall_number
));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: gdbarch_get_thread_local_address_p() = %d\n",
1108 gdbarch_get_thread_local_address_p (gdbarch
));
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: get_thread_local_address = <%s>\n",
1111 host_address_to_string (gdbarch
->get_thread_local_address
));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1114 host_address_to_string (gdbarch
->gnu_triplet_regexp
));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1117 host_address_to_string (gdbarch
->guess_tracepoint_registers
));
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: half_bit = %s\n",
1120 plongest (gdbarch
->half_bit
));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: half_format = %s\n",
1123 pformat (gdbarch
->half_format
));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: has_dos_based_file_system = %s\n",
1126 plongest (gdbarch
->has_dos_based_file_system
));
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: has_global_breakpoints = %s\n",
1129 plongest (gdbarch
->has_global_breakpoints
));
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: has_global_solist = %s\n",
1132 plongest (gdbarch
->has_global_solist
));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: has_shared_address_space = <%s>\n",
1135 host_address_to_string (gdbarch
->has_shared_address_space
));
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1138 plongest (gdbarch
->have_nonsteppable_watchpoint
));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: in_indirect_branch_thunk = <%s>\n",
1141 host_address_to_string (gdbarch
->in_indirect_branch_thunk
));
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1144 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: infcall_mmap = <%s>\n",
1147 host_address_to_string (gdbarch
->infcall_mmap
));
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: infcall_munmap = <%s>\n",
1150 host_address_to_string (gdbarch
->infcall_munmap
));
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1153 gdbarch_info_proc_p (gdbarch
));
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: info_proc = <%s>\n",
1156 host_address_to_string (gdbarch
->info_proc
));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: inner_than = <%s>\n",
1159 host_address_to_string (gdbarch
->inner_than
));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: insn_is_call = <%s>\n",
1162 host_address_to_string (gdbarch
->insn_is_call
));
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: insn_is_jump = <%s>\n",
1165 host_address_to_string (gdbarch
->insn_is_jump
));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: insn_is_ret = <%s>\n",
1168 host_address_to_string (gdbarch
->insn_is_ret
));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: int_bit = %s\n",
1171 plongest (gdbarch
->int_bit
));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1174 gdbarch_integer_to_address_p (gdbarch
));
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: integer_to_address = <%s>\n",
1177 host_address_to_string (gdbarch
->integer_to_address
));
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1180 host_address_to_string (gdbarch
->iterate_over_objfiles_in_search_order
));
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1183 gdbarch_iterate_over_regset_sections_p (gdbarch
));
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1186 host_address_to_string (gdbarch
->iterate_over_regset_sections
));
1187 fprintf_unfiltered (file
,
1188 "gdbarch_dump: long_bit = %s\n",
1189 plongest (gdbarch
->long_bit
));
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: long_double_bit = %s\n",
1192 plongest (gdbarch
->long_double_bit
));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: long_double_format = %s\n",
1195 pformat (gdbarch
->long_double_format
));
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: long_long_bit = %s\n",
1198 plongest (gdbarch
->long_long_bit
));
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1201 gdbarch_make_corefile_notes_p (gdbarch
));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: make_corefile_notes = <%s>\n",
1204 host_address_to_string (gdbarch
->make_corefile_notes
));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: make_symbol_special = <%s>\n",
1207 host_address_to_string (gdbarch
->make_symbol_special
));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1210 gdbarch_max_insn_length_p (gdbarch
));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: max_insn_length = %s\n",
1213 plongest (gdbarch
->max_insn_length
));
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1216 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1219 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: num_pseudo_regs = %s\n",
1222 plongest (gdbarch
->num_pseudo_regs
));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: num_regs = %s\n",
1225 plongest (gdbarch
->num_regs
));
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: osabi = %s\n",
1228 plongest (gdbarch
->osabi
));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1231 gdbarch_overlay_update_p (gdbarch
));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: overlay_update = <%s>\n",
1234 host_address_to_string (gdbarch
->overlay_update
));
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: pc_regnum = %s\n",
1237 plongest (gdbarch
->pc_regnum
));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: pointer_to_address = <%s>\n",
1240 host_address_to_string (gdbarch
->pointer_to_address
));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: print_auxv_entry = <%s>\n",
1243 host_address_to_string (gdbarch
->print_auxv_entry
));
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: print_float_info = <%s>\n",
1246 host_address_to_string (gdbarch
->print_float_info
));
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: print_insn = <%s>\n",
1249 host_address_to_string (gdbarch
->print_insn
));
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: print_registers_info = <%s>\n",
1252 host_address_to_string (gdbarch
->print_registers_info
));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1255 gdbarch_print_vector_info_p (gdbarch
));
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: print_vector_info = <%s>\n",
1258 host_address_to_string (gdbarch
->print_vector_info
));
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1261 gdbarch_process_record_p (gdbarch
));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: process_record = <%s>\n",
1264 host_address_to_string (gdbarch
->process_record
));
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1267 gdbarch_process_record_signal_p (gdbarch
));
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: process_record_signal = <%s>\n",
1270 host_address_to_string (gdbarch
->process_record_signal
));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: program_breakpoint_here_p = <%s>\n",
1273 host_address_to_string (gdbarch
->program_breakpoint_here_p
));
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: ps_regnum = %s\n",
1276 plongest (gdbarch
->ps_regnum
));
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1279 gdbarch_pseudo_register_read_p (gdbarch
));
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: pseudo_register_read = <%s>\n",
1282 host_address_to_string (gdbarch
->pseudo_register_read
));
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1285 gdbarch_pseudo_register_read_value_p (gdbarch
));
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1288 host_address_to_string (gdbarch
->pseudo_register_read_value
));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1291 gdbarch_pseudo_register_write_p (gdbarch
));
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: pseudo_register_write = <%s>\n",
1294 host_address_to_string (gdbarch
->pseudo_register_write
));
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: ptr_bit = %s\n",
1297 plongest (gdbarch
->ptr_bit
));
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1300 gdbarch_push_dummy_call_p (gdbarch
));
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: push_dummy_call = <%s>\n",
1303 host_address_to_string (gdbarch
->push_dummy_call
));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1306 gdbarch_push_dummy_code_p (gdbarch
));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: push_dummy_code = <%s>\n",
1309 host_address_to_string (gdbarch
->push_dummy_code
));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: ravenscar_ops = %s\n",
1312 host_address_to_string (gdbarch
->ravenscar_ops
));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: read_core_file_mappings = <%s>\n",
1315 host_address_to_string (gdbarch
->read_core_file_mappings
));
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1318 gdbarch_read_pc_p (gdbarch
));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: read_pc = <%s>\n",
1321 host_address_to_string (gdbarch
->read_pc
));
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1324 gdbarch_record_special_symbol_p (gdbarch
));
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: record_special_symbol = <%s>\n",
1327 host_address_to_string (gdbarch
->record_special_symbol
));
1328 fprintf_unfiltered (file
,
1329 "gdbarch_dump: register_name = <%s>\n",
1330 host_address_to_string (gdbarch
->register_name
));
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: register_reggroup_p = <%s>\n",
1333 host_address_to_string (gdbarch
->register_reggroup_p
));
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: register_sim_regno = <%s>\n",
1336 host_address_to_string (gdbarch
->register_sim_regno
));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: register_to_value = <%s>\n",
1339 host_address_to_string (gdbarch
->register_to_value
));
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1342 gdbarch_register_type_p (gdbarch
));
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: register_type = <%s>\n",
1345 host_address_to_string (gdbarch
->register_type
));
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1348 gdbarch_relocate_instruction_p (gdbarch
));
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: relocate_instruction = <%s>\n",
1351 host_address_to_string (gdbarch
->relocate_instruction
));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: remote_register_number = <%s>\n",
1354 host_address_to_string (gdbarch
->remote_register_number
));
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: gdbarch_report_signal_info_p() = %d\n",
1357 gdbarch_report_signal_info_p (gdbarch
));
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: report_signal_info = <%s>\n",
1360 host_address_to_string (gdbarch
->report_signal_info
));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1363 host_address_to_string (gdbarch
->return_in_first_hidden_param_p
));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1366 gdbarch_return_value_p (gdbarch
));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: return_value = <%s>\n",
1369 host_address_to_string (gdbarch
->return_value
));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1372 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: short_bit = %s\n",
1375 plongest (gdbarch
->short_bit
));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: significant_addr_bit = %s\n",
1378 plongest (gdbarch
->significant_addr_bit
));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1381 gdbarch_single_step_through_delay_p (gdbarch
));
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: single_step_through_delay = <%s>\n",
1384 host_address_to_string (gdbarch
->single_step_through_delay
));
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1387 gdbarch_skip_entrypoint_p (gdbarch
));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: skip_entrypoint = <%s>\n",
1390 host_address_to_string (gdbarch
->skip_entrypoint
));
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1393 gdbarch_skip_main_prologue_p (gdbarch
));
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: skip_main_prologue = <%s>\n",
1396 host_address_to_string (gdbarch
->skip_main_prologue
));
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1399 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: skip_prologue = <%s>\n",
1402 host_address_to_string (gdbarch
->skip_prologue
));
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1405 host_address_to_string (gdbarch
->skip_solib_resolver
));
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1408 host_address_to_string (gdbarch
->skip_trampoline_code
));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1411 gdbarch_software_single_step_p (gdbarch
));
1412 fprintf_unfiltered (file
,
1413 "gdbarch_dump: software_single_step = <%s>\n",
1414 host_address_to_string (gdbarch
->software_single_step
));
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1417 plongest (gdbarch
->sofun_address_maybe_missing
));
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: solib_symbols_extension = %s\n",
1420 pstring (gdbarch
->solib_symbols_extension
));
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: sp_regnum = %s\n",
1423 plongest (gdbarch
->sp_regnum
));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1426 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1429 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1430 fprintf_unfiltered (file
,
1431 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1432 host_address_to_string (gdbarch
->stack_frame_destroyed_p
));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: gdbarch_stap_adjust_register_p() = %d\n",
1435 gdbarch_stap_adjust_register_p (gdbarch
));
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: stap_adjust_register = <%s>\n",
1438 host_address_to_string (gdbarch
->stap_adjust_register
));
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1441 pstring (gdbarch
->stap_gdb_register_prefix
));
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1444 pstring (gdbarch
->stap_gdb_register_suffix
));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: stap_integer_prefixes = %s\n",
1447 pstring_list (gdbarch
->stap_integer_prefixes
));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: stap_integer_suffixes = %s\n",
1450 pstring_list (gdbarch
->stap_integer_suffixes
));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1453 gdbarch_stap_is_single_operand_p (gdbarch
));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1456 host_address_to_string (gdbarch
->stap_is_single_operand
));
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1459 gdbarch_stap_parse_special_token_p (gdbarch
));
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1462 host_address_to_string (gdbarch
->stap_parse_special_token
));
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1465 pstring_list (gdbarch
->stap_register_indirection_prefixes
));
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1468 pstring_list (gdbarch
->stap_register_indirection_suffixes
));
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: stap_register_prefixes = %s\n",
1471 pstring_list (gdbarch
->stap_register_prefixes
));
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: stap_register_suffixes = %s\n",
1474 pstring_list (gdbarch
->stap_register_suffixes
));
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
1477 host_address_to_string (gdbarch
->sw_breakpoint_from_kind
));
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: syscalls_info = %s\n",
1480 host_address_to_string (gdbarch
->syscalls_info
));
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: target_desc = %s\n",
1483 host_address_to_string (gdbarch
->target_desc
));
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: type_align = <%s>\n",
1486 host_address_to_string (gdbarch
->type_align
));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: unwind_pc = <%s>\n",
1489 host_address_to_string (gdbarch
->unwind_pc
));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: unwind_sp = <%s>\n",
1492 host_address_to_string (gdbarch
->unwind_sp
));
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: valid_disassembler_options = %s\n",
1495 host_address_to_string (gdbarch
->valid_disassembler_options
));
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: value_from_register = <%s>\n",
1498 host_address_to_string (gdbarch
->value_from_register
));
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: value_to_register = <%s>\n",
1501 host_address_to_string (gdbarch
->value_to_register
));
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: vbit_in_delta = %s\n",
1504 plongest (gdbarch
->vbit_in_delta
));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1507 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: vsyscall_range = <%s>\n",
1510 host_address_to_string (gdbarch
->vsyscall_range
));
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: vtable_function_descriptors = %s\n",
1513 plongest (gdbarch
->vtable_function_descriptors
));
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: wchar_bit = %s\n",
1516 plongest (gdbarch
->wchar_bit
));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: wchar_signed = %s\n",
1519 plongest (gdbarch
->wchar_signed
));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1522 gdbarch_write_pc_p (gdbarch
));
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: write_pc = <%s>\n",
1525 host_address_to_string (gdbarch
->write_pc
));
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: xml_syscall_file = %s\n",
1528 pstring (gdbarch
->xml_syscall_file
));
1529 if (gdbarch
->dump_tdep
!= NULL
)
1530 gdbarch
->dump_tdep (gdbarch
, file
);
1533 struct gdbarch_tdep
*
1534 gdbarch_tdep (struct gdbarch
*gdbarch
)
1536 if (gdbarch_debug
>= 2)
1537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1538 return gdbarch
->tdep
;
1542 const struct bfd_arch_info
*
1543 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1545 gdb_assert (gdbarch
!= NULL
);
1546 if (gdbarch_debug
>= 2)
1547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1548 return gdbarch
->bfd_arch_info
;
1552 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1554 gdb_assert (gdbarch
!= NULL
);
1555 if (gdbarch_debug
>= 2)
1556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1557 return gdbarch
->byte_order
;
1561 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1563 gdb_assert (gdbarch
!= NULL
);
1564 if (gdbarch_debug
>= 2)
1565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1566 return gdbarch
->byte_order_for_code
;
1570 gdbarch_osabi (struct gdbarch
*gdbarch
)
1572 gdb_assert (gdbarch
!= NULL
);
1573 if (gdbarch_debug
>= 2)
1574 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1575 return gdbarch
->osabi
;
1578 const struct target_desc
*
1579 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1581 gdb_assert (gdbarch
!= NULL
);
1582 if (gdbarch_debug
>= 2)
1583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1584 return gdbarch
->target_desc
;
1588 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1590 gdb_assert (gdbarch
!= NULL
);
1591 /* Skip verify of short_bit, invalid_p == 0 */
1592 if (gdbarch_debug
>= 2)
1593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1594 return gdbarch
->short_bit
;
1598 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1601 gdbarch
->short_bit
= short_bit
;
1605 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1607 gdb_assert (gdbarch
!= NULL
);
1608 /* Skip verify of int_bit, invalid_p == 0 */
1609 if (gdbarch_debug
>= 2)
1610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1611 return gdbarch
->int_bit
;
1615 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1618 gdbarch
->int_bit
= int_bit
;
1622 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1624 gdb_assert (gdbarch
!= NULL
);
1625 /* Skip verify of long_bit, invalid_p == 0 */
1626 if (gdbarch_debug
>= 2)
1627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1628 return gdbarch
->long_bit
;
1632 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1635 gdbarch
->long_bit
= long_bit
;
1639 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1641 gdb_assert (gdbarch
!= NULL
);
1642 /* Skip verify of long_long_bit, invalid_p == 0 */
1643 if (gdbarch_debug
>= 2)
1644 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1645 return gdbarch
->long_long_bit
;
1649 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1652 gdbarch
->long_long_bit
= long_long_bit
;
1656 gdbarch_bfloat16_bit (struct gdbarch
*gdbarch
)
1658 gdb_assert (gdbarch
!= NULL
);
1659 /* Skip verify of bfloat16_bit, invalid_p == 0 */
1660 if (gdbarch_debug
>= 2)
1661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfloat16_bit called\n");
1662 return gdbarch
->bfloat16_bit
;
1666 set_gdbarch_bfloat16_bit (struct gdbarch
*gdbarch
,
1669 gdbarch
->bfloat16_bit
= bfloat16_bit
;
1672 const struct floatformat
**
1673 gdbarch_bfloat16_format (struct gdbarch
*gdbarch
)
1675 gdb_assert (gdbarch
!= NULL
);
1676 if (gdbarch_debug
>= 2)
1677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfloat16_format called\n");
1678 return gdbarch
->bfloat16_format
;
1682 set_gdbarch_bfloat16_format (struct gdbarch
*gdbarch
,
1683 const struct floatformat
** bfloat16_format
)
1685 gdbarch
->bfloat16_format
= bfloat16_format
;
1689 gdbarch_half_bit (struct gdbarch
*gdbarch
)
1691 gdb_assert (gdbarch
!= NULL
);
1692 /* Skip verify of half_bit, invalid_p == 0 */
1693 if (gdbarch_debug
>= 2)
1694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_bit called\n");
1695 return gdbarch
->half_bit
;
1699 set_gdbarch_half_bit (struct gdbarch
*gdbarch
,
1702 gdbarch
->half_bit
= half_bit
;
1705 const struct floatformat
**
1706 gdbarch_half_format (struct gdbarch
*gdbarch
)
1708 gdb_assert (gdbarch
!= NULL
);
1709 if (gdbarch_debug
>= 2)
1710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_format called\n");
1711 return gdbarch
->half_format
;
1715 set_gdbarch_half_format (struct gdbarch
*gdbarch
,
1716 const struct floatformat
** half_format
)
1718 gdbarch
->half_format
= half_format
;
1722 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1724 gdb_assert (gdbarch
!= NULL
);
1725 /* Skip verify of float_bit, invalid_p == 0 */
1726 if (gdbarch_debug
>= 2)
1727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1728 return gdbarch
->float_bit
;
1732 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1735 gdbarch
->float_bit
= float_bit
;
1738 const struct floatformat
**
1739 gdbarch_float_format (struct gdbarch
*gdbarch
)
1741 gdb_assert (gdbarch
!= NULL
);
1742 if (gdbarch_debug
>= 2)
1743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1744 return gdbarch
->float_format
;
1748 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1749 const struct floatformat
** float_format
)
1751 gdbarch
->float_format
= float_format
;
1755 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1757 gdb_assert (gdbarch
!= NULL
);
1758 /* Skip verify of double_bit, invalid_p == 0 */
1759 if (gdbarch_debug
>= 2)
1760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1761 return gdbarch
->double_bit
;
1765 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1768 gdbarch
->double_bit
= double_bit
;
1771 const struct floatformat
**
1772 gdbarch_double_format (struct gdbarch
*gdbarch
)
1774 gdb_assert (gdbarch
!= NULL
);
1775 if (gdbarch_debug
>= 2)
1776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1777 return gdbarch
->double_format
;
1781 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1782 const struct floatformat
** double_format
)
1784 gdbarch
->double_format
= double_format
;
1788 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1790 gdb_assert (gdbarch
!= NULL
);
1791 /* Skip verify of long_double_bit, invalid_p == 0 */
1792 if (gdbarch_debug
>= 2)
1793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1794 return gdbarch
->long_double_bit
;
1798 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1799 int long_double_bit
)
1801 gdbarch
->long_double_bit
= long_double_bit
;
1804 const struct floatformat
**
1805 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1807 gdb_assert (gdbarch
!= NULL
);
1808 if (gdbarch_debug
>= 2)
1809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1810 return gdbarch
->long_double_format
;
1814 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1815 const struct floatformat
** long_double_format
)
1817 gdbarch
->long_double_format
= long_double_format
;
1821 gdbarch_wchar_bit (struct gdbarch
*gdbarch
)
1823 gdb_assert (gdbarch
!= NULL
);
1824 /* Skip verify of wchar_bit, invalid_p == 0 */
1825 if (gdbarch_debug
>= 2)
1826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_wchar_bit called\n");
1827 return gdbarch
->wchar_bit
;
1831 set_gdbarch_wchar_bit (struct gdbarch
*gdbarch
,
1834 gdbarch
->wchar_bit
= wchar_bit
;
1838 gdbarch_wchar_signed (struct gdbarch
*gdbarch
)
1840 gdb_assert (gdbarch
!= NULL
);
1841 /* Check variable changed from pre-default. */
1842 gdb_assert (gdbarch
->wchar_signed
!= -1);
1843 if (gdbarch_debug
>= 2)
1844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_wchar_signed called\n");
1845 return gdbarch
->wchar_signed
;
1849 set_gdbarch_wchar_signed (struct gdbarch
*gdbarch
,
1852 gdbarch
->wchar_signed
= wchar_signed
;
1855 const struct floatformat
**
1856 gdbarch_floatformat_for_type (struct gdbarch
*gdbarch
, const char *name
, int length
)
1858 gdb_assert (gdbarch
!= NULL
);
1859 gdb_assert (gdbarch
->floatformat_for_type
!= NULL
);
1860 if (gdbarch_debug
>= 2)
1861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_floatformat_for_type called\n");
1862 return gdbarch
->floatformat_for_type (gdbarch
, name
, length
);
1866 set_gdbarch_floatformat_for_type (struct gdbarch
*gdbarch
,
1867 gdbarch_floatformat_for_type_ftype floatformat_for_type
)
1869 gdbarch
->floatformat_for_type
= floatformat_for_type
;
1873 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1875 gdb_assert (gdbarch
!= NULL
);
1876 /* Skip verify of ptr_bit, invalid_p == 0 */
1877 if (gdbarch_debug
>= 2)
1878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1879 return gdbarch
->ptr_bit
;
1883 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1886 gdbarch
->ptr_bit
= ptr_bit
;
1890 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1892 gdb_assert (gdbarch
!= NULL
);
1893 /* Check variable changed from pre-default. */
1894 gdb_assert (gdbarch
->addr_bit
!= 0);
1895 if (gdbarch_debug
>= 2)
1896 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1897 return gdbarch
->addr_bit
;
1901 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1904 gdbarch
->addr_bit
= addr_bit
;
1908 gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
)
1910 gdb_assert (gdbarch
!= NULL
);
1911 /* Check variable changed from pre-default. */
1912 gdb_assert (gdbarch
->dwarf2_addr_size
!= 0);
1913 if (gdbarch_debug
>= 2)
1914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_addr_size called\n");
1915 return gdbarch
->dwarf2_addr_size
;
1919 set_gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
,
1920 int dwarf2_addr_size
)
1922 gdbarch
->dwarf2_addr_size
= dwarf2_addr_size
;
1926 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1928 gdb_assert (gdbarch
!= NULL
);
1929 /* Check variable changed from pre-default. */
1930 gdb_assert (gdbarch
->char_signed
!= -1);
1931 if (gdbarch_debug
>= 2)
1932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1933 return gdbarch
->char_signed
;
1937 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1940 gdbarch
->char_signed
= char_signed
;
1944 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1946 gdb_assert (gdbarch
!= NULL
);
1947 return gdbarch
->read_pc
!= NULL
;
1951 gdbarch_read_pc (struct gdbarch
*gdbarch
, readable_regcache
*regcache
)
1953 gdb_assert (gdbarch
!= NULL
);
1954 gdb_assert (gdbarch
->read_pc
!= NULL
);
1955 if (gdbarch_debug
>= 2)
1956 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1957 return gdbarch
->read_pc (regcache
);
1961 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1962 gdbarch_read_pc_ftype read_pc
)
1964 gdbarch
->read_pc
= read_pc
;
1968 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1970 gdb_assert (gdbarch
!= NULL
);
1971 return gdbarch
->write_pc
!= NULL
;
1975 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1977 gdb_assert (gdbarch
!= NULL
);
1978 gdb_assert (gdbarch
->write_pc
!= NULL
);
1979 if (gdbarch_debug
>= 2)
1980 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1981 gdbarch
->write_pc (regcache
, val
);
1985 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1986 gdbarch_write_pc_ftype write_pc
)
1988 gdbarch
->write_pc
= write_pc
;
1992 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1994 gdb_assert (gdbarch
!= NULL
);
1995 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1996 if (gdbarch_debug
>= 2)
1997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1998 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
2002 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2003 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2005 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2009 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2011 gdb_assert (gdbarch
!= NULL
);
2012 return gdbarch
->pseudo_register_read
!= NULL
;
2015 enum register_status
2016 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, readable_regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
2018 gdb_assert (gdbarch
!= NULL
);
2019 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
2020 if (gdbarch_debug
>= 2)
2021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2022 return gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2026 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2027 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2029 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2033 gdbarch_pseudo_register_read_value_p (struct gdbarch
*gdbarch
)
2035 gdb_assert (gdbarch
!= NULL
);
2036 return gdbarch
->pseudo_register_read_value
!= NULL
;
2040 gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
, readable_regcache
*regcache
, int cookednum
)
2042 gdb_assert (gdbarch
!= NULL
);
2043 gdb_assert (gdbarch
->pseudo_register_read_value
!= NULL
);
2044 if (gdbarch_debug
>= 2)
2045 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read_value called\n");
2046 return gdbarch
->pseudo_register_read_value (gdbarch
, regcache
, cookednum
);
2050 set_gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
,
2051 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value
)
2053 gdbarch
->pseudo_register_read_value
= pseudo_register_read_value
;
2057 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2059 gdb_assert (gdbarch
!= NULL
);
2060 return gdbarch
->pseudo_register_write
!= NULL
;
2064 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
2066 gdb_assert (gdbarch
!= NULL
);
2067 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
2068 if (gdbarch_debug
>= 2)
2069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2070 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2074 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2075 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2077 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2081 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2083 gdb_assert (gdbarch
!= NULL
);
2084 /* Check variable changed from pre-default. */
2085 gdb_assert (gdbarch
->num_regs
!= -1);
2086 if (gdbarch_debug
>= 2)
2087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2088 return gdbarch
->num_regs
;
2092 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2095 gdbarch
->num_regs
= num_regs
;
2099 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2101 gdb_assert (gdbarch
!= NULL
);
2102 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2103 if (gdbarch_debug
>= 2)
2104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2105 return gdbarch
->num_pseudo_regs
;
2109 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2110 int num_pseudo_regs
)
2112 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2116 gdbarch_ax_pseudo_register_collect_p (struct gdbarch
*gdbarch
)
2118 gdb_assert (gdbarch
!= NULL
);
2119 return gdbarch
->ax_pseudo_register_collect
!= NULL
;
2123 gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
2125 gdb_assert (gdbarch
!= NULL
);
2126 gdb_assert (gdbarch
->ax_pseudo_register_collect
!= NULL
);
2127 if (gdbarch_debug
>= 2)
2128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_collect called\n");
2129 return gdbarch
->ax_pseudo_register_collect (gdbarch
, ax
, reg
);
2133 set_gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
,
2134 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect
)
2136 gdbarch
->ax_pseudo_register_collect
= ax_pseudo_register_collect
;
2140 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch
*gdbarch
)
2142 gdb_assert (gdbarch
!= NULL
);
2143 return gdbarch
->ax_pseudo_register_push_stack
!= NULL
;
2147 gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
2149 gdb_assert (gdbarch
!= NULL
);
2150 gdb_assert (gdbarch
->ax_pseudo_register_push_stack
!= NULL
);
2151 if (gdbarch_debug
>= 2)
2152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_push_stack called\n");
2153 return gdbarch
->ax_pseudo_register_push_stack (gdbarch
, ax
, reg
);
2157 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
,
2158 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack
)
2160 gdbarch
->ax_pseudo_register_push_stack
= ax_pseudo_register_push_stack
;
2164 gdbarch_report_signal_info_p (struct gdbarch
*gdbarch
)
2166 gdb_assert (gdbarch
!= NULL
);
2167 return gdbarch
->report_signal_info
!= NULL
;
2171 gdbarch_report_signal_info (struct gdbarch
*gdbarch
, struct ui_out
*uiout
, enum gdb_signal siggnal
)
2173 gdb_assert (gdbarch
!= NULL
);
2174 gdb_assert (gdbarch
->report_signal_info
!= NULL
);
2175 if (gdbarch_debug
>= 2)
2176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_report_signal_info called\n");
2177 gdbarch
->report_signal_info (gdbarch
, uiout
, siggnal
);
2181 set_gdbarch_report_signal_info (struct gdbarch
*gdbarch
,
2182 gdbarch_report_signal_info_ftype report_signal_info
)
2184 gdbarch
->report_signal_info
= report_signal_info
;
2188 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2190 gdb_assert (gdbarch
!= NULL
);
2191 /* Skip verify of sp_regnum, invalid_p == 0 */
2192 if (gdbarch_debug
>= 2)
2193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2194 return gdbarch
->sp_regnum
;
2198 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2201 gdbarch
->sp_regnum
= sp_regnum
;
2205 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2207 gdb_assert (gdbarch
!= NULL
);
2208 /* Skip verify of pc_regnum, invalid_p == 0 */
2209 if (gdbarch_debug
>= 2)
2210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2211 return gdbarch
->pc_regnum
;
2215 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2218 gdbarch
->pc_regnum
= pc_regnum
;
2222 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2224 gdb_assert (gdbarch
!= NULL
);
2225 /* Skip verify of ps_regnum, invalid_p == 0 */
2226 if (gdbarch_debug
>= 2)
2227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2228 return gdbarch
->ps_regnum
;
2232 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2235 gdbarch
->ps_regnum
= ps_regnum
;
2239 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2241 gdb_assert (gdbarch
!= NULL
);
2242 /* Skip verify of fp0_regnum, invalid_p == 0 */
2243 if (gdbarch_debug
>= 2)
2244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2245 return gdbarch
->fp0_regnum
;
2249 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2252 gdbarch
->fp0_regnum
= fp0_regnum
;
2256 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2258 gdb_assert (gdbarch
!= NULL
);
2259 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2260 if (gdbarch_debug
>= 2)
2261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2262 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
2266 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2267 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2269 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2273 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2275 gdb_assert (gdbarch
!= NULL
);
2276 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2277 if (gdbarch_debug
>= 2)
2278 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2279 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
2283 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2284 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2286 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2290 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2292 gdb_assert (gdbarch
!= NULL
);
2293 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2294 if (gdbarch_debug
>= 2)
2295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2296 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
2300 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2301 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2303 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2307 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2309 gdb_assert (gdbarch
!= NULL
);
2310 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2311 if (gdbarch_debug
>= 2)
2312 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2313 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
2317 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2318 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2320 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2324 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2326 gdb_assert (gdbarch
!= NULL
);
2327 gdb_assert (gdbarch
->register_name
!= NULL
);
2328 if (gdbarch_debug
>= 2)
2329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2330 return gdbarch
->register_name (gdbarch
, regnr
);
2334 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2335 gdbarch_register_name_ftype register_name
)
2337 gdbarch
->register_name
= register_name
;
2341 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2343 gdb_assert (gdbarch
!= NULL
);
2344 return gdbarch
->register_type
!= NULL
;
2348 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2350 gdb_assert (gdbarch
!= NULL
);
2351 gdb_assert (gdbarch
->register_type
!= NULL
);
2352 if (gdbarch_debug
>= 2)
2353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2354 return gdbarch
->register_type (gdbarch
, reg_nr
);
2358 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2359 gdbarch_register_type_ftype register_type
)
2361 gdbarch
->register_type
= register_type
;
2365 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
2367 gdb_assert (gdbarch
!= NULL
);
2368 gdb_assert (gdbarch
->dummy_id
!= NULL
);
2369 if (gdbarch_debug
>= 2)
2370 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
2371 return gdbarch
->dummy_id (gdbarch
, this_frame
);
2375 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
2376 gdbarch_dummy_id_ftype dummy_id
)
2378 gdbarch
->dummy_id
= dummy_id
;
2382 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2384 gdb_assert (gdbarch
!= NULL
);
2385 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2386 if (gdbarch_debug
>= 2)
2387 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2388 return gdbarch
->deprecated_fp_regnum
;
2392 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2393 int deprecated_fp_regnum
)
2395 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2399 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2401 gdb_assert (gdbarch
!= NULL
);
2402 return gdbarch
->push_dummy_call
!= NULL
;
2406 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
, function_call_return_method return_method
, CORE_ADDR struct_addr
)
2408 gdb_assert (gdbarch
!= NULL
);
2409 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2410 if (gdbarch_debug
>= 2)
2411 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2412 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, return_method
, struct_addr
);
2416 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2417 gdbarch_push_dummy_call_ftype push_dummy_call
)
2419 gdbarch
->push_dummy_call
= push_dummy_call
;
2423 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2425 gdb_assert (gdbarch
!= NULL
);
2426 /* Skip verify of call_dummy_location, invalid_p == 0 */
2427 if (gdbarch_debug
>= 2)
2428 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2429 return gdbarch
->call_dummy_location
;
2433 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2434 int call_dummy_location
)
2436 gdbarch
->call_dummy_location
= call_dummy_location
;
2440 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2442 gdb_assert (gdbarch
!= NULL
);
2443 return gdbarch
->push_dummy_code
!= NULL
;
2447 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
)
2449 gdb_assert (gdbarch
!= NULL
);
2450 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2451 if (gdbarch_debug
>= 2)
2452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2453 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
2457 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2458 gdbarch_push_dummy_code_ftype push_dummy_code
)
2460 gdbarch
->push_dummy_code
= push_dummy_code
;
2464 gdbarch_code_of_frame_writable (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2466 gdb_assert (gdbarch
!= NULL
);
2467 gdb_assert (gdbarch
->code_of_frame_writable
!= NULL
);
2468 if (gdbarch_debug
>= 2)
2469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_code_of_frame_writable called\n");
2470 return gdbarch
->code_of_frame_writable (gdbarch
, frame
);
2474 set_gdbarch_code_of_frame_writable (struct gdbarch
*gdbarch
,
2475 gdbarch_code_of_frame_writable_ftype code_of_frame_writable
)
2477 gdbarch
->code_of_frame_writable
= code_of_frame_writable
;
2481 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2483 gdb_assert (gdbarch
!= NULL
);
2484 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2485 if (gdbarch_debug
>= 2)
2486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2487 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2491 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2492 gdbarch_print_registers_info_ftype print_registers_info
)
2494 gdbarch
->print_registers_info
= print_registers_info
;
2498 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2500 gdb_assert (gdbarch
!= NULL
);
2501 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2502 if (gdbarch_debug
>= 2)
2503 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2504 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2508 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2509 gdbarch_print_float_info_ftype print_float_info
)
2511 gdbarch
->print_float_info
= print_float_info
;
2515 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2517 gdb_assert (gdbarch
!= NULL
);
2518 return gdbarch
->print_vector_info
!= NULL
;
2522 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2524 gdb_assert (gdbarch
!= NULL
);
2525 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2526 if (gdbarch_debug
>= 2)
2527 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2528 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2532 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2533 gdbarch_print_vector_info_ftype print_vector_info
)
2535 gdbarch
->print_vector_info
= print_vector_info
;
2539 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2541 gdb_assert (gdbarch
!= NULL
);
2542 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2543 if (gdbarch_debug
>= 2)
2544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2545 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2549 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2550 gdbarch_register_sim_regno_ftype register_sim_regno
)
2552 gdbarch
->register_sim_regno
= register_sim_regno
;
2556 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2558 gdb_assert (gdbarch
!= NULL
);
2559 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2560 if (gdbarch_debug
>= 2)
2561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2562 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2566 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2567 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2569 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2573 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2575 gdb_assert (gdbarch
!= NULL
);
2576 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2577 if (gdbarch_debug
>= 2)
2578 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2579 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2583 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2584 gdbarch_cannot_store_register_ftype cannot_store_register
)
2586 gdbarch
->cannot_store_register
= cannot_store_register
;
2590 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2592 gdb_assert (gdbarch
!= NULL
);
2593 return gdbarch
->get_longjmp_target
!= NULL
;
2597 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2599 gdb_assert (gdbarch
!= NULL
);
2600 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2601 if (gdbarch_debug
>= 2)
2602 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2603 return gdbarch
->get_longjmp_target (frame
, pc
);
2607 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2608 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2610 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2614 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2616 gdb_assert (gdbarch
!= NULL
);
2617 if (gdbarch_debug
>= 2)
2618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2619 return gdbarch
->believe_pcc_promotion
;
2623 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2624 int believe_pcc_promotion
)
2626 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2630 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2632 gdb_assert (gdbarch
!= NULL
);
2633 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2634 if (gdbarch_debug
>= 2)
2635 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2636 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2640 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2641 gdbarch_convert_register_p_ftype convert_register_p
)
2643 gdbarch
->convert_register_p
= convert_register_p
;
2647 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
, int *optimizedp
, int *unavailablep
)
2649 gdb_assert (gdbarch
!= NULL
);
2650 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2651 if (gdbarch_debug
>= 2)
2652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2653 return gdbarch
->register_to_value (frame
, regnum
, type
, buf
, optimizedp
, unavailablep
);
2657 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2658 gdbarch_register_to_value_ftype register_to_value
)
2660 gdbarch
->register_to_value
= register_to_value
;
2664 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2666 gdb_assert (gdbarch
!= NULL
);
2667 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2670 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2674 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2675 gdbarch_value_to_register_ftype value_to_register
)
2677 gdbarch
->value_to_register
= value_to_register
;
2681 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_id frame_id
)
2683 gdb_assert (gdbarch
!= NULL
);
2684 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2685 if (gdbarch_debug
>= 2)
2686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2687 return gdbarch
->value_from_register (gdbarch
, type
, regnum
, frame_id
);
2691 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2692 gdbarch_value_from_register_ftype value_from_register
)
2694 gdbarch
->value_from_register
= value_from_register
;
2698 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2700 gdb_assert (gdbarch
!= NULL
);
2701 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2702 if (gdbarch_debug
>= 2)
2703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2704 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2708 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2709 gdbarch_pointer_to_address_ftype pointer_to_address
)
2711 gdbarch
->pointer_to_address
= pointer_to_address
;
2715 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2717 gdb_assert (gdbarch
!= NULL
);
2718 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2721 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2725 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2726 gdbarch_address_to_pointer_ftype address_to_pointer
)
2728 gdbarch
->address_to_pointer
= address_to_pointer
;
2732 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2734 gdb_assert (gdbarch
!= NULL
);
2735 return gdbarch
->integer_to_address
!= NULL
;
2739 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2741 gdb_assert (gdbarch
!= NULL
);
2742 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2743 if (gdbarch_debug
>= 2)
2744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2745 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2749 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2750 gdbarch_integer_to_address_ftype integer_to_address
)
2752 gdbarch
->integer_to_address
= integer_to_address
;
2756 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2758 gdb_assert (gdbarch
!= NULL
);
2759 return gdbarch
->return_value
!= NULL
;
2762 enum return_value_convention
2763 gdbarch_return_value (struct gdbarch
*gdbarch
, struct value
*function
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2765 gdb_assert (gdbarch
!= NULL
);
2766 gdb_assert (gdbarch
->return_value
!= NULL
);
2767 if (gdbarch_debug
>= 2)
2768 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2769 return gdbarch
->return_value (gdbarch
, function
, valtype
, regcache
, readbuf
, writebuf
);
2773 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2774 gdbarch_return_value_ftype return_value
)
2776 gdbarch
->return_value
= return_value
;
2780 gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
, struct type
*type
)
2782 gdb_assert (gdbarch
!= NULL
);
2783 gdb_assert (gdbarch
->return_in_first_hidden_param_p
!= NULL
);
2784 if (gdbarch_debug
>= 2)
2785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_in_first_hidden_param_p called\n");
2786 return gdbarch
->return_in_first_hidden_param_p (gdbarch
, type
);
2790 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
,
2791 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p
)
2793 gdbarch
->return_in_first_hidden_param_p
= return_in_first_hidden_param_p
;
2797 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2799 gdb_assert (gdbarch
!= NULL
);
2800 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2801 if (gdbarch_debug
>= 2)
2802 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2803 return gdbarch
->skip_prologue (gdbarch
, ip
);
2807 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2808 gdbarch_skip_prologue_ftype skip_prologue
)
2810 gdbarch
->skip_prologue
= skip_prologue
;
2814 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2816 gdb_assert (gdbarch
!= NULL
);
2817 return gdbarch
->skip_main_prologue
!= NULL
;
2821 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2823 gdb_assert (gdbarch
!= NULL
);
2824 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2825 if (gdbarch_debug
>= 2)
2826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2827 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2831 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2832 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2834 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2838 gdbarch_skip_entrypoint_p (struct gdbarch
*gdbarch
)
2840 gdb_assert (gdbarch
!= NULL
);
2841 return gdbarch
->skip_entrypoint
!= NULL
;
2845 gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2847 gdb_assert (gdbarch
!= NULL
);
2848 gdb_assert (gdbarch
->skip_entrypoint
!= NULL
);
2849 if (gdbarch_debug
>= 2)
2850 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_entrypoint called\n");
2851 return gdbarch
->skip_entrypoint (gdbarch
, ip
);
2855 set_gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
,
2856 gdbarch_skip_entrypoint_ftype skip_entrypoint
)
2858 gdbarch
->skip_entrypoint
= skip_entrypoint
;
2862 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2864 gdb_assert (gdbarch
!= NULL
);
2865 gdb_assert (gdbarch
->inner_than
!= NULL
);
2866 if (gdbarch_debug
>= 2)
2867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2868 return gdbarch
->inner_than (lhs
, rhs
);
2872 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2873 gdbarch_inner_than_ftype inner_than
)
2875 gdbarch
->inner_than
= inner_than
;
2879 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2881 gdb_assert (gdbarch
!= NULL
);
2882 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2883 if (gdbarch_debug
>= 2)
2884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2885 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2889 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2890 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2892 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2896 gdbarch_breakpoint_kind_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
)
2898 gdb_assert (gdbarch
!= NULL
);
2899 gdb_assert (gdbarch
->breakpoint_kind_from_pc
!= NULL
);
2900 if (gdbarch_debug
>= 2)
2901 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_kind_from_pc called\n");
2902 return gdbarch
->breakpoint_kind_from_pc (gdbarch
, pcptr
);
2906 set_gdbarch_breakpoint_kind_from_pc (struct gdbarch
*gdbarch
,
2907 gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc
)
2909 gdbarch
->breakpoint_kind_from_pc
= breakpoint_kind_from_pc
;
2913 gdbarch_sw_breakpoint_from_kind (struct gdbarch
*gdbarch
, int kind
, int *size
)
2915 gdb_assert (gdbarch
!= NULL
);
2916 gdb_assert (gdbarch
->sw_breakpoint_from_kind
!= NULL
);
2917 if (gdbarch_debug
>= 2)
2918 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sw_breakpoint_from_kind called\n");
2919 return gdbarch
->sw_breakpoint_from_kind (gdbarch
, kind
, size
);
2923 set_gdbarch_sw_breakpoint_from_kind (struct gdbarch
*gdbarch
,
2924 gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind
)
2926 gdbarch
->sw_breakpoint_from_kind
= sw_breakpoint_from_kind
;
2930 gdbarch_breakpoint_kind_from_current_state (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR
*pcptr
)
2932 gdb_assert (gdbarch
!= NULL
);
2933 gdb_assert (gdbarch
->breakpoint_kind_from_current_state
!= NULL
);
2934 if (gdbarch_debug
>= 2)
2935 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_kind_from_current_state called\n");
2936 return gdbarch
->breakpoint_kind_from_current_state (gdbarch
, regcache
, pcptr
);
2940 set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch
*gdbarch
,
2941 gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state
)
2943 gdbarch
->breakpoint_kind_from_current_state
= breakpoint_kind_from_current_state
;
2947 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2949 gdb_assert (gdbarch
!= NULL
);
2950 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2954 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2956 gdb_assert (gdbarch
!= NULL
);
2957 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2960 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2964 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2965 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2967 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2971 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2973 gdb_assert (gdbarch
!= NULL
);
2974 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2975 if (gdbarch_debug
>= 2)
2976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2977 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2981 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2982 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2984 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2988 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2990 gdb_assert (gdbarch
!= NULL
);
2991 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2992 if (gdbarch_debug
>= 2)
2993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2994 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2998 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2999 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3001 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3005 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3007 gdb_assert (gdbarch
!= NULL
);
3008 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3009 if (gdbarch_debug
>= 2)
3010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3011 return gdbarch
->decr_pc_after_break
;
3015 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3016 CORE_ADDR decr_pc_after_break
)
3018 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3022 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
3024 gdb_assert (gdbarch
!= NULL
);
3025 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
3026 if (gdbarch_debug
>= 2)
3027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
3028 return gdbarch
->deprecated_function_start_offset
;
3032 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
3033 CORE_ADDR deprecated_function_start_offset
)
3035 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
3039 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
3041 gdb_assert (gdbarch
!= NULL
);
3042 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
3043 if (gdbarch_debug
>= 2)
3044 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
3045 return gdbarch
->remote_register_number (gdbarch
, regno
);
3049 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
3050 gdbarch_remote_register_number_ftype remote_register_number
)
3052 gdbarch
->remote_register_number
= remote_register_number
;
3056 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
3058 gdb_assert (gdbarch
!= NULL
);
3059 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
3063 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
3065 gdb_assert (gdbarch
!= NULL
);
3066 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
3069 return gdbarch
->fetch_tls_load_module_address (objfile
);
3073 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
3074 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
3076 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
3080 gdbarch_get_thread_local_address_p (struct gdbarch
*gdbarch
)
3082 gdb_assert (gdbarch
!= NULL
);
3083 return gdbarch
->get_thread_local_address
!= NULL
;
3087 gdbarch_get_thread_local_address (struct gdbarch
*gdbarch
, ptid_t ptid
, CORE_ADDR lm_addr
, CORE_ADDR offset
)
3089 gdb_assert (gdbarch
!= NULL
);
3090 gdb_assert (gdbarch
->get_thread_local_address
!= NULL
);
3091 if (gdbarch_debug
>= 2)
3092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_thread_local_address called\n");
3093 return gdbarch
->get_thread_local_address (gdbarch
, ptid
, lm_addr
, offset
);
3097 set_gdbarch_get_thread_local_address (struct gdbarch
*gdbarch
,
3098 gdbarch_get_thread_local_address_ftype get_thread_local_address
)
3100 gdbarch
->get_thread_local_address
= get_thread_local_address
;
3104 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3106 gdb_assert (gdbarch
!= NULL
);
3107 /* Skip verify of frame_args_skip, invalid_p == 0 */
3108 if (gdbarch_debug
>= 2)
3109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3110 return gdbarch
->frame_args_skip
;
3114 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3115 CORE_ADDR frame_args_skip
)
3117 gdbarch
->frame_args_skip
= frame_args_skip
;
3121 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
3123 gdb_assert (gdbarch
!= NULL
);
3124 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
3125 if (gdbarch_debug
>= 2)
3126 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
3127 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
3131 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
3132 gdbarch_unwind_pc_ftype unwind_pc
)
3134 gdbarch
->unwind_pc
= unwind_pc
;
3138 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
3140 gdb_assert (gdbarch
!= NULL
);
3141 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
3142 if (gdbarch_debug
>= 2)
3143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
3144 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
3148 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
3149 gdbarch_unwind_sp_ftype unwind_sp
)
3151 gdbarch
->unwind_sp
= unwind_sp
;
3155 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
3157 gdb_assert (gdbarch
!= NULL
);
3158 return gdbarch
->frame_num_args
!= NULL
;
3162 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3164 gdb_assert (gdbarch
!= NULL
);
3165 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
3166 if (gdbarch_debug
>= 2)
3167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3168 return gdbarch
->frame_num_args (frame
);
3172 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3173 gdbarch_frame_num_args_ftype frame_num_args
)
3175 gdbarch
->frame_num_args
= frame_num_args
;
3179 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
3181 gdb_assert (gdbarch
!= NULL
);
3182 return gdbarch
->frame_align
!= NULL
;
3186 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
3188 gdb_assert (gdbarch
!= NULL
);
3189 gdb_assert (gdbarch
->frame_align
!= NULL
);
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
3192 return gdbarch
->frame_align (gdbarch
, address
);
3196 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
3197 gdbarch_frame_align_ftype frame_align
)
3199 gdbarch
->frame_align
= frame_align
;
3203 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
3205 gdb_assert (gdbarch
!= NULL
);
3206 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
3209 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
3213 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
3214 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
3216 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
3220 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
3222 gdb_assert (gdbarch
!= NULL
);
3223 if (gdbarch_debug
>= 2)
3224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
3225 return gdbarch
->frame_red_zone_size
;
3229 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
3230 int frame_red_zone_size
)
3232 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
3236 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
3238 gdb_assert (gdbarch
!= NULL
);
3239 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
3242 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
3246 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
3247 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
3249 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
3253 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3255 gdb_assert (gdbarch
!= NULL
);
3256 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
3257 if (gdbarch_debug
>= 2)
3258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
3259 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
3263 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
3264 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
3266 gdbarch
->addr_bits_remove
= addr_bits_remove
;
3270 gdbarch_significant_addr_bit (struct gdbarch
*gdbarch
)
3272 gdb_assert (gdbarch
!= NULL
);
3273 /* Skip verify of significant_addr_bit, invalid_p == 0 */
3274 if (gdbarch_debug
>= 2)
3275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_significant_addr_bit called\n");
3276 return gdbarch
->significant_addr_bit
;
3280 set_gdbarch_significant_addr_bit (struct gdbarch
*gdbarch
,
3281 int significant_addr_bit
)
3283 gdbarch
->significant_addr_bit
= significant_addr_bit
;
3287 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
3289 gdb_assert (gdbarch
!= NULL
);
3290 return gdbarch
->software_single_step
!= NULL
;
3293 std::vector
<CORE_ADDR
>
3294 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3296 gdb_assert (gdbarch
!= NULL
);
3297 gdb_assert (gdbarch
->software_single_step
!= NULL
);
3298 if (gdbarch_debug
>= 2)
3299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
3300 return gdbarch
->software_single_step (regcache
);
3304 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
3305 gdbarch_software_single_step_ftype software_single_step
)
3307 gdbarch
->software_single_step
= software_single_step
;
3311 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
3313 gdb_assert (gdbarch
!= NULL
);
3314 return gdbarch
->single_step_through_delay
!= NULL
;
3318 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3320 gdb_assert (gdbarch
!= NULL
);
3321 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
3322 if (gdbarch_debug
>= 2)
3323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
3324 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
3328 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
3329 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
3331 gdbarch
->single_step_through_delay
= single_step_through_delay
;
3335 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
3337 gdb_assert (gdbarch
!= NULL
);
3338 gdb_assert (gdbarch
->print_insn
!= NULL
);
3339 if (gdbarch_debug
>= 2)
3340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
3341 return gdbarch
->print_insn (vma
, info
);
3345 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
3346 gdbarch_print_insn_ftype print_insn
)
3348 gdbarch
->print_insn
= print_insn
;
3352 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
3354 gdb_assert (gdbarch
!= NULL
);
3355 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
3356 if (gdbarch_debug
>= 2)
3357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
3358 return gdbarch
->skip_trampoline_code (frame
, pc
);
3362 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
3363 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
3365 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3369 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3371 gdb_assert (gdbarch
!= NULL
);
3372 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3373 if (gdbarch_debug
>= 2)
3374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3375 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3379 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3380 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3382 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3386 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, const char *name
)
3388 gdb_assert (gdbarch
!= NULL
);
3389 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3390 if (gdbarch_debug
>= 2)
3391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3392 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
3396 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3397 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3399 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3403 gdbarch_in_indirect_branch_thunk (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3405 gdb_assert (gdbarch
!= NULL
);
3406 gdb_assert (gdbarch
->in_indirect_branch_thunk
!= NULL
);
3407 if (gdbarch_debug
>= 2)
3408 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_indirect_branch_thunk called\n");
3409 return gdbarch
->in_indirect_branch_thunk (gdbarch
, pc
);
3413 set_gdbarch_in_indirect_branch_thunk (struct gdbarch
*gdbarch
,
3414 gdbarch_in_indirect_branch_thunk_ftype in_indirect_branch_thunk
)
3416 gdbarch
->in_indirect_branch_thunk
= in_indirect_branch_thunk
;
3420 gdbarch_stack_frame_destroyed_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3422 gdb_assert (gdbarch
!= NULL
);
3423 gdb_assert (gdbarch
->stack_frame_destroyed_p
!= NULL
);
3424 if (gdbarch_debug
>= 2)
3425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_frame_destroyed_p called\n");
3426 return gdbarch
->stack_frame_destroyed_p (gdbarch
, addr
);
3430 set_gdbarch_stack_frame_destroyed_p (struct gdbarch
*gdbarch
,
3431 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p
)
3433 gdbarch
->stack_frame_destroyed_p
= stack_frame_destroyed_p
;
3437 gdbarch_elf_make_msymbol_special_p (struct gdbarch
*gdbarch
)
3439 gdb_assert (gdbarch
!= NULL
);
3440 return gdbarch
->elf_make_msymbol_special
!= NULL
;
3444 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3446 gdb_assert (gdbarch
!= NULL
);
3447 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3448 if (gdbarch_debug
>= 2)
3449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3450 gdbarch
->elf_make_msymbol_special (sym
, msym
);
3454 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
3455 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
3457 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
3461 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
3463 gdb_assert (gdbarch
!= NULL
);
3464 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
3465 if (gdbarch_debug
>= 2)
3466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
3467 gdbarch
->coff_make_msymbol_special (val
, msym
);
3471 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
3472 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
3474 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
3478 gdbarch_make_symbol_special (struct gdbarch
*gdbarch
, struct symbol
*sym
, struct objfile
*objfile
)
3480 gdb_assert (gdbarch
!= NULL
);
3481 gdb_assert (gdbarch
->make_symbol_special
!= NULL
);
3482 if (gdbarch_debug
>= 2)
3483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_symbol_special called\n");
3484 gdbarch
->make_symbol_special (sym
, objfile
);
3488 set_gdbarch_make_symbol_special (struct gdbarch
*gdbarch
,
3489 gdbarch_make_symbol_special_ftype make_symbol_special
)
3491 gdbarch
->make_symbol_special
= make_symbol_special
;
3495 gdbarch_adjust_dwarf2_addr (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3497 gdb_assert (gdbarch
!= NULL
);
3498 gdb_assert (gdbarch
->adjust_dwarf2_addr
!= NULL
);
3499 if (gdbarch_debug
>= 2)
3500 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_dwarf2_addr called\n");
3501 return gdbarch
->adjust_dwarf2_addr (pc
);
3505 set_gdbarch_adjust_dwarf2_addr (struct gdbarch
*gdbarch
,
3506 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr
)
3508 gdbarch
->adjust_dwarf2_addr
= adjust_dwarf2_addr
;
3512 gdbarch_adjust_dwarf2_line (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int rel
)
3514 gdb_assert (gdbarch
!= NULL
);
3515 gdb_assert (gdbarch
->adjust_dwarf2_line
!= NULL
);
3516 if (gdbarch_debug
>= 2)
3517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_dwarf2_line called\n");
3518 return gdbarch
->adjust_dwarf2_line (addr
, rel
);
3522 set_gdbarch_adjust_dwarf2_line (struct gdbarch
*gdbarch
,
3523 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line
)
3525 gdbarch
->adjust_dwarf2_line
= adjust_dwarf2_line
;
3529 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
3531 gdb_assert (gdbarch
!= NULL
);
3532 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3533 if (gdbarch_debug
>= 2)
3534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
3535 return gdbarch
->cannot_step_breakpoint
;
3539 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
3540 int cannot_step_breakpoint
)
3542 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
3546 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
3548 gdb_assert (gdbarch
!= NULL
);
3549 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3550 if (gdbarch_debug
>= 2)
3551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
3552 return gdbarch
->have_nonsteppable_watchpoint
;
3556 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
3557 int have_nonsteppable_watchpoint
)
3559 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
3563 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
3565 gdb_assert (gdbarch
!= NULL
);
3566 return gdbarch
->address_class_type_flags
!= NULL
;
3570 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
3572 gdb_assert (gdbarch
!= NULL
);
3573 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
3574 if (gdbarch_debug
>= 2)
3575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
3576 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
3580 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
3581 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
3583 gdbarch
->address_class_type_flags
= address_class_type_flags
;
3587 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
3589 gdb_assert (gdbarch
!= NULL
);
3590 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
3594 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, type_instance_flags type_flags
)
3596 gdb_assert (gdbarch
!= NULL
);
3597 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
3598 if (gdbarch_debug
>= 2)
3599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
3600 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
3604 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
3605 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
3607 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
3611 gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch
*gdbarch
, gdb_byte op
, struct dwarf2_frame_state
*fs
)
3613 gdb_assert (gdbarch
!= NULL
);
3614 gdb_assert (gdbarch
->execute_dwarf_cfa_vendor_op
!= NULL
);
3615 if (gdbarch_debug
>= 2)
3616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_execute_dwarf_cfa_vendor_op called\n");
3617 return gdbarch
->execute_dwarf_cfa_vendor_op (gdbarch
, op
, fs
);
3621 set_gdbarch_execute_dwarf_cfa_vendor_op (struct gdbarch
*gdbarch
,
3622 gdbarch_execute_dwarf_cfa_vendor_op_ftype execute_dwarf_cfa_vendor_op
)
3624 gdbarch
->execute_dwarf_cfa_vendor_op
= execute_dwarf_cfa_vendor_op
;
3628 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
3630 gdb_assert (gdbarch
!= NULL
);
3631 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
3635 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, type_instance_flags
*type_flags_ptr
)
3637 gdb_assert (gdbarch
!= NULL
);
3638 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
3641 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
3645 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
3646 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
3648 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
3652 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
3654 gdb_assert (gdbarch
!= NULL
);
3655 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
3656 if (gdbarch_debug
>= 2)
3657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
3658 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
3662 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
3663 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
3665 gdbarch
->register_reggroup_p
= register_reggroup_p
;
3669 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
3671 gdb_assert (gdbarch
!= NULL
);
3672 return gdbarch
->fetch_pointer_argument
!= NULL
;
3676 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
3678 gdb_assert (gdbarch
!= NULL
);
3679 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
3680 if (gdbarch_debug
>= 2)
3681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
3682 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
3686 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
3687 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
3689 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
3693 gdbarch_iterate_over_regset_sections_p (struct gdbarch
*gdbarch
)
3695 gdb_assert (gdbarch
!= NULL
);
3696 return gdbarch
->iterate_over_regset_sections
!= NULL
;
3700 gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
, iterate_over_regset_sections_cb
*cb
, void *cb_data
, const struct regcache
*regcache
)
3702 gdb_assert (gdbarch
!= NULL
);
3703 gdb_assert (gdbarch
->iterate_over_regset_sections
!= NULL
);
3704 if (gdbarch_debug
>= 2)
3705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_regset_sections called\n");
3706 gdbarch
->iterate_over_regset_sections (gdbarch
, cb
, cb_data
, regcache
);
3710 set_gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
,
3711 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections
)
3713 gdbarch
->iterate_over_regset_sections
= iterate_over_regset_sections
;
3717 gdbarch_make_corefile_notes_p (struct gdbarch
*gdbarch
)
3719 gdb_assert (gdbarch
!= NULL
);
3720 return gdbarch
->make_corefile_notes
!= NULL
;
3723 gdb::unique_xmalloc_ptr
<char>
3724 gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
, bfd
*obfd
, int *note_size
)
3726 gdb_assert (gdbarch
!= NULL
);
3727 gdb_assert (gdbarch
->make_corefile_notes
!= NULL
);
3728 if (gdbarch_debug
>= 2)
3729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_corefile_notes called\n");
3730 return gdbarch
->make_corefile_notes (gdbarch
, obfd
, note_size
);
3734 set_gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
,
3735 gdbarch_make_corefile_notes_ftype make_corefile_notes
)
3737 gdbarch
->make_corefile_notes
= make_corefile_notes
;
3741 gdbarch_find_memory_regions_p (struct gdbarch
*gdbarch
)
3743 gdb_assert (gdbarch
!= NULL
);
3744 return gdbarch
->find_memory_regions
!= NULL
;
3748 gdbarch_find_memory_regions (struct gdbarch
*gdbarch
, find_memory_region_ftype func
, void *data
)
3750 gdb_assert (gdbarch
!= NULL
);
3751 gdb_assert (gdbarch
->find_memory_regions
!= NULL
);
3752 if (gdbarch_debug
>= 2)
3753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_memory_regions called\n");
3754 return gdbarch
->find_memory_regions (gdbarch
, func
, data
);
3758 set_gdbarch_find_memory_regions (struct gdbarch
*gdbarch
,
3759 gdbarch_find_memory_regions_ftype find_memory_regions
)
3761 gdbarch
->find_memory_regions
= find_memory_regions
;
3765 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3767 gdb_assert (gdbarch
!= NULL
);
3768 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3772 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3774 gdb_assert (gdbarch
!= NULL
);
3775 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3776 if (gdbarch_debug
>= 2)
3777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3778 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3782 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3783 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3785 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3789 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch
*gdbarch
)
3791 gdb_assert (gdbarch
!= NULL
);
3792 return gdbarch
->core_xfer_shared_libraries_aix
!= NULL
;
3796 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3798 gdb_assert (gdbarch
!= NULL
);
3799 gdb_assert (gdbarch
->core_xfer_shared_libraries_aix
!= NULL
);
3800 if (gdbarch_debug
>= 2)
3801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries_aix called\n");
3802 return gdbarch
->core_xfer_shared_libraries_aix (gdbarch
, readbuf
, offset
, len
);
3806 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
,
3807 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix
)
3809 gdbarch
->core_xfer_shared_libraries_aix
= core_xfer_shared_libraries_aix
;
3813 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 return gdbarch
->core_pid_to_str
!= NULL
;
3820 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3822 gdb_assert (gdbarch
!= NULL
);
3823 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3826 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3830 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3831 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3833 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3837 gdbarch_core_thread_name_p (struct gdbarch
*gdbarch
)
3839 gdb_assert (gdbarch
!= NULL
);
3840 return gdbarch
->core_thread_name
!= NULL
;
3844 gdbarch_core_thread_name (struct gdbarch
*gdbarch
, struct thread_info
*thr
)
3846 gdb_assert (gdbarch
!= NULL
);
3847 gdb_assert (gdbarch
->core_thread_name
!= NULL
);
3848 if (gdbarch_debug
>= 2)
3849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_thread_name called\n");
3850 return gdbarch
->core_thread_name (gdbarch
, thr
);
3854 set_gdbarch_core_thread_name (struct gdbarch
*gdbarch
,
3855 gdbarch_core_thread_name_ftype core_thread_name
)
3857 gdbarch
->core_thread_name
= core_thread_name
;
3861 gdbarch_core_xfer_siginfo_p (struct gdbarch
*gdbarch
)
3863 gdb_assert (gdbarch
!= NULL
);
3864 return gdbarch
->core_xfer_siginfo
!= NULL
;
3868 gdbarch_core_xfer_siginfo (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3870 gdb_assert (gdbarch
!= NULL
);
3871 gdb_assert (gdbarch
->core_xfer_siginfo
!= NULL
);
3872 if (gdbarch_debug
>= 2)
3873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_siginfo called\n");
3874 return gdbarch
->core_xfer_siginfo (gdbarch
, readbuf
, offset
, len
);
3878 set_gdbarch_core_xfer_siginfo (struct gdbarch
*gdbarch
,
3879 gdbarch_core_xfer_siginfo_ftype core_xfer_siginfo
)
3881 gdbarch
->core_xfer_siginfo
= core_xfer_siginfo
;
3885 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3887 gdb_assert (gdbarch
!= NULL
);
3888 return gdbarch
->gcore_bfd_target
!= 0;
3892 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3894 gdb_assert (gdbarch
!= NULL
);
3895 /* Check variable changed from pre-default. */
3896 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3899 return gdbarch
->gcore_bfd_target
;
3903 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3904 const char * gcore_bfd_target
)
3906 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3910 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3912 gdb_assert (gdbarch
!= NULL
);
3913 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3914 if (gdbarch_debug
>= 2)
3915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3916 return gdbarch
->vtable_function_descriptors
;
3920 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3921 int vtable_function_descriptors
)
3923 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3927 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3929 gdb_assert (gdbarch
!= NULL
);
3930 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3931 if (gdbarch_debug
>= 2)
3932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3933 return gdbarch
->vbit_in_delta
;
3937 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3940 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3944 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3946 gdb_assert (gdbarch
!= NULL
);
3947 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3948 if (gdbarch_debug
>= 2)
3949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3950 gdbarch
->skip_permanent_breakpoint (regcache
);
3954 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3955 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3957 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3961 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3963 gdb_assert (gdbarch
!= NULL
);
3964 return gdbarch
->max_insn_length
!= 0;
3968 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3970 gdb_assert (gdbarch
!= NULL
);
3971 /* Check variable changed from pre-default. */
3972 gdb_assert (gdbarch
->max_insn_length
!= 0);
3973 if (gdbarch_debug
>= 2)
3974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3975 return gdbarch
->max_insn_length
;
3979 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3980 ULONGEST max_insn_length
)
3982 gdbarch
->max_insn_length
= max_insn_length
;
3986 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3988 gdb_assert (gdbarch
!= NULL
);
3989 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3992 displaced_step_copy_insn_closure_up
3993 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3995 gdb_assert (gdbarch
!= NULL
);
3996 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3997 if (gdbarch_debug
>= 2)
3998 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3999 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
4003 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
4004 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
4006 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
4010 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
)
4012 gdb_assert (gdbarch
!= NULL
);
4013 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
4014 if (gdbarch_debug
>= 2)
4015 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
4016 return gdbarch
->displaced_step_hw_singlestep (gdbarch
);
4020 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
4021 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
4023 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
4027 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
4029 gdb_assert (gdbarch
!= NULL
);
4030 return gdbarch
->displaced_step_fixup
!= NULL
;
4034 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_copy_insn_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
4036 gdb_assert (gdbarch
!= NULL
);
4037 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
4038 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
4039 if (gdbarch_debug
>= 2)
4040 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
4041 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
4045 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
4046 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
4048 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
4052 gdbarch_displaced_step_prepare_p (struct gdbarch
*gdbarch
)
4054 gdb_assert (gdbarch
!= NULL
);
4055 return gdbarch
->displaced_step_prepare
!= NULL
;
4058 displaced_step_prepare_status
4059 gdbarch_displaced_step_prepare (struct gdbarch
*gdbarch
, thread_info
*thread
, CORE_ADDR
&displaced_pc
)
4061 gdb_assert (gdbarch
!= NULL
);
4062 gdb_assert (gdbarch
->displaced_step_prepare
!= NULL
);
4063 if (gdbarch_debug
>= 2)
4064 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_prepare called\n");
4065 return gdbarch
->displaced_step_prepare (gdbarch
, thread
, displaced_pc
);
4069 set_gdbarch_displaced_step_prepare (struct gdbarch
*gdbarch
,
4070 gdbarch_displaced_step_prepare_ftype displaced_step_prepare
)
4072 gdbarch
->displaced_step_prepare
= displaced_step_prepare
;
4075 displaced_step_finish_status
4076 gdbarch_displaced_step_finish (struct gdbarch
*gdbarch
, thread_info
*thread
, gdb_signal sig
)
4078 gdb_assert (gdbarch
!= NULL
);
4079 gdb_assert (gdbarch
->displaced_step_finish
!= NULL
);
4080 if (gdbarch_debug
>= 2)
4081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_finish called\n");
4082 return gdbarch
->displaced_step_finish (gdbarch
, thread
, sig
);
4086 set_gdbarch_displaced_step_finish (struct gdbarch
*gdbarch
,
4087 gdbarch_displaced_step_finish_ftype displaced_step_finish
)
4089 gdbarch
->displaced_step_finish
= displaced_step_finish
;
4093 gdbarch_displaced_step_copy_insn_closure_by_addr_p (struct gdbarch
*gdbarch
)
4095 gdb_assert (gdbarch
!= NULL
);
4096 return gdbarch
->displaced_step_copy_insn_closure_by_addr
!= NULL
;
4099 const displaced_step_copy_insn_closure
*
4100 gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch
*gdbarch
, inferior
*inf
, CORE_ADDR addr
)
4102 gdb_assert (gdbarch
!= NULL
);
4103 gdb_assert (gdbarch
->displaced_step_copy_insn_closure_by_addr
!= NULL
);
4104 if (gdbarch_debug
>= 2)
4105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn_closure_by_addr called\n");
4106 return gdbarch
->displaced_step_copy_insn_closure_by_addr (inf
, addr
);
4110 set_gdbarch_displaced_step_copy_insn_closure_by_addr (struct gdbarch
*gdbarch
,
4111 gdbarch_displaced_step_copy_insn_closure_by_addr_ftype displaced_step_copy_insn_closure_by_addr
)
4113 gdbarch
->displaced_step_copy_insn_closure_by_addr
= displaced_step_copy_insn_closure_by_addr
;
4117 gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch
*gdbarch
, inferior
*parent_inf
, ptid_t child_ptid
)
4119 gdb_assert (gdbarch
!= NULL
);
4120 gdb_assert (gdbarch
->displaced_step_restore_all_in_ptid
!= NULL
);
4121 if (gdbarch_debug
>= 2)
4122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_restore_all_in_ptid called\n");
4123 gdbarch
->displaced_step_restore_all_in_ptid (parent_inf
, child_ptid
);
4127 set_gdbarch_displaced_step_restore_all_in_ptid (struct gdbarch
*gdbarch
,
4128 gdbarch_displaced_step_restore_all_in_ptid_ftype displaced_step_restore_all_in_ptid
)
4130 gdbarch
->displaced_step_restore_all_in_ptid
= displaced_step_restore_all_in_ptid
;
4134 gdbarch_relocate_instruction_p (struct gdbarch
*gdbarch
)
4136 gdb_assert (gdbarch
!= NULL
);
4137 return gdbarch
->relocate_instruction
!= NULL
;
4141 gdbarch_relocate_instruction (struct gdbarch
*gdbarch
, CORE_ADDR
*to
, CORE_ADDR from
)
4143 gdb_assert (gdbarch
!= NULL
);
4144 gdb_assert (gdbarch
->relocate_instruction
!= NULL
);
4145 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
4146 if (gdbarch_debug
>= 2)
4147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_relocate_instruction called\n");
4148 gdbarch
->relocate_instruction (gdbarch
, to
, from
);
4152 set_gdbarch_relocate_instruction (struct gdbarch
*gdbarch
,
4153 gdbarch_relocate_instruction_ftype relocate_instruction
)
4155 gdbarch
->relocate_instruction
= relocate_instruction
;
4159 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
4161 gdb_assert (gdbarch
!= NULL
);
4162 return gdbarch
->overlay_update
!= NULL
;
4166 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
4168 gdb_assert (gdbarch
!= NULL
);
4169 gdb_assert (gdbarch
->overlay_update
!= NULL
);
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
4172 gdbarch
->overlay_update (osect
);
4176 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
4177 gdbarch_overlay_update_ftype overlay_update
)
4179 gdbarch
->overlay_update
= overlay_update
;
4183 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
4185 gdb_assert (gdbarch
!= NULL
);
4186 return gdbarch
->core_read_description
!= NULL
;
4189 const struct target_desc
*
4190 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
4192 gdb_assert (gdbarch
!= NULL
);
4193 gdb_assert (gdbarch
->core_read_description
!= NULL
);
4194 if (gdbarch_debug
>= 2)
4195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
4196 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
4200 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
4201 gdbarch_core_read_description_ftype core_read_description
)
4203 gdbarch
->core_read_description
= core_read_description
;
4207 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
4209 gdb_assert (gdbarch
!= NULL
);
4210 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
4211 if (gdbarch_debug
>= 2)
4212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
4213 return gdbarch
->sofun_address_maybe_missing
;
4217 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
4218 int sofun_address_maybe_missing
)
4220 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
4224 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
4226 gdb_assert (gdbarch
!= NULL
);
4227 return gdbarch
->process_record
!= NULL
;
4231 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
4233 gdb_assert (gdbarch
!= NULL
);
4234 gdb_assert (gdbarch
->process_record
!= NULL
);
4235 if (gdbarch_debug
>= 2)
4236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
4237 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
4241 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
4242 gdbarch_process_record_ftype process_record
)
4244 gdbarch
->process_record
= process_record
;
4248 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
4250 gdb_assert (gdbarch
!= NULL
);
4251 return gdbarch
->process_record_signal
!= NULL
;
4255 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum gdb_signal signal
)
4257 gdb_assert (gdbarch
!= NULL
);
4258 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
4259 if (gdbarch_debug
>= 2)
4260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
4261 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
4265 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
4266 gdbarch_process_record_signal_ftype process_record_signal
)
4268 gdbarch
->process_record_signal
= process_record_signal
;
4272 gdbarch_gdb_signal_from_target_p (struct gdbarch
*gdbarch
)
4274 gdb_assert (gdbarch
!= NULL
);
4275 return gdbarch
->gdb_signal_from_target
!= NULL
;
4279 gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
, int signo
)
4281 gdb_assert (gdbarch
!= NULL
);
4282 gdb_assert (gdbarch
->gdb_signal_from_target
!= NULL
);
4283 if (gdbarch_debug
>= 2)
4284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_from_target called\n");
4285 return gdbarch
->gdb_signal_from_target (gdbarch
, signo
);
4289 set_gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
,
4290 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target
)
4292 gdbarch
->gdb_signal_from_target
= gdb_signal_from_target
;
4296 gdbarch_gdb_signal_to_target_p (struct gdbarch
*gdbarch
)
4298 gdb_assert (gdbarch
!= NULL
);
4299 return gdbarch
->gdb_signal_to_target
!= NULL
;
4303 gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
, enum gdb_signal signal
)
4305 gdb_assert (gdbarch
!= NULL
);
4306 gdb_assert (gdbarch
->gdb_signal_to_target
!= NULL
);
4307 if (gdbarch_debug
>= 2)
4308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_to_target called\n");
4309 return gdbarch
->gdb_signal_to_target (gdbarch
, signal
);
4313 set_gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
,
4314 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target
)
4316 gdbarch
->gdb_signal_to_target
= gdb_signal_to_target
;
4320 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
4322 gdb_assert (gdbarch
!= NULL
);
4323 return gdbarch
->get_siginfo_type
!= NULL
;
4327 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
4329 gdb_assert (gdbarch
!= NULL
);
4330 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
4331 if (gdbarch_debug
>= 2)
4332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
4333 return gdbarch
->get_siginfo_type (gdbarch
);
4337 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
4338 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
4340 gdbarch
->get_siginfo_type
= get_siginfo_type
;
4344 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
4346 gdb_assert (gdbarch
!= NULL
);
4347 return gdbarch
->record_special_symbol
!= NULL
;
4351 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
4353 gdb_assert (gdbarch
!= NULL
);
4354 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
4355 if (gdbarch_debug
>= 2)
4356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
4357 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
4361 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
4362 gdbarch_record_special_symbol_ftype record_special_symbol
)
4364 gdbarch
->record_special_symbol
= record_special_symbol
;
4368 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
4370 gdb_assert (gdbarch
!= NULL
);
4371 return gdbarch
->get_syscall_number
!= NULL
;
4375 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, thread_info
*thread
)
4377 gdb_assert (gdbarch
!= NULL
);
4378 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
4379 if (gdbarch_debug
>= 2)
4380 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
4381 return gdbarch
->get_syscall_number (gdbarch
, thread
);
4385 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
4386 gdbarch_get_syscall_number_ftype get_syscall_number
)
4388 gdbarch
->get_syscall_number
= get_syscall_number
;
4392 gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
)
4394 gdb_assert (gdbarch
!= NULL
);
4395 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4396 if (gdbarch_debug
>= 2)
4397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_xml_syscall_file called\n");
4398 return gdbarch
->xml_syscall_file
;
4402 set_gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
,
4403 const char * xml_syscall_file
)
4405 gdbarch
->xml_syscall_file
= xml_syscall_file
;
4408 struct syscalls_info
*
4409 gdbarch_syscalls_info (struct gdbarch
*gdbarch
)
4411 gdb_assert (gdbarch
!= NULL
);
4412 /* Skip verify of syscalls_info, invalid_p == 0 */
4413 if (gdbarch_debug
>= 2)
4414 fprintf_unfiltered (gdb_stdlog
, "gdbarch_syscalls_info called\n");
4415 return gdbarch
->syscalls_info
;
4419 set_gdbarch_syscalls_info (struct gdbarch
*gdbarch
,
4420 struct syscalls_info
* syscalls_info
)
4422 gdbarch
->syscalls_info
= syscalls_info
;
4426 gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
)
4428 gdb_assert (gdbarch
!= NULL
);
4429 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4430 if (gdbarch_debug
>= 2)
4431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_prefixes called\n");
4432 return gdbarch
->stap_integer_prefixes
;
4436 set_gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
,
4437 const char *const * stap_integer_prefixes
)
4439 gdbarch
->stap_integer_prefixes
= stap_integer_prefixes
;
4443 gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
)
4445 gdb_assert (gdbarch
!= NULL
);
4446 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4447 if (gdbarch_debug
>= 2)
4448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_suffixes called\n");
4449 return gdbarch
->stap_integer_suffixes
;
4453 set_gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
,
4454 const char *const * stap_integer_suffixes
)
4456 gdbarch
->stap_integer_suffixes
= stap_integer_suffixes
;
4460 gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
)
4462 gdb_assert (gdbarch
!= NULL
);
4463 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4464 if (gdbarch_debug
>= 2)
4465 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_prefixes called\n");
4466 return gdbarch
->stap_register_prefixes
;
4470 set_gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
,
4471 const char *const * stap_register_prefixes
)
4473 gdbarch
->stap_register_prefixes
= stap_register_prefixes
;
4477 gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
)
4479 gdb_assert (gdbarch
!= NULL
);
4480 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4481 if (gdbarch_debug
>= 2)
4482 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_suffixes called\n");
4483 return gdbarch
->stap_register_suffixes
;
4487 set_gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
,
4488 const char *const * stap_register_suffixes
)
4490 gdbarch
->stap_register_suffixes
= stap_register_suffixes
;
4494 gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
)
4496 gdb_assert (gdbarch
!= NULL
);
4497 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4498 if (gdbarch_debug
>= 2)
4499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_prefixes called\n");
4500 return gdbarch
->stap_register_indirection_prefixes
;
4504 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
,
4505 const char *const * stap_register_indirection_prefixes
)
4507 gdbarch
->stap_register_indirection_prefixes
= stap_register_indirection_prefixes
;
4511 gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
)
4513 gdb_assert (gdbarch
!= NULL
);
4514 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4515 if (gdbarch_debug
>= 2)
4516 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_suffixes called\n");
4517 return gdbarch
->stap_register_indirection_suffixes
;
4521 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
,
4522 const char *const * stap_register_indirection_suffixes
)
4524 gdbarch
->stap_register_indirection_suffixes
= stap_register_indirection_suffixes
;
4528 gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
)
4530 gdb_assert (gdbarch
!= NULL
);
4531 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4532 if (gdbarch_debug
>= 2)
4533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_prefix called\n");
4534 return gdbarch
->stap_gdb_register_prefix
;
4538 set_gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
,
4539 const char * stap_gdb_register_prefix
)
4541 gdbarch
->stap_gdb_register_prefix
= stap_gdb_register_prefix
;
4545 gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
)
4547 gdb_assert (gdbarch
!= NULL
);
4548 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4549 if (gdbarch_debug
>= 2)
4550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_suffix called\n");
4551 return gdbarch
->stap_gdb_register_suffix
;
4555 set_gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
,
4556 const char * stap_gdb_register_suffix
)
4558 gdbarch
->stap_gdb_register_suffix
= stap_gdb_register_suffix
;
4562 gdbarch_stap_is_single_operand_p (struct gdbarch
*gdbarch
)
4564 gdb_assert (gdbarch
!= NULL
);
4565 return gdbarch
->stap_is_single_operand
!= NULL
;
4569 gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
, const char *s
)
4571 gdb_assert (gdbarch
!= NULL
);
4572 gdb_assert (gdbarch
->stap_is_single_operand
!= NULL
);
4573 if (gdbarch_debug
>= 2)
4574 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_is_single_operand called\n");
4575 return gdbarch
->stap_is_single_operand (gdbarch
, s
);
4579 set_gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
,
4580 gdbarch_stap_is_single_operand_ftype stap_is_single_operand
)
4582 gdbarch
->stap_is_single_operand
= stap_is_single_operand
;
4586 gdbarch_stap_parse_special_token_p (struct gdbarch
*gdbarch
)
4588 gdb_assert (gdbarch
!= NULL
);
4589 return gdbarch
->stap_parse_special_token
!= NULL
;
4593 gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
)
4595 gdb_assert (gdbarch
!= NULL
);
4596 gdb_assert (gdbarch
->stap_parse_special_token
!= NULL
);
4597 if (gdbarch_debug
>= 2)
4598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_parse_special_token called\n");
4599 return gdbarch
->stap_parse_special_token (gdbarch
, p
);
4603 set_gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
,
4604 gdbarch_stap_parse_special_token_ftype stap_parse_special_token
)
4606 gdbarch
->stap_parse_special_token
= stap_parse_special_token
;
4610 gdbarch_stap_adjust_register_p (struct gdbarch
*gdbarch
)
4612 gdb_assert (gdbarch
!= NULL
);
4613 return gdbarch
->stap_adjust_register
!= NULL
;
4617 gdbarch_stap_adjust_register (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
, const std::string
®name
, int regnum
)
4619 gdb_assert (gdbarch
!= NULL
);
4620 gdb_assert (gdbarch
->stap_adjust_register
!= NULL
);
4621 if (gdbarch_debug
>= 2)
4622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_adjust_register called\n");
4623 return gdbarch
->stap_adjust_register (gdbarch
, p
, regname
, regnum
);
4627 set_gdbarch_stap_adjust_register (struct gdbarch
*gdbarch
,
4628 gdbarch_stap_adjust_register_ftype stap_adjust_register
)
4630 gdbarch
->stap_adjust_register
= stap_adjust_register
;
4634 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch
*gdbarch
)
4636 gdb_assert (gdbarch
!= NULL
);
4637 return gdbarch
->dtrace_parse_probe_argument
!= NULL
;
4641 gdbarch_dtrace_parse_probe_argument (struct gdbarch
*gdbarch
, struct expr_builder
*builder
, int narg
)
4643 gdb_assert (gdbarch
!= NULL
);
4644 gdb_assert (gdbarch
->dtrace_parse_probe_argument
!= NULL
);
4645 if (gdbarch_debug
>= 2)
4646 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_parse_probe_argument called\n");
4647 gdbarch
->dtrace_parse_probe_argument (gdbarch
, builder
, narg
);
4651 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch
*gdbarch
,
4652 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument
)
4654 gdbarch
->dtrace_parse_probe_argument
= dtrace_parse_probe_argument
;
4658 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch
*gdbarch
)
4660 gdb_assert (gdbarch
!= NULL
);
4661 return gdbarch
->dtrace_probe_is_enabled
!= NULL
;
4665 gdbarch_dtrace_probe_is_enabled (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4667 gdb_assert (gdbarch
!= NULL
);
4668 gdb_assert (gdbarch
->dtrace_probe_is_enabled
!= NULL
);
4669 if (gdbarch_debug
>= 2)
4670 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_probe_is_enabled called\n");
4671 return gdbarch
->dtrace_probe_is_enabled (gdbarch
, addr
);
4675 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch
*gdbarch
,
4676 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled
)
4678 gdbarch
->dtrace_probe_is_enabled
= dtrace_probe_is_enabled
;
4682 gdbarch_dtrace_enable_probe_p (struct gdbarch
*gdbarch
)
4684 gdb_assert (gdbarch
!= NULL
);
4685 return gdbarch
->dtrace_enable_probe
!= NULL
;
4689 gdbarch_dtrace_enable_probe (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4691 gdb_assert (gdbarch
!= NULL
);
4692 gdb_assert (gdbarch
->dtrace_enable_probe
!= NULL
);
4693 if (gdbarch_debug
>= 2)
4694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_enable_probe called\n");
4695 gdbarch
->dtrace_enable_probe (gdbarch
, addr
);
4699 set_gdbarch_dtrace_enable_probe (struct gdbarch
*gdbarch
,
4700 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe
)
4702 gdbarch
->dtrace_enable_probe
= dtrace_enable_probe
;
4706 gdbarch_dtrace_disable_probe_p (struct gdbarch
*gdbarch
)
4708 gdb_assert (gdbarch
!= NULL
);
4709 return gdbarch
->dtrace_disable_probe
!= NULL
;
4713 gdbarch_dtrace_disable_probe (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4715 gdb_assert (gdbarch
!= NULL
);
4716 gdb_assert (gdbarch
->dtrace_disable_probe
!= NULL
);
4717 if (gdbarch_debug
>= 2)
4718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_disable_probe called\n");
4719 gdbarch
->dtrace_disable_probe (gdbarch
, addr
);
4723 set_gdbarch_dtrace_disable_probe (struct gdbarch
*gdbarch
,
4724 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe
)
4726 gdbarch
->dtrace_disable_probe
= dtrace_disable_probe
;
4730 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
4732 gdb_assert (gdbarch
!= NULL
);
4733 /* Skip verify of has_global_solist, invalid_p == 0 */
4734 if (gdbarch_debug
>= 2)
4735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
4736 return gdbarch
->has_global_solist
;
4740 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
4741 int has_global_solist
)
4743 gdbarch
->has_global_solist
= has_global_solist
;
4747 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
4749 gdb_assert (gdbarch
!= NULL
);
4750 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4751 if (gdbarch_debug
>= 2)
4752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
4753 return gdbarch
->has_global_breakpoints
;
4757 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
4758 int has_global_breakpoints
)
4760 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
4764 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
4766 gdb_assert (gdbarch
!= NULL
);
4767 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
4768 if (gdbarch_debug
>= 2)
4769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
4770 return gdbarch
->has_shared_address_space (gdbarch
);
4774 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
4775 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
4777 gdbarch
->has_shared_address_space
= has_shared_address_space
;
4781 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, std::string
*msg
)
4783 gdb_assert (gdbarch
!= NULL
);
4784 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
4785 if (gdbarch_debug
>= 2)
4786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
4787 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, msg
);
4791 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
4792 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
4794 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
4798 gdbarch_guess_tracepoint_registers (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
4800 gdb_assert (gdbarch
!= NULL
);
4801 gdb_assert (gdbarch
->guess_tracepoint_registers
!= NULL
);
4802 if (gdbarch_debug
>= 2)
4803 fprintf_unfiltered (gdb_stdlog
, "gdbarch_guess_tracepoint_registers called\n");
4804 gdbarch
->guess_tracepoint_registers (gdbarch
, regcache
, addr
);
4808 set_gdbarch_guess_tracepoint_registers (struct gdbarch
*gdbarch
,
4809 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers
)
4811 gdbarch
->guess_tracepoint_registers
= guess_tracepoint_registers
;
4815 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
4817 gdb_assert (gdbarch
!= NULL
);
4818 gdb_assert (gdbarch
->auto_charset
!= NULL
);
4819 if (gdbarch_debug
>= 2)
4820 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
4821 return gdbarch
->auto_charset ();
4825 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
4826 gdbarch_auto_charset_ftype auto_charset
)
4828 gdbarch
->auto_charset
= auto_charset
;
4832 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
4834 gdb_assert (gdbarch
!= NULL
);
4835 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
4836 if (gdbarch_debug
>= 2)
4837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
4838 return gdbarch
->auto_wide_charset ();
4842 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
4843 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
4845 gdbarch
->auto_wide_charset
= auto_wide_charset
;
4849 gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
)
4851 gdb_assert (gdbarch
!= NULL
);
4852 if (gdbarch_debug
>= 2)
4853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_solib_symbols_extension called\n");
4854 return gdbarch
->solib_symbols_extension
;
4858 set_gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
,
4859 const char * solib_symbols_extension
)
4861 gdbarch
->solib_symbols_extension
= solib_symbols_extension
;
4865 gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
)
4867 gdb_assert (gdbarch
!= NULL
);
4868 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4869 if (gdbarch_debug
>= 2)
4870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_dos_based_file_system called\n");
4871 return gdbarch
->has_dos_based_file_system
;
4875 set_gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
,
4876 int has_dos_based_file_system
)
4878 gdbarch
->has_dos_based_file_system
= has_dos_based_file_system
;
4882 gdbarch_gen_return_address (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, struct axs_value
*value
, CORE_ADDR scope
)
4884 gdb_assert (gdbarch
!= NULL
);
4885 gdb_assert (gdbarch
->gen_return_address
!= NULL
);
4886 if (gdbarch_debug
>= 2)
4887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gen_return_address called\n");
4888 gdbarch
->gen_return_address (gdbarch
, ax
, value
, scope
);
4892 set_gdbarch_gen_return_address (struct gdbarch
*gdbarch
,
4893 gdbarch_gen_return_address_ftype gen_return_address
)
4895 gdbarch
->gen_return_address
= gen_return_address
;
4899 gdbarch_info_proc_p (struct gdbarch
*gdbarch
)
4901 gdb_assert (gdbarch
!= NULL
);
4902 return gdbarch
->info_proc
!= NULL
;
4906 gdbarch_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4908 gdb_assert (gdbarch
!= NULL
);
4909 gdb_assert (gdbarch
->info_proc
!= NULL
);
4910 if (gdbarch_debug
>= 2)
4911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_info_proc called\n");
4912 gdbarch
->info_proc (gdbarch
, args
, what
);
4916 set_gdbarch_info_proc (struct gdbarch
*gdbarch
,
4917 gdbarch_info_proc_ftype info_proc
)
4919 gdbarch
->info_proc
= info_proc
;
4923 gdbarch_core_info_proc_p (struct gdbarch
*gdbarch
)
4925 gdb_assert (gdbarch
!= NULL
);
4926 return gdbarch
->core_info_proc
!= NULL
;
4930 gdbarch_core_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4932 gdb_assert (gdbarch
!= NULL
);
4933 gdb_assert (gdbarch
->core_info_proc
!= NULL
);
4934 if (gdbarch_debug
>= 2)
4935 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_info_proc called\n");
4936 gdbarch
->core_info_proc (gdbarch
, args
, what
);
4940 set_gdbarch_core_info_proc (struct gdbarch
*gdbarch
,
4941 gdbarch_core_info_proc_ftype core_info_proc
)
4943 gdbarch
->core_info_proc
= core_info_proc
;
4947 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
)
4949 gdb_assert (gdbarch
!= NULL
);
4950 gdb_assert (gdbarch
->iterate_over_objfiles_in_search_order
!= NULL
);
4951 if (gdbarch_debug
>= 2)
4952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4953 gdbarch
->iterate_over_objfiles_in_search_order (gdbarch
, cb
, cb_data
, current_objfile
);
4957 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch
*gdbarch
,
4958 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order
)
4960 gdbarch
->iterate_over_objfiles_in_search_order
= iterate_over_objfiles_in_search_order
;
4963 struct ravenscar_arch_ops
*
4964 gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
)
4966 gdb_assert (gdbarch
!= NULL
);
4967 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4968 if (gdbarch_debug
>= 2)
4969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ravenscar_ops called\n");
4970 return gdbarch
->ravenscar_ops
;
4974 set_gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
,
4975 struct ravenscar_arch_ops
* ravenscar_ops
)
4977 gdbarch
->ravenscar_ops
= ravenscar_ops
;
4981 gdbarch_insn_is_call (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4983 gdb_assert (gdbarch
!= NULL
);
4984 gdb_assert (gdbarch
->insn_is_call
!= NULL
);
4985 if (gdbarch_debug
>= 2)
4986 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_call called\n");
4987 return gdbarch
->insn_is_call (gdbarch
, addr
);
4991 set_gdbarch_insn_is_call (struct gdbarch
*gdbarch
,
4992 gdbarch_insn_is_call_ftype insn_is_call
)
4994 gdbarch
->insn_is_call
= insn_is_call
;
4998 gdbarch_insn_is_ret (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5000 gdb_assert (gdbarch
!= NULL
);
5001 gdb_assert (gdbarch
->insn_is_ret
!= NULL
);
5002 if (gdbarch_debug
>= 2)
5003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_ret called\n");
5004 return gdbarch
->insn_is_ret (gdbarch
, addr
);
5008 set_gdbarch_insn_is_ret (struct gdbarch
*gdbarch
,
5009 gdbarch_insn_is_ret_ftype insn_is_ret
)
5011 gdbarch
->insn_is_ret
= insn_is_ret
;
5015 gdbarch_insn_is_jump (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5017 gdb_assert (gdbarch
!= NULL
);
5018 gdb_assert (gdbarch
->insn_is_jump
!= NULL
);
5019 if (gdbarch_debug
>= 2)
5020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_jump called\n");
5021 return gdbarch
->insn_is_jump (gdbarch
, addr
);
5025 set_gdbarch_insn_is_jump (struct gdbarch
*gdbarch
,
5026 gdbarch_insn_is_jump_ftype insn_is_jump
)
5028 gdbarch
->insn_is_jump
= insn_is_jump
;
5032 gdbarch_program_breakpoint_here_p (struct gdbarch
*gdbarch
, CORE_ADDR address
)
5034 gdb_assert (gdbarch
!= NULL
);
5035 gdb_assert (gdbarch
->program_breakpoint_here_p
!= NULL
);
5036 if (gdbarch_debug
>= 2)
5037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_program_breakpoint_here_p called\n");
5038 return gdbarch
->program_breakpoint_here_p (gdbarch
, address
);
5042 set_gdbarch_program_breakpoint_here_p (struct gdbarch
*gdbarch
,
5043 gdbarch_program_breakpoint_here_p_ftype program_breakpoint_here_p
)
5045 gdbarch
->program_breakpoint_here_p
= program_breakpoint_here_p
;
5049 gdbarch_auxv_parse_p (struct gdbarch
*gdbarch
)
5051 gdb_assert (gdbarch
!= NULL
);
5052 return gdbarch
->auxv_parse
!= NULL
;
5056 gdbarch_auxv_parse (struct gdbarch
*gdbarch
, gdb_byte
**readptr
, gdb_byte
*endptr
, CORE_ADDR
*typep
, CORE_ADDR
*valp
)
5058 gdb_assert (gdbarch
!= NULL
);
5059 gdb_assert (gdbarch
->auxv_parse
!= NULL
);
5060 if (gdbarch_debug
>= 2)
5061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auxv_parse called\n");
5062 return gdbarch
->auxv_parse (gdbarch
, readptr
, endptr
, typep
, valp
);
5066 set_gdbarch_auxv_parse (struct gdbarch
*gdbarch
,
5067 gdbarch_auxv_parse_ftype auxv_parse
)
5069 gdbarch
->auxv_parse
= auxv_parse
;
5073 gdbarch_print_auxv_entry (struct gdbarch
*gdbarch
, struct ui_file
*file
, CORE_ADDR type
, CORE_ADDR val
)
5075 gdb_assert (gdbarch
!= NULL
);
5076 gdb_assert (gdbarch
->print_auxv_entry
!= NULL
);
5077 if (gdbarch_debug
>= 2)
5078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_auxv_entry called\n");
5079 gdbarch
->print_auxv_entry (gdbarch
, file
, type
, val
);
5083 set_gdbarch_print_auxv_entry (struct gdbarch
*gdbarch
,
5084 gdbarch_print_auxv_entry_ftype print_auxv_entry
)
5086 gdbarch
->print_auxv_entry
= print_auxv_entry
;
5090 gdbarch_vsyscall_range (struct gdbarch
*gdbarch
, struct mem_range
*range
)
5092 gdb_assert (gdbarch
!= NULL
);
5093 gdb_assert (gdbarch
->vsyscall_range
!= NULL
);
5094 if (gdbarch_debug
>= 2)
5095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vsyscall_range called\n");
5096 return gdbarch
->vsyscall_range (gdbarch
, range
);
5100 set_gdbarch_vsyscall_range (struct gdbarch
*gdbarch
,
5101 gdbarch_vsyscall_range_ftype vsyscall_range
)
5103 gdbarch
->vsyscall_range
= vsyscall_range
;
5107 gdbarch_infcall_mmap (struct gdbarch
*gdbarch
, CORE_ADDR size
, unsigned prot
)
5109 gdb_assert (gdbarch
!= NULL
);
5110 gdb_assert (gdbarch
->infcall_mmap
!= NULL
);
5111 if (gdbarch_debug
>= 2)
5112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_infcall_mmap called\n");
5113 return gdbarch
->infcall_mmap (size
, prot
);
5117 set_gdbarch_infcall_mmap (struct gdbarch
*gdbarch
,
5118 gdbarch_infcall_mmap_ftype infcall_mmap
)
5120 gdbarch
->infcall_mmap
= infcall_mmap
;
5124 gdbarch_infcall_munmap (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR size
)
5126 gdb_assert (gdbarch
!= NULL
);
5127 gdb_assert (gdbarch
->infcall_munmap
!= NULL
);
5128 if (gdbarch_debug
>= 2)
5129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_infcall_munmap called\n");
5130 gdbarch
->infcall_munmap (addr
, size
);
5134 set_gdbarch_infcall_munmap (struct gdbarch
*gdbarch
,
5135 gdbarch_infcall_munmap_ftype infcall_munmap
)
5137 gdbarch
->infcall_munmap
= infcall_munmap
;
5141 gdbarch_gcc_target_options (struct gdbarch
*gdbarch
)
5143 gdb_assert (gdbarch
!= NULL
);
5144 gdb_assert (gdbarch
->gcc_target_options
!= NULL
);
5145 if (gdbarch_debug
>= 2)
5146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcc_target_options called\n");
5147 return gdbarch
->gcc_target_options (gdbarch
);
5151 set_gdbarch_gcc_target_options (struct gdbarch
*gdbarch
,
5152 gdbarch_gcc_target_options_ftype gcc_target_options
)
5154 gdbarch
->gcc_target_options
= gcc_target_options
;
5158 gdbarch_gnu_triplet_regexp (struct gdbarch
*gdbarch
)
5160 gdb_assert (gdbarch
!= NULL
);
5161 gdb_assert (gdbarch
->gnu_triplet_regexp
!= NULL
);
5162 if (gdbarch_debug
>= 2)
5163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gnu_triplet_regexp called\n");
5164 return gdbarch
->gnu_triplet_regexp (gdbarch
);
5168 set_gdbarch_gnu_triplet_regexp (struct gdbarch
*gdbarch
,
5169 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp
)
5171 gdbarch
->gnu_triplet_regexp
= gnu_triplet_regexp
;
5175 gdbarch_addressable_memory_unit_size (struct gdbarch
*gdbarch
)
5177 gdb_assert (gdbarch
!= NULL
);
5178 gdb_assert (gdbarch
->addressable_memory_unit_size
!= NULL
);
5179 if (gdbarch_debug
>= 2)
5180 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addressable_memory_unit_size called\n");
5181 return gdbarch
->addressable_memory_unit_size (gdbarch
);
5185 set_gdbarch_addressable_memory_unit_size (struct gdbarch
*gdbarch
,
5186 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size
)
5188 gdbarch
->addressable_memory_unit_size
= addressable_memory_unit_size
;
5192 gdbarch_disassembler_options_implicit (struct gdbarch
*gdbarch
)
5194 gdb_assert (gdbarch
!= NULL
);
5195 /* Skip verify of disassembler_options_implicit, invalid_p == 0 */
5196 if (gdbarch_debug
>= 2)
5197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_disassembler_options_implicit called\n");
5198 return gdbarch
->disassembler_options_implicit
;
5202 set_gdbarch_disassembler_options_implicit (struct gdbarch
*gdbarch
,
5203 const char * disassembler_options_implicit
)
5205 gdbarch
->disassembler_options_implicit
= disassembler_options_implicit
;
5209 gdbarch_disassembler_options (struct gdbarch
*gdbarch
)
5211 gdb_assert (gdbarch
!= NULL
);
5212 /* Skip verify of disassembler_options, invalid_p == 0 */
5213 if (gdbarch_debug
>= 2)
5214 fprintf_unfiltered (gdb_stdlog
, "gdbarch_disassembler_options called\n");
5215 return gdbarch
->disassembler_options
;
5219 set_gdbarch_disassembler_options (struct gdbarch
*gdbarch
,
5220 char ** disassembler_options
)
5222 gdbarch
->disassembler_options
= disassembler_options
;
5225 const disasm_options_and_args_t
*
5226 gdbarch_valid_disassembler_options (struct gdbarch
*gdbarch
)
5228 gdb_assert (gdbarch
!= NULL
);
5229 /* Skip verify of valid_disassembler_options, invalid_p == 0 */
5230 if (gdbarch_debug
>= 2)
5231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_valid_disassembler_options called\n");
5232 return gdbarch
->valid_disassembler_options
;
5236 set_gdbarch_valid_disassembler_options (struct gdbarch
*gdbarch
,
5237 const disasm_options_and_args_t
* valid_disassembler_options
)
5239 gdbarch
->valid_disassembler_options
= valid_disassembler_options
;
5243 gdbarch_type_align (struct gdbarch
*gdbarch
, struct type
*type
)
5245 gdb_assert (gdbarch
!= NULL
);
5246 gdb_assert (gdbarch
->type_align
!= NULL
);
5247 if (gdbarch_debug
>= 2)
5248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_type_align called\n");
5249 return gdbarch
->type_align (gdbarch
, type
);
5253 set_gdbarch_type_align (struct gdbarch
*gdbarch
,
5254 gdbarch_type_align_ftype type_align
)
5256 gdbarch
->type_align
= type_align
;
5260 gdbarch_get_pc_address_flags (struct gdbarch
*gdbarch
, frame_info
*frame
, CORE_ADDR pc
)
5262 gdb_assert (gdbarch
!= NULL
);
5263 gdb_assert (gdbarch
->get_pc_address_flags
!= NULL
);
5264 if (gdbarch_debug
>= 2)
5265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_pc_address_flags called\n");
5266 return gdbarch
->get_pc_address_flags (frame
, pc
);
5270 set_gdbarch_get_pc_address_flags (struct gdbarch
*gdbarch
,
5271 gdbarch_get_pc_address_flags_ftype get_pc_address_flags
)
5273 gdbarch
->get_pc_address_flags
= get_pc_address_flags
;
5277 gdbarch_read_core_file_mappings (struct gdbarch
*gdbarch
, struct bfd
*cbfd
, gdb::function_view
<void (ULONGEST count
)> pre_loop_cb
, gdb::function_view
<void (int num
, ULONGEST start
, ULONGEST end
, ULONGEST file_ofs
, const char *filename
)> loop_cb
)
5279 gdb_assert (gdbarch
!= NULL
);
5280 gdb_assert (gdbarch
->read_core_file_mappings
!= NULL
);
5281 if (gdbarch_debug
>= 2)
5282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_core_file_mappings called\n");
5283 gdbarch
->read_core_file_mappings (gdbarch
, cbfd
, pre_loop_cb
, loop_cb
);
5287 set_gdbarch_read_core_file_mappings (struct gdbarch
*gdbarch
,
5288 gdbarch_read_core_file_mappings_ftype read_core_file_mappings
)
5290 gdbarch
->read_core_file_mappings
= read_core_file_mappings
;
5294 /* Keep a registry of per-architecture data-pointers required by GDB
5301 gdbarch_data_pre_init_ftype
*pre_init
;
5302 gdbarch_data_post_init_ftype
*post_init
;
5305 struct gdbarch_data_registration
5307 struct gdbarch_data
*data
;
5308 struct gdbarch_data_registration
*next
;
5311 struct gdbarch_data_registry
5314 struct gdbarch_data_registration
*registrations
;
5317 static struct gdbarch_data_registry gdbarch_data_registry
=
5322 static struct gdbarch_data
*
5323 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
5324 gdbarch_data_post_init_ftype
*post_init
)
5326 struct gdbarch_data_registration
**curr
;
5328 /* Append the new registration. */
5329 for (curr
= &gdbarch_data_registry
.registrations
;
5331 curr
= &(*curr
)->next
);
5332 (*curr
) = XNEW (struct gdbarch_data_registration
);
5333 (*curr
)->next
= NULL
;
5334 (*curr
)->data
= XNEW (struct gdbarch_data
);
5335 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5336 (*curr
)->data
->pre_init
= pre_init
;
5337 (*curr
)->data
->post_init
= post_init
;
5338 (*curr
)->data
->init_p
= 1;
5339 return (*curr
)->data
;
5342 struct gdbarch_data
*
5343 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
5345 return gdbarch_data_register (pre_init
, NULL
);
5348 struct gdbarch_data
*
5349 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
5351 return gdbarch_data_register (NULL
, post_init
);
5354 /* Create/delete the gdbarch data vector. */
5357 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5359 gdb_assert (gdbarch
->data
== NULL
);
5360 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5361 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
5364 /* Return the current value of the specified per-architecture
5368 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5370 gdb_assert (data
->index
< gdbarch
->nr_data
);
5371 if (gdbarch
->data
[data
->index
] == NULL
)
5373 /* The data-pointer isn't initialized, call init() to get a
5375 if (data
->pre_init
!= NULL
)
5376 /* Mid architecture creation: pass just the obstack, and not
5377 the entire architecture, as that way it isn't possible for
5378 pre-init code to refer to undefined architecture
5380 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
5381 else if (gdbarch
->initialized_p
5382 && data
->post_init
!= NULL
)
5383 /* Post architecture creation: pass the entire architecture
5384 (as all fields are valid), but be careful to also detect
5385 recursive references. */
5387 gdb_assert (data
->init_p
);
5389 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
5393 internal_error (__FILE__
, __LINE__
,
5394 _("gdbarch post-init data field can only be used "
5395 "after gdbarch is fully initialised"));
5396 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5398 return gdbarch
->data
[data
->index
];
5402 /* Keep a registry of the architectures known by GDB. */
5404 struct gdbarch_registration
5406 enum bfd_architecture bfd_architecture
;
5407 gdbarch_init_ftype
*init
;
5408 gdbarch_dump_tdep_ftype
*dump_tdep
;
5409 struct gdbarch_list
*arches
;
5410 struct gdbarch_registration
*next
;
5413 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5416 append_name (const char ***buf
, int *nr
, const char *name
)
5418 *buf
= XRESIZEVEC (const char *, *buf
, *nr
+ 1);
5424 gdbarch_printable_names (void)
5426 /* Accumulate a list of names based on the registed list of
5429 const char **arches
= NULL
;
5430 struct gdbarch_registration
*rego
;
5432 for (rego
= gdbarch_registry
;
5436 const struct bfd_arch_info
*ap
;
5437 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5439 internal_error (__FILE__
, __LINE__
,
5440 _("gdbarch_architecture_names: multi-arch unknown"));
5443 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5448 append_name (&arches
, &nr_arches
, NULL
);
5454 gdbarch_register (enum bfd_architecture bfd_architecture
,
5455 gdbarch_init_ftype
*init
,
5456 gdbarch_dump_tdep_ftype
*dump_tdep
)
5458 struct gdbarch_registration
**curr
;
5459 const struct bfd_arch_info
*bfd_arch_info
;
5461 /* Check that BFD recognizes this architecture */
5462 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5463 if (bfd_arch_info
== NULL
)
5465 internal_error (__FILE__
, __LINE__
,
5466 _("gdbarch: Attempt to register "
5467 "unknown architecture (%d)"),
5470 /* Check that we haven't seen this architecture before. */
5471 for (curr
= &gdbarch_registry
;
5473 curr
= &(*curr
)->next
)
5475 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5476 internal_error (__FILE__
, __LINE__
,
5477 _("gdbarch: Duplicate registration "
5478 "of architecture (%s)"),
5479 bfd_arch_info
->printable_name
);
5483 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
5484 bfd_arch_info
->printable_name
,
5485 host_address_to_string (init
));
5487 (*curr
) = XNEW (struct gdbarch_registration
);
5488 (*curr
)->bfd_architecture
= bfd_architecture
;
5489 (*curr
)->init
= init
;
5490 (*curr
)->dump_tdep
= dump_tdep
;
5491 (*curr
)->arches
= NULL
;
5492 (*curr
)->next
= NULL
;
5496 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5497 gdbarch_init_ftype
*init
)
5499 gdbarch_register (bfd_architecture
, init
, NULL
);
5503 /* Look for an architecture using gdbarch_info. */
5505 struct gdbarch_list
*
5506 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5507 const struct gdbarch_info
*info
)
5509 for (; arches
!= NULL
; arches
= arches
->next
)
5511 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5513 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5515 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5517 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
5525 /* Find an architecture that matches the specified INFO. Create a new
5526 architecture if needed. Return that new architecture. */
5529 gdbarch_find_by_info (struct gdbarch_info info
)
5531 struct gdbarch
*new_gdbarch
;
5532 struct gdbarch_registration
*rego
;
5534 /* Fill in missing parts of the INFO struct using a number of
5535 sources: "set ..."; INFOabfd supplied; and the global
5537 gdbarch_info_fill (&info
);
5539 /* Must have found some sort of architecture. */
5540 gdb_assert (info
.bfd_arch_info
!= NULL
);
5544 fprintf_unfiltered (gdb_stdlog
,
5545 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5546 (info
.bfd_arch_info
!= NULL
5547 ? info
.bfd_arch_info
->printable_name
5549 fprintf_unfiltered (gdb_stdlog
,
5550 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5552 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5553 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5555 fprintf_unfiltered (gdb_stdlog
,
5556 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5557 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5558 fprintf_unfiltered (gdb_stdlog
,
5559 "gdbarch_find_by_info: info.abfd %s\n",
5560 host_address_to_string (info
.abfd
));
5561 fprintf_unfiltered (gdb_stdlog
,
5562 "gdbarch_find_by_info: info.tdep_info %s\n",
5563 host_address_to_string (info
.tdep_info
));
5566 /* Find the tdep code that knows about this architecture. */
5567 for (rego
= gdbarch_registry
;
5570 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5576 "No matching architecture\n");
5580 /* Ask the tdep code for an architecture that matches "info". */
5581 new_gdbarch
= rego
->init (info
, rego
->arches
);
5583 /* Did the tdep code like it? No. Reject the change and revert to
5584 the old architecture. */
5585 if (new_gdbarch
== NULL
)
5588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5589 "Target rejected architecture\n");
5593 /* Is this a pre-existing architecture (as determined by already
5594 being initialized)? Move it to the front of the architecture
5595 list (keeping the list sorted Most Recently Used). */
5596 if (new_gdbarch
->initialized_p
)
5598 struct gdbarch_list
**list
;
5599 struct gdbarch_list
*self
;
5601 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5602 "Previous architecture %s (%s) selected\n",
5603 host_address_to_string (new_gdbarch
),
5604 new_gdbarch
->bfd_arch_info
->printable_name
);
5605 /* Find the existing arch in the list. */
5606 for (list
= ®o
->arches
;
5607 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5608 list
= &(*list
)->next
);
5609 /* It had better be in the list of architectures. */
5610 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5613 (*list
) = self
->next
;
5614 /* Insert SELF at the front. */
5615 self
->next
= rego
->arches
;
5616 rego
->arches
= self
;
5621 /* It's a new architecture. */
5623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5624 "New architecture %s (%s) selected\n",
5625 host_address_to_string (new_gdbarch
),
5626 new_gdbarch
->bfd_arch_info
->printable_name
);
5628 /* Insert the new architecture into the front of the architecture
5629 list (keep the list sorted Most Recently Used). */
5631 struct gdbarch_list
*self
= XNEW (struct gdbarch_list
);
5632 self
->next
= rego
->arches
;
5633 self
->gdbarch
= new_gdbarch
;
5634 rego
->arches
= self
;
5637 /* Check that the newly installed architecture is valid. Plug in
5638 any post init values. */
5639 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5640 verify_gdbarch (new_gdbarch
);
5641 new_gdbarch
->initialized_p
= 1;
5644 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5649 /* Make the specified architecture current. */
5652 set_target_gdbarch (struct gdbarch
*new_gdbarch
)
5654 gdb_assert (new_gdbarch
!= NULL
);
5655 gdb_assert (new_gdbarch
->initialized_p
);
5656 current_inferior ()->gdbarch
= new_gdbarch
;
5657 gdb::observers::architecture_changed
.notify (new_gdbarch
);
5658 registers_changed ();
5661 /* Return the current inferior's arch. */
5664 target_gdbarch (void)
5666 return current_inferior ()->gdbarch
;
5669 void _initialize_gdbarch ();
5671 _initialize_gdbarch ()
5673 add_setshow_zuinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
5674 Set architecture debugging."), _("\
5675 Show architecture debugging."), _("\
5676 When non-zero, architecture debugging is enabled."),
5679 &setdebuglist
, &showdebuglist
);