1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2017 Free Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
43 #include "floatformat.h"
44 #include "reggroups.h"
46 #include "gdb_obstack.h"
52 /* Static function declarations */
54 static void alloc_gdbarch_data (struct gdbarch
*);
56 /* Non-zero if we want to trace architecture code. */
59 #define GDBARCH_DEBUG 0
61 unsigned int gdbarch_debug
= GDBARCH_DEBUG
;
63 show_gdbarch_debug (struct ui_file
*file
, int from_tty
,
64 struct cmd_list_element
*c
, const char *value
)
66 fprintf_filtered (file
, _("Architecture debugging is %s.\n"), value
);
70 pformat (const struct floatformat
**format
)
75 /* Just print out one of them - this is only for diagnostics. */
76 return format
[0]->name
;
80 pstring (const char *string
)
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 int long_long_align_bit
;
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
;
179 gdbarch_floatformat_for_type_ftype
*floatformat_for_type
;
182 int dwarf2_addr_size
;
184 gdbarch_read_pc_ftype
*read_pc
;
185 gdbarch_write_pc_ftype
*write_pc
;
186 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
187 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
188 gdbarch_pseudo_register_read_value_ftype
*pseudo_register_read_value
;
189 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
192 gdbarch_ax_pseudo_register_collect_ftype
*ax_pseudo_register_collect
;
193 gdbarch_ax_pseudo_register_push_stack_ftype
*ax_pseudo_register_push_stack
;
194 gdbarch_handle_segmentation_fault_ftype
*handle_segmentation_fault
;
199 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
200 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
201 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
202 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
203 gdbarch_register_name_ftype
*register_name
;
204 gdbarch_register_type_ftype
*register_type
;
205 gdbarch_dummy_id_ftype
*dummy_id
;
206 int deprecated_fp_regnum
;
207 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
208 int call_dummy_location
;
209 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
210 gdbarch_code_of_frame_writable_ftype
*code_of_frame_writable
;
211 gdbarch_print_registers_info_ftype
*print_registers_info
;
212 gdbarch_print_float_info_ftype
*print_float_info
;
213 gdbarch_print_vector_info_ftype
*print_vector_info
;
214 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
215 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
216 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
217 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
218 int believe_pcc_promotion
;
219 gdbarch_convert_register_p_ftype
*convert_register_p
;
220 gdbarch_register_to_value_ftype
*register_to_value
;
221 gdbarch_value_to_register_ftype
*value_to_register
;
222 gdbarch_value_from_register_ftype
*value_from_register
;
223 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
224 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
225 gdbarch_integer_to_address_ftype
*integer_to_address
;
226 gdbarch_return_value_ftype
*return_value
;
227 gdbarch_return_in_first_hidden_param_p_ftype
*return_in_first_hidden_param_p
;
228 gdbarch_skip_prologue_ftype
*skip_prologue
;
229 gdbarch_skip_main_prologue_ftype
*skip_main_prologue
;
230 gdbarch_skip_entrypoint_ftype
*skip_entrypoint
;
231 gdbarch_inner_than_ftype
*inner_than
;
232 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
233 gdbarch_breakpoint_kind_from_pc_ftype
*breakpoint_kind_from_pc
;
234 gdbarch_sw_breakpoint_from_kind_ftype
*sw_breakpoint_from_kind
;
235 gdbarch_breakpoint_kind_from_current_state_ftype
*breakpoint_kind_from_current_state
;
236 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
237 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
238 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
239 CORE_ADDR decr_pc_after_break
;
240 CORE_ADDR deprecated_function_start_offset
;
241 gdbarch_remote_register_number_ftype
*remote_register_number
;
242 gdbarch_fetch_tls_load_module_address_ftype
*fetch_tls_load_module_address
;
243 CORE_ADDR frame_args_skip
;
244 gdbarch_unwind_pc_ftype
*unwind_pc
;
245 gdbarch_unwind_sp_ftype
*unwind_sp
;
246 gdbarch_frame_num_args_ftype
*frame_num_args
;
247 gdbarch_frame_align_ftype
*frame_align
;
248 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
249 int frame_red_zone_size
;
250 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
251 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
252 gdbarch_software_single_step_ftype
*software_single_step
;
253 gdbarch_single_step_through_delay_ftype
*single_step_through_delay
;
254 gdbarch_print_insn_ftype
*print_insn
;
255 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
256 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
257 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
258 gdbarch_stack_frame_destroyed_p_ftype
*stack_frame_destroyed_p
;
259 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
260 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
261 gdbarch_make_symbol_special_ftype
*make_symbol_special
;
262 gdbarch_adjust_dwarf2_addr_ftype
*adjust_dwarf2_addr
;
263 gdbarch_adjust_dwarf2_line_ftype
*adjust_dwarf2_line
;
264 int cannot_step_breakpoint
;
265 int have_nonsteppable_watchpoint
;
266 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
267 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
268 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
269 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
270 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
271 gdbarch_iterate_over_regset_sections_ftype
*iterate_over_regset_sections
;
272 gdbarch_make_corefile_notes_ftype
*make_corefile_notes
;
273 gdbarch_elfcore_write_linux_prpsinfo_ftype
*elfcore_write_linux_prpsinfo
;
274 gdbarch_find_memory_regions_ftype
*find_memory_regions
;
275 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
276 gdbarch_core_xfer_shared_libraries_aix_ftype
*core_xfer_shared_libraries_aix
;
277 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
278 gdbarch_core_thread_name_ftype
*core_thread_name
;
279 const char * gcore_bfd_target
;
280 int vtable_function_descriptors
;
282 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
283 ULONGEST max_insn_length
;
284 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
285 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
286 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
287 gdbarch_displaced_step_free_closure_ftype
*displaced_step_free_closure
;
288 gdbarch_displaced_step_location_ftype
*displaced_step_location
;
289 gdbarch_relocate_instruction_ftype
*relocate_instruction
;
290 gdbarch_overlay_update_ftype
*overlay_update
;
291 gdbarch_core_read_description_ftype
*core_read_description
;
292 gdbarch_static_transform_name_ftype
*static_transform_name
;
293 int sofun_address_maybe_missing
;
294 gdbarch_process_record_ftype
*process_record
;
295 gdbarch_process_record_signal_ftype
*process_record_signal
;
296 gdbarch_gdb_signal_from_target_ftype
*gdb_signal_from_target
;
297 gdbarch_gdb_signal_to_target_ftype
*gdb_signal_to_target
;
298 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
299 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
300 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
301 const char * xml_syscall_file
;
302 struct syscalls_info
* syscalls_info
;
303 const char *const * stap_integer_prefixes
;
304 const char *const * stap_integer_suffixes
;
305 const char *const * stap_register_prefixes
;
306 const char *const * stap_register_suffixes
;
307 const char *const * stap_register_indirection_prefixes
;
308 const char *const * stap_register_indirection_suffixes
;
309 const char * stap_gdb_register_prefix
;
310 const char * stap_gdb_register_suffix
;
311 gdbarch_stap_is_single_operand_ftype
*stap_is_single_operand
;
312 gdbarch_stap_parse_special_token_ftype
*stap_parse_special_token
;
313 gdbarch_dtrace_parse_probe_argument_ftype
*dtrace_parse_probe_argument
;
314 gdbarch_dtrace_probe_is_enabled_ftype
*dtrace_probe_is_enabled
;
315 gdbarch_dtrace_enable_probe_ftype
*dtrace_enable_probe
;
316 gdbarch_dtrace_disable_probe_ftype
*dtrace_disable_probe
;
317 int has_global_solist
;
318 int has_global_breakpoints
;
319 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
320 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
321 gdbarch_guess_tracepoint_registers_ftype
*guess_tracepoint_registers
;
322 gdbarch_auto_charset_ftype
*auto_charset
;
323 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
324 const char * solib_symbols_extension
;
325 int has_dos_based_file_system
;
326 gdbarch_gen_return_address_ftype
*gen_return_address
;
327 gdbarch_info_proc_ftype
*info_proc
;
328 gdbarch_core_info_proc_ftype
*core_info_proc
;
329 gdbarch_iterate_over_objfiles_in_search_order_ftype
*iterate_over_objfiles_in_search_order
;
330 struct ravenscar_arch_ops
* ravenscar_ops
;
331 gdbarch_insn_is_call_ftype
*insn_is_call
;
332 gdbarch_insn_is_ret_ftype
*insn_is_ret
;
333 gdbarch_insn_is_jump_ftype
*insn_is_jump
;
334 gdbarch_auxv_parse_ftype
*auxv_parse
;
335 gdbarch_print_auxv_entry_ftype
*print_auxv_entry
;
336 gdbarch_vsyscall_range_ftype
*vsyscall_range
;
337 gdbarch_infcall_mmap_ftype
*infcall_mmap
;
338 gdbarch_infcall_munmap_ftype
*infcall_munmap
;
339 gdbarch_gcc_target_options_ftype
*gcc_target_options
;
340 gdbarch_gnu_triplet_regexp_ftype
*gnu_triplet_regexp
;
341 gdbarch_addressable_memory_unit_size_ftype
*addressable_memory_unit_size
;
344 /* Create a new ``struct gdbarch'' based on information provided by
345 ``struct gdbarch_info''. */
348 gdbarch_alloc (const struct gdbarch_info
*info
,
349 struct gdbarch_tdep
*tdep
)
351 struct gdbarch
*gdbarch
;
353 /* Create an obstack for allocating all the per-architecture memory,
354 then use that to allocate the architecture vector. */
355 struct obstack
*obstack
= XNEW (struct obstack
);
356 obstack_init (obstack
);
357 gdbarch
= XOBNEW (obstack
, struct gdbarch
);
358 memset (gdbarch
, 0, sizeof (*gdbarch
));
359 gdbarch
->obstack
= obstack
;
361 alloc_gdbarch_data (gdbarch
);
363 gdbarch
->tdep
= tdep
;
365 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
366 gdbarch
->byte_order
= info
->byte_order
;
367 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
368 gdbarch
->osabi
= info
->osabi
;
369 gdbarch
->target_desc
= info
->target_desc
;
371 /* Force the explicit initialization of these. */
372 gdbarch
->bits_big_endian
= (gdbarch
->byte_order
== BFD_ENDIAN_BIG
);
373 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
374 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
375 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
376 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
377 gdbarch
->long_long_align_bit
= 2*gdbarch
->long_bit
;
378 gdbarch
->half_bit
= 2*TARGET_CHAR_BIT
;
379 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
380 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
381 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
382 gdbarch
->floatformat_for_type
= default_floatformat_for_type
;
383 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
384 gdbarch
->char_signed
= -1;
385 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
386 gdbarch
->num_regs
= -1;
387 gdbarch
->sp_regnum
= -1;
388 gdbarch
->pc_regnum
= -1;
389 gdbarch
->ps_regnum
= -1;
390 gdbarch
->fp0_regnum
= -1;
391 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
392 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
393 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
394 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
395 gdbarch
->deprecated_fp_regnum
= -1;
396 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
397 gdbarch
->code_of_frame_writable
= default_code_of_frame_writable
;
398 gdbarch
->print_registers_info
= default_print_registers_info
;
399 gdbarch
->print_float_info
= default_print_float_info
;
400 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
401 gdbarch
->cannot_fetch_register
= cannot_register_not
;
402 gdbarch
->cannot_store_register
= cannot_register_not
;
403 gdbarch
->convert_register_p
= generic_convert_register_p
;
404 gdbarch
->value_from_register
= default_value_from_register
;
405 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
406 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
407 gdbarch
->return_in_first_hidden_param_p
= default_return_in_first_hidden_param_p
;
408 gdbarch
->breakpoint_from_pc
= default_breakpoint_from_pc
;
409 gdbarch
->sw_breakpoint_from_kind
= NULL
;
410 gdbarch
->breakpoint_kind_from_current_state
= default_breakpoint_kind_from_current_state
;
411 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
412 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
413 gdbarch
->remote_register_number
= default_remote_register_number
;
414 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
415 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
416 gdbarch
->addr_bits_remove
= core_addr_identity
;
417 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
418 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
419 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
420 gdbarch
->stack_frame_destroyed_p
= generic_stack_frame_destroyed_p
;
421 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
422 gdbarch
->make_symbol_special
= default_make_symbol_special
;
423 gdbarch
->adjust_dwarf2_addr
= default_adjust_dwarf2_addr
;
424 gdbarch
->adjust_dwarf2_line
= default_adjust_dwarf2_line
;
425 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
426 gdbarch
->skip_permanent_breakpoint
= default_skip_permanent_breakpoint
;
427 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
428 gdbarch
->displaced_step_fixup
= NULL
;
429 gdbarch
->displaced_step_free_closure
= NULL
;
430 gdbarch
->displaced_step_location
= NULL
;
431 gdbarch
->relocate_instruction
= NULL
;
432 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
433 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
434 gdbarch
->guess_tracepoint_registers
= default_guess_tracepoint_registers
;
435 gdbarch
->auto_charset
= default_auto_charset
;
436 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
437 gdbarch
->gen_return_address
= default_gen_return_address
;
438 gdbarch
->iterate_over_objfiles_in_search_order
= default_iterate_over_objfiles_in_search_order
;
439 gdbarch
->ravenscar_ops
= NULL
;
440 gdbarch
->insn_is_call
= default_insn_is_call
;
441 gdbarch
->insn_is_ret
= default_insn_is_ret
;
442 gdbarch
->insn_is_jump
= default_insn_is_jump
;
443 gdbarch
->print_auxv_entry
= default_print_auxv_entry
;
444 gdbarch
->vsyscall_range
= default_vsyscall_range
;
445 gdbarch
->infcall_mmap
= default_infcall_mmap
;
446 gdbarch
->infcall_munmap
= default_infcall_munmap
;
447 gdbarch
->gcc_target_options
= default_gcc_target_options
;
448 gdbarch
->gnu_triplet_regexp
= default_gnu_triplet_regexp
;
449 gdbarch
->addressable_memory_unit_size
= default_addressable_memory_unit_size
;
450 /* gdbarch_alloc() */
456 /* Allocate extra space using the per-architecture obstack. */
459 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
461 void *data
= obstack_alloc (arch
->obstack
, size
);
463 memset (data
, 0, size
);
470 gdbarch_obstack_strdup (struct gdbarch
*arch
, const char *string
)
472 return obstack_strdup (arch
->obstack
, string
);
476 /* Free a gdbarch struct. This should never happen in normal
477 operation --- once you've created a gdbarch, you keep it around.
478 However, if an architecture's init function encounters an error
479 building the structure, it may need to clean up a partially
480 constructed gdbarch. */
483 gdbarch_free (struct gdbarch
*arch
)
485 struct obstack
*obstack
;
487 gdb_assert (arch
!= NULL
);
488 gdb_assert (!arch
->initialized_p
);
489 obstack
= arch
->obstack
;
490 obstack_free (obstack
, 0); /* Includes the ARCH. */
495 /* Ensure that all values in a GDBARCH are reasonable. */
498 verify_gdbarch (struct gdbarch
*gdbarch
)
503 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
504 log
.puts ("\n\tbyte-order");
505 if (gdbarch
->bfd_arch_info
== NULL
)
506 log
.puts ("\n\tbfd_arch_info");
507 /* Check those that need to be defined for the given multi-arch level. */
508 /* Skip verify of bits_big_endian, invalid_p == 0 */
509 /* Skip verify of short_bit, invalid_p == 0 */
510 /* Skip verify of int_bit, invalid_p == 0 */
511 /* Skip verify of long_bit, invalid_p == 0 */
512 /* Skip verify of long_long_bit, invalid_p == 0 */
513 /* Skip verify of long_long_align_bit, invalid_p == 0 */
514 /* Skip verify of half_bit, invalid_p == 0 */
515 if (gdbarch
->half_format
== 0)
516 gdbarch
->half_format
= floatformats_ieee_half
;
517 /* Skip verify of float_bit, invalid_p == 0 */
518 if (gdbarch
->float_format
== 0)
519 gdbarch
->float_format
= floatformats_ieee_single
;
520 /* Skip verify of double_bit, invalid_p == 0 */
521 if (gdbarch
->double_format
== 0)
522 gdbarch
->double_format
= floatformats_ieee_double
;
523 /* Skip verify of long_double_bit, invalid_p == 0 */
524 if (gdbarch
->long_double_format
== 0)
525 gdbarch
->long_double_format
= floatformats_ieee_double
;
526 /* Skip verify of floatformat_for_type, invalid_p == 0 */
527 /* Skip verify of ptr_bit, invalid_p == 0 */
528 if (gdbarch
->addr_bit
== 0)
529 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
530 if (gdbarch
->dwarf2_addr_size
== 0)
531 gdbarch
->dwarf2_addr_size
= gdbarch_ptr_bit (gdbarch
) / TARGET_CHAR_BIT
;
532 if (gdbarch
->char_signed
== -1)
533 gdbarch
->char_signed
= 1;
534 /* Skip verify of read_pc, has predicate. */
535 /* Skip verify of write_pc, has predicate. */
536 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
537 /* Skip verify of pseudo_register_read, has predicate. */
538 /* Skip verify of pseudo_register_read_value, has predicate. */
539 /* Skip verify of pseudo_register_write, has predicate. */
540 if (gdbarch
->num_regs
== -1)
541 log
.puts ("\n\tnum_regs");
542 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
543 /* Skip verify of ax_pseudo_register_collect, has predicate. */
544 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
545 /* Skip verify of handle_segmentation_fault, has predicate. */
546 /* Skip verify of sp_regnum, invalid_p == 0 */
547 /* Skip verify of pc_regnum, invalid_p == 0 */
548 /* Skip verify of ps_regnum, invalid_p == 0 */
549 /* Skip verify of fp0_regnum, invalid_p == 0 */
550 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
551 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
552 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
553 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
554 if (gdbarch
->register_name
== 0)
555 log
.puts ("\n\tregister_name");
556 /* Skip verify of register_type, has predicate. */
557 /* Skip verify of dummy_id, has predicate. */
558 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
559 /* Skip verify of push_dummy_call, has predicate. */
560 /* Skip verify of call_dummy_location, invalid_p == 0 */
561 /* Skip verify of push_dummy_code, has predicate. */
562 /* Skip verify of code_of_frame_writable, invalid_p == 0 */
563 /* Skip verify of print_registers_info, invalid_p == 0 */
564 /* Skip verify of print_float_info, invalid_p == 0 */
565 /* Skip verify of print_vector_info, has predicate. */
566 /* Skip verify of register_sim_regno, invalid_p == 0 */
567 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
568 /* Skip verify of cannot_store_register, invalid_p == 0 */
569 /* Skip verify of get_longjmp_target, has predicate. */
570 /* Skip verify of convert_register_p, invalid_p == 0 */
571 /* Skip verify of value_from_register, invalid_p == 0 */
572 /* Skip verify of pointer_to_address, invalid_p == 0 */
573 /* Skip verify of address_to_pointer, invalid_p == 0 */
574 /* Skip verify of integer_to_address, has predicate. */
575 /* Skip verify of return_value, has predicate. */
576 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
577 if (gdbarch
->skip_prologue
== 0)
578 log
.puts ("\n\tskip_prologue");
579 /* Skip verify of skip_main_prologue, has predicate. */
580 /* Skip verify of skip_entrypoint, has predicate. */
581 if (gdbarch
->inner_than
== 0)
582 log
.puts ("\n\tinner_than");
583 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
584 if (gdbarch
->breakpoint_kind_from_pc
== 0)
585 log
.puts ("\n\tbreakpoint_kind_from_pc");
586 /* Skip verify of sw_breakpoint_from_kind, invalid_p == 0 */
587 /* Skip verify of breakpoint_kind_from_current_state, invalid_p == 0 */
588 /* Skip verify of adjust_breakpoint_address, has predicate. */
589 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
590 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
591 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
592 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
593 /* Skip verify of remote_register_number, invalid_p == 0 */
594 /* Skip verify of fetch_tls_load_module_address, has predicate. */
595 /* Skip verify of frame_args_skip, invalid_p == 0 */
596 /* Skip verify of unwind_pc, has predicate. */
597 /* Skip verify of unwind_sp, has predicate. */
598 /* Skip verify of frame_num_args, has predicate. */
599 /* Skip verify of frame_align, has predicate. */
600 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
601 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
602 /* Skip verify of addr_bits_remove, invalid_p == 0 */
603 /* Skip verify of software_single_step, has predicate. */
604 /* Skip verify of single_step_through_delay, has predicate. */
605 if (gdbarch
->print_insn
== 0)
606 log
.puts ("\n\tprint_insn");
607 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
608 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
609 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
610 /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
611 /* Skip verify of elf_make_msymbol_special, has predicate. */
612 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
613 /* Skip verify of make_symbol_special, invalid_p == 0 */
614 /* Skip verify of adjust_dwarf2_addr, invalid_p == 0 */
615 /* Skip verify of adjust_dwarf2_line, invalid_p == 0 */
616 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
617 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
618 /* Skip verify of address_class_type_flags, has predicate. */
619 /* Skip verify of address_class_type_flags_to_name, has predicate. */
620 /* Skip verify of address_class_name_to_type_flags, has predicate. */
621 /* Skip verify of register_reggroup_p, invalid_p == 0 */
622 /* Skip verify of fetch_pointer_argument, has predicate. */
623 /* Skip verify of iterate_over_regset_sections, has predicate. */
624 /* Skip verify of make_corefile_notes, has predicate. */
625 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
626 /* Skip verify of find_memory_regions, has predicate. */
627 /* Skip verify of core_xfer_shared_libraries, has predicate. */
628 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
629 /* Skip verify of core_pid_to_str, has predicate. */
630 /* Skip verify of core_thread_name, has predicate. */
631 /* Skip verify of gcore_bfd_target, has predicate. */
632 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
633 /* Skip verify of vbit_in_delta, invalid_p == 0 */
634 /* Skip verify of skip_permanent_breakpoint, invalid_p == 0 */
635 /* Skip verify of max_insn_length, has predicate. */
636 /* Skip verify of displaced_step_copy_insn, has predicate. */
637 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
638 /* Skip verify of displaced_step_fixup, has predicate. */
639 if ((! gdbarch
->displaced_step_free_closure
) != (! gdbarch
->displaced_step_copy_insn
))
640 log
.puts ("\n\tdisplaced_step_free_closure");
641 if ((! gdbarch
->displaced_step_location
) != (! gdbarch
->displaced_step_copy_insn
))
642 log
.puts ("\n\tdisplaced_step_location");
643 /* Skip verify of relocate_instruction, has predicate. */
644 /* Skip verify of overlay_update, has predicate. */
645 /* Skip verify of core_read_description, has predicate. */
646 /* Skip verify of static_transform_name, has predicate. */
647 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
648 /* Skip verify of process_record, has predicate. */
649 /* Skip verify of process_record_signal, has predicate. */
650 /* Skip verify of gdb_signal_from_target, has predicate. */
651 /* Skip verify of gdb_signal_to_target, has predicate. */
652 /* Skip verify of get_siginfo_type, has predicate. */
653 /* Skip verify of record_special_symbol, has predicate. */
654 /* Skip verify of get_syscall_number, has predicate. */
655 /* Skip verify of xml_syscall_file, invalid_p == 0 */
656 /* Skip verify of syscalls_info, invalid_p == 0 */
657 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
658 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
659 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
660 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
661 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
662 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
663 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
664 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
665 /* Skip verify of stap_is_single_operand, has predicate. */
666 /* Skip verify of stap_parse_special_token, has predicate. */
667 /* Skip verify of dtrace_parse_probe_argument, has predicate. */
668 /* Skip verify of dtrace_probe_is_enabled, has predicate. */
669 /* Skip verify of dtrace_enable_probe, has predicate. */
670 /* Skip verify of dtrace_disable_probe, has predicate. */
671 /* Skip verify of has_global_solist, invalid_p == 0 */
672 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
673 /* Skip verify of has_shared_address_space, invalid_p == 0 */
674 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
675 /* Skip verify of guess_tracepoint_registers, invalid_p == 0 */
676 /* Skip verify of auto_charset, invalid_p == 0 */
677 /* Skip verify of auto_wide_charset, invalid_p == 0 */
678 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
679 /* Skip verify of gen_return_address, invalid_p == 0 */
680 /* Skip verify of info_proc, has predicate. */
681 /* Skip verify of core_info_proc, has predicate. */
682 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
683 /* Skip verify of ravenscar_ops, invalid_p == 0 */
684 /* Skip verify of insn_is_call, invalid_p == 0 */
685 /* Skip verify of insn_is_ret, invalid_p == 0 */
686 /* Skip verify of insn_is_jump, invalid_p == 0 */
687 /* Skip verify of auxv_parse, has predicate. */
688 /* Skip verify of print_auxv_entry, invalid_p == 0 */
689 /* Skip verify of vsyscall_range, invalid_p == 0 */
690 /* Skip verify of infcall_mmap, invalid_p == 0 */
691 /* Skip verify of infcall_munmap, invalid_p == 0 */
692 /* Skip verify of gcc_target_options, invalid_p == 0 */
693 /* Skip verify of gnu_triplet_regexp, invalid_p == 0 */
694 /* Skip verify of addressable_memory_unit_size, invalid_p == 0 */
696 internal_error (__FILE__
, __LINE__
,
697 _("verify_gdbarch: the following are invalid ...%s"),
702 /* Print out the details of the current architecture. */
705 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
707 const char *gdb_nm_file
= "<not-defined>";
709 #if defined (GDB_NM_FILE)
710 gdb_nm_file
= GDB_NM_FILE
;
712 fprintf_unfiltered (file
,
713 "gdbarch_dump: GDB_NM_FILE = %s\n",
715 fprintf_unfiltered (file
,
716 "gdbarch_dump: addr_bit = %s\n",
717 plongest (gdbarch
->addr_bit
));
718 fprintf_unfiltered (file
,
719 "gdbarch_dump: addr_bits_remove = <%s>\n",
720 host_address_to_string (gdbarch
->addr_bits_remove
));
721 fprintf_unfiltered (file
,
722 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
723 gdbarch_address_class_name_to_type_flags_p (gdbarch
));
724 fprintf_unfiltered (file
,
725 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
726 host_address_to_string (gdbarch
->address_class_name_to_type_flags
));
727 fprintf_unfiltered (file
,
728 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
729 gdbarch_address_class_type_flags_p (gdbarch
));
730 fprintf_unfiltered (file
,
731 "gdbarch_dump: address_class_type_flags = <%s>\n",
732 host_address_to_string (gdbarch
->address_class_type_flags
));
733 fprintf_unfiltered (file
,
734 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
735 gdbarch_address_class_type_flags_to_name_p (gdbarch
));
736 fprintf_unfiltered (file
,
737 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
738 host_address_to_string (gdbarch
->address_class_type_flags_to_name
));
739 fprintf_unfiltered (file
,
740 "gdbarch_dump: address_to_pointer = <%s>\n",
741 host_address_to_string (gdbarch
->address_to_pointer
));
742 fprintf_unfiltered (file
,
743 "gdbarch_dump: addressable_memory_unit_size = <%s>\n",
744 host_address_to_string (gdbarch
->addressable_memory_unit_size
));
745 fprintf_unfiltered (file
,
746 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
747 gdbarch_adjust_breakpoint_address_p (gdbarch
));
748 fprintf_unfiltered (file
,
749 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
750 host_address_to_string (gdbarch
->adjust_breakpoint_address
));
751 fprintf_unfiltered (file
,
752 "gdbarch_dump: adjust_dwarf2_addr = <%s>\n",
753 host_address_to_string (gdbarch
->adjust_dwarf2_addr
));
754 fprintf_unfiltered (file
,
755 "gdbarch_dump: adjust_dwarf2_line = <%s>\n",
756 host_address_to_string (gdbarch
->adjust_dwarf2_line
));
757 fprintf_unfiltered (file
,
758 "gdbarch_dump: auto_charset = <%s>\n",
759 host_address_to_string (gdbarch
->auto_charset
));
760 fprintf_unfiltered (file
,
761 "gdbarch_dump: auto_wide_charset = <%s>\n",
762 host_address_to_string (gdbarch
->auto_wide_charset
));
763 fprintf_unfiltered (file
,
764 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
765 gdbarch_auxv_parse_p (gdbarch
));
766 fprintf_unfiltered (file
,
767 "gdbarch_dump: auxv_parse = <%s>\n",
768 host_address_to_string (gdbarch
->auxv_parse
));
769 fprintf_unfiltered (file
,
770 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
771 gdbarch_ax_pseudo_register_collect_p (gdbarch
));
772 fprintf_unfiltered (file
,
773 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
774 host_address_to_string (gdbarch
->ax_pseudo_register_collect
));
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
777 gdbarch_ax_pseudo_register_push_stack_p (gdbarch
));
778 fprintf_unfiltered (file
,
779 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
780 host_address_to_string (gdbarch
->ax_pseudo_register_push_stack
));
781 fprintf_unfiltered (file
,
782 "gdbarch_dump: believe_pcc_promotion = %s\n",
783 plongest (gdbarch
->believe_pcc_promotion
));
784 fprintf_unfiltered (file
,
785 "gdbarch_dump: bfd_arch_info = %s\n",
786 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: bits_big_endian = %s\n",
789 plongest (gdbarch
->bits_big_endian
));
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
792 host_address_to_string (gdbarch
->breakpoint_from_pc
));
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: breakpoint_kind_from_current_state = <%s>\n",
795 host_address_to_string (gdbarch
->breakpoint_kind_from_current_state
));
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: breakpoint_kind_from_pc = <%s>\n",
798 host_address_to_string (gdbarch
->breakpoint_kind_from_pc
));
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: byte_order = %s\n",
801 plongest (gdbarch
->byte_order
));
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: byte_order_for_code = %s\n",
804 plongest (gdbarch
->byte_order_for_code
));
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: call_dummy_location = %s\n",
807 plongest (gdbarch
->call_dummy_location
));
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: cannot_fetch_register = <%s>\n",
810 host_address_to_string (gdbarch
->cannot_fetch_register
));
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: cannot_step_breakpoint = %s\n",
813 plongest (gdbarch
->cannot_step_breakpoint
));
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: cannot_store_register = <%s>\n",
816 host_address_to_string (gdbarch
->cannot_store_register
));
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: char_signed = %s\n",
819 plongest (gdbarch
->char_signed
));
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: code_of_frame_writable = <%s>\n",
822 host_address_to_string (gdbarch
->code_of_frame_writable
));
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
825 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
828 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: convert_register_p = <%s>\n",
831 host_address_to_string (gdbarch
->convert_register_p
));
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
834 gdbarch_core_info_proc_p (gdbarch
));
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: core_info_proc = <%s>\n",
837 host_address_to_string (gdbarch
->core_info_proc
));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
840 gdbarch_core_pid_to_str_p (gdbarch
));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: core_pid_to_str = <%s>\n",
843 host_address_to_string (gdbarch
->core_pid_to_str
));
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
846 gdbarch_core_read_description_p (gdbarch
));
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: core_read_description = <%s>\n",
849 host_address_to_string (gdbarch
->core_read_description
));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: gdbarch_core_thread_name_p() = %d\n",
852 gdbarch_core_thread_name_p (gdbarch
));
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: core_thread_name = <%s>\n",
855 host_address_to_string (gdbarch
->core_thread_name
));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
858 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
861 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
864 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch
));
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
867 host_address_to_string (gdbarch
->core_xfer_shared_libraries_aix
));
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: decr_pc_after_break = %s\n",
870 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: deprecated_fp_regnum = %s\n",
873 plongest (gdbarch
->deprecated_fp_regnum
));
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: deprecated_function_start_offset = %s\n",
876 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
879 gdbarch_displaced_step_copy_insn_p (gdbarch
));
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
882 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
885 gdbarch_displaced_step_fixup_p (gdbarch
));
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: displaced_step_fixup = <%s>\n",
888 host_address_to_string (gdbarch
->displaced_step_fixup
));
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
891 host_address_to_string (gdbarch
->displaced_step_free_closure
));
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
894 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: displaced_step_location = <%s>\n",
897 host_address_to_string (gdbarch
->displaced_step_location
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: double_bit = %s\n",
900 plongest (gdbarch
->double_bit
));
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: double_format = %s\n",
903 pformat (gdbarch
->double_format
));
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: gdbarch_dtrace_disable_probe_p() = %d\n",
906 gdbarch_dtrace_disable_probe_p (gdbarch
));
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: dtrace_disable_probe = <%s>\n",
909 host_address_to_string (gdbarch
->dtrace_disable_probe
));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: gdbarch_dtrace_enable_probe_p() = %d\n",
912 gdbarch_dtrace_enable_probe_p (gdbarch
));
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: dtrace_enable_probe = <%s>\n",
915 host_address_to_string (gdbarch
->dtrace_enable_probe
));
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: gdbarch_dtrace_parse_probe_argument_p() = %d\n",
918 gdbarch_dtrace_parse_probe_argument_p (gdbarch
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: dtrace_parse_probe_argument = <%s>\n",
921 host_address_to_string (gdbarch
->dtrace_parse_probe_argument
));
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: gdbarch_dtrace_probe_is_enabled_p() = %d\n",
924 gdbarch_dtrace_probe_is_enabled_p (gdbarch
));
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: dtrace_probe_is_enabled = <%s>\n",
927 host_address_to_string (gdbarch
->dtrace_probe_is_enabled
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
930 gdbarch_dummy_id_p (gdbarch
));
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: dummy_id = <%s>\n",
933 host_address_to_string (gdbarch
->dummy_id
));
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: dwarf2_addr_size = %s\n",
936 plongest (gdbarch
->dwarf2_addr_size
));
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
939 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
942 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: gdbarch_elf_make_msymbol_special_p() = %d\n",
945 gdbarch_elf_make_msymbol_special_p (gdbarch
));
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
948 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
951 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch
));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
954 host_address_to_string (gdbarch
->elfcore_write_linux_prpsinfo
));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
957 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
960 gdbarch_fetch_pointer_argument_p (gdbarch
));
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
963 host_address_to_string (gdbarch
->fetch_pointer_argument
));
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
966 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
969 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
972 gdbarch_find_memory_regions_p (gdbarch
));
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: find_memory_regions = <%s>\n",
975 host_address_to_string (gdbarch
->find_memory_regions
));
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: float_bit = %s\n",
978 plongest (gdbarch
->float_bit
));
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: float_format = %s\n",
981 pformat (gdbarch
->float_format
));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: floatformat_for_type = <%s>\n",
984 host_address_to_string (gdbarch
->floatformat_for_type
));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: fp0_regnum = %s\n",
987 plongest (gdbarch
->fp0_regnum
));
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
990 gdbarch_frame_align_p (gdbarch
));
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: frame_align = <%s>\n",
993 host_address_to_string (gdbarch
->frame_align
));
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: frame_args_skip = %s\n",
996 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
999 gdbarch_frame_num_args_p (gdbarch
));
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: frame_num_args = <%s>\n",
1002 host_address_to_string (gdbarch
->frame_num_args
));
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: frame_red_zone_size = %s\n",
1005 plongest (gdbarch
->frame_red_zone_size
));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: gcc_target_options = <%s>\n",
1008 host_address_to_string (gdbarch
->gcc_target_options
));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1011 gdbarch_gcore_bfd_target_p (gdbarch
));
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: gcore_bfd_target = %s\n",
1014 pstring (gdbarch
->gcore_bfd_target
));
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1017 gdbarch_gdb_signal_from_target_p (gdbarch
));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1020 host_address_to_string (gdbarch
->gdb_signal_from_target
));
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
1023 gdbarch_gdb_signal_to_target_p (gdbarch
));
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
1026 host_address_to_string (gdbarch
->gdb_signal_to_target
));
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: gen_return_address = <%s>\n",
1029 host_address_to_string (gdbarch
->gen_return_address
));
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1032 gdbarch_get_longjmp_target_p (gdbarch
));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: get_longjmp_target = <%s>\n",
1035 host_address_to_string (gdbarch
->get_longjmp_target
));
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1038 gdbarch_get_siginfo_type_p (gdbarch
));
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: get_siginfo_type = <%s>\n",
1041 host_address_to_string (gdbarch
->get_siginfo_type
));
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1044 gdbarch_get_syscall_number_p (gdbarch
));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: get_syscall_number = <%s>\n",
1047 host_address_to_string (gdbarch
->get_syscall_number
));
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: gnu_triplet_regexp = <%s>\n",
1050 host_address_to_string (gdbarch
->gnu_triplet_regexp
));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: guess_tracepoint_registers = <%s>\n",
1053 host_address_to_string (gdbarch
->guess_tracepoint_registers
));
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: half_bit = %s\n",
1056 plongest (gdbarch
->half_bit
));
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: half_format = %s\n",
1059 pformat (gdbarch
->half_format
));
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: gdbarch_handle_segmentation_fault_p() = %d\n",
1062 gdbarch_handle_segmentation_fault_p (gdbarch
));
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: handle_segmentation_fault = <%s>\n",
1065 host_address_to_string (gdbarch
->handle_segmentation_fault
));
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: has_dos_based_file_system = %s\n",
1068 plongest (gdbarch
->has_dos_based_file_system
));
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: has_global_breakpoints = %s\n",
1071 plongest (gdbarch
->has_global_breakpoints
));
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: has_global_solist = %s\n",
1074 plongest (gdbarch
->has_global_solist
));
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: has_shared_address_space = <%s>\n",
1077 host_address_to_string (gdbarch
->has_shared_address_space
));
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1080 plongest (gdbarch
->have_nonsteppable_watchpoint
));
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1083 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: infcall_mmap = <%s>\n",
1086 host_address_to_string (gdbarch
->infcall_mmap
));
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: infcall_munmap = <%s>\n",
1089 host_address_to_string (gdbarch
->infcall_munmap
));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1092 gdbarch_info_proc_p (gdbarch
));
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: info_proc = <%s>\n",
1095 host_address_to_string (gdbarch
->info_proc
));
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: inner_than = <%s>\n",
1098 host_address_to_string (gdbarch
->inner_than
));
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: insn_is_call = <%s>\n",
1101 host_address_to_string (gdbarch
->insn_is_call
));
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: insn_is_jump = <%s>\n",
1104 host_address_to_string (gdbarch
->insn_is_jump
));
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: insn_is_ret = <%s>\n",
1107 host_address_to_string (gdbarch
->insn_is_ret
));
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: int_bit = %s\n",
1110 plongest (gdbarch
->int_bit
));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1113 gdbarch_integer_to_address_p (gdbarch
));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: integer_to_address = <%s>\n",
1116 host_address_to_string (gdbarch
->integer_to_address
));
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1119 host_address_to_string (gdbarch
->iterate_over_objfiles_in_search_order
));
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
1122 gdbarch_iterate_over_regset_sections_p (gdbarch
));
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
1125 host_address_to_string (gdbarch
->iterate_over_regset_sections
));
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: long_bit = %s\n",
1128 plongest (gdbarch
->long_bit
));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: long_double_bit = %s\n",
1131 plongest (gdbarch
->long_double_bit
));
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: long_double_format = %s\n",
1134 pformat (gdbarch
->long_double_format
));
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: long_long_align_bit = %s\n",
1137 plongest (gdbarch
->long_long_align_bit
));
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: long_long_bit = %s\n",
1140 plongest (gdbarch
->long_long_bit
));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1143 gdbarch_make_corefile_notes_p (gdbarch
));
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: make_corefile_notes = <%s>\n",
1146 host_address_to_string (gdbarch
->make_corefile_notes
));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: make_symbol_special = <%s>\n",
1149 host_address_to_string (gdbarch
->make_symbol_special
));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1152 gdbarch_max_insn_length_p (gdbarch
));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: max_insn_length = %s\n",
1155 plongest (gdbarch
->max_insn_length
));
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1158 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1161 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: num_pseudo_regs = %s\n",
1164 plongest (gdbarch
->num_pseudo_regs
));
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: num_regs = %s\n",
1167 plongest (gdbarch
->num_regs
));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: osabi = %s\n",
1170 plongest (gdbarch
->osabi
));
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1173 gdbarch_overlay_update_p (gdbarch
));
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: overlay_update = <%s>\n",
1176 host_address_to_string (gdbarch
->overlay_update
));
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: pc_regnum = %s\n",
1179 plongest (gdbarch
->pc_regnum
));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: pointer_to_address = <%s>\n",
1182 host_address_to_string (gdbarch
->pointer_to_address
));
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: print_auxv_entry = <%s>\n",
1185 host_address_to_string (gdbarch
->print_auxv_entry
));
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: print_float_info = <%s>\n",
1188 host_address_to_string (gdbarch
->print_float_info
));
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: print_insn = <%s>\n",
1191 host_address_to_string (gdbarch
->print_insn
));
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: print_registers_info = <%s>\n",
1194 host_address_to_string (gdbarch
->print_registers_info
));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1197 gdbarch_print_vector_info_p (gdbarch
));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: print_vector_info = <%s>\n",
1200 host_address_to_string (gdbarch
->print_vector_info
));
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1203 gdbarch_process_record_p (gdbarch
));
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: process_record = <%s>\n",
1206 host_address_to_string (gdbarch
->process_record
));
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1209 gdbarch_process_record_signal_p (gdbarch
));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: process_record_signal = <%s>\n",
1212 host_address_to_string (gdbarch
->process_record_signal
));
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: ps_regnum = %s\n",
1215 plongest (gdbarch
->ps_regnum
));
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1218 gdbarch_pseudo_register_read_p (gdbarch
));
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: pseudo_register_read = <%s>\n",
1221 host_address_to_string (gdbarch
->pseudo_register_read
));
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1224 gdbarch_pseudo_register_read_value_p (gdbarch
));
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1227 host_address_to_string (gdbarch
->pseudo_register_read_value
));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1230 gdbarch_pseudo_register_write_p (gdbarch
));
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: pseudo_register_write = <%s>\n",
1233 host_address_to_string (gdbarch
->pseudo_register_write
));
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: ptr_bit = %s\n",
1236 plongest (gdbarch
->ptr_bit
));
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1239 gdbarch_push_dummy_call_p (gdbarch
));
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: push_dummy_call = <%s>\n",
1242 host_address_to_string (gdbarch
->push_dummy_call
));
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1245 gdbarch_push_dummy_code_p (gdbarch
));
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: push_dummy_code = <%s>\n",
1248 host_address_to_string (gdbarch
->push_dummy_code
));
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: ravenscar_ops = %s\n",
1251 host_address_to_string (gdbarch
->ravenscar_ops
));
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1254 gdbarch_read_pc_p (gdbarch
));
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: read_pc = <%s>\n",
1257 host_address_to_string (gdbarch
->read_pc
));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1260 gdbarch_record_special_symbol_p (gdbarch
));
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: record_special_symbol = <%s>\n",
1263 host_address_to_string (gdbarch
->record_special_symbol
));
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: register_name = <%s>\n",
1266 host_address_to_string (gdbarch
->register_name
));
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: register_reggroup_p = <%s>\n",
1269 host_address_to_string (gdbarch
->register_reggroup_p
));
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: register_sim_regno = <%s>\n",
1272 host_address_to_string (gdbarch
->register_sim_regno
));
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: register_to_value = <%s>\n",
1275 host_address_to_string (gdbarch
->register_to_value
));
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1278 gdbarch_register_type_p (gdbarch
));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: register_type = <%s>\n",
1281 host_address_to_string (gdbarch
->register_type
));
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1284 gdbarch_relocate_instruction_p (gdbarch
));
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: relocate_instruction = <%s>\n",
1287 host_address_to_string (gdbarch
->relocate_instruction
));
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: remote_register_number = <%s>\n",
1290 host_address_to_string (gdbarch
->remote_register_number
));
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1293 host_address_to_string (gdbarch
->return_in_first_hidden_param_p
));
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1296 gdbarch_return_value_p (gdbarch
));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: return_value = <%s>\n",
1299 host_address_to_string (gdbarch
->return_value
));
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1302 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: short_bit = %s\n",
1305 plongest (gdbarch
->short_bit
));
1306 fprintf_unfiltered (file
,
1307 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1308 gdbarch_single_step_through_delay_p (gdbarch
));
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: single_step_through_delay = <%s>\n",
1311 host_address_to_string (gdbarch
->single_step_through_delay
));
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1314 gdbarch_skip_entrypoint_p (gdbarch
));
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: skip_entrypoint = <%s>\n",
1317 host_address_to_string (gdbarch
->skip_entrypoint
));
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1320 gdbarch_skip_main_prologue_p (gdbarch
));
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: skip_main_prologue = <%s>\n",
1323 host_address_to_string (gdbarch
->skip_main_prologue
));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1326 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: skip_prologue = <%s>\n",
1329 host_address_to_string (gdbarch
->skip_prologue
));
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1332 host_address_to_string (gdbarch
->skip_solib_resolver
));
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1335 host_address_to_string (gdbarch
->skip_trampoline_code
));
1336 fprintf_unfiltered (file
,
1337 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1338 gdbarch_software_single_step_p (gdbarch
));
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: software_single_step = <%s>\n",
1341 host_address_to_string (gdbarch
->software_single_step
));
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1344 plongest (gdbarch
->sofun_address_maybe_missing
));
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: solib_symbols_extension = %s\n",
1347 pstring (gdbarch
->solib_symbols_extension
));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: sp_regnum = %s\n",
1350 plongest (gdbarch
->sp_regnum
));
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1353 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1356 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
1359 host_address_to_string (gdbarch
->stack_frame_destroyed_p
));
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1362 pstring (gdbarch
->stap_gdb_register_prefix
));
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1365 pstring (gdbarch
->stap_gdb_register_suffix
));
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: stap_integer_prefixes = %s\n",
1368 pstring_list (gdbarch
->stap_integer_prefixes
));
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: stap_integer_suffixes = %s\n",
1371 pstring_list (gdbarch
->stap_integer_suffixes
));
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1374 gdbarch_stap_is_single_operand_p (gdbarch
));
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1377 host_address_to_string (gdbarch
->stap_is_single_operand
));
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1380 gdbarch_stap_parse_special_token_p (gdbarch
));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1383 host_address_to_string (gdbarch
->stap_parse_special_token
));
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1386 pstring_list (gdbarch
->stap_register_indirection_prefixes
));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1389 pstring_list (gdbarch
->stap_register_indirection_suffixes
));
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: stap_register_prefixes = %s\n",
1392 pstring_list (gdbarch
->stap_register_prefixes
));
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: stap_register_suffixes = %s\n",
1395 pstring_list (gdbarch
->stap_register_suffixes
));
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1398 gdbarch_static_transform_name_p (gdbarch
));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: static_transform_name = <%s>\n",
1401 host_address_to_string (gdbarch
->static_transform_name
));
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: sw_breakpoint_from_kind = <%s>\n",
1404 host_address_to_string (gdbarch
->sw_breakpoint_from_kind
));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: syscalls_info = %s\n",
1407 host_address_to_string (gdbarch
->syscalls_info
));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: target_desc = %s\n",
1410 host_address_to_string (gdbarch
->target_desc
));
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1413 gdbarch_unwind_pc_p (gdbarch
));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: unwind_pc = <%s>\n",
1416 host_address_to_string (gdbarch
->unwind_pc
));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1419 gdbarch_unwind_sp_p (gdbarch
));
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: unwind_sp = <%s>\n",
1422 host_address_to_string (gdbarch
->unwind_sp
));
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: value_from_register = <%s>\n",
1425 host_address_to_string (gdbarch
->value_from_register
));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: value_to_register = <%s>\n",
1428 host_address_to_string (gdbarch
->value_to_register
));
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: vbit_in_delta = %s\n",
1431 plongest (gdbarch
->vbit_in_delta
));
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1434 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: vsyscall_range = <%s>\n",
1437 host_address_to_string (gdbarch
->vsyscall_range
));
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: vtable_function_descriptors = %s\n",
1440 plongest (gdbarch
->vtable_function_descriptors
));
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1443 gdbarch_write_pc_p (gdbarch
));
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: write_pc = <%s>\n",
1446 host_address_to_string (gdbarch
->write_pc
));
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: xml_syscall_file = %s\n",
1449 pstring (gdbarch
->xml_syscall_file
));
1450 if (gdbarch
->dump_tdep
!= NULL
)
1451 gdbarch
->dump_tdep (gdbarch
, file
);
1454 struct gdbarch_tdep
*
1455 gdbarch_tdep (struct gdbarch
*gdbarch
)
1457 if (gdbarch_debug
>= 2)
1458 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1459 return gdbarch
->tdep
;
1463 const struct bfd_arch_info
*
1464 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1466 gdb_assert (gdbarch
!= NULL
);
1467 if (gdbarch_debug
>= 2)
1468 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1469 return gdbarch
->bfd_arch_info
;
1473 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1475 gdb_assert (gdbarch
!= NULL
);
1476 if (gdbarch_debug
>= 2)
1477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1478 return gdbarch
->byte_order
;
1482 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1484 gdb_assert (gdbarch
!= NULL
);
1485 if (gdbarch_debug
>= 2)
1486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1487 return gdbarch
->byte_order_for_code
;
1491 gdbarch_osabi (struct gdbarch
*gdbarch
)
1493 gdb_assert (gdbarch
!= NULL
);
1494 if (gdbarch_debug
>= 2)
1495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1496 return gdbarch
->osabi
;
1499 const struct target_desc
*
1500 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1502 gdb_assert (gdbarch
!= NULL
);
1503 if (gdbarch_debug
>= 2)
1504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1505 return gdbarch
->target_desc
;
1509 gdbarch_bits_big_endian (struct gdbarch
*gdbarch
)
1511 gdb_assert (gdbarch
!= NULL
);
1512 /* Skip verify of bits_big_endian, invalid_p == 0 */
1513 if (gdbarch_debug
>= 2)
1514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bits_big_endian called\n");
1515 return gdbarch
->bits_big_endian
;
1519 set_gdbarch_bits_big_endian (struct gdbarch
*gdbarch
,
1520 int bits_big_endian
)
1522 gdbarch
->bits_big_endian
= bits_big_endian
;
1526 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1528 gdb_assert (gdbarch
!= NULL
);
1529 /* Skip verify of short_bit, invalid_p == 0 */
1530 if (gdbarch_debug
>= 2)
1531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1532 return gdbarch
->short_bit
;
1536 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1539 gdbarch
->short_bit
= short_bit
;
1543 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1545 gdb_assert (gdbarch
!= NULL
);
1546 /* Skip verify of int_bit, invalid_p == 0 */
1547 if (gdbarch_debug
>= 2)
1548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1549 return gdbarch
->int_bit
;
1553 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1556 gdbarch
->int_bit
= int_bit
;
1560 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1562 gdb_assert (gdbarch
!= NULL
);
1563 /* Skip verify of long_bit, invalid_p == 0 */
1564 if (gdbarch_debug
>= 2)
1565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1566 return gdbarch
->long_bit
;
1570 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1573 gdbarch
->long_bit
= long_bit
;
1577 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1579 gdb_assert (gdbarch
!= NULL
);
1580 /* Skip verify of long_long_bit, invalid_p == 0 */
1581 if (gdbarch_debug
>= 2)
1582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1583 return gdbarch
->long_long_bit
;
1587 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1590 gdbarch
->long_long_bit
= long_long_bit
;
1594 gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
)
1596 gdb_assert (gdbarch
!= NULL
);
1597 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1598 if (gdbarch_debug
>= 2)
1599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_align_bit called\n");
1600 return gdbarch
->long_long_align_bit
;
1604 set_gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
,
1605 int long_long_align_bit
)
1607 gdbarch
->long_long_align_bit
= long_long_align_bit
;
1611 gdbarch_half_bit (struct gdbarch
*gdbarch
)
1613 gdb_assert (gdbarch
!= NULL
);
1614 /* Skip verify of half_bit, invalid_p == 0 */
1615 if (gdbarch_debug
>= 2)
1616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_bit called\n");
1617 return gdbarch
->half_bit
;
1621 set_gdbarch_half_bit (struct gdbarch
*gdbarch
,
1624 gdbarch
->half_bit
= half_bit
;
1627 const struct floatformat
**
1628 gdbarch_half_format (struct gdbarch
*gdbarch
)
1630 gdb_assert (gdbarch
!= NULL
);
1631 if (gdbarch_debug
>= 2)
1632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_format called\n");
1633 return gdbarch
->half_format
;
1637 set_gdbarch_half_format (struct gdbarch
*gdbarch
,
1638 const struct floatformat
** half_format
)
1640 gdbarch
->half_format
= half_format
;
1644 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1646 gdb_assert (gdbarch
!= NULL
);
1647 /* Skip verify of float_bit, invalid_p == 0 */
1648 if (gdbarch_debug
>= 2)
1649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1650 return gdbarch
->float_bit
;
1654 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1657 gdbarch
->float_bit
= float_bit
;
1660 const struct floatformat
**
1661 gdbarch_float_format (struct gdbarch
*gdbarch
)
1663 gdb_assert (gdbarch
!= NULL
);
1664 if (gdbarch_debug
>= 2)
1665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1666 return gdbarch
->float_format
;
1670 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1671 const struct floatformat
** float_format
)
1673 gdbarch
->float_format
= float_format
;
1677 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1679 gdb_assert (gdbarch
!= NULL
);
1680 /* Skip verify of double_bit, invalid_p == 0 */
1681 if (gdbarch_debug
>= 2)
1682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1683 return gdbarch
->double_bit
;
1687 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1690 gdbarch
->double_bit
= double_bit
;
1693 const struct floatformat
**
1694 gdbarch_double_format (struct gdbarch
*gdbarch
)
1696 gdb_assert (gdbarch
!= NULL
);
1697 if (gdbarch_debug
>= 2)
1698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1699 return gdbarch
->double_format
;
1703 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1704 const struct floatformat
** double_format
)
1706 gdbarch
->double_format
= double_format
;
1710 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1712 gdb_assert (gdbarch
!= NULL
);
1713 /* Skip verify of long_double_bit, invalid_p == 0 */
1714 if (gdbarch_debug
>= 2)
1715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1716 return gdbarch
->long_double_bit
;
1720 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1721 int long_double_bit
)
1723 gdbarch
->long_double_bit
= long_double_bit
;
1726 const struct floatformat
**
1727 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1729 gdb_assert (gdbarch
!= NULL
);
1730 if (gdbarch_debug
>= 2)
1731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1732 return gdbarch
->long_double_format
;
1736 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1737 const struct floatformat
** long_double_format
)
1739 gdbarch
->long_double_format
= long_double_format
;
1742 const struct floatformat
**
1743 gdbarch_floatformat_for_type (struct gdbarch
*gdbarch
, const char *name
, int length
)
1745 gdb_assert (gdbarch
!= NULL
);
1746 gdb_assert (gdbarch
->floatformat_for_type
!= NULL
);
1747 if (gdbarch_debug
>= 2)
1748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_floatformat_for_type called\n");
1749 return gdbarch
->floatformat_for_type (gdbarch
, name
, length
);
1753 set_gdbarch_floatformat_for_type (struct gdbarch
*gdbarch
,
1754 gdbarch_floatformat_for_type_ftype floatformat_for_type
)
1756 gdbarch
->floatformat_for_type
= floatformat_for_type
;
1760 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1762 gdb_assert (gdbarch
!= NULL
);
1763 /* Skip verify of ptr_bit, invalid_p == 0 */
1764 if (gdbarch_debug
>= 2)
1765 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1766 return gdbarch
->ptr_bit
;
1770 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1773 gdbarch
->ptr_bit
= ptr_bit
;
1777 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1779 gdb_assert (gdbarch
!= NULL
);
1780 /* Check variable changed from pre-default. */
1781 gdb_assert (gdbarch
->addr_bit
!= 0);
1782 if (gdbarch_debug
>= 2)
1783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1784 return gdbarch
->addr_bit
;
1788 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1791 gdbarch
->addr_bit
= addr_bit
;
1795 gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
)
1797 gdb_assert (gdbarch
!= NULL
);
1798 /* Check variable changed from pre-default. */
1799 gdb_assert (gdbarch
->dwarf2_addr_size
!= 0);
1800 if (gdbarch_debug
>= 2)
1801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_addr_size called\n");
1802 return gdbarch
->dwarf2_addr_size
;
1806 set_gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
,
1807 int dwarf2_addr_size
)
1809 gdbarch
->dwarf2_addr_size
= dwarf2_addr_size
;
1813 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1815 gdb_assert (gdbarch
!= NULL
);
1816 /* Check variable changed from pre-default. */
1817 gdb_assert (gdbarch
->char_signed
!= -1);
1818 if (gdbarch_debug
>= 2)
1819 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1820 return gdbarch
->char_signed
;
1824 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1827 gdbarch
->char_signed
= char_signed
;
1831 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1833 gdb_assert (gdbarch
!= NULL
);
1834 return gdbarch
->read_pc
!= NULL
;
1838 gdbarch_read_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
1840 gdb_assert (gdbarch
!= NULL
);
1841 gdb_assert (gdbarch
->read_pc
!= NULL
);
1842 if (gdbarch_debug
>= 2)
1843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1844 return gdbarch
->read_pc (regcache
);
1848 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1849 gdbarch_read_pc_ftype read_pc
)
1851 gdbarch
->read_pc
= read_pc
;
1855 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1857 gdb_assert (gdbarch
!= NULL
);
1858 return gdbarch
->write_pc
!= NULL
;
1862 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1864 gdb_assert (gdbarch
!= NULL
);
1865 gdb_assert (gdbarch
->write_pc
!= NULL
);
1866 if (gdbarch_debug
>= 2)
1867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1868 gdbarch
->write_pc (regcache
, val
);
1872 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1873 gdbarch_write_pc_ftype write_pc
)
1875 gdbarch
->write_pc
= write_pc
;
1879 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1881 gdb_assert (gdbarch
!= NULL
);
1882 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1883 if (gdbarch_debug
>= 2)
1884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1885 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
1889 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
1890 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
1892 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
1896 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
1898 gdb_assert (gdbarch
!= NULL
);
1899 return gdbarch
->pseudo_register_read
!= NULL
;
1902 enum register_status
1903 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
1905 gdb_assert (gdbarch
!= NULL
);
1906 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
1907 if (gdbarch_debug
>= 2)
1908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
1909 return gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
1913 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
1914 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
1916 gdbarch
->pseudo_register_read
= pseudo_register_read
;
1920 gdbarch_pseudo_register_read_value_p (struct gdbarch
*gdbarch
)
1922 gdb_assert (gdbarch
!= NULL
);
1923 return gdbarch
->pseudo_register_read_value
!= NULL
;
1927 gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
)
1929 gdb_assert (gdbarch
!= NULL
);
1930 gdb_assert (gdbarch
->pseudo_register_read_value
!= NULL
);
1931 if (gdbarch_debug
>= 2)
1932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read_value called\n");
1933 return gdbarch
->pseudo_register_read_value (gdbarch
, regcache
, cookednum
);
1937 set_gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
,
1938 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value
)
1940 gdbarch
->pseudo_register_read_value
= pseudo_register_read_value
;
1944 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
1946 gdb_assert (gdbarch
!= NULL
);
1947 return gdbarch
->pseudo_register_write
!= NULL
;
1951 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
1953 gdb_assert (gdbarch
!= NULL
);
1954 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
1955 if (gdbarch_debug
>= 2)
1956 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
1957 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
1961 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
1962 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
1964 gdbarch
->pseudo_register_write
= pseudo_register_write
;
1968 gdbarch_num_regs (struct gdbarch
*gdbarch
)
1970 gdb_assert (gdbarch
!= NULL
);
1971 /* Check variable changed from pre-default. */
1972 gdb_assert (gdbarch
->num_regs
!= -1);
1973 if (gdbarch_debug
>= 2)
1974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
1975 return gdbarch
->num_regs
;
1979 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
1982 gdbarch
->num_regs
= num_regs
;
1986 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
1988 gdb_assert (gdbarch
!= NULL
);
1989 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1990 if (gdbarch_debug
>= 2)
1991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
1992 return gdbarch
->num_pseudo_regs
;
1996 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
1997 int num_pseudo_regs
)
1999 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2003 gdbarch_ax_pseudo_register_collect_p (struct gdbarch
*gdbarch
)
2005 gdb_assert (gdbarch
!= NULL
);
2006 return gdbarch
->ax_pseudo_register_collect
!= NULL
;
2010 gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
2012 gdb_assert (gdbarch
!= NULL
);
2013 gdb_assert (gdbarch
->ax_pseudo_register_collect
!= NULL
);
2014 if (gdbarch_debug
>= 2)
2015 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_collect called\n");
2016 return gdbarch
->ax_pseudo_register_collect (gdbarch
, ax
, reg
);
2020 set_gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
,
2021 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect
)
2023 gdbarch
->ax_pseudo_register_collect
= ax_pseudo_register_collect
;
2027 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch
*gdbarch
)
2029 gdb_assert (gdbarch
!= NULL
);
2030 return gdbarch
->ax_pseudo_register_push_stack
!= NULL
;
2034 gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
2036 gdb_assert (gdbarch
!= NULL
);
2037 gdb_assert (gdbarch
->ax_pseudo_register_push_stack
!= NULL
);
2038 if (gdbarch_debug
>= 2)
2039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_push_stack called\n");
2040 return gdbarch
->ax_pseudo_register_push_stack (gdbarch
, ax
, reg
);
2044 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
,
2045 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack
)
2047 gdbarch
->ax_pseudo_register_push_stack
= ax_pseudo_register_push_stack
;
2051 gdbarch_handle_segmentation_fault_p (struct gdbarch
*gdbarch
)
2053 gdb_assert (gdbarch
!= NULL
);
2054 return gdbarch
->handle_segmentation_fault
!= NULL
;
2058 gdbarch_handle_segmentation_fault (struct gdbarch
*gdbarch
, struct ui_out
*uiout
)
2060 gdb_assert (gdbarch
!= NULL
);
2061 gdb_assert (gdbarch
->handle_segmentation_fault
!= NULL
);
2062 if (gdbarch_debug
>= 2)
2063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_handle_segmentation_fault called\n");
2064 gdbarch
->handle_segmentation_fault (gdbarch
, uiout
);
2068 set_gdbarch_handle_segmentation_fault (struct gdbarch
*gdbarch
,
2069 gdbarch_handle_segmentation_fault_ftype handle_segmentation_fault
)
2071 gdbarch
->handle_segmentation_fault
= handle_segmentation_fault
;
2075 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2077 gdb_assert (gdbarch
!= NULL
);
2078 /* Skip verify of sp_regnum, invalid_p == 0 */
2079 if (gdbarch_debug
>= 2)
2080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2081 return gdbarch
->sp_regnum
;
2085 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2088 gdbarch
->sp_regnum
= sp_regnum
;
2092 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2094 gdb_assert (gdbarch
!= NULL
);
2095 /* Skip verify of pc_regnum, invalid_p == 0 */
2096 if (gdbarch_debug
>= 2)
2097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2098 return gdbarch
->pc_regnum
;
2102 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2105 gdbarch
->pc_regnum
= pc_regnum
;
2109 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2111 gdb_assert (gdbarch
!= NULL
);
2112 /* Skip verify of ps_regnum, invalid_p == 0 */
2113 if (gdbarch_debug
>= 2)
2114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2115 return gdbarch
->ps_regnum
;
2119 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2122 gdbarch
->ps_regnum
= ps_regnum
;
2126 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2128 gdb_assert (gdbarch
!= NULL
);
2129 /* Skip verify of fp0_regnum, invalid_p == 0 */
2130 if (gdbarch_debug
>= 2)
2131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2132 return gdbarch
->fp0_regnum
;
2136 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2139 gdbarch
->fp0_regnum
= fp0_regnum
;
2143 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2145 gdb_assert (gdbarch
!= NULL
);
2146 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2147 if (gdbarch_debug
>= 2)
2148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2149 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
2153 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2154 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2156 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2160 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2162 gdb_assert (gdbarch
!= NULL
);
2163 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2164 if (gdbarch_debug
>= 2)
2165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2166 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
2170 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2171 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2173 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2177 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2179 gdb_assert (gdbarch
!= NULL
);
2180 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2181 if (gdbarch_debug
>= 2)
2182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2183 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
2187 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2188 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2190 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2194 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2196 gdb_assert (gdbarch
!= NULL
);
2197 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2198 if (gdbarch_debug
>= 2)
2199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2200 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
2204 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2205 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2207 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2211 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2213 gdb_assert (gdbarch
!= NULL
);
2214 gdb_assert (gdbarch
->register_name
!= NULL
);
2215 if (gdbarch_debug
>= 2)
2216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2217 return gdbarch
->register_name (gdbarch
, regnr
);
2221 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2222 gdbarch_register_name_ftype register_name
)
2224 gdbarch
->register_name
= register_name
;
2228 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2230 gdb_assert (gdbarch
!= NULL
);
2231 return gdbarch
->register_type
!= NULL
;
2235 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2237 gdb_assert (gdbarch
!= NULL
);
2238 gdb_assert (gdbarch
->register_type
!= NULL
);
2239 if (gdbarch_debug
>= 2)
2240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2241 return gdbarch
->register_type (gdbarch
, reg_nr
);
2245 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2246 gdbarch_register_type_ftype register_type
)
2248 gdbarch
->register_type
= register_type
;
2252 gdbarch_dummy_id_p (struct gdbarch
*gdbarch
)
2254 gdb_assert (gdbarch
!= NULL
);
2255 return gdbarch
->dummy_id
!= NULL
;
2259 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
2261 gdb_assert (gdbarch
!= NULL
);
2262 gdb_assert (gdbarch
->dummy_id
!= NULL
);
2263 if (gdbarch_debug
>= 2)
2264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
2265 return gdbarch
->dummy_id (gdbarch
, this_frame
);
2269 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
2270 gdbarch_dummy_id_ftype dummy_id
)
2272 gdbarch
->dummy_id
= dummy_id
;
2276 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2278 gdb_assert (gdbarch
!= NULL
);
2279 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2280 if (gdbarch_debug
>= 2)
2281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2282 return gdbarch
->deprecated_fp_regnum
;
2286 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2287 int deprecated_fp_regnum
)
2289 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2293 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2295 gdb_assert (gdbarch
!= NULL
);
2296 return gdbarch
->push_dummy_call
!= NULL
;
2300 gdbarch_push_dummy_call (struct gdbarch
*gdbarch
, struct value
*function
, struct regcache
*regcache
, CORE_ADDR bp_addr
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
2302 gdb_assert (gdbarch
!= NULL
);
2303 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2304 if (gdbarch_debug
>= 2)
2305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2306 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
2310 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2311 gdbarch_push_dummy_call_ftype push_dummy_call
)
2313 gdbarch
->push_dummy_call
= push_dummy_call
;
2317 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2319 gdb_assert (gdbarch
!= NULL
);
2320 /* Skip verify of call_dummy_location, invalid_p == 0 */
2321 if (gdbarch_debug
>= 2)
2322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2323 return gdbarch
->call_dummy_location
;
2327 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2328 int call_dummy_location
)
2330 gdbarch
->call_dummy_location
= call_dummy_location
;
2334 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2336 gdb_assert (gdbarch
!= NULL
);
2337 return gdbarch
->push_dummy_code
!= NULL
;
2341 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
)
2343 gdb_assert (gdbarch
!= NULL
);
2344 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2345 if (gdbarch_debug
>= 2)
2346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2347 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
2351 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2352 gdbarch_push_dummy_code_ftype push_dummy_code
)
2354 gdbarch
->push_dummy_code
= push_dummy_code
;
2358 gdbarch_code_of_frame_writable (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2360 gdb_assert (gdbarch
!= NULL
);
2361 gdb_assert (gdbarch
->code_of_frame_writable
!= NULL
);
2362 if (gdbarch_debug
>= 2)
2363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_code_of_frame_writable called\n");
2364 return gdbarch
->code_of_frame_writable (gdbarch
, frame
);
2368 set_gdbarch_code_of_frame_writable (struct gdbarch
*gdbarch
,
2369 gdbarch_code_of_frame_writable_ftype code_of_frame_writable
)
2371 gdbarch
->code_of_frame_writable
= code_of_frame_writable
;
2375 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2377 gdb_assert (gdbarch
!= NULL
);
2378 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2379 if (gdbarch_debug
>= 2)
2380 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2381 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2385 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2386 gdbarch_print_registers_info_ftype print_registers_info
)
2388 gdbarch
->print_registers_info
= print_registers_info
;
2392 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2394 gdb_assert (gdbarch
!= NULL
);
2395 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2396 if (gdbarch_debug
>= 2)
2397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2398 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2402 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2403 gdbarch_print_float_info_ftype print_float_info
)
2405 gdbarch
->print_float_info
= print_float_info
;
2409 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2411 gdb_assert (gdbarch
!= NULL
);
2412 return gdbarch
->print_vector_info
!= NULL
;
2416 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2418 gdb_assert (gdbarch
!= NULL
);
2419 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2420 if (gdbarch_debug
>= 2)
2421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2422 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2426 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2427 gdbarch_print_vector_info_ftype print_vector_info
)
2429 gdbarch
->print_vector_info
= print_vector_info
;
2433 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2435 gdb_assert (gdbarch
!= NULL
);
2436 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2437 if (gdbarch_debug
>= 2)
2438 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2439 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2443 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2444 gdbarch_register_sim_regno_ftype register_sim_regno
)
2446 gdbarch
->register_sim_regno
= register_sim_regno
;
2450 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2452 gdb_assert (gdbarch
!= NULL
);
2453 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2454 if (gdbarch_debug
>= 2)
2455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2456 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2460 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2461 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2463 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2467 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2469 gdb_assert (gdbarch
!= NULL
);
2470 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2471 if (gdbarch_debug
>= 2)
2472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2473 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2477 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2478 gdbarch_cannot_store_register_ftype cannot_store_register
)
2480 gdbarch
->cannot_store_register
= cannot_store_register
;
2484 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2486 gdb_assert (gdbarch
!= NULL
);
2487 return gdbarch
->get_longjmp_target
!= NULL
;
2491 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2493 gdb_assert (gdbarch
!= NULL
);
2494 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2495 if (gdbarch_debug
>= 2)
2496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2497 return gdbarch
->get_longjmp_target (frame
, pc
);
2501 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2502 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2504 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2508 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2510 gdb_assert (gdbarch
!= NULL
);
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2513 return gdbarch
->believe_pcc_promotion
;
2517 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2518 int believe_pcc_promotion
)
2520 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2524 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2526 gdb_assert (gdbarch
!= NULL
);
2527 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2528 if (gdbarch_debug
>= 2)
2529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2530 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2534 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2535 gdbarch_convert_register_p_ftype convert_register_p
)
2537 gdbarch
->convert_register_p
= convert_register_p
;
2541 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
, int *optimizedp
, int *unavailablep
)
2543 gdb_assert (gdbarch
!= NULL
);
2544 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2545 if (gdbarch_debug
>= 2)
2546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2547 return gdbarch
->register_to_value (frame
, regnum
, type
, buf
, optimizedp
, unavailablep
);
2551 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2552 gdbarch_register_to_value_ftype register_to_value
)
2554 gdbarch
->register_to_value
= register_to_value
;
2558 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2560 gdb_assert (gdbarch
!= NULL
);
2561 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2562 if (gdbarch_debug
>= 2)
2563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2564 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2568 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2569 gdbarch_value_to_register_ftype value_to_register
)
2571 gdbarch
->value_to_register
= value_to_register
;
2575 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_id frame_id
)
2577 gdb_assert (gdbarch
!= NULL
);
2578 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2579 if (gdbarch_debug
>= 2)
2580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2581 return gdbarch
->value_from_register (gdbarch
, type
, regnum
, frame_id
);
2585 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2586 gdbarch_value_from_register_ftype value_from_register
)
2588 gdbarch
->value_from_register
= value_from_register
;
2592 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2594 gdb_assert (gdbarch
!= NULL
);
2595 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2598 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2602 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2603 gdbarch_pointer_to_address_ftype pointer_to_address
)
2605 gdbarch
->pointer_to_address
= pointer_to_address
;
2609 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2611 gdb_assert (gdbarch
!= NULL
);
2612 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2613 if (gdbarch_debug
>= 2)
2614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2615 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2619 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2620 gdbarch_address_to_pointer_ftype address_to_pointer
)
2622 gdbarch
->address_to_pointer
= address_to_pointer
;
2626 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2628 gdb_assert (gdbarch
!= NULL
);
2629 return gdbarch
->integer_to_address
!= NULL
;
2633 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2635 gdb_assert (gdbarch
!= NULL
);
2636 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2637 if (gdbarch_debug
>= 2)
2638 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2639 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2643 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2644 gdbarch_integer_to_address_ftype integer_to_address
)
2646 gdbarch
->integer_to_address
= integer_to_address
;
2650 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2652 gdb_assert (gdbarch
!= NULL
);
2653 return gdbarch
->return_value
!= NULL
;
2656 enum return_value_convention
2657 gdbarch_return_value (struct gdbarch
*gdbarch
, struct value
*function
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2659 gdb_assert (gdbarch
!= NULL
);
2660 gdb_assert (gdbarch
->return_value
!= NULL
);
2661 if (gdbarch_debug
>= 2)
2662 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2663 return gdbarch
->return_value (gdbarch
, function
, valtype
, regcache
, readbuf
, writebuf
);
2667 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2668 gdbarch_return_value_ftype return_value
)
2670 gdbarch
->return_value
= return_value
;
2674 gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
, struct type
*type
)
2676 gdb_assert (gdbarch
!= NULL
);
2677 gdb_assert (gdbarch
->return_in_first_hidden_param_p
!= NULL
);
2678 if (gdbarch_debug
>= 2)
2679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_in_first_hidden_param_p called\n");
2680 return gdbarch
->return_in_first_hidden_param_p (gdbarch
, type
);
2684 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
,
2685 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p
)
2687 gdbarch
->return_in_first_hidden_param_p
= return_in_first_hidden_param_p
;
2691 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2693 gdb_assert (gdbarch
!= NULL
);
2694 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2695 if (gdbarch_debug
>= 2)
2696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2697 return gdbarch
->skip_prologue (gdbarch
, ip
);
2701 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2702 gdbarch_skip_prologue_ftype skip_prologue
)
2704 gdbarch
->skip_prologue
= skip_prologue
;
2708 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2710 gdb_assert (gdbarch
!= NULL
);
2711 return gdbarch
->skip_main_prologue
!= NULL
;
2715 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2717 gdb_assert (gdbarch
!= NULL
);
2718 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2721 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2725 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2726 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2728 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2732 gdbarch_skip_entrypoint_p (struct gdbarch
*gdbarch
)
2734 gdb_assert (gdbarch
!= NULL
);
2735 return gdbarch
->skip_entrypoint
!= NULL
;
2739 gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2741 gdb_assert (gdbarch
!= NULL
);
2742 gdb_assert (gdbarch
->skip_entrypoint
!= NULL
);
2743 if (gdbarch_debug
>= 2)
2744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_entrypoint called\n");
2745 return gdbarch
->skip_entrypoint (gdbarch
, ip
);
2749 set_gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
,
2750 gdbarch_skip_entrypoint_ftype skip_entrypoint
)
2752 gdbarch
->skip_entrypoint
= skip_entrypoint
;
2756 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2758 gdb_assert (gdbarch
!= NULL
);
2759 gdb_assert (gdbarch
->inner_than
!= NULL
);
2760 if (gdbarch_debug
>= 2)
2761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2762 return gdbarch
->inner_than (lhs
, rhs
);
2766 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2767 gdbarch_inner_than_ftype inner_than
)
2769 gdbarch
->inner_than
= inner_than
;
2773 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2775 gdb_assert (gdbarch
!= NULL
);
2776 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2777 if (gdbarch_debug
>= 2)
2778 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2779 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2783 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2784 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2786 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2790 gdbarch_breakpoint_kind_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
)
2792 gdb_assert (gdbarch
!= NULL
);
2793 gdb_assert (gdbarch
->breakpoint_kind_from_pc
!= NULL
);
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_kind_from_pc called\n");
2796 return gdbarch
->breakpoint_kind_from_pc (gdbarch
, pcptr
);
2800 set_gdbarch_breakpoint_kind_from_pc (struct gdbarch
*gdbarch
,
2801 gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc
)
2803 gdbarch
->breakpoint_kind_from_pc
= breakpoint_kind_from_pc
;
2807 gdbarch_sw_breakpoint_from_kind (struct gdbarch
*gdbarch
, int kind
, int *size
)
2809 gdb_assert (gdbarch
!= NULL
);
2810 gdb_assert (gdbarch
->sw_breakpoint_from_kind
!= NULL
);
2811 if (gdbarch_debug
>= 2)
2812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sw_breakpoint_from_kind called\n");
2813 return gdbarch
->sw_breakpoint_from_kind (gdbarch
, kind
, size
);
2817 set_gdbarch_sw_breakpoint_from_kind (struct gdbarch
*gdbarch
,
2818 gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind
)
2820 gdbarch
->sw_breakpoint_from_kind
= sw_breakpoint_from_kind
;
2824 gdbarch_breakpoint_kind_from_current_state (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR
*pcptr
)
2826 gdb_assert (gdbarch
!= NULL
);
2827 gdb_assert (gdbarch
->breakpoint_kind_from_current_state
!= NULL
);
2828 if (gdbarch_debug
>= 2)
2829 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_kind_from_current_state called\n");
2830 return gdbarch
->breakpoint_kind_from_current_state (gdbarch
, regcache
, pcptr
);
2834 set_gdbarch_breakpoint_kind_from_current_state (struct gdbarch
*gdbarch
,
2835 gdbarch_breakpoint_kind_from_current_state_ftype breakpoint_kind_from_current_state
)
2837 gdbarch
->breakpoint_kind_from_current_state
= breakpoint_kind_from_current_state
;
2841 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2843 gdb_assert (gdbarch
!= NULL
);
2844 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2848 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2850 gdb_assert (gdbarch
!= NULL
);
2851 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2852 if (gdbarch_debug
>= 2)
2853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2854 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2858 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2859 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2861 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2865 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2867 gdb_assert (gdbarch
!= NULL
);
2868 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2869 if (gdbarch_debug
>= 2)
2870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2871 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2875 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2876 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2878 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2882 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2884 gdb_assert (gdbarch
!= NULL
);
2885 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2886 if (gdbarch_debug
>= 2)
2887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2888 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2892 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2893 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
2895 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
2899 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
2901 gdb_assert (gdbarch
!= NULL
);
2902 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2903 if (gdbarch_debug
>= 2)
2904 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
2905 return gdbarch
->decr_pc_after_break
;
2909 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
2910 CORE_ADDR decr_pc_after_break
)
2912 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
2916 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
2918 gdb_assert (gdbarch
!= NULL
);
2919 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2920 if (gdbarch_debug
>= 2)
2921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
2922 return gdbarch
->deprecated_function_start_offset
;
2926 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
2927 CORE_ADDR deprecated_function_start_offset
)
2929 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
2933 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
2935 gdb_assert (gdbarch
!= NULL
);
2936 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
2937 if (gdbarch_debug
>= 2)
2938 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
2939 return gdbarch
->remote_register_number (gdbarch
, regno
);
2943 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
2944 gdbarch_remote_register_number_ftype remote_register_number
)
2946 gdbarch
->remote_register_number
= remote_register_number
;
2950 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
2952 gdb_assert (gdbarch
!= NULL
);
2953 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
2957 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
2959 gdb_assert (gdbarch
!= NULL
);
2960 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
2961 if (gdbarch_debug
>= 2)
2962 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
2963 return gdbarch
->fetch_tls_load_module_address (objfile
);
2967 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
2968 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
2970 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
2974 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
2976 gdb_assert (gdbarch
!= NULL
);
2977 /* Skip verify of frame_args_skip, invalid_p == 0 */
2978 if (gdbarch_debug
>= 2)
2979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
2980 return gdbarch
->frame_args_skip
;
2984 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
2985 CORE_ADDR frame_args_skip
)
2987 gdbarch
->frame_args_skip
= frame_args_skip
;
2991 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
2993 gdb_assert (gdbarch
!= NULL
);
2994 return gdbarch
->unwind_pc
!= NULL
;
2998 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
3000 gdb_assert (gdbarch
!= NULL
);
3001 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
3002 if (gdbarch_debug
>= 2)
3003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
3004 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
3008 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
3009 gdbarch_unwind_pc_ftype unwind_pc
)
3011 gdbarch
->unwind_pc
= unwind_pc
;
3015 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
3017 gdb_assert (gdbarch
!= NULL
);
3018 return gdbarch
->unwind_sp
!= NULL
;
3022 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
3024 gdb_assert (gdbarch
!= NULL
);
3025 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
3026 if (gdbarch_debug
>= 2)
3027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
3028 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
3032 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
3033 gdbarch_unwind_sp_ftype unwind_sp
)
3035 gdbarch
->unwind_sp
= unwind_sp
;
3039 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
3041 gdb_assert (gdbarch
!= NULL
);
3042 return gdbarch
->frame_num_args
!= NULL
;
3046 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3048 gdb_assert (gdbarch
!= NULL
);
3049 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
3050 if (gdbarch_debug
>= 2)
3051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3052 return gdbarch
->frame_num_args (frame
);
3056 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3057 gdbarch_frame_num_args_ftype frame_num_args
)
3059 gdbarch
->frame_num_args
= frame_num_args
;
3063 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
3065 gdb_assert (gdbarch
!= NULL
);
3066 return gdbarch
->frame_align
!= NULL
;
3070 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
3072 gdb_assert (gdbarch
!= NULL
);
3073 gdb_assert (gdbarch
->frame_align
!= NULL
);
3074 if (gdbarch_debug
>= 2)
3075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
3076 return gdbarch
->frame_align (gdbarch
, address
);
3080 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
3081 gdbarch_frame_align_ftype frame_align
)
3083 gdbarch
->frame_align
= frame_align
;
3087 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
3089 gdb_assert (gdbarch
!= NULL
);
3090 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
3091 if (gdbarch_debug
>= 2)
3092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
3093 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
3097 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
3098 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
3100 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
3104 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
3106 gdb_assert (gdbarch
!= NULL
);
3107 if (gdbarch_debug
>= 2)
3108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
3109 return gdbarch
->frame_red_zone_size
;
3113 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
3114 int frame_red_zone_size
)
3116 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
3120 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
3122 gdb_assert (gdbarch
!= NULL
);
3123 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
3124 if (gdbarch_debug
>= 2)
3125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
3126 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
3130 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
3131 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
3133 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
3137 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3139 gdb_assert (gdbarch
!= NULL
);
3140 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
3141 if (gdbarch_debug
>= 2)
3142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
3143 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
3147 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
3148 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
3150 gdbarch
->addr_bits_remove
= addr_bits_remove
;
3154 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
3156 gdb_assert (gdbarch
!= NULL
);
3157 return gdbarch
->software_single_step
!= NULL
;
3161 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3163 gdb_assert (gdbarch
!= NULL
);
3164 gdb_assert (gdbarch
->software_single_step
!= NULL
);
3165 if (gdbarch_debug
>= 2)
3166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
3167 return gdbarch
->software_single_step (regcache
);
3171 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
3172 gdbarch_software_single_step_ftype software_single_step
)
3174 gdbarch
->software_single_step
= software_single_step
;
3178 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
3180 gdb_assert (gdbarch
!= NULL
);
3181 return gdbarch
->single_step_through_delay
!= NULL
;
3185 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3187 gdb_assert (gdbarch
!= NULL
);
3188 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
3189 if (gdbarch_debug
>= 2)
3190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
3191 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
3195 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
3196 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
3198 gdbarch
->single_step_through_delay
= single_step_through_delay
;
3202 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
3204 gdb_assert (gdbarch
!= NULL
);
3205 gdb_assert (gdbarch
->print_insn
!= NULL
);
3206 if (gdbarch_debug
>= 2)
3207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
3208 return gdbarch
->print_insn (vma
, info
);
3212 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
3213 gdbarch_print_insn_ftype print_insn
)
3215 gdbarch
->print_insn
= print_insn
;
3219 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
3221 gdb_assert (gdbarch
!= NULL
);
3222 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
3223 if (gdbarch_debug
>= 2)
3224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
3225 return gdbarch
->skip_trampoline_code (frame
, pc
);
3229 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
3230 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
3232 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3236 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3238 gdb_assert (gdbarch
!= NULL
);
3239 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3242 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3246 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3247 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3249 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3253 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, const char *name
)
3255 gdb_assert (gdbarch
!= NULL
);
3256 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3257 if (gdbarch_debug
>= 2)
3258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3259 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
3263 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3264 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3266 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3270 gdbarch_stack_frame_destroyed_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3272 gdb_assert (gdbarch
!= NULL
);
3273 gdb_assert (gdbarch
->stack_frame_destroyed_p
!= NULL
);
3274 if (gdbarch_debug
>= 2)
3275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_frame_destroyed_p called\n");
3276 return gdbarch
->stack_frame_destroyed_p (gdbarch
, addr
);
3280 set_gdbarch_stack_frame_destroyed_p (struct gdbarch
*gdbarch
,
3281 gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p
)
3283 gdbarch
->stack_frame_destroyed_p
= stack_frame_destroyed_p
;
3287 gdbarch_elf_make_msymbol_special_p (struct gdbarch
*gdbarch
)
3289 gdb_assert (gdbarch
!= NULL
);
3290 return gdbarch
->elf_make_msymbol_special
!= NULL
;
3294 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3296 gdb_assert (gdbarch
!= NULL
);
3297 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3298 if (gdbarch_debug
>= 2)
3299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3300 gdbarch
->elf_make_msymbol_special (sym
, msym
);
3304 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
3305 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
3307 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
3311 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
3313 gdb_assert (gdbarch
!= NULL
);
3314 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
3315 if (gdbarch_debug
>= 2)
3316 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
3317 gdbarch
->coff_make_msymbol_special (val
, msym
);
3321 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
3322 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
3324 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
3328 gdbarch_make_symbol_special (struct gdbarch
*gdbarch
, struct symbol
*sym
, struct objfile
*objfile
)
3330 gdb_assert (gdbarch
!= NULL
);
3331 gdb_assert (gdbarch
->make_symbol_special
!= NULL
);
3332 if (gdbarch_debug
>= 2)
3333 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_symbol_special called\n");
3334 gdbarch
->make_symbol_special (sym
, objfile
);
3338 set_gdbarch_make_symbol_special (struct gdbarch
*gdbarch
,
3339 gdbarch_make_symbol_special_ftype make_symbol_special
)
3341 gdbarch
->make_symbol_special
= make_symbol_special
;
3345 gdbarch_adjust_dwarf2_addr (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3347 gdb_assert (gdbarch
!= NULL
);
3348 gdb_assert (gdbarch
->adjust_dwarf2_addr
!= NULL
);
3349 if (gdbarch_debug
>= 2)
3350 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_dwarf2_addr called\n");
3351 return gdbarch
->adjust_dwarf2_addr (pc
);
3355 set_gdbarch_adjust_dwarf2_addr (struct gdbarch
*gdbarch
,
3356 gdbarch_adjust_dwarf2_addr_ftype adjust_dwarf2_addr
)
3358 gdbarch
->adjust_dwarf2_addr
= adjust_dwarf2_addr
;
3362 gdbarch_adjust_dwarf2_line (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int rel
)
3364 gdb_assert (gdbarch
!= NULL
);
3365 gdb_assert (gdbarch
->adjust_dwarf2_line
!= NULL
);
3366 if (gdbarch_debug
>= 2)
3367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_dwarf2_line called\n");
3368 return gdbarch
->adjust_dwarf2_line (addr
, rel
);
3372 set_gdbarch_adjust_dwarf2_line (struct gdbarch
*gdbarch
,
3373 gdbarch_adjust_dwarf2_line_ftype adjust_dwarf2_line
)
3375 gdbarch
->adjust_dwarf2_line
= adjust_dwarf2_line
;
3379 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
3381 gdb_assert (gdbarch
!= NULL
);
3382 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3383 if (gdbarch_debug
>= 2)
3384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
3385 return gdbarch
->cannot_step_breakpoint
;
3389 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
3390 int cannot_step_breakpoint
)
3392 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
3396 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
3398 gdb_assert (gdbarch
!= NULL
);
3399 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3400 if (gdbarch_debug
>= 2)
3401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
3402 return gdbarch
->have_nonsteppable_watchpoint
;
3406 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
3407 int have_nonsteppable_watchpoint
)
3409 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
3413 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
3415 gdb_assert (gdbarch
!= NULL
);
3416 return gdbarch
->address_class_type_flags
!= NULL
;
3420 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
3422 gdb_assert (gdbarch
!= NULL
);
3423 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
3424 if (gdbarch_debug
>= 2)
3425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
3426 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
3430 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
3431 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
3433 gdbarch
->address_class_type_flags
= address_class_type_flags
;
3437 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
3439 gdb_assert (gdbarch
!= NULL
);
3440 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
3444 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
3446 gdb_assert (gdbarch
!= NULL
);
3447 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
3448 if (gdbarch_debug
>= 2)
3449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
3450 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
3454 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
3455 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
3457 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
3461 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
3463 gdb_assert (gdbarch
!= NULL
);
3464 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
3468 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
3470 gdb_assert (gdbarch
!= NULL
);
3471 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
3472 if (gdbarch_debug
>= 2)
3473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
3474 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
3478 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
3479 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
3481 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
3485 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
3487 gdb_assert (gdbarch
!= NULL
);
3488 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
3489 if (gdbarch_debug
>= 2)
3490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
3491 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
3495 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
3496 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
3498 gdbarch
->register_reggroup_p
= register_reggroup_p
;
3502 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
3504 gdb_assert (gdbarch
!= NULL
);
3505 return gdbarch
->fetch_pointer_argument
!= NULL
;
3509 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
3511 gdb_assert (gdbarch
!= NULL
);
3512 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
3515 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
3519 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
3520 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
3522 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
3526 gdbarch_iterate_over_regset_sections_p (struct gdbarch
*gdbarch
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 return gdbarch
->iterate_over_regset_sections
!= NULL
;
3533 gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
, iterate_over_regset_sections_cb
*cb
, void *cb_data
, const struct regcache
*regcache
)
3535 gdb_assert (gdbarch
!= NULL
);
3536 gdb_assert (gdbarch
->iterate_over_regset_sections
!= NULL
);
3537 if (gdbarch_debug
>= 2)
3538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_regset_sections called\n");
3539 gdbarch
->iterate_over_regset_sections (gdbarch
, cb
, cb_data
, regcache
);
3543 set_gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
,
3544 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections
)
3546 gdbarch
->iterate_over_regset_sections
= iterate_over_regset_sections
;
3550 gdbarch_make_corefile_notes_p (struct gdbarch
*gdbarch
)
3552 gdb_assert (gdbarch
!= NULL
);
3553 return gdbarch
->make_corefile_notes
!= NULL
;
3557 gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
, bfd
*obfd
, int *note_size
)
3559 gdb_assert (gdbarch
!= NULL
);
3560 gdb_assert (gdbarch
->make_corefile_notes
!= NULL
);
3561 if (gdbarch_debug
>= 2)
3562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_corefile_notes called\n");
3563 return gdbarch
->make_corefile_notes (gdbarch
, obfd
, note_size
);
3567 set_gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
,
3568 gdbarch_make_corefile_notes_ftype make_corefile_notes
)
3570 gdbarch
->make_corefile_notes
= make_corefile_notes
;
3574 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch
*gdbarch
)
3576 gdb_assert (gdbarch
!= NULL
);
3577 return gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
;
3581 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
, bfd
*obfd
, char *note_data
, int *note_size
, const struct elf_internal_linux_prpsinfo
*info
)
3583 gdb_assert (gdbarch
!= NULL
);
3584 gdb_assert (gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
);
3585 if (gdbarch_debug
>= 2)
3586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3587 return gdbarch
->elfcore_write_linux_prpsinfo (obfd
, note_data
, note_size
, info
);
3591 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
,
3592 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo
)
3594 gdbarch
->elfcore_write_linux_prpsinfo
= elfcore_write_linux_prpsinfo
;
3598 gdbarch_find_memory_regions_p (struct gdbarch
*gdbarch
)
3600 gdb_assert (gdbarch
!= NULL
);
3601 return gdbarch
->find_memory_regions
!= NULL
;
3605 gdbarch_find_memory_regions (struct gdbarch
*gdbarch
, find_memory_region_ftype func
, void *data
)
3607 gdb_assert (gdbarch
!= NULL
);
3608 gdb_assert (gdbarch
->find_memory_regions
!= NULL
);
3609 if (gdbarch_debug
>= 2)
3610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_memory_regions called\n");
3611 return gdbarch
->find_memory_regions (gdbarch
, func
, data
);
3615 set_gdbarch_find_memory_regions (struct gdbarch
*gdbarch
,
3616 gdbarch_find_memory_regions_ftype find_memory_regions
)
3618 gdbarch
->find_memory_regions
= find_memory_regions
;
3622 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3624 gdb_assert (gdbarch
!= NULL
);
3625 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3629 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3631 gdb_assert (gdbarch
!= NULL
);
3632 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3633 if (gdbarch_debug
>= 2)
3634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3635 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3639 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3640 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3642 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3646 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch
*gdbarch
)
3648 gdb_assert (gdbarch
!= NULL
);
3649 return gdbarch
->core_xfer_shared_libraries_aix
!= NULL
;
3653 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3655 gdb_assert (gdbarch
!= NULL
);
3656 gdb_assert (gdbarch
->core_xfer_shared_libraries_aix
!= NULL
);
3657 if (gdbarch_debug
>= 2)
3658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries_aix called\n");
3659 return gdbarch
->core_xfer_shared_libraries_aix (gdbarch
, readbuf
, offset
, len
);
3663 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
,
3664 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix
)
3666 gdbarch
->core_xfer_shared_libraries_aix
= core_xfer_shared_libraries_aix
;
3670 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3672 gdb_assert (gdbarch
!= NULL
);
3673 return gdbarch
->core_pid_to_str
!= NULL
;
3677 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3679 gdb_assert (gdbarch
!= NULL
);
3680 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3681 if (gdbarch_debug
>= 2)
3682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3683 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3687 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3688 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3690 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3694 gdbarch_core_thread_name_p (struct gdbarch
*gdbarch
)
3696 gdb_assert (gdbarch
!= NULL
);
3697 return gdbarch
->core_thread_name
!= NULL
;
3701 gdbarch_core_thread_name (struct gdbarch
*gdbarch
, struct thread_info
*thr
)
3703 gdb_assert (gdbarch
!= NULL
);
3704 gdb_assert (gdbarch
->core_thread_name
!= NULL
);
3705 if (gdbarch_debug
>= 2)
3706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_thread_name called\n");
3707 return gdbarch
->core_thread_name (gdbarch
, thr
);
3711 set_gdbarch_core_thread_name (struct gdbarch
*gdbarch
,
3712 gdbarch_core_thread_name_ftype core_thread_name
)
3714 gdbarch
->core_thread_name
= core_thread_name
;
3718 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3720 gdb_assert (gdbarch
!= NULL
);
3721 return gdbarch
->gcore_bfd_target
!= 0;
3725 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3727 gdb_assert (gdbarch
!= NULL
);
3728 /* Check variable changed from pre-default. */
3729 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3730 if (gdbarch_debug
>= 2)
3731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3732 return gdbarch
->gcore_bfd_target
;
3736 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3737 const char * gcore_bfd_target
)
3739 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3743 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3745 gdb_assert (gdbarch
!= NULL
);
3746 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3747 if (gdbarch_debug
>= 2)
3748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3749 return gdbarch
->vtable_function_descriptors
;
3753 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3754 int vtable_function_descriptors
)
3756 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3760 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3762 gdb_assert (gdbarch
!= NULL
);
3763 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3764 if (gdbarch_debug
>= 2)
3765 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3766 return gdbarch
->vbit_in_delta
;
3770 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3773 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3777 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3779 gdb_assert (gdbarch
!= NULL
);
3780 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3781 if (gdbarch_debug
>= 2)
3782 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3783 gdbarch
->skip_permanent_breakpoint (regcache
);
3787 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3788 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3790 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3794 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3796 gdb_assert (gdbarch
!= NULL
);
3797 return gdbarch
->max_insn_length
!= 0;
3801 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3803 gdb_assert (gdbarch
!= NULL
);
3804 /* Check variable changed from pre-default. */
3805 gdb_assert (gdbarch
->max_insn_length
!= 0);
3806 if (gdbarch_debug
>= 2)
3807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3808 return gdbarch
->max_insn_length
;
3812 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3813 ULONGEST max_insn_length
)
3815 gdbarch
->max_insn_length
= max_insn_length
;
3819 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3821 gdb_assert (gdbarch
!= NULL
);
3822 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3825 struct displaced_step_closure
*
3826 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3828 gdb_assert (gdbarch
!= NULL
);
3829 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3830 if (gdbarch_debug
>= 2)
3831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3832 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
3836 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
3837 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
3839 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
3843 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3845 gdb_assert (gdbarch
!= NULL
);
3846 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
3847 if (gdbarch_debug
>= 2)
3848 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
3849 return gdbarch
->displaced_step_hw_singlestep (gdbarch
, closure
);
3853 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
3854 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
3856 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
3860 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
3862 gdb_assert (gdbarch
!= NULL
);
3863 return gdbarch
->displaced_step_fixup
!= NULL
;
3867 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3869 gdb_assert (gdbarch
!= NULL
);
3870 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
3871 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3872 if (gdbarch_debug
>= 2)
3873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
3874 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
3878 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
3879 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
3881 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
3885 gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3887 gdb_assert (gdbarch
!= NULL
);
3888 gdb_assert (gdbarch
->displaced_step_free_closure
!= NULL
);
3889 if (gdbarch_debug
>= 2)
3890 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_free_closure called\n");
3891 gdbarch
->displaced_step_free_closure (gdbarch
, closure
);
3895 set_gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
,
3896 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure
)
3898 gdbarch
->displaced_step_free_closure
= displaced_step_free_closure
;
3902 gdbarch_displaced_step_location (struct gdbarch
*gdbarch
)
3904 gdb_assert (gdbarch
!= NULL
);
3905 gdb_assert (gdbarch
->displaced_step_location
!= NULL
);
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_location called\n");
3908 return gdbarch
->displaced_step_location (gdbarch
);
3912 set_gdbarch_displaced_step_location (struct gdbarch
*gdbarch
,
3913 gdbarch_displaced_step_location_ftype displaced_step_location
)
3915 gdbarch
->displaced_step_location
= displaced_step_location
;
3919 gdbarch_relocate_instruction_p (struct gdbarch
*gdbarch
)
3921 gdb_assert (gdbarch
!= NULL
);
3922 return gdbarch
->relocate_instruction
!= NULL
;
3926 gdbarch_relocate_instruction (struct gdbarch
*gdbarch
, CORE_ADDR
*to
, CORE_ADDR from
)
3928 gdb_assert (gdbarch
!= NULL
);
3929 gdb_assert (gdbarch
->relocate_instruction
!= NULL
);
3930 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3931 if (gdbarch_debug
>= 2)
3932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_relocate_instruction called\n");
3933 gdbarch
->relocate_instruction (gdbarch
, to
, from
);
3937 set_gdbarch_relocate_instruction (struct gdbarch
*gdbarch
,
3938 gdbarch_relocate_instruction_ftype relocate_instruction
)
3940 gdbarch
->relocate_instruction
= relocate_instruction
;
3944 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
3946 gdb_assert (gdbarch
!= NULL
);
3947 return gdbarch
->overlay_update
!= NULL
;
3951 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
3953 gdb_assert (gdbarch
!= NULL
);
3954 gdb_assert (gdbarch
->overlay_update
!= NULL
);
3955 if (gdbarch_debug
>= 2)
3956 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
3957 gdbarch
->overlay_update (osect
);
3961 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
3962 gdbarch_overlay_update_ftype overlay_update
)
3964 gdbarch
->overlay_update
= overlay_update
;
3968 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
3970 gdb_assert (gdbarch
!= NULL
);
3971 return gdbarch
->core_read_description
!= NULL
;
3974 const struct target_desc
*
3975 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
3977 gdb_assert (gdbarch
!= NULL
);
3978 gdb_assert (gdbarch
->core_read_description
!= NULL
);
3979 if (gdbarch_debug
>= 2)
3980 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
3981 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
3985 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
3986 gdbarch_core_read_description_ftype core_read_description
)
3988 gdbarch
->core_read_description
= core_read_description
;
3992 gdbarch_static_transform_name_p (struct gdbarch
*gdbarch
)
3994 gdb_assert (gdbarch
!= NULL
);
3995 return gdbarch
->static_transform_name
!= NULL
;
3999 gdbarch_static_transform_name (struct gdbarch
*gdbarch
, const char *name
)
4001 gdb_assert (gdbarch
!= NULL
);
4002 gdb_assert (gdbarch
->static_transform_name
!= NULL
);
4003 if (gdbarch_debug
>= 2)
4004 fprintf_unfiltered (gdb_stdlog
, "gdbarch_static_transform_name called\n");
4005 return gdbarch
->static_transform_name (name
);
4009 set_gdbarch_static_transform_name (struct gdbarch
*gdbarch
,
4010 gdbarch_static_transform_name_ftype static_transform_name
)
4012 gdbarch
->static_transform_name
= static_transform_name
;
4016 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
4018 gdb_assert (gdbarch
!= NULL
);
4019 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
4020 if (gdbarch_debug
>= 2)
4021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
4022 return gdbarch
->sofun_address_maybe_missing
;
4026 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
4027 int sofun_address_maybe_missing
)
4029 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
4033 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
4035 gdb_assert (gdbarch
!= NULL
);
4036 return gdbarch
->process_record
!= NULL
;
4040 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
4042 gdb_assert (gdbarch
!= NULL
);
4043 gdb_assert (gdbarch
->process_record
!= NULL
);
4044 if (gdbarch_debug
>= 2)
4045 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
4046 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
4050 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
4051 gdbarch_process_record_ftype process_record
)
4053 gdbarch
->process_record
= process_record
;
4057 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
4059 gdb_assert (gdbarch
!= NULL
);
4060 return gdbarch
->process_record_signal
!= NULL
;
4064 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum gdb_signal signal
)
4066 gdb_assert (gdbarch
!= NULL
);
4067 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
4068 if (gdbarch_debug
>= 2)
4069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
4070 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
4074 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
4075 gdbarch_process_record_signal_ftype process_record_signal
)
4077 gdbarch
->process_record_signal
= process_record_signal
;
4081 gdbarch_gdb_signal_from_target_p (struct gdbarch
*gdbarch
)
4083 gdb_assert (gdbarch
!= NULL
);
4084 return gdbarch
->gdb_signal_from_target
!= NULL
;
4088 gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
, int signo
)
4090 gdb_assert (gdbarch
!= NULL
);
4091 gdb_assert (gdbarch
->gdb_signal_from_target
!= NULL
);
4092 if (gdbarch_debug
>= 2)
4093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_from_target called\n");
4094 return gdbarch
->gdb_signal_from_target (gdbarch
, signo
);
4098 set_gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
,
4099 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target
)
4101 gdbarch
->gdb_signal_from_target
= gdb_signal_from_target
;
4105 gdbarch_gdb_signal_to_target_p (struct gdbarch
*gdbarch
)
4107 gdb_assert (gdbarch
!= NULL
);
4108 return gdbarch
->gdb_signal_to_target
!= NULL
;
4112 gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
, enum gdb_signal signal
)
4114 gdb_assert (gdbarch
!= NULL
);
4115 gdb_assert (gdbarch
->gdb_signal_to_target
!= NULL
);
4116 if (gdbarch_debug
>= 2)
4117 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_to_target called\n");
4118 return gdbarch
->gdb_signal_to_target (gdbarch
, signal
);
4122 set_gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
,
4123 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target
)
4125 gdbarch
->gdb_signal_to_target
= gdb_signal_to_target
;
4129 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
4131 gdb_assert (gdbarch
!= NULL
);
4132 return gdbarch
->get_siginfo_type
!= NULL
;
4136 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
4138 gdb_assert (gdbarch
!= NULL
);
4139 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
4140 if (gdbarch_debug
>= 2)
4141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
4142 return gdbarch
->get_siginfo_type (gdbarch
);
4146 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
4147 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
4149 gdbarch
->get_siginfo_type
= get_siginfo_type
;
4153 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
4155 gdb_assert (gdbarch
!= NULL
);
4156 return gdbarch
->record_special_symbol
!= NULL
;
4160 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
4162 gdb_assert (gdbarch
!= NULL
);
4163 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
4164 if (gdbarch_debug
>= 2)
4165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
4166 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
4170 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
4171 gdbarch_record_special_symbol_ftype record_special_symbol
)
4173 gdbarch
->record_special_symbol
= record_special_symbol
;
4177 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
4179 gdb_assert (gdbarch
!= NULL
);
4180 return gdbarch
->get_syscall_number
!= NULL
;
4184 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, ptid_t ptid
)
4186 gdb_assert (gdbarch
!= NULL
);
4187 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
4188 if (gdbarch_debug
>= 2)
4189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
4190 return gdbarch
->get_syscall_number (gdbarch
, ptid
);
4194 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
4195 gdbarch_get_syscall_number_ftype get_syscall_number
)
4197 gdbarch
->get_syscall_number
= get_syscall_number
;
4201 gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
)
4203 gdb_assert (gdbarch
!= NULL
);
4204 /* Skip verify of xml_syscall_file, invalid_p == 0 */
4205 if (gdbarch_debug
>= 2)
4206 fprintf_unfiltered (gdb_stdlog
, "gdbarch_xml_syscall_file called\n");
4207 return gdbarch
->xml_syscall_file
;
4211 set_gdbarch_xml_syscall_file (struct gdbarch
*gdbarch
,
4212 const char * xml_syscall_file
)
4214 gdbarch
->xml_syscall_file
= xml_syscall_file
;
4217 struct syscalls_info
*
4218 gdbarch_syscalls_info (struct gdbarch
*gdbarch
)
4220 gdb_assert (gdbarch
!= NULL
);
4221 /* Skip verify of syscalls_info, invalid_p == 0 */
4222 if (gdbarch_debug
>= 2)
4223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_syscalls_info called\n");
4224 return gdbarch
->syscalls_info
;
4228 set_gdbarch_syscalls_info (struct gdbarch
*gdbarch
,
4229 struct syscalls_info
* syscalls_info
)
4231 gdbarch
->syscalls_info
= syscalls_info
;
4235 gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
)
4237 gdb_assert (gdbarch
!= NULL
);
4238 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
4239 if (gdbarch_debug
>= 2)
4240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_prefixes called\n");
4241 return gdbarch
->stap_integer_prefixes
;
4245 set_gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
,
4246 const char *const * stap_integer_prefixes
)
4248 gdbarch
->stap_integer_prefixes
= stap_integer_prefixes
;
4252 gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
)
4254 gdb_assert (gdbarch
!= NULL
);
4255 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
4256 if (gdbarch_debug
>= 2)
4257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_suffixes called\n");
4258 return gdbarch
->stap_integer_suffixes
;
4262 set_gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
,
4263 const char *const * stap_integer_suffixes
)
4265 gdbarch
->stap_integer_suffixes
= stap_integer_suffixes
;
4269 gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
)
4271 gdb_assert (gdbarch
!= NULL
);
4272 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
4273 if (gdbarch_debug
>= 2)
4274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_prefixes called\n");
4275 return gdbarch
->stap_register_prefixes
;
4279 set_gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
,
4280 const char *const * stap_register_prefixes
)
4282 gdbarch
->stap_register_prefixes
= stap_register_prefixes
;
4286 gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
)
4288 gdb_assert (gdbarch
!= NULL
);
4289 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
4290 if (gdbarch_debug
>= 2)
4291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_suffixes called\n");
4292 return gdbarch
->stap_register_suffixes
;
4296 set_gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
,
4297 const char *const * stap_register_suffixes
)
4299 gdbarch
->stap_register_suffixes
= stap_register_suffixes
;
4303 gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
)
4305 gdb_assert (gdbarch
!= NULL
);
4306 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
4307 if (gdbarch_debug
>= 2)
4308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_prefixes called\n");
4309 return gdbarch
->stap_register_indirection_prefixes
;
4313 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
,
4314 const char *const * stap_register_indirection_prefixes
)
4316 gdbarch
->stap_register_indirection_prefixes
= stap_register_indirection_prefixes
;
4320 gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
)
4322 gdb_assert (gdbarch
!= NULL
);
4323 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4324 if (gdbarch_debug
>= 2)
4325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_suffixes called\n");
4326 return gdbarch
->stap_register_indirection_suffixes
;
4330 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
,
4331 const char *const * stap_register_indirection_suffixes
)
4333 gdbarch
->stap_register_indirection_suffixes
= stap_register_indirection_suffixes
;
4337 gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
)
4339 gdb_assert (gdbarch
!= NULL
);
4340 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4341 if (gdbarch_debug
>= 2)
4342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_prefix called\n");
4343 return gdbarch
->stap_gdb_register_prefix
;
4347 set_gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
,
4348 const char * stap_gdb_register_prefix
)
4350 gdbarch
->stap_gdb_register_prefix
= stap_gdb_register_prefix
;
4354 gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
)
4356 gdb_assert (gdbarch
!= NULL
);
4357 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4358 if (gdbarch_debug
>= 2)
4359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_suffix called\n");
4360 return gdbarch
->stap_gdb_register_suffix
;
4364 set_gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
,
4365 const char * stap_gdb_register_suffix
)
4367 gdbarch
->stap_gdb_register_suffix
= stap_gdb_register_suffix
;
4371 gdbarch_stap_is_single_operand_p (struct gdbarch
*gdbarch
)
4373 gdb_assert (gdbarch
!= NULL
);
4374 return gdbarch
->stap_is_single_operand
!= NULL
;
4378 gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
, const char *s
)
4380 gdb_assert (gdbarch
!= NULL
);
4381 gdb_assert (gdbarch
->stap_is_single_operand
!= NULL
);
4382 if (gdbarch_debug
>= 2)
4383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_is_single_operand called\n");
4384 return gdbarch
->stap_is_single_operand (gdbarch
, s
);
4388 set_gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
,
4389 gdbarch_stap_is_single_operand_ftype stap_is_single_operand
)
4391 gdbarch
->stap_is_single_operand
= stap_is_single_operand
;
4395 gdbarch_stap_parse_special_token_p (struct gdbarch
*gdbarch
)
4397 gdb_assert (gdbarch
!= NULL
);
4398 return gdbarch
->stap_parse_special_token
!= NULL
;
4402 gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
)
4404 gdb_assert (gdbarch
!= NULL
);
4405 gdb_assert (gdbarch
->stap_parse_special_token
!= NULL
);
4406 if (gdbarch_debug
>= 2)
4407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_parse_special_token called\n");
4408 return gdbarch
->stap_parse_special_token (gdbarch
, p
);
4412 set_gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
,
4413 gdbarch_stap_parse_special_token_ftype stap_parse_special_token
)
4415 gdbarch
->stap_parse_special_token
= stap_parse_special_token
;
4419 gdbarch_dtrace_parse_probe_argument_p (struct gdbarch
*gdbarch
)
4421 gdb_assert (gdbarch
!= NULL
);
4422 return gdbarch
->dtrace_parse_probe_argument
!= NULL
;
4426 gdbarch_dtrace_parse_probe_argument (struct gdbarch
*gdbarch
, struct parser_state
*pstate
, int narg
)
4428 gdb_assert (gdbarch
!= NULL
);
4429 gdb_assert (gdbarch
->dtrace_parse_probe_argument
!= NULL
);
4430 if (gdbarch_debug
>= 2)
4431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_parse_probe_argument called\n");
4432 gdbarch
->dtrace_parse_probe_argument (gdbarch
, pstate
, narg
);
4436 set_gdbarch_dtrace_parse_probe_argument (struct gdbarch
*gdbarch
,
4437 gdbarch_dtrace_parse_probe_argument_ftype dtrace_parse_probe_argument
)
4439 gdbarch
->dtrace_parse_probe_argument
= dtrace_parse_probe_argument
;
4443 gdbarch_dtrace_probe_is_enabled_p (struct gdbarch
*gdbarch
)
4445 gdb_assert (gdbarch
!= NULL
);
4446 return gdbarch
->dtrace_probe_is_enabled
!= NULL
;
4450 gdbarch_dtrace_probe_is_enabled (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4452 gdb_assert (gdbarch
!= NULL
);
4453 gdb_assert (gdbarch
->dtrace_probe_is_enabled
!= NULL
);
4454 if (gdbarch_debug
>= 2)
4455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_probe_is_enabled called\n");
4456 return gdbarch
->dtrace_probe_is_enabled (gdbarch
, addr
);
4460 set_gdbarch_dtrace_probe_is_enabled (struct gdbarch
*gdbarch
,
4461 gdbarch_dtrace_probe_is_enabled_ftype dtrace_probe_is_enabled
)
4463 gdbarch
->dtrace_probe_is_enabled
= dtrace_probe_is_enabled
;
4467 gdbarch_dtrace_enable_probe_p (struct gdbarch
*gdbarch
)
4469 gdb_assert (gdbarch
!= NULL
);
4470 return gdbarch
->dtrace_enable_probe
!= NULL
;
4474 gdbarch_dtrace_enable_probe (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4476 gdb_assert (gdbarch
!= NULL
);
4477 gdb_assert (gdbarch
->dtrace_enable_probe
!= NULL
);
4478 if (gdbarch_debug
>= 2)
4479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_enable_probe called\n");
4480 gdbarch
->dtrace_enable_probe (gdbarch
, addr
);
4484 set_gdbarch_dtrace_enable_probe (struct gdbarch
*gdbarch
,
4485 gdbarch_dtrace_enable_probe_ftype dtrace_enable_probe
)
4487 gdbarch
->dtrace_enable_probe
= dtrace_enable_probe
;
4491 gdbarch_dtrace_disable_probe_p (struct gdbarch
*gdbarch
)
4493 gdb_assert (gdbarch
!= NULL
);
4494 return gdbarch
->dtrace_disable_probe
!= NULL
;
4498 gdbarch_dtrace_disable_probe (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4500 gdb_assert (gdbarch
!= NULL
);
4501 gdb_assert (gdbarch
->dtrace_disable_probe
!= NULL
);
4502 if (gdbarch_debug
>= 2)
4503 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dtrace_disable_probe called\n");
4504 gdbarch
->dtrace_disable_probe (gdbarch
, addr
);
4508 set_gdbarch_dtrace_disable_probe (struct gdbarch
*gdbarch
,
4509 gdbarch_dtrace_disable_probe_ftype dtrace_disable_probe
)
4511 gdbarch
->dtrace_disable_probe
= dtrace_disable_probe
;
4515 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
4517 gdb_assert (gdbarch
!= NULL
);
4518 /* Skip verify of has_global_solist, invalid_p == 0 */
4519 if (gdbarch_debug
>= 2)
4520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
4521 return gdbarch
->has_global_solist
;
4525 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
4526 int has_global_solist
)
4528 gdbarch
->has_global_solist
= has_global_solist
;
4532 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
4534 gdb_assert (gdbarch
!= NULL
);
4535 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4536 if (gdbarch_debug
>= 2)
4537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
4538 return gdbarch
->has_global_breakpoints
;
4542 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
4543 int has_global_breakpoints
)
4545 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
4549 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
4551 gdb_assert (gdbarch
!= NULL
);
4552 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
4553 if (gdbarch_debug
>= 2)
4554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
4555 return gdbarch
->has_shared_address_space (gdbarch
);
4559 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
4560 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
4562 gdbarch
->has_shared_address_space
= has_shared_address_space
;
4566 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char **msg
)
4568 gdb_assert (gdbarch
!= NULL
);
4569 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
4570 if (gdbarch_debug
>= 2)
4571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
4572 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, msg
);
4576 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
4577 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
4579 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
4583 gdbarch_guess_tracepoint_registers (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
4585 gdb_assert (gdbarch
!= NULL
);
4586 gdb_assert (gdbarch
->guess_tracepoint_registers
!= NULL
);
4587 if (gdbarch_debug
>= 2)
4588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_guess_tracepoint_registers called\n");
4589 gdbarch
->guess_tracepoint_registers (gdbarch
, regcache
, addr
);
4593 set_gdbarch_guess_tracepoint_registers (struct gdbarch
*gdbarch
,
4594 gdbarch_guess_tracepoint_registers_ftype guess_tracepoint_registers
)
4596 gdbarch
->guess_tracepoint_registers
= guess_tracepoint_registers
;
4600 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
4602 gdb_assert (gdbarch
!= NULL
);
4603 gdb_assert (gdbarch
->auto_charset
!= NULL
);
4604 if (gdbarch_debug
>= 2)
4605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
4606 return gdbarch
->auto_charset ();
4610 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
4611 gdbarch_auto_charset_ftype auto_charset
)
4613 gdbarch
->auto_charset
= auto_charset
;
4617 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
4619 gdb_assert (gdbarch
!= NULL
);
4620 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
4621 if (gdbarch_debug
>= 2)
4622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
4623 return gdbarch
->auto_wide_charset ();
4627 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
4628 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
4630 gdbarch
->auto_wide_charset
= auto_wide_charset
;
4634 gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
)
4636 gdb_assert (gdbarch
!= NULL
);
4637 if (gdbarch_debug
>= 2)
4638 fprintf_unfiltered (gdb_stdlog
, "gdbarch_solib_symbols_extension called\n");
4639 return gdbarch
->solib_symbols_extension
;
4643 set_gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
,
4644 const char * solib_symbols_extension
)
4646 gdbarch
->solib_symbols_extension
= solib_symbols_extension
;
4650 gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
)
4652 gdb_assert (gdbarch
!= NULL
);
4653 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4654 if (gdbarch_debug
>= 2)
4655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_dos_based_file_system called\n");
4656 return gdbarch
->has_dos_based_file_system
;
4660 set_gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
,
4661 int has_dos_based_file_system
)
4663 gdbarch
->has_dos_based_file_system
= has_dos_based_file_system
;
4667 gdbarch_gen_return_address (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, struct axs_value
*value
, CORE_ADDR scope
)
4669 gdb_assert (gdbarch
!= NULL
);
4670 gdb_assert (gdbarch
->gen_return_address
!= NULL
);
4671 if (gdbarch_debug
>= 2)
4672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gen_return_address called\n");
4673 gdbarch
->gen_return_address (gdbarch
, ax
, value
, scope
);
4677 set_gdbarch_gen_return_address (struct gdbarch
*gdbarch
,
4678 gdbarch_gen_return_address_ftype gen_return_address
)
4680 gdbarch
->gen_return_address
= gen_return_address
;
4684 gdbarch_info_proc_p (struct gdbarch
*gdbarch
)
4686 gdb_assert (gdbarch
!= NULL
);
4687 return gdbarch
->info_proc
!= NULL
;
4691 gdbarch_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4693 gdb_assert (gdbarch
!= NULL
);
4694 gdb_assert (gdbarch
->info_proc
!= NULL
);
4695 if (gdbarch_debug
>= 2)
4696 fprintf_unfiltered (gdb_stdlog
, "gdbarch_info_proc called\n");
4697 gdbarch
->info_proc (gdbarch
, args
, what
);
4701 set_gdbarch_info_proc (struct gdbarch
*gdbarch
,
4702 gdbarch_info_proc_ftype info_proc
)
4704 gdbarch
->info_proc
= info_proc
;
4708 gdbarch_core_info_proc_p (struct gdbarch
*gdbarch
)
4710 gdb_assert (gdbarch
!= NULL
);
4711 return gdbarch
->core_info_proc
!= NULL
;
4715 gdbarch_core_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4717 gdb_assert (gdbarch
!= NULL
);
4718 gdb_assert (gdbarch
->core_info_proc
!= NULL
);
4719 if (gdbarch_debug
>= 2)
4720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_info_proc called\n");
4721 gdbarch
->core_info_proc (gdbarch
, args
, what
);
4725 set_gdbarch_core_info_proc (struct gdbarch
*gdbarch
,
4726 gdbarch_core_info_proc_ftype core_info_proc
)
4728 gdbarch
->core_info_proc
= core_info_proc
;
4732 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
)
4734 gdb_assert (gdbarch
!= NULL
);
4735 gdb_assert (gdbarch
->iterate_over_objfiles_in_search_order
!= NULL
);
4736 if (gdbarch_debug
>= 2)
4737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4738 gdbarch
->iterate_over_objfiles_in_search_order (gdbarch
, cb
, cb_data
, current_objfile
);
4742 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch
*gdbarch
,
4743 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order
)
4745 gdbarch
->iterate_over_objfiles_in_search_order
= iterate_over_objfiles_in_search_order
;
4748 struct ravenscar_arch_ops
*
4749 gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
)
4751 gdb_assert (gdbarch
!= NULL
);
4752 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4753 if (gdbarch_debug
>= 2)
4754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ravenscar_ops called\n");
4755 return gdbarch
->ravenscar_ops
;
4759 set_gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
,
4760 struct ravenscar_arch_ops
* ravenscar_ops
)
4762 gdbarch
->ravenscar_ops
= ravenscar_ops
;
4766 gdbarch_insn_is_call (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4768 gdb_assert (gdbarch
!= NULL
);
4769 gdb_assert (gdbarch
->insn_is_call
!= NULL
);
4770 if (gdbarch_debug
>= 2)
4771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_call called\n");
4772 return gdbarch
->insn_is_call (gdbarch
, addr
);
4776 set_gdbarch_insn_is_call (struct gdbarch
*gdbarch
,
4777 gdbarch_insn_is_call_ftype insn_is_call
)
4779 gdbarch
->insn_is_call
= insn_is_call
;
4783 gdbarch_insn_is_ret (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4785 gdb_assert (gdbarch
!= NULL
);
4786 gdb_assert (gdbarch
->insn_is_ret
!= NULL
);
4787 if (gdbarch_debug
>= 2)
4788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_ret called\n");
4789 return gdbarch
->insn_is_ret (gdbarch
, addr
);
4793 set_gdbarch_insn_is_ret (struct gdbarch
*gdbarch
,
4794 gdbarch_insn_is_ret_ftype insn_is_ret
)
4796 gdbarch
->insn_is_ret
= insn_is_ret
;
4800 gdbarch_insn_is_jump (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4802 gdb_assert (gdbarch
!= NULL
);
4803 gdb_assert (gdbarch
->insn_is_jump
!= NULL
);
4804 if (gdbarch_debug
>= 2)
4805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_jump called\n");
4806 return gdbarch
->insn_is_jump (gdbarch
, addr
);
4810 set_gdbarch_insn_is_jump (struct gdbarch
*gdbarch
,
4811 gdbarch_insn_is_jump_ftype insn_is_jump
)
4813 gdbarch
->insn_is_jump
= insn_is_jump
;
4817 gdbarch_auxv_parse_p (struct gdbarch
*gdbarch
)
4819 gdb_assert (gdbarch
!= NULL
);
4820 return gdbarch
->auxv_parse
!= NULL
;
4824 gdbarch_auxv_parse (struct gdbarch
*gdbarch
, gdb_byte
**readptr
, gdb_byte
*endptr
, CORE_ADDR
*typep
, CORE_ADDR
*valp
)
4826 gdb_assert (gdbarch
!= NULL
);
4827 gdb_assert (gdbarch
->auxv_parse
!= NULL
);
4828 if (gdbarch_debug
>= 2)
4829 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auxv_parse called\n");
4830 return gdbarch
->auxv_parse (gdbarch
, readptr
, endptr
, typep
, valp
);
4834 set_gdbarch_auxv_parse (struct gdbarch
*gdbarch
,
4835 gdbarch_auxv_parse_ftype auxv_parse
)
4837 gdbarch
->auxv_parse
= auxv_parse
;
4841 gdbarch_print_auxv_entry (struct gdbarch
*gdbarch
, struct ui_file
*file
, CORE_ADDR type
, CORE_ADDR val
)
4843 gdb_assert (gdbarch
!= NULL
);
4844 gdb_assert (gdbarch
->print_auxv_entry
!= NULL
);
4845 if (gdbarch_debug
>= 2)
4846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_auxv_entry called\n");
4847 gdbarch
->print_auxv_entry (gdbarch
, file
, type
, val
);
4851 set_gdbarch_print_auxv_entry (struct gdbarch
*gdbarch
,
4852 gdbarch_print_auxv_entry_ftype print_auxv_entry
)
4854 gdbarch
->print_auxv_entry
= print_auxv_entry
;
4858 gdbarch_vsyscall_range (struct gdbarch
*gdbarch
, struct mem_range
*range
)
4860 gdb_assert (gdbarch
!= NULL
);
4861 gdb_assert (gdbarch
->vsyscall_range
!= NULL
);
4862 if (gdbarch_debug
>= 2)
4863 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vsyscall_range called\n");
4864 return gdbarch
->vsyscall_range (gdbarch
, range
);
4868 set_gdbarch_vsyscall_range (struct gdbarch
*gdbarch
,
4869 gdbarch_vsyscall_range_ftype vsyscall_range
)
4871 gdbarch
->vsyscall_range
= vsyscall_range
;
4875 gdbarch_infcall_mmap (struct gdbarch
*gdbarch
, CORE_ADDR size
, unsigned prot
)
4877 gdb_assert (gdbarch
!= NULL
);
4878 gdb_assert (gdbarch
->infcall_mmap
!= NULL
);
4879 if (gdbarch_debug
>= 2)
4880 fprintf_unfiltered (gdb_stdlog
, "gdbarch_infcall_mmap called\n");
4881 return gdbarch
->infcall_mmap (size
, prot
);
4885 set_gdbarch_infcall_mmap (struct gdbarch
*gdbarch
,
4886 gdbarch_infcall_mmap_ftype infcall_mmap
)
4888 gdbarch
->infcall_mmap
= infcall_mmap
;
4892 gdbarch_infcall_munmap (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR size
)
4894 gdb_assert (gdbarch
!= NULL
);
4895 gdb_assert (gdbarch
->infcall_munmap
!= NULL
);
4896 if (gdbarch_debug
>= 2)
4897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_infcall_munmap called\n");
4898 gdbarch
->infcall_munmap (addr
, size
);
4902 set_gdbarch_infcall_munmap (struct gdbarch
*gdbarch
,
4903 gdbarch_infcall_munmap_ftype infcall_munmap
)
4905 gdbarch
->infcall_munmap
= infcall_munmap
;
4909 gdbarch_gcc_target_options (struct gdbarch
*gdbarch
)
4911 gdb_assert (gdbarch
!= NULL
);
4912 gdb_assert (gdbarch
->gcc_target_options
!= NULL
);
4913 if (gdbarch_debug
>= 2)
4914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcc_target_options called\n");
4915 return gdbarch
->gcc_target_options (gdbarch
);
4919 set_gdbarch_gcc_target_options (struct gdbarch
*gdbarch
,
4920 gdbarch_gcc_target_options_ftype gcc_target_options
)
4922 gdbarch
->gcc_target_options
= gcc_target_options
;
4926 gdbarch_gnu_triplet_regexp (struct gdbarch
*gdbarch
)
4928 gdb_assert (gdbarch
!= NULL
);
4929 gdb_assert (gdbarch
->gnu_triplet_regexp
!= NULL
);
4930 if (gdbarch_debug
>= 2)
4931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gnu_triplet_regexp called\n");
4932 return gdbarch
->gnu_triplet_regexp (gdbarch
);
4936 set_gdbarch_gnu_triplet_regexp (struct gdbarch
*gdbarch
,
4937 gdbarch_gnu_triplet_regexp_ftype gnu_triplet_regexp
)
4939 gdbarch
->gnu_triplet_regexp
= gnu_triplet_regexp
;
4943 gdbarch_addressable_memory_unit_size (struct gdbarch
*gdbarch
)
4945 gdb_assert (gdbarch
!= NULL
);
4946 gdb_assert (gdbarch
->addressable_memory_unit_size
!= NULL
);
4947 if (gdbarch_debug
>= 2)
4948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addressable_memory_unit_size called\n");
4949 return gdbarch
->addressable_memory_unit_size (gdbarch
);
4953 set_gdbarch_addressable_memory_unit_size (struct gdbarch
*gdbarch
,
4954 gdbarch_addressable_memory_unit_size_ftype addressable_memory_unit_size
)
4956 gdbarch
->addressable_memory_unit_size
= addressable_memory_unit_size
;
4960 /* Keep a registry of per-architecture data-pointers required by GDB
4967 gdbarch_data_pre_init_ftype
*pre_init
;
4968 gdbarch_data_post_init_ftype
*post_init
;
4971 struct gdbarch_data_registration
4973 struct gdbarch_data
*data
;
4974 struct gdbarch_data_registration
*next
;
4977 struct gdbarch_data_registry
4980 struct gdbarch_data_registration
*registrations
;
4983 struct gdbarch_data_registry gdbarch_data_registry
=
4988 static struct gdbarch_data
*
4989 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4990 gdbarch_data_post_init_ftype
*post_init
)
4992 struct gdbarch_data_registration
**curr
;
4994 /* Append the new registration. */
4995 for (curr
= &gdbarch_data_registry
.registrations
;
4997 curr
= &(*curr
)->next
);
4998 (*curr
) = XNEW (struct gdbarch_data_registration
);
4999 (*curr
)->next
= NULL
;
5000 (*curr
)->data
= XNEW (struct gdbarch_data
);
5001 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5002 (*curr
)->data
->pre_init
= pre_init
;
5003 (*curr
)->data
->post_init
= post_init
;
5004 (*curr
)->data
->init_p
= 1;
5005 return (*curr
)->data
;
5008 struct gdbarch_data
*
5009 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
5011 return gdbarch_data_register (pre_init
, NULL
);
5014 struct gdbarch_data
*
5015 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
5017 return gdbarch_data_register (NULL
, post_init
);
5020 /* Create/delete the gdbarch data vector. */
5023 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5025 gdb_assert (gdbarch
->data
== NULL
);
5026 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5027 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
5030 /* Initialize the current value of the specified per-architecture
5034 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
5035 struct gdbarch_data
*data
,
5038 gdb_assert (data
->index
< gdbarch
->nr_data
);
5039 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
5040 gdb_assert (data
->pre_init
== NULL
);
5041 gdbarch
->data
[data
->index
] = pointer
;
5044 /* Return the current value of the specified per-architecture
5048 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5050 gdb_assert (data
->index
< gdbarch
->nr_data
);
5051 if (gdbarch
->data
[data
->index
] == NULL
)
5053 /* The data-pointer isn't initialized, call init() to get a
5055 if (data
->pre_init
!= NULL
)
5056 /* Mid architecture creation: pass just the obstack, and not
5057 the entire architecture, as that way it isn't possible for
5058 pre-init code to refer to undefined architecture
5060 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
5061 else if (gdbarch
->initialized_p
5062 && data
->post_init
!= NULL
)
5063 /* Post architecture creation: pass the entire architecture
5064 (as all fields are valid), but be careful to also detect
5065 recursive references. */
5067 gdb_assert (data
->init_p
);
5069 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
5073 /* The architecture initialization hasn't completed - punt -
5074 hope that the caller knows what they are doing. Once
5075 deprecated_set_gdbarch_data has been initialized, this can be
5076 changed to an internal error. */
5078 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5080 return gdbarch
->data
[data
->index
];
5084 /* Keep a registry of the architectures known by GDB. */
5086 struct gdbarch_registration
5088 enum bfd_architecture bfd_architecture
;
5089 gdbarch_init_ftype
*init
;
5090 gdbarch_dump_tdep_ftype
*dump_tdep
;
5091 struct gdbarch_list
*arches
;
5092 struct gdbarch_registration
*next
;
5095 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5098 append_name (const char ***buf
, int *nr
, const char *name
)
5100 *buf
= XRESIZEVEC (const char *, *buf
, *nr
+ 1);
5106 gdbarch_printable_names (void)
5108 /* Accumulate a list of names based on the registed list of
5111 const char **arches
= NULL
;
5112 struct gdbarch_registration
*rego
;
5114 for (rego
= gdbarch_registry
;
5118 const struct bfd_arch_info
*ap
;
5119 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5121 internal_error (__FILE__
, __LINE__
,
5122 _("gdbarch_architecture_names: multi-arch unknown"));
5125 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5130 append_name (&arches
, &nr_arches
, NULL
);
5136 gdbarch_register (enum bfd_architecture bfd_architecture
,
5137 gdbarch_init_ftype
*init
,
5138 gdbarch_dump_tdep_ftype
*dump_tdep
)
5140 struct gdbarch_registration
**curr
;
5141 const struct bfd_arch_info
*bfd_arch_info
;
5143 /* Check that BFD recognizes this architecture */
5144 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5145 if (bfd_arch_info
== NULL
)
5147 internal_error (__FILE__
, __LINE__
,
5148 _("gdbarch: Attempt to register "
5149 "unknown architecture (%d)"),
5152 /* Check that we haven't seen this architecture before. */
5153 for (curr
= &gdbarch_registry
;
5155 curr
= &(*curr
)->next
)
5157 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5158 internal_error (__FILE__
, __LINE__
,
5159 _("gdbarch: Duplicate registration "
5160 "of architecture (%s)"),
5161 bfd_arch_info
->printable_name
);
5165 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
5166 bfd_arch_info
->printable_name
,
5167 host_address_to_string (init
));
5169 (*curr
) = XNEW (struct gdbarch_registration
);
5170 (*curr
)->bfd_architecture
= bfd_architecture
;
5171 (*curr
)->init
= init
;
5172 (*curr
)->dump_tdep
= dump_tdep
;
5173 (*curr
)->arches
= NULL
;
5174 (*curr
)->next
= NULL
;
5178 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5179 gdbarch_init_ftype
*init
)
5181 gdbarch_register (bfd_architecture
, init
, NULL
);
5185 /* Look for an architecture using gdbarch_info. */
5187 struct gdbarch_list
*
5188 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5189 const struct gdbarch_info
*info
)
5191 for (; arches
!= NULL
; arches
= arches
->next
)
5193 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5195 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5197 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5199 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
5207 /* Find an architecture that matches the specified INFO. Create a new
5208 architecture if needed. Return that new architecture. */
5211 gdbarch_find_by_info (struct gdbarch_info info
)
5213 struct gdbarch
*new_gdbarch
;
5214 struct gdbarch_registration
*rego
;
5216 /* Fill in missing parts of the INFO struct using a number of
5217 sources: "set ..."; INFOabfd supplied; and the global
5219 gdbarch_info_fill (&info
);
5221 /* Must have found some sort of architecture. */
5222 gdb_assert (info
.bfd_arch_info
!= NULL
);
5226 fprintf_unfiltered (gdb_stdlog
,
5227 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
5228 (info
.bfd_arch_info
!= NULL
5229 ? info
.bfd_arch_info
->printable_name
5231 fprintf_unfiltered (gdb_stdlog
,
5232 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
5234 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5235 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5237 fprintf_unfiltered (gdb_stdlog
,
5238 "gdbarch_find_by_info: info.osabi %d (%s)\n",
5239 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5240 fprintf_unfiltered (gdb_stdlog
,
5241 "gdbarch_find_by_info: info.abfd %s\n",
5242 host_address_to_string (info
.abfd
));
5243 fprintf_unfiltered (gdb_stdlog
,
5244 "gdbarch_find_by_info: info.tdep_info %s\n",
5245 host_address_to_string (info
.tdep_info
));
5248 /* Find the tdep code that knows about this architecture. */
5249 for (rego
= gdbarch_registry
;
5252 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5258 "No matching architecture\n");
5262 /* Ask the tdep code for an architecture that matches "info". */
5263 new_gdbarch
= rego
->init (info
, rego
->arches
);
5265 /* Did the tdep code like it? No. Reject the change and revert to
5266 the old architecture. */
5267 if (new_gdbarch
== NULL
)
5270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5271 "Target rejected architecture\n");
5275 /* Is this a pre-existing architecture (as determined by already
5276 being initialized)? Move it to the front of the architecture
5277 list (keeping the list sorted Most Recently Used). */
5278 if (new_gdbarch
->initialized_p
)
5280 struct gdbarch_list
**list
;
5281 struct gdbarch_list
*self
;
5283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5284 "Previous architecture %s (%s) selected\n",
5285 host_address_to_string (new_gdbarch
),
5286 new_gdbarch
->bfd_arch_info
->printable_name
);
5287 /* Find the existing arch in the list. */
5288 for (list
= ®o
->arches
;
5289 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5290 list
= &(*list
)->next
);
5291 /* It had better be in the list of architectures. */
5292 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5295 (*list
) = self
->next
;
5296 /* Insert SELF at the front. */
5297 self
->next
= rego
->arches
;
5298 rego
->arches
= self
;
5303 /* It's a new architecture. */
5305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
5306 "New architecture %s (%s) selected\n",
5307 host_address_to_string (new_gdbarch
),
5308 new_gdbarch
->bfd_arch_info
->printable_name
);
5310 /* Insert the new architecture into the front of the architecture
5311 list (keep the list sorted Most Recently Used). */
5313 struct gdbarch_list
*self
= XNEW (struct gdbarch_list
);
5314 self
->next
= rego
->arches
;
5315 self
->gdbarch
= new_gdbarch
;
5316 rego
->arches
= self
;
5319 /* Check that the newly installed architecture is valid. Plug in
5320 any post init values. */
5321 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5322 verify_gdbarch (new_gdbarch
);
5323 new_gdbarch
->initialized_p
= 1;
5326 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5331 /* Make the specified architecture current. */
5334 set_target_gdbarch (struct gdbarch
*new_gdbarch
)
5336 gdb_assert (new_gdbarch
!= NULL
);
5337 gdb_assert (new_gdbarch
->initialized_p
);
5338 current_inferior ()->gdbarch
= new_gdbarch
;
5339 observer_notify_architecture_changed (new_gdbarch
);
5340 registers_changed ();
5343 /* Return the current inferior's arch. */
5346 target_gdbarch (void)
5348 return current_inferior ()->gdbarch
;
5351 extern void _initialize_gdbarch (void);
5354 _initialize_gdbarch (void)
5356 add_setshow_zuinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
5357 Set architecture debugging."), _("\
5358 Show architecture debugging."), _("\
5359 When non-zero, architecture debugging is enabled."),
5362 &setdebuglist
, &showdebuglist
);