1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */
4 /* Dynamic architecture support for GDB, the GNU debugger.
6 Copyright (C) 1998-2014 Free Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
43 #include "floatformat.h"
44 #include "reggroups.h"
46 #include "gdb_obstack.h"
51 /* Static function declarations */
53 static void alloc_gdbarch_data (struct gdbarch
*);
55 /* Non-zero if we want to trace architecture code. */
58 #define GDBARCH_DEBUG 0
60 unsigned int gdbarch_debug
= GDBARCH_DEBUG
;
62 show_gdbarch_debug (struct ui_file
*file
, int from_tty
,
63 struct cmd_list_element
*c
, const char *value
)
65 fprintf_filtered (file
, _("Architecture debugging is %s.\n"), value
);
69 pformat (const struct floatformat
**format
)
74 /* Just print out one of them - this is only for diagnostics. */
75 return format
[0]->name
;
79 pstring (const char *string
)
86 /* Helper function to print a list of strings, represented as "const
87 char *const *". The list is printed comma-separated. */
90 pstring_list (const char *const *list
)
100 for (p
= list
; *p
!= NULL
&& offset
< sizeof (ret
); ++p
)
102 size_t s
= xsnprintf (ret
+ offset
, sizeof (ret
) - offset
, "%s, ", *p
);
108 gdb_assert (offset
- 2 < sizeof (ret
));
109 ret
[offset
- 2] = '\0';
116 /* Maintain the struct gdbarch object. */
120 /* Has this architecture been fully initialized? */
123 /* An obstack bound to the lifetime of the architecture. */
124 struct obstack
*obstack
;
126 /* basic architectural information. */
127 const struct bfd_arch_info
* bfd_arch_info
;
128 enum bfd_endian byte_order
;
129 enum bfd_endian byte_order_for_code
;
130 enum gdb_osabi osabi
;
131 const struct target_desc
* target_desc
;
133 /* target specific vector. */
134 struct gdbarch_tdep
*tdep
;
135 gdbarch_dump_tdep_ftype
*dump_tdep
;
137 /* per-architecture data-pointers. */
141 /* Multi-arch values.
143 When extending this structure you must:
147 Declare set/get functions and define the corresponding
150 gdbarch_alloc(): If zero/NULL is not a suitable default,
151 initialize the new field.
153 verify_gdbarch(): Confirm that the target updated the field
156 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
159 get_gdbarch(): Implement the set/get functions (probably using
160 the macro's as shortcuts).
169 int long_long_align_bit
;
171 const struct floatformat
** half_format
;
173 const struct floatformat
** float_format
;
175 const struct floatformat
** double_format
;
177 const struct floatformat
** long_double_format
;
180 int dwarf2_addr_size
;
182 gdbarch_read_pc_ftype
*read_pc
;
183 gdbarch_write_pc_ftype
*write_pc
;
184 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
185 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
186 gdbarch_pseudo_register_read_value_ftype
*pseudo_register_read_value
;
187 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
190 gdbarch_ax_pseudo_register_collect_ftype
*ax_pseudo_register_collect
;
191 gdbarch_ax_pseudo_register_push_stack_ftype
*ax_pseudo_register_push_stack
;
196 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
197 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
198 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
199 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
200 gdbarch_register_name_ftype
*register_name
;
201 gdbarch_register_type_ftype
*register_type
;
202 gdbarch_dummy_id_ftype
*dummy_id
;
203 int deprecated_fp_regnum
;
204 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
205 int call_dummy_location
;
206 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
207 gdbarch_print_registers_info_ftype
*print_registers_info
;
208 gdbarch_print_float_info_ftype
*print_float_info
;
209 gdbarch_print_vector_info_ftype
*print_vector_info
;
210 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
211 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
212 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
213 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
214 int believe_pcc_promotion
;
215 gdbarch_convert_register_p_ftype
*convert_register_p
;
216 gdbarch_register_to_value_ftype
*register_to_value
;
217 gdbarch_value_to_register_ftype
*value_to_register
;
218 gdbarch_value_from_register_ftype
*value_from_register
;
219 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
220 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
221 gdbarch_integer_to_address_ftype
*integer_to_address
;
222 gdbarch_return_value_ftype
*return_value
;
223 gdbarch_return_in_first_hidden_param_p_ftype
*return_in_first_hidden_param_p
;
224 gdbarch_skip_prologue_ftype
*skip_prologue
;
225 gdbarch_skip_main_prologue_ftype
*skip_main_prologue
;
226 gdbarch_skip_entrypoint_ftype
*skip_entrypoint
;
227 gdbarch_inner_than_ftype
*inner_than
;
228 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
229 gdbarch_remote_breakpoint_from_pc_ftype
*remote_breakpoint_from_pc
;
230 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
231 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
232 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
233 CORE_ADDR decr_pc_after_break
;
234 CORE_ADDR deprecated_function_start_offset
;
235 gdbarch_remote_register_number_ftype
*remote_register_number
;
236 gdbarch_fetch_tls_load_module_address_ftype
*fetch_tls_load_module_address
;
237 CORE_ADDR frame_args_skip
;
238 gdbarch_unwind_pc_ftype
*unwind_pc
;
239 gdbarch_unwind_sp_ftype
*unwind_sp
;
240 gdbarch_frame_num_args_ftype
*frame_num_args
;
241 gdbarch_frame_align_ftype
*frame_align
;
242 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
243 int frame_red_zone_size
;
244 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
245 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
246 gdbarch_software_single_step_ftype
*software_single_step
;
247 gdbarch_single_step_through_delay_ftype
*single_step_through_delay
;
248 gdbarch_print_insn_ftype
*print_insn
;
249 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
250 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
251 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
252 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
253 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
254 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
255 int cannot_step_breakpoint
;
256 int have_nonsteppable_watchpoint
;
257 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
258 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
259 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
260 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
261 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
262 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
263 gdbarch_iterate_over_regset_sections_ftype
*iterate_over_regset_sections
;
264 gdbarch_make_corefile_notes_ftype
*make_corefile_notes
;
265 gdbarch_elfcore_write_linux_prpsinfo_ftype
*elfcore_write_linux_prpsinfo
;
266 gdbarch_find_memory_regions_ftype
*find_memory_regions
;
267 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
268 gdbarch_core_xfer_shared_libraries_aix_ftype
*core_xfer_shared_libraries_aix
;
269 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
270 const char * gcore_bfd_target
;
271 int vtable_function_descriptors
;
273 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
274 ULONGEST max_insn_length
;
275 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
276 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
277 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
278 gdbarch_displaced_step_free_closure_ftype
*displaced_step_free_closure
;
279 gdbarch_displaced_step_location_ftype
*displaced_step_location
;
280 gdbarch_relocate_instruction_ftype
*relocate_instruction
;
281 gdbarch_overlay_update_ftype
*overlay_update
;
282 gdbarch_core_read_description_ftype
*core_read_description
;
283 gdbarch_static_transform_name_ftype
*static_transform_name
;
284 int sofun_address_maybe_missing
;
285 gdbarch_process_record_ftype
*process_record
;
286 gdbarch_process_record_signal_ftype
*process_record_signal
;
287 gdbarch_gdb_signal_from_target_ftype
*gdb_signal_from_target
;
288 gdbarch_gdb_signal_to_target_ftype
*gdb_signal_to_target
;
289 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
290 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
291 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
292 const char *const * stap_integer_prefixes
;
293 const char *const * stap_integer_suffixes
;
294 const char *const * stap_register_prefixes
;
295 const char *const * stap_register_suffixes
;
296 const char *const * stap_register_indirection_prefixes
;
297 const char *const * stap_register_indirection_suffixes
;
298 const char * stap_gdb_register_prefix
;
299 const char * stap_gdb_register_suffix
;
300 gdbarch_stap_is_single_operand_ftype
*stap_is_single_operand
;
301 gdbarch_stap_parse_special_token_ftype
*stap_parse_special_token
;
302 int has_global_solist
;
303 int has_global_breakpoints
;
304 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
305 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
306 gdbarch_auto_charset_ftype
*auto_charset
;
307 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
308 const char * solib_symbols_extension
;
309 int has_dos_based_file_system
;
310 gdbarch_gen_return_address_ftype
*gen_return_address
;
311 gdbarch_info_proc_ftype
*info_proc
;
312 gdbarch_core_info_proc_ftype
*core_info_proc
;
313 gdbarch_iterate_over_objfiles_in_search_order_ftype
*iterate_over_objfiles_in_search_order
;
314 struct ravenscar_arch_ops
* ravenscar_ops
;
315 gdbarch_insn_is_call_ftype
*insn_is_call
;
316 gdbarch_insn_is_ret_ftype
*insn_is_ret
;
317 gdbarch_insn_is_jump_ftype
*insn_is_jump
;
318 gdbarch_auxv_parse_ftype
*auxv_parse
;
321 /* Create a new ``struct gdbarch'' based on information provided by
322 ``struct gdbarch_info''. */
325 gdbarch_alloc (const struct gdbarch_info
*info
,
326 struct gdbarch_tdep
*tdep
)
328 struct gdbarch
*gdbarch
;
330 /* Create an obstack for allocating all the per-architecture memory,
331 then use that to allocate the architecture vector. */
332 struct obstack
*obstack
= XNEW (struct obstack
);
333 obstack_init (obstack
);
334 gdbarch
= obstack_alloc (obstack
, sizeof (*gdbarch
));
335 memset (gdbarch
, 0, sizeof (*gdbarch
));
336 gdbarch
->obstack
= obstack
;
338 alloc_gdbarch_data (gdbarch
);
340 gdbarch
->tdep
= tdep
;
342 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
343 gdbarch
->byte_order
= info
->byte_order
;
344 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
345 gdbarch
->osabi
= info
->osabi
;
346 gdbarch
->target_desc
= info
->target_desc
;
348 /* Force the explicit initialization of these. */
349 gdbarch
->bits_big_endian
= (gdbarch
->byte_order
== BFD_ENDIAN_BIG
);
350 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
351 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
352 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
353 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
354 gdbarch
->long_long_align_bit
= 2*gdbarch
->long_bit
;
355 gdbarch
->half_bit
= 2*TARGET_CHAR_BIT
;
356 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
357 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
358 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
359 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
360 gdbarch
->char_signed
= -1;
361 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
362 gdbarch
->num_regs
= -1;
363 gdbarch
->sp_regnum
= -1;
364 gdbarch
->pc_regnum
= -1;
365 gdbarch
->ps_regnum
= -1;
366 gdbarch
->fp0_regnum
= -1;
367 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
368 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
369 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
370 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
371 gdbarch
->deprecated_fp_regnum
= -1;
372 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
373 gdbarch
->print_registers_info
= default_print_registers_info
;
374 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
375 gdbarch
->cannot_fetch_register
= cannot_register_not
;
376 gdbarch
->cannot_store_register
= cannot_register_not
;
377 gdbarch
->convert_register_p
= generic_convert_register_p
;
378 gdbarch
->value_from_register
= default_value_from_register
;
379 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
380 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
381 gdbarch
->return_in_first_hidden_param_p
= default_return_in_first_hidden_param_p
;
382 gdbarch
->remote_breakpoint_from_pc
= default_remote_breakpoint_from_pc
;
383 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
384 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
385 gdbarch
->remote_register_number
= default_remote_register_number
;
386 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
387 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
388 gdbarch
->addr_bits_remove
= core_addr_identity
;
389 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
390 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
391 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
392 gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
393 gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
394 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
395 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
396 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
397 gdbarch
->displaced_step_fixup
= NULL
;
398 gdbarch
->displaced_step_free_closure
= NULL
;
399 gdbarch
->displaced_step_location
= NULL
;
400 gdbarch
->relocate_instruction
= NULL
;
401 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
402 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
403 gdbarch
->auto_charset
= default_auto_charset
;
404 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
405 gdbarch
->gen_return_address
= default_gen_return_address
;
406 gdbarch
->iterate_over_objfiles_in_search_order
= default_iterate_over_objfiles_in_search_order
;
407 gdbarch
->ravenscar_ops
= NULL
;
408 gdbarch
->insn_is_call
= default_insn_is_call
;
409 gdbarch
->insn_is_ret
= default_insn_is_ret
;
410 gdbarch
->insn_is_jump
= default_insn_is_jump
;
411 /* gdbarch_alloc() */
417 /* Allocate extra space using the per-architecture obstack. */
420 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
422 void *data
= obstack_alloc (arch
->obstack
, size
);
424 memset (data
, 0, size
);
429 /* Free a gdbarch struct. This should never happen in normal
430 operation --- once you've created a gdbarch, you keep it around.
431 However, if an architecture's init function encounters an error
432 building the structure, it may need to clean up a partially
433 constructed gdbarch. */
436 gdbarch_free (struct gdbarch
*arch
)
438 struct obstack
*obstack
;
440 gdb_assert (arch
!= NULL
);
441 gdb_assert (!arch
->initialized_p
);
442 obstack
= arch
->obstack
;
443 obstack_free (obstack
, 0); /* Includes the ARCH. */
448 /* Ensure that all values in a GDBARCH are reasonable. */
451 verify_gdbarch (struct gdbarch
*gdbarch
)
454 struct cleanup
*cleanups
;
458 log
= mem_fileopen ();
459 cleanups
= make_cleanup_ui_file_delete (log
);
461 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
462 fprintf_unfiltered (log
, "\n\tbyte-order");
463 if (gdbarch
->bfd_arch_info
== NULL
)
464 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
465 /* Check those that need to be defined for the given multi-arch level. */
466 /* Skip verify of bits_big_endian, invalid_p == 0 */
467 /* Skip verify of short_bit, invalid_p == 0 */
468 /* Skip verify of int_bit, invalid_p == 0 */
469 /* Skip verify of long_bit, invalid_p == 0 */
470 /* Skip verify of long_long_bit, invalid_p == 0 */
471 /* Skip verify of long_long_align_bit, invalid_p == 0 */
472 /* Skip verify of half_bit, invalid_p == 0 */
473 if (gdbarch
->half_format
== 0)
474 gdbarch
->half_format
= floatformats_ieee_half
;
475 /* Skip verify of float_bit, invalid_p == 0 */
476 if (gdbarch
->float_format
== 0)
477 gdbarch
->float_format
= floatformats_ieee_single
;
478 /* Skip verify of double_bit, invalid_p == 0 */
479 if (gdbarch
->double_format
== 0)
480 gdbarch
->double_format
= floatformats_ieee_double
;
481 /* Skip verify of long_double_bit, invalid_p == 0 */
482 if (gdbarch
->long_double_format
== 0)
483 gdbarch
->long_double_format
= floatformats_ieee_double
;
484 /* Skip verify of ptr_bit, invalid_p == 0 */
485 if (gdbarch
->addr_bit
== 0)
486 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
487 if (gdbarch
->dwarf2_addr_size
== 0)
488 gdbarch
->dwarf2_addr_size
= gdbarch_ptr_bit (gdbarch
) / TARGET_CHAR_BIT
;
489 if (gdbarch
->char_signed
== -1)
490 gdbarch
->char_signed
= 1;
491 /* Skip verify of read_pc, has predicate. */
492 /* Skip verify of write_pc, has predicate. */
493 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
494 /* Skip verify of pseudo_register_read, has predicate. */
495 /* Skip verify of pseudo_register_read_value, has predicate. */
496 /* Skip verify of pseudo_register_write, has predicate. */
497 if (gdbarch
->num_regs
== -1)
498 fprintf_unfiltered (log
, "\n\tnum_regs");
499 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
500 /* Skip verify of ax_pseudo_register_collect, has predicate. */
501 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
502 /* Skip verify of sp_regnum, invalid_p == 0 */
503 /* Skip verify of pc_regnum, invalid_p == 0 */
504 /* Skip verify of ps_regnum, invalid_p == 0 */
505 /* Skip verify of fp0_regnum, invalid_p == 0 */
506 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
507 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
508 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
509 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
510 if (gdbarch
->register_name
== 0)
511 fprintf_unfiltered (log
, "\n\tregister_name");
512 /* Skip verify of register_type, has predicate. */
513 /* Skip verify of dummy_id, has predicate. */
514 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
515 /* Skip verify of push_dummy_call, has predicate. */
516 /* Skip verify of call_dummy_location, invalid_p == 0 */
517 /* Skip verify of push_dummy_code, has predicate. */
518 /* Skip verify of print_registers_info, invalid_p == 0 */
519 /* Skip verify of print_float_info, has predicate. */
520 /* Skip verify of print_vector_info, has predicate. */
521 /* Skip verify of register_sim_regno, invalid_p == 0 */
522 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
523 /* Skip verify of cannot_store_register, invalid_p == 0 */
524 /* Skip verify of get_longjmp_target, has predicate. */
525 /* Skip verify of convert_register_p, invalid_p == 0 */
526 /* Skip verify of value_from_register, invalid_p == 0 */
527 /* Skip verify of pointer_to_address, invalid_p == 0 */
528 /* Skip verify of address_to_pointer, invalid_p == 0 */
529 /* Skip verify of integer_to_address, has predicate. */
530 /* Skip verify of return_value, has predicate. */
531 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
532 if (gdbarch
->skip_prologue
== 0)
533 fprintf_unfiltered (log
, "\n\tskip_prologue");
534 /* Skip verify of skip_main_prologue, has predicate. */
535 /* Skip verify of skip_entrypoint, has predicate. */
536 if (gdbarch
->inner_than
== 0)
537 fprintf_unfiltered (log
, "\n\tinner_than");
538 if (gdbarch
->breakpoint_from_pc
== 0)
539 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
540 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
541 /* Skip verify of adjust_breakpoint_address, has predicate. */
542 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
543 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
544 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
545 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
546 /* Skip verify of remote_register_number, invalid_p == 0 */
547 /* Skip verify of fetch_tls_load_module_address, has predicate. */
548 /* Skip verify of frame_args_skip, invalid_p == 0 */
549 /* Skip verify of unwind_pc, has predicate. */
550 /* Skip verify of unwind_sp, has predicate. */
551 /* Skip verify of frame_num_args, has predicate. */
552 /* Skip verify of frame_align, has predicate. */
553 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
554 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
555 /* Skip verify of addr_bits_remove, invalid_p == 0 */
556 /* Skip verify of software_single_step, has predicate. */
557 /* Skip verify of single_step_through_delay, has predicate. */
558 if (gdbarch
->print_insn
== 0)
559 fprintf_unfiltered (log
, "\n\tprint_insn");
560 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
561 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
562 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
563 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
564 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
565 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
566 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
567 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
568 /* Skip verify of address_class_type_flags, has predicate. */
569 /* Skip verify of address_class_type_flags_to_name, has predicate. */
570 /* Skip verify of address_class_name_to_type_flags, has predicate. */
571 /* Skip verify of register_reggroup_p, invalid_p == 0 */
572 /* Skip verify of fetch_pointer_argument, has predicate. */
573 /* Skip verify of regset_from_core_section, has predicate. */
574 /* Skip verify of iterate_over_regset_sections, has predicate. */
575 /* Skip verify of make_corefile_notes, has predicate. */
576 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
577 /* Skip verify of find_memory_regions, has predicate. */
578 /* Skip verify of core_xfer_shared_libraries, has predicate. */
579 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
580 /* Skip verify of core_pid_to_str, has predicate. */
581 /* Skip verify of gcore_bfd_target, has predicate. */
582 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
583 /* Skip verify of vbit_in_delta, invalid_p == 0 */
584 /* Skip verify of skip_permanent_breakpoint, has predicate. */
585 /* Skip verify of max_insn_length, has predicate. */
586 /* Skip verify of displaced_step_copy_insn, has predicate. */
587 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
588 /* Skip verify of displaced_step_fixup, has predicate. */
589 if ((! gdbarch
->displaced_step_free_closure
) != (! gdbarch
->displaced_step_copy_insn
))
590 fprintf_unfiltered (log
, "\n\tdisplaced_step_free_closure");
591 if ((! gdbarch
->displaced_step_location
) != (! gdbarch
->displaced_step_copy_insn
))
592 fprintf_unfiltered (log
, "\n\tdisplaced_step_location");
593 /* Skip verify of relocate_instruction, has predicate. */
594 /* Skip verify of overlay_update, has predicate. */
595 /* Skip verify of core_read_description, has predicate. */
596 /* Skip verify of static_transform_name, has predicate. */
597 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
598 /* Skip verify of process_record, has predicate. */
599 /* Skip verify of process_record_signal, has predicate. */
600 /* Skip verify of gdb_signal_from_target, has predicate. */
601 /* Skip verify of gdb_signal_to_target, has predicate. */
602 /* Skip verify of get_siginfo_type, has predicate. */
603 /* Skip verify of record_special_symbol, has predicate. */
604 /* Skip verify of get_syscall_number, has predicate. */
605 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
606 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
607 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
608 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
609 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
610 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
611 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
612 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
613 /* Skip verify of stap_is_single_operand, has predicate. */
614 /* Skip verify of stap_parse_special_token, has predicate. */
615 /* Skip verify of has_global_solist, invalid_p == 0 */
616 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
617 /* Skip verify of has_shared_address_space, invalid_p == 0 */
618 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
619 /* Skip verify of auto_charset, invalid_p == 0 */
620 /* Skip verify of auto_wide_charset, invalid_p == 0 */
621 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
622 /* Skip verify of gen_return_address, invalid_p == 0 */
623 /* Skip verify of info_proc, has predicate. */
624 /* Skip verify of core_info_proc, has predicate. */
625 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
626 /* Skip verify of ravenscar_ops, invalid_p == 0 */
627 /* Skip verify of insn_is_call, invalid_p == 0 */
628 /* Skip verify of insn_is_ret, invalid_p == 0 */
629 /* Skip verify of insn_is_jump, invalid_p == 0 */
630 /* Skip verify of auxv_parse, has predicate. */
631 buf
= ui_file_xstrdup (log
, &length
);
632 make_cleanup (xfree
, buf
);
634 internal_error (__FILE__
, __LINE__
,
635 _("verify_gdbarch: the following are invalid ...%s"),
637 do_cleanups (cleanups
);
641 /* Print out the details of the current architecture. */
644 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
646 const char *gdb_nm_file
= "<not-defined>";
648 #if defined (GDB_NM_FILE)
649 gdb_nm_file
= GDB_NM_FILE
;
651 fprintf_unfiltered (file
,
652 "gdbarch_dump: GDB_NM_FILE = %s\n",
654 fprintf_unfiltered (file
,
655 "gdbarch_dump: addr_bit = %s\n",
656 plongest (gdbarch
->addr_bit
));
657 fprintf_unfiltered (file
,
658 "gdbarch_dump: addr_bits_remove = <%s>\n",
659 host_address_to_string (gdbarch
->addr_bits_remove
));
660 fprintf_unfiltered (file
,
661 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
662 gdbarch_address_class_name_to_type_flags_p (gdbarch
));
663 fprintf_unfiltered (file
,
664 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
665 host_address_to_string (gdbarch
->address_class_name_to_type_flags
));
666 fprintf_unfiltered (file
,
667 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
668 gdbarch_address_class_type_flags_p (gdbarch
));
669 fprintf_unfiltered (file
,
670 "gdbarch_dump: address_class_type_flags = <%s>\n",
671 host_address_to_string (gdbarch
->address_class_type_flags
));
672 fprintf_unfiltered (file
,
673 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
674 gdbarch_address_class_type_flags_to_name_p (gdbarch
));
675 fprintf_unfiltered (file
,
676 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
677 host_address_to_string (gdbarch
->address_class_type_flags_to_name
));
678 fprintf_unfiltered (file
,
679 "gdbarch_dump: address_to_pointer = <%s>\n",
680 host_address_to_string (gdbarch
->address_to_pointer
));
681 fprintf_unfiltered (file
,
682 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
683 gdbarch_adjust_breakpoint_address_p (gdbarch
));
684 fprintf_unfiltered (file
,
685 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
686 host_address_to_string (gdbarch
->adjust_breakpoint_address
));
687 fprintf_unfiltered (file
,
688 "gdbarch_dump: auto_charset = <%s>\n",
689 host_address_to_string (gdbarch
->auto_charset
));
690 fprintf_unfiltered (file
,
691 "gdbarch_dump: auto_wide_charset = <%s>\n",
692 host_address_to_string (gdbarch
->auto_wide_charset
));
693 fprintf_unfiltered (file
,
694 "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n",
695 gdbarch_auxv_parse_p (gdbarch
));
696 fprintf_unfiltered (file
,
697 "gdbarch_dump: auxv_parse = <%s>\n",
698 host_address_to_string (gdbarch
->auxv_parse
));
699 fprintf_unfiltered (file
,
700 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
701 gdbarch_ax_pseudo_register_collect_p (gdbarch
));
702 fprintf_unfiltered (file
,
703 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
704 host_address_to_string (gdbarch
->ax_pseudo_register_collect
));
705 fprintf_unfiltered (file
,
706 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
707 gdbarch_ax_pseudo_register_push_stack_p (gdbarch
));
708 fprintf_unfiltered (file
,
709 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
710 host_address_to_string (gdbarch
->ax_pseudo_register_push_stack
));
711 fprintf_unfiltered (file
,
712 "gdbarch_dump: believe_pcc_promotion = %s\n",
713 plongest (gdbarch
->believe_pcc_promotion
));
714 fprintf_unfiltered (file
,
715 "gdbarch_dump: bfd_arch_info = %s\n",
716 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
717 fprintf_unfiltered (file
,
718 "gdbarch_dump: bits_big_endian = %s\n",
719 plongest (gdbarch
->bits_big_endian
));
720 fprintf_unfiltered (file
,
721 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
722 host_address_to_string (gdbarch
->breakpoint_from_pc
));
723 fprintf_unfiltered (file
,
724 "gdbarch_dump: byte_order = %s\n",
725 plongest (gdbarch
->byte_order
));
726 fprintf_unfiltered (file
,
727 "gdbarch_dump: byte_order_for_code = %s\n",
728 plongest (gdbarch
->byte_order_for_code
));
729 fprintf_unfiltered (file
,
730 "gdbarch_dump: call_dummy_location = %s\n",
731 plongest (gdbarch
->call_dummy_location
));
732 fprintf_unfiltered (file
,
733 "gdbarch_dump: cannot_fetch_register = <%s>\n",
734 host_address_to_string (gdbarch
->cannot_fetch_register
));
735 fprintf_unfiltered (file
,
736 "gdbarch_dump: cannot_step_breakpoint = %s\n",
737 plongest (gdbarch
->cannot_step_breakpoint
));
738 fprintf_unfiltered (file
,
739 "gdbarch_dump: cannot_store_register = <%s>\n",
740 host_address_to_string (gdbarch
->cannot_store_register
));
741 fprintf_unfiltered (file
,
742 "gdbarch_dump: char_signed = %s\n",
743 plongest (gdbarch
->char_signed
));
744 fprintf_unfiltered (file
,
745 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
746 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
747 fprintf_unfiltered (file
,
748 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
749 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
750 fprintf_unfiltered (file
,
751 "gdbarch_dump: convert_register_p = <%s>\n",
752 host_address_to_string (gdbarch
->convert_register_p
));
753 fprintf_unfiltered (file
,
754 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
755 gdbarch_core_info_proc_p (gdbarch
));
756 fprintf_unfiltered (file
,
757 "gdbarch_dump: core_info_proc = <%s>\n",
758 host_address_to_string (gdbarch
->core_info_proc
));
759 fprintf_unfiltered (file
,
760 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
761 gdbarch_core_pid_to_str_p (gdbarch
));
762 fprintf_unfiltered (file
,
763 "gdbarch_dump: core_pid_to_str = <%s>\n",
764 host_address_to_string (gdbarch
->core_pid_to_str
));
765 fprintf_unfiltered (file
,
766 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
767 gdbarch_core_read_description_p (gdbarch
));
768 fprintf_unfiltered (file
,
769 "gdbarch_dump: core_read_description = <%s>\n",
770 host_address_to_string (gdbarch
->core_read_description
));
771 fprintf_unfiltered (file
,
772 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
773 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
774 fprintf_unfiltered (file
,
775 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
776 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
777 fprintf_unfiltered (file
,
778 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
779 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch
));
780 fprintf_unfiltered (file
,
781 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
782 host_address_to_string (gdbarch
->core_xfer_shared_libraries_aix
));
783 fprintf_unfiltered (file
,
784 "gdbarch_dump: decr_pc_after_break = %s\n",
785 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
786 fprintf_unfiltered (file
,
787 "gdbarch_dump: deprecated_fp_regnum = %s\n",
788 plongest (gdbarch
->deprecated_fp_regnum
));
789 fprintf_unfiltered (file
,
790 "gdbarch_dump: deprecated_function_start_offset = %s\n",
791 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
794 gdbarch_displaced_step_copy_insn_p (gdbarch
));
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
797 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
800 gdbarch_displaced_step_fixup_p (gdbarch
));
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: displaced_step_fixup = <%s>\n",
803 host_address_to_string (gdbarch
->displaced_step_fixup
));
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
806 host_address_to_string (gdbarch
->displaced_step_free_closure
));
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
809 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: displaced_step_location = <%s>\n",
812 host_address_to_string (gdbarch
->displaced_step_location
));
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: double_bit = %s\n",
815 plongest (gdbarch
->double_bit
));
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: double_format = %s\n",
818 pformat (gdbarch
->double_format
));
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
821 gdbarch_dummy_id_p (gdbarch
));
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: dummy_id = <%s>\n",
824 host_address_to_string (gdbarch
->dummy_id
));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: dwarf2_addr_size = %s\n",
827 plongest (gdbarch
->dwarf2_addr_size
));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
830 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
833 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
836 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
839 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch
));
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
842 host_address_to_string (gdbarch
->elfcore_write_linux_prpsinfo
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
845 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
848 gdbarch_fetch_pointer_argument_p (gdbarch
));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
851 host_address_to_string (gdbarch
->fetch_pointer_argument
));
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
854 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
857 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
860 gdbarch_find_memory_regions_p (gdbarch
));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: find_memory_regions = <%s>\n",
863 host_address_to_string (gdbarch
->find_memory_regions
));
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: float_bit = %s\n",
866 plongest (gdbarch
->float_bit
));
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: float_format = %s\n",
869 pformat (gdbarch
->float_format
));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: fp0_regnum = %s\n",
872 plongest (gdbarch
->fp0_regnum
));
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
875 gdbarch_frame_align_p (gdbarch
));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: frame_align = <%s>\n",
878 host_address_to_string (gdbarch
->frame_align
));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: frame_args_skip = %s\n",
881 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
884 gdbarch_frame_num_args_p (gdbarch
));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: frame_num_args = <%s>\n",
887 host_address_to_string (gdbarch
->frame_num_args
));
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: frame_red_zone_size = %s\n",
890 plongest (gdbarch
->frame_red_zone_size
));
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
893 gdbarch_gcore_bfd_target_p (gdbarch
));
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: gcore_bfd_target = %s\n",
896 pstring (gdbarch
->gcore_bfd_target
));
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
899 gdbarch_gdb_signal_from_target_p (gdbarch
));
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
902 host_address_to_string (gdbarch
->gdb_signal_from_target
));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
905 gdbarch_gdb_signal_to_target_p (gdbarch
));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
908 host_address_to_string (gdbarch
->gdb_signal_to_target
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: gen_return_address = <%s>\n",
911 host_address_to_string (gdbarch
->gen_return_address
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
914 gdbarch_get_longjmp_target_p (gdbarch
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: get_longjmp_target = <%s>\n",
917 host_address_to_string (gdbarch
->get_longjmp_target
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
920 gdbarch_get_siginfo_type_p (gdbarch
));
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: get_siginfo_type = <%s>\n",
923 host_address_to_string (gdbarch
->get_siginfo_type
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
926 gdbarch_get_syscall_number_p (gdbarch
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: get_syscall_number = <%s>\n",
929 host_address_to_string (gdbarch
->get_syscall_number
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: half_bit = %s\n",
932 plongest (gdbarch
->half_bit
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: half_format = %s\n",
935 pformat (gdbarch
->half_format
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: has_dos_based_file_system = %s\n",
938 plongest (gdbarch
->has_dos_based_file_system
));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: has_global_breakpoints = %s\n",
941 plongest (gdbarch
->has_global_breakpoints
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: has_global_solist = %s\n",
944 plongest (gdbarch
->has_global_solist
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: has_shared_address_space = <%s>\n",
947 host_address_to_string (gdbarch
->has_shared_address_space
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
950 plongest (gdbarch
->have_nonsteppable_watchpoint
));
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
953 host_address_to_string (gdbarch
->in_function_epilogue_p
));
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
956 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
959 gdbarch_info_proc_p (gdbarch
));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: info_proc = <%s>\n",
962 host_address_to_string (gdbarch
->info_proc
));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: inner_than = <%s>\n",
965 host_address_to_string (gdbarch
->inner_than
));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: insn_is_call = <%s>\n",
968 host_address_to_string (gdbarch
->insn_is_call
));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: insn_is_jump = <%s>\n",
971 host_address_to_string (gdbarch
->insn_is_jump
));
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: insn_is_ret = <%s>\n",
974 host_address_to_string (gdbarch
->insn_is_ret
));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: int_bit = %s\n",
977 plongest (gdbarch
->int_bit
));
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
980 gdbarch_integer_to_address_p (gdbarch
));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: integer_to_address = <%s>\n",
983 host_address_to_string (gdbarch
->integer_to_address
));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
986 host_address_to_string (gdbarch
->iterate_over_objfiles_in_search_order
));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: gdbarch_iterate_over_regset_sections_p() = %d\n",
989 gdbarch_iterate_over_regset_sections_p (gdbarch
));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: iterate_over_regset_sections = <%s>\n",
992 host_address_to_string (gdbarch
->iterate_over_regset_sections
));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: long_bit = %s\n",
995 plongest (gdbarch
->long_bit
));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: long_double_bit = %s\n",
998 plongest (gdbarch
->long_double_bit
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: long_double_format = %s\n",
1001 pformat (gdbarch
->long_double_format
));
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: long_long_align_bit = %s\n",
1004 plongest (gdbarch
->long_long_align_bit
));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: long_long_bit = %s\n",
1007 plongest (gdbarch
->long_long_bit
));
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1010 gdbarch_make_corefile_notes_p (gdbarch
));
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: make_corefile_notes = <%s>\n",
1013 host_address_to_string (gdbarch
->make_corefile_notes
));
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1016 gdbarch_max_insn_length_p (gdbarch
));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: max_insn_length = %s\n",
1019 plongest (gdbarch
->max_insn_length
));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1022 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1025 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: num_pseudo_regs = %s\n",
1028 plongest (gdbarch
->num_pseudo_regs
));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: num_regs = %s\n",
1031 plongest (gdbarch
->num_regs
));
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: osabi = %s\n",
1034 plongest (gdbarch
->osabi
));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1037 gdbarch_overlay_update_p (gdbarch
));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: overlay_update = <%s>\n",
1040 host_address_to_string (gdbarch
->overlay_update
));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: pc_regnum = %s\n",
1043 plongest (gdbarch
->pc_regnum
));
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: pointer_to_address = <%s>\n",
1046 host_address_to_string (gdbarch
->pointer_to_address
));
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1049 gdbarch_print_float_info_p (gdbarch
));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: print_float_info = <%s>\n",
1052 host_address_to_string (gdbarch
->print_float_info
));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: print_insn = <%s>\n",
1055 host_address_to_string (gdbarch
->print_insn
));
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: print_registers_info = <%s>\n",
1058 host_address_to_string (gdbarch
->print_registers_info
));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1061 gdbarch_print_vector_info_p (gdbarch
));
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: print_vector_info = <%s>\n",
1064 host_address_to_string (gdbarch
->print_vector_info
));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1067 gdbarch_process_record_p (gdbarch
));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: process_record = <%s>\n",
1070 host_address_to_string (gdbarch
->process_record
));
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1073 gdbarch_process_record_signal_p (gdbarch
));
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: process_record_signal = <%s>\n",
1076 host_address_to_string (gdbarch
->process_record_signal
));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: ps_regnum = %s\n",
1079 plongest (gdbarch
->ps_regnum
));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1082 gdbarch_pseudo_register_read_p (gdbarch
));
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: pseudo_register_read = <%s>\n",
1085 host_address_to_string (gdbarch
->pseudo_register_read
));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1088 gdbarch_pseudo_register_read_value_p (gdbarch
));
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1091 host_address_to_string (gdbarch
->pseudo_register_read_value
));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1094 gdbarch_pseudo_register_write_p (gdbarch
));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: pseudo_register_write = <%s>\n",
1097 host_address_to_string (gdbarch
->pseudo_register_write
));
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: ptr_bit = %s\n",
1100 plongest (gdbarch
->ptr_bit
));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1103 gdbarch_push_dummy_call_p (gdbarch
));
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: push_dummy_call = <%s>\n",
1106 host_address_to_string (gdbarch
->push_dummy_call
));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1109 gdbarch_push_dummy_code_p (gdbarch
));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: push_dummy_code = <%s>\n",
1112 host_address_to_string (gdbarch
->push_dummy_code
));
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: ravenscar_ops = %s\n",
1115 host_address_to_string (gdbarch
->ravenscar_ops
));
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1118 gdbarch_read_pc_p (gdbarch
));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: read_pc = <%s>\n",
1121 host_address_to_string (gdbarch
->read_pc
));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1124 gdbarch_record_special_symbol_p (gdbarch
));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: record_special_symbol = <%s>\n",
1127 host_address_to_string (gdbarch
->record_special_symbol
));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: register_name = <%s>\n",
1130 host_address_to_string (gdbarch
->register_name
));
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: register_reggroup_p = <%s>\n",
1133 host_address_to_string (gdbarch
->register_reggroup_p
));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: register_sim_regno = <%s>\n",
1136 host_address_to_string (gdbarch
->register_sim_regno
));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: register_to_value = <%s>\n",
1139 host_address_to_string (gdbarch
->register_to_value
));
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1142 gdbarch_register_type_p (gdbarch
));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: register_type = <%s>\n",
1145 host_address_to_string (gdbarch
->register_type
));
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1148 gdbarch_regset_from_core_section_p (gdbarch
));
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: regset_from_core_section = <%s>\n",
1151 host_address_to_string (gdbarch
->regset_from_core_section
));
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1154 gdbarch_relocate_instruction_p (gdbarch
));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: relocate_instruction = <%s>\n",
1157 host_address_to_string (gdbarch
->relocate_instruction
));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1160 host_address_to_string (gdbarch
->remote_breakpoint_from_pc
));
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: remote_register_number = <%s>\n",
1163 host_address_to_string (gdbarch
->remote_register_number
));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1166 host_address_to_string (gdbarch
->return_in_first_hidden_param_p
));
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1169 gdbarch_return_value_p (gdbarch
));
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: return_value = <%s>\n",
1172 host_address_to_string (gdbarch
->return_value
));
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1175 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: short_bit = %s\n",
1178 plongest (gdbarch
->short_bit
));
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1181 gdbarch_single_step_through_delay_p (gdbarch
));
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: single_step_through_delay = <%s>\n",
1184 host_address_to_string (gdbarch
->single_step_through_delay
));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1187 gdbarch_skip_entrypoint_p (gdbarch
));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: skip_entrypoint = <%s>\n",
1190 host_address_to_string (gdbarch
->skip_entrypoint
));
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1193 gdbarch_skip_main_prologue_p (gdbarch
));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: skip_main_prologue = <%s>\n",
1196 host_address_to_string (gdbarch
->skip_main_prologue
));
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1199 gdbarch_skip_permanent_breakpoint_p (gdbarch
));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1202 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: skip_prologue = <%s>\n",
1205 host_address_to_string (gdbarch
->skip_prologue
));
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1208 host_address_to_string (gdbarch
->skip_solib_resolver
));
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1211 host_address_to_string (gdbarch
->skip_trampoline_code
));
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1214 gdbarch_software_single_step_p (gdbarch
));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: software_single_step = <%s>\n",
1217 host_address_to_string (gdbarch
->software_single_step
));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1220 plongest (gdbarch
->sofun_address_maybe_missing
));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: solib_symbols_extension = %s\n",
1223 pstring (gdbarch
->solib_symbols_extension
));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: sp_regnum = %s\n",
1226 plongest (gdbarch
->sp_regnum
));
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1229 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1232 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1235 pstring (gdbarch
->stap_gdb_register_prefix
));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1238 pstring (gdbarch
->stap_gdb_register_suffix
));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: stap_integer_prefixes = %s\n",
1241 pstring_list (gdbarch
->stap_integer_prefixes
));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: stap_integer_suffixes = %s\n",
1244 pstring_list (gdbarch
->stap_integer_suffixes
));
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1247 gdbarch_stap_is_single_operand_p (gdbarch
));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1250 host_address_to_string (gdbarch
->stap_is_single_operand
));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1253 gdbarch_stap_parse_special_token_p (gdbarch
));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1256 host_address_to_string (gdbarch
->stap_parse_special_token
));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1259 pstring_list (gdbarch
->stap_register_indirection_prefixes
));
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1262 pstring_list (gdbarch
->stap_register_indirection_suffixes
));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: stap_register_prefixes = %s\n",
1265 pstring_list (gdbarch
->stap_register_prefixes
));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: stap_register_suffixes = %s\n",
1268 pstring_list (gdbarch
->stap_register_suffixes
));
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1271 gdbarch_static_transform_name_p (gdbarch
));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: static_transform_name = <%s>\n",
1274 host_address_to_string (gdbarch
->static_transform_name
));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: target_desc = %s\n",
1277 host_address_to_string (gdbarch
->target_desc
));
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1280 gdbarch_unwind_pc_p (gdbarch
));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: unwind_pc = <%s>\n",
1283 host_address_to_string (gdbarch
->unwind_pc
));
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1286 gdbarch_unwind_sp_p (gdbarch
));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: unwind_sp = <%s>\n",
1289 host_address_to_string (gdbarch
->unwind_sp
));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: value_from_register = <%s>\n",
1292 host_address_to_string (gdbarch
->value_from_register
));
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: value_to_register = <%s>\n",
1295 host_address_to_string (gdbarch
->value_to_register
));
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: vbit_in_delta = %s\n",
1298 plongest (gdbarch
->vbit_in_delta
));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1301 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: vtable_function_descriptors = %s\n",
1304 plongest (gdbarch
->vtable_function_descriptors
));
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1307 gdbarch_write_pc_p (gdbarch
));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: write_pc = <%s>\n",
1310 host_address_to_string (gdbarch
->write_pc
));
1311 if (gdbarch
->dump_tdep
!= NULL
)
1312 gdbarch
->dump_tdep (gdbarch
, file
);
1315 struct gdbarch_tdep
*
1316 gdbarch_tdep (struct gdbarch
*gdbarch
)
1318 if (gdbarch_debug
>= 2)
1319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1320 return gdbarch
->tdep
;
1324 const struct bfd_arch_info
*
1325 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1327 gdb_assert (gdbarch
!= NULL
);
1328 if (gdbarch_debug
>= 2)
1329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1330 return gdbarch
->bfd_arch_info
;
1334 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1336 gdb_assert (gdbarch
!= NULL
);
1337 if (gdbarch_debug
>= 2)
1338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1339 return gdbarch
->byte_order
;
1343 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1345 gdb_assert (gdbarch
!= NULL
);
1346 if (gdbarch_debug
>= 2)
1347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1348 return gdbarch
->byte_order_for_code
;
1352 gdbarch_osabi (struct gdbarch
*gdbarch
)
1354 gdb_assert (gdbarch
!= NULL
);
1355 if (gdbarch_debug
>= 2)
1356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1357 return gdbarch
->osabi
;
1360 const struct target_desc
*
1361 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1363 gdb_assert (gdbarch
!= NULL
);
1364 if (gdbarch_debug
>= 2)
1365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1366 return gdbarch
->target_desc
;
1370 gdbarch_bits_big_endian (struct gdbarch
*gdbarch
)
1372 gdb_assert (gdbarch
!= NULL
);
1373 /* Skip verify of bits_big_endian, invalid_p == 0 */
1374 if (gdbarch_debug
>= 2)
1375 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bits_big_endian called\n");
1376 return gdbarch
->bits_big_endian
;
1380 set_gdbarch_bits_big_endian (struct gdbarch
*gdbarch
,
1381 int bits_big_endian
)
1383 gdbarch
->bits_big_endian
= bits_big_endian
;
1387 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1389 gdb_assert (gdbarch
!= NULL
);
1390 /* Skip verify of short_bit, invalid_p == 0 */
1391 if (gdbarch_debug
>= 2)
1392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1393 return gdbarch
->short_bit
;
1397 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1400 gdbarch
->short_bit
= short_bit
;
1404 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1406 gdb_assert (gdbarch
!= NULL
);
1407 /* Skip verify of int_bit, invalid_p == 0 */
1408 if (gdbarch_debug
>= 2)
1409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1410 return gdbarch
->int_bit
;
1414 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1417 gdbarch
->int_bit
= int_bit
;
1421 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1423 gdb_assert (gdbarch
!= NULL
);
1424 /* Skip verify of long_bit, invalid_p == 0 */
1425 if (gdbarch_debug
>= 2)
1426 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1427 return gdbarch
->long_bit
;
1431 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1434 gdbarch
->long_bit
= long_bit
;
1438 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1440 gdb_assert (gdbarch
!= NULL
);
1441 /* Skip verify of long_long_bit, invalid_p == 0 */
1442 if (gdbarch_debug
>= 2)
1443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1444 return gdbarch
->long_long_bit
;
1448 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1451 gdbarch
->long_long_bit
= long_long_bit
;
1455 gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
)
1457 gdb_assert (gdbarch
!= NULL
);
1458 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1459 if (gdbarch_debug
>= 2)
1460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_align_bit called\n");
1461 return gdbarch
->long_long_align_bit
;
1465 set_gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
,
1466 int long_long_align_bit
)
1468 gdbarch
->long_long_align_bit
= long_long_align_bit
;
1472 gdbarch_half_bit (struct gdbarch
*gdbarch
)
1474 gdb_assert (gdbarch
!= NULL
);
1475 /* Skip verify of half_bit, invalid_p == 0 */
1476 if (gdbarch_debug
>= 2)
1477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_bit called\n");
1478 return gdbarch
->half_bit
;
1482 set_gdbarch_half_bit (struct gdbarch
*gdbarch
,
1485 gdbarch
->half_bit
= half_bit
;
1488 const struct floatformat
**
1489 gdbarch_half_format (struct gdbarch
*gdbarch
)
1491 gdb_assert (gdbarch
!= NULL
);
1492 if (gdbarch_debug
>= 2)
1493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_format called\n");
1494 return gdbarch
->half_format
;
1498 set_gdbarch_half_format (struct gdbarch
*gdbarch
,
1499 const struct floatformat
** half_format
)
1501 gdbarch
->half_format
= half_format
;
1505 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1507 gdb_assert (gdbarch
!= NULL
);
1508 /* Skip verify of float_bit, invalid_p == 0 */
1509 if (gdbarch_debug
>= 2)
1510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1511 return gdbarch
->float_bit
;
1515 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1518 gdbarch
->float_bit
= float_bit
;
1521 const struct floatformat
**
1522 gdbarch_float_format (struct gdbarch
*gdbarch
)
1524 gdb_assert (gdbarch
!= NULL
);
1525 if (gdbarch_debug
>= 2)
1526 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1527 return gdbarch
->float_format
;
1531 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1532 const struct floatformat
** float_format
)
1534 gdbarch
->float_format
= float_format
;
1538 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1540 gdb_assert (gdbarch
!= NULL
);
1541 /* Skip verify of double_bit, invalid_p == 0 */
1542 if (gdbarch_debug
>= 2)
1543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1544 return gdbarch
->double_bit
;
1548 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1551 gdbarch
->double_bit
= double_bit
;
1554 const struct floatformat
**
1555 gdbarch_double_format (struct gdbarch
*gdbarch
)
1557 gdb_assert (gdbarch
!= NULL
);
1558 if (gdbarch_debug
>= 2)
1559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1560 return gdbarch
->double_format
;
1564 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1565 const struct floatformat
** double_format
)
1567 gdbarch
->double_format
= double_format
;
1571 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1573 gdb_assert (gdbarch
!= NULL
);
1574 /* Skip verify of long_double_bit, invalid_p == 0 */
1575 if (gdbarch_debug
>= 2)
1576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1577 return gdbarch
->long_double_bit
;
1581 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1582 int long_double_bit
)
1584 gdbarch
->long_double_bit
= long_double_bit
;
1587 const struct floatformat
**
1588 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1590 gdb_assert (gdbarch
!= NULL
);
1591 if (gdbarch_debug
>= 2)
1592 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1593 return gdbarch
->long_double_format
;
1597 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1598 const struct floatformat
** long_double_format
)
1600 gdbarch
->long_double_format
= long_double_format
;
1604 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1606 gdb_assert (gdbarch
!= NULL
);
1607 /* Skip verify of ptr_bit, invalid_p == 0 */
1608 if (gdbarch_debug
>= 2)
1609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1610 return gdbarch
->ptr_bit
;
1614 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1617 gdbarch
->ptr_bit
= ptr_bit
;
1621 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1623 gdb_assert (gdbarch
!= NULL
);
1624 /* Check variable changed from pre-default. */
1625 gdb_assert (gdbarch
->addr_bit
!= 0);
1626 if (gdbarch_debug
>= 2)
1627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1628 return gdbarch
->addr_bit
;
1632 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1635 gdbarch
->addr_bit
= addr_bit
;
1639 gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
)
1641 gdb_assert (gdbarch
!= NULL
);
1642 /* Check variable changed from pre-default. */
1643 gdb_assert (gdbarch
->dwarf2_addr_size
!= 0);
1644 if (gdbarch_debug
>= 2)
1645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_addr_size called\n");
1646 return gdbarch
->dwarf2_addr_size
;
1650 set_gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
,
1651 int dwarf2_addr_size
)
1653 gdbarch
->dwarf2_addr_size
= dwarf2_addr_size
;
1657 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1659 gdb_assert (gdbarch
!= NULL
);
1660 /* Check variable changed from pre-default. */
1661 gdb_assert (gdbarch
->char_signed
!= -1);
1662 if (gdbarch_debug
>= 2)
1663 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1664 return gdbarch
->char_signed
;
1668 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1671 gdbarch
->char_signed
= char_signed
;
1675 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1677 gdb_assert (gdbarch
!= NULL
);
1678 return gdbarch
->read_pc
!= NULL
;
1682 gdbarch_read_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
1684 gdb_assert (gdbarch
!= NULL
);
1685 gdb_assert (gdbarch
->read_pc
!= NULL
);
1686 if (gdbarch_debug
>= 2)
1687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1688 return gdbarch
->read_pc (regcache
);
1692 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1693 gdbarch_read_pc_ftype read_pc
)
1695 gdbarch
->read_pc
= read_pc
;
1699 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1701 gdb_assert (gdbarch
!= NULL
);
1702 return gdbarch
->write_pc
!= NULL
;
1706 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1708 gdb_assert (gdbarch
!= NULL
);
1709 gdb_assert (gdbarch
->write_pc
!= NULL
);
1710 if (gdbarch_debug
>= 2)
1711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1712 gdbarch
->write_pc (regcache
, val
);
1716 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1717 gdbarch_write_pc_ftype write_pc
)
1719 gdbarch
->write_pc
= write_pc
;
1723 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1725 gdb_assert (gdbarch
!= NULL
);
1726 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1727 if (gdbarch_debug
>= 2)
1728 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1729 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
1733 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
1734 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
1736 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
1740 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
1742 gdb_assert (gdbarch
!= NULL
);
1743 return gdbarch
->pseudo_register_read
!= NULL
;
1746 enum register_status
1747 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
1749 gdb_assert (gdbarch
!= NULL
);
1750 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
1751 if (gdbarch_debug
>= 2)
1752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
1753 return gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
1757 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
1758 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
1760 gdbarch
->pseudo_register_read
= pseudo_register_read
;
1764 gdbarch_pseudo_register_read_value_p (struct gdbarch
*gdbarch
)
1766 gdb_assert (gdbarch
!= NULL
);
1767 return gdbarch
->pseudo_register_read_value
!= NULL
;
1771 gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
)
1773 gdb_assert (gdbarch
!= NULL
);
1774 gdb_assert (gdbarch
->pseudo_register_read_value
!= NULL
);
1775 if (gdbarch_debug
>= 2)
1776 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read_value called\n");
1777 return gdbarch
->pseudo_register_read_value (gdbarch
, regcache
, cookednum
);
1781 set_gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
,
1782 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value
)
1784 gdbarch
->pseudo_register_read_value
= pseudo_register_read_value
;
1788 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
1790 gdb_assert (gdbarch
!= NULL
);
1791 return gdbarch
->pseudo_register_write
!= NULL
;
1795 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
1797 gdb_assert (gdbarch
!= NULL
);
1798 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
1799 if (gdbarch_debug
>= 2)
1800 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
1801 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
1805 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
1806 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
1808 gdbarch
->pseudo_register_write
= pseudo_register_write
;
1812 gdbarch_num_regs (struct gdbarch
*gdbarch
)
1814 gdb_assert (gdbarch
!= NULL
);
1815 /* Check variable changed from pre-default. */
1816 gdb_assert (gdbarch
->num_regs
!= -1);
1817 if (gdbarch_debug
>= 2)
1818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
1819 return gdbarch
->num_regs
;
1823 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
1826 gdbarch
->num_regs
= num_regs
;
1830 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
1832 gdb_assert (gdbarch
!= NULL
);
1833 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1834 if (gdbarch_debug
>= 2)
1835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
1836 return gdbarch
->num_pseudo_regs
;
1840 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
1841 int num_pseudo_regs
)
1843 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
1847 gdbarch_ax_pseudo_register_collect_p (struct gdbarch
*gdbarch
)
1849 gdb_assert (gdbarch
!= NULL
);
1850 return gdbarch
->ax_pseudo_register_collect
!= NULL
;
1854 gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1856 gdb_assert (gdbarch
!= NULL
);
1857 gdb_assert (gdbarch
->ax_pseudo_register_collect
!= NULL
);
1858 if (gdbarch_debug
>= 2)
1859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_collect called\n");
1860 return gdbarch
->ax_pseudo_register_collect (gdbarch
, ax
, reg
);
1864 set_gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
,
1865 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect
)
1867 gdbarch
->ax_pseudo_register_collect
= ax_pseudo_register_collect
;
1871 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch
*gdbarch
)
1873 gdb_assert (gdbarch
!= NULL
);
1874 return gdbarch
->ax_pseudo_register_push_stack
!= NULL
;
1878 gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1880 gdb_assert (gdbarch
!= NULL
);
1881 gdb_assert (gdbarch
->ax_pseudo_register_push_stack
!= NULL
);
1882 if (gdbarch_debug
>= 2)
1883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_push_stack called\n");
1884 return gdbarch
->ax_pseudo_register_push_stack (gdbarch
, ax
, reg
);
1888 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
,
1889 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack
)
1891 gdbarch
->ax_pseudo_register_push_stack
= ax_pseudo_register_push_stack
;
1895 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
1897 gdb_assert (gdbarch
!= NULL
);
1898 /* Skip verify of sp_regnum, invalid_p == 0 */
1899 if (gdbarch_debug
>= 2)
1900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
1901 return gdbarch
->sp_regnum
;
1905 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
1908 gdbarch
->sp_regnum
= sp_regnum
;
1912 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
1914 gdb_assert (gdbarch
!= NULL
);
1915 /* Skip verify of pc_regnum, invalid_p == 0 */
1916 if (gdbarch_debug
>= 2)
1917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
1918 return gdbarch
->pc_regnum
;
1922 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
1925 gdbarch
->pc_regnum
= pc_regnum
;
1929 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
1931 gdb_assert (gdbarch
!= NULL
);
1932 /* Skip verify of ps_regnum, invalid_p == 0 */
1933 if (gdbarch_debug
>= 2)
1934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
1935 return gdbarch
->ps_regnum
;
1939 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
1942 gdbarch
->ps_regnum
= ps_regnum
;
1946 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
1948 gdb_assert (gdbarch
!= NULL
);
1949 /* Skip verify of fp0_regnum, invalid_p == 0 */
1950 if (gdbarch_debug
>= 2)
1951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
1952 return gdbarch
->fp0_regnum
;
1956 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
1959 gdbarch
->fp0_regnum
= fp0_regnum
;
1963 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
1965 gdb_assert (gdbarch
!= NULL
);
1966 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
1967 if (gdbarch_debug
>= 2)
1968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
1969 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
1973 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
1974 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
1976 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
1980 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
1982 gdb_assert (gdbarch
!= NULL
);
1983 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
1984 if (gdbarch_debug
>= 2)
1985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
1986 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
1990 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
1991 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
1993 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
1997 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
1999 gdb_assert (gdbarch
!= NULL
);
2000 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2001 if (gdbarch_debug
>= 2)
2002 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2003 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
2007 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2008 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2010 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2014 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2016 gdb_assert (gdbarch
!= NULL
);
2017 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2018 if (gdbarch_debug
>= 2)
2019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2020 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
2024 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2025 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2027 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2031 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2033 gdb_assert (gdbarch
!= NULL
);
2034 gdb_assert (gdbarch
->register_name
!= NULL
);
2035 if (gdbarch_debug
>= 2)
2036 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2037 return gdbarch
->register_name (gdbarch
, regnr
);
2041 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2042 gdbarch_register_name_ftype register_name
)
2044 gdbarch
->register_name
= register_name
;
2048 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2050 gdb_assert (gdbarch
!= NULL
);
2051 return gdbarch
->register_type
!= NULL
;
2055 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2057 gdb_assert (gdbarch
!= NULL
);
2058 gdb_assert (gdbarch
->register_type
!= NULL
);
2059 if (gdbarch_debug
>= 2)
2060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2061 return gdbarch
->register_type (gdbarch
, reg_nr
);
2065 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2066 gdbarch_register_type_ftype register_type
)
2068 gdbarch
->register_type
= register_type
;
2072 gdbarch_dummy_id_p (struct gdbarch
*gdbarch
)
2074 gdb_assert (gdbarch
!= NULL
);
2075 return gdbarch
->dummy_id
!= NULL
;
2079 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
2081 gdb_assert (gdbarch
!= NULL
);
2082 gdb_assert (gdbarch
->dummy_id
!= NULL
);
2083 if (gdbarch_debug
>= 2)
2084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
2085 return gdbarch
->dummy_id (gdbarch
, this_frame
);
2089 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
2090 gdbarch_dummy_id_ftype dummy_id
)
2092 gdbarch
->dummy_id
= dummy_id
;
2096 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2098 gdb_assert (gdbarch
!= NULL
);
2099 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2100 if (gdbarch_debug
>= 2)
2101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2102 return gdbarch
->deprecated_fp_regnum
;
2106 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2107 int deprecated_fp_regnum
)
2109 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2113 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2115 gdb_assert (gdbarch
!= NULL
);
2116 return gdbarch
->push_dummy_call
!= NULL
;
2120 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
)
2122 gdb_assert (gdbarch
!= NULL
);
2123 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2124 if (gdbarch_debug
>= 2)
2125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2126 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
2130 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2131 gdbarch_push_dummy_call_ftype push_dummy_call
)
2133 gdbarch
->push_dummy_call
= push_dummy_call
;
2137 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2139 gdb_assert (gdbarch
!= NULL
);
2140 /* Skip verify of call_dummy_location, invalid_p == 0 */
2141 if (gdbarch_debug
>= 2)
2142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2143 return gdbarch
->call_dummy_location
;
2147 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2148 int call_dummy_location
)
2150 gdbarch
->call_dummy_location
= call_dummy_location
;
2154 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2156 gdb_assert (gdbarch
!= NULL
);
2157 return gdbarch
->push_dummy_code
!= NULL
;
2161 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
)
2163 gdb_assert (gdbarch
!= NULL
);
2164 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2165 if (gdbarch_debug
>= 2)
2166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2167 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
2171 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2172 gdbarch_push_dummy_code_ftype push_dummy_code
)
2174 gdbarch
->push_dummy_code
= push_dummy_code
;
2178 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2180 gdb_assert (gdbarch
!= NULL
);
2181 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2182 if (gdbarch_debug
>= 2)
2183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2184 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2188 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2189 gdbarch_print_registers_info_ftype print_registers_info
)
2191 gdbarch
->print_registers_info
= print_registers_info
;
2195 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
2197 gdb_assert (gdbarch
!= NULL
);
2198 return gdbarch
->print_float_info
!= NULL
;
2202 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2204 gdb_assert (gdbarch
!= NULL
);
2205 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2206 if (gdbarch_debug
>= 2)
2207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2208 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2212 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2213 gdbarch_print_float_info_ftype print_float_info
)
2215 gdbarch
->print_float_info
= print_float_info
;
2219 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2221 gdb_assert (gdbarch
!= NULL
);
2222 return gdbarch
->print_vector_info
!= NULL
;
2226 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2228 gdb_assert (gdbarch
!= NULL
);
2229 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2230 if (gdbarch_debug
>= 2)
2231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2232 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2236 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2237 gdbarch_print_vector_info_ftype print_vector_info
)
2239 gdbarch
->print_vector_info
= print_vector_info
;
2243 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2245 gdb_assert (gdbarch
!= NULL
);
2246 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2247 if (gdbarch_debug
>= 2)
2248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2249 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2253 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2254 gdbarch_register_sim_regno_ftype register_sim_regno
)
2256 gdbarch
->register_sim_regno
= register_sim_regno
;
2260 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2262 gdb_assert (gdbarch
!= NULL
);
2263 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2264 if (gdbarch_debug
>= 2)
2265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2266 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2270 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2271 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2273 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2277 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2279 gdb_assert (gdbarch
!= NULL
);
2280 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2281 if (gdbarch_debug
>= 2)
2282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2283 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2287 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2288 gdbarch_cannot_store_register_ftype cannot_store_register
)
2290 gdbarch
->cannot_store_register
= cannot_store_register
;
2294 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2296 gdb_assert (gdbarch
!= NULL
);
2297 return gdbarch
->get_longjmp_target
!= NULL
;
2301 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2303 gdb_assert (gdbarch
!= NULL
);
2304 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2305 if (gdbarch_debug
>= 2)
2306 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2307 return gdbarch
->get_longjmp_target (frame
, pc
);
2311 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2312 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2314 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2318 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2320 gdb_assert (gdbarch
!= NULL
);
2321 if (gdbarch_debug
>= 2)
2322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2323 return gdbarch
->believe_pcc_promotion
;
2327 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2328 int believe_pcc_promotion
)
2330 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2334 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2336 gdb_assert (gdbarch
!= NULL
);
2337 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2338 if (gdbarch_debug
>= 2)
2339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2340 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2344 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2345 gdbarch_convert_register_p_ftype convert_register_p
)
2347 gdbarch
->convert_register_p
= convert_register_p
;
2351 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
, int *optimizedp
, int *unavailablep
)
2353 gdb_assert (gdbarch
!= NULL
);
2354 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2355 if (gdbarch_debug
>= 2)
2356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2357 return gdbarch
->register_to_value (frame
, regnum
, type
, buf
, optimizedp
, unavailablep
);
2361 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2362 gdbarch_register_to_value_ftype register_to_value
)
2364 gdbarch
->register_to_value
= register_to_value
;
2368 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2370 gdb_assert (gdbarch
!= NULL
);
2371 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2372 if (gdbarch_debug
>= 2)
2373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2374 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2378 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2379 gdbarch_value_to_register_ftype value_to_register
)
2381 gdbarch
->value_to_register
= value_to_register
;
2385 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_id frame_id
)
2387 gdb_assert (gdbarch
!= NULL
);
2388 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2389 if (gdbarch_debug
>= 2)
2390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2391 return gdbarch
->value_from_register (gdbarch
, type
, regnum
, frame_id
);
2395 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2396 gdbarch_value_from_register_ftype value_from_register
)
2398 gdbarch
->value_from_register
= value_from_register
;
2402 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2404 gdb_assert (gdbarch
!= NULL
);
2405 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2406 if (gdbarch_debug
>= 2)
2407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2408 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2412 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2413 gdbarch_pointer_to_address_ftype pointer_to_address
)
2415 gdbarch
->pointer_to_address
= pointer_to_address
;
2419 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2421 gdb_assert (gdbarch
!= NULL
);
2422 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2423 if (gdbarch_debug
>= 2)
2424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2425 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2429 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2430 gdbarch_address_to_pointer_ftype address_to_pointer
)
2432 gdbarch
->address_to_pointer
= address_to_pointer
;
2436 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2438 gdb_assert (gdbarch
!= NULL
);
2439 return gdbarch
->integer_to_address
!= NULL
;
2443 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2445 gdb_assert (gdbarch
!= NULL
);
2446 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2447 if (gdbarch_debug
>= 2)
2448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2449 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2453 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2454 gdbarch_integer_to_address_ftype integer_to_address
)
2456 gdbarch
->integer_to_address
= integer_to_address
;
2460 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2462 gdb_assert (gdbarch
!= NULL
);
2463 return gdbarch
->return_value
!= NULL
;
2466 enum return_value_convention
2467 gdbarch_return_value (struct gdbarch
*gdbarch
, struct value
*function
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2469 gdb_assert (gdbarch
!= NULL
);
2470 gdb_assert (gdbarch
->return_value
!= NULL
);
2471 if (gdbarch_debug
>= 2)
2472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2473 return gdbarch
->return_value (gdbarch
, function
, valtype
, regcache
, readbuf
, writebuf
);
2477 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2478 gdbarch_return_value_ftype return_value
)
2480 gdbarch
->return_value
= return_value
;
2484 gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
, struct type
*type
)
2486 gdb_assert (gdbarch
!= NULL
);
2487 gdb_assert (gdbarch
->return_in_first_hidden_param_p
!= NULL
);
2488 if (gdbarch_debug
>= 2)
2489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_in_first_hidden_param_p called\n");
2490 return gdbarch
->return_in_first_hidden_param_p (gdbarch
, type
);
2494 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
,
2495 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p
)
2497 gdbarch
->return_in_first_hidden_param_p
= return_in_first_hidden_param_p
;
2501 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2503 gdb_assert (gdbarch
!= NULL
);
2504 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2505 if (gdbarch_debug
>= 2)
2506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2507 return gdbarch
->skip_prologue (gdbarch
, ip
);
2511 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2512 gdbarch_skip_prologue_ftype skip_prologue
)
2514 gdbarch
->skip_prologue
= skip_prologue
;
2518 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2520 gdb_assert (gdbarch
!= NULL
);
2521 return gdbarch
->skip_main_prologue
!= NULL
;
2525 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2527 gdb_assert (gdbarch
!= NULL
);
2528 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2529 if (gdbarch_debug
>= 2)
2530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2531 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2535 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2536 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2538 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2542 gdbarch_skip_entrypoint_p (struct gdbarch
*gdbarch
)
2544 gdb_assert (gdbarch
!= NULL
);
2545 return gdbarch
->skip_entrypoint
!= NULL
;
2549 gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2551 gdb_assert (gdbarch
!= NULL
);
2552 gdb_assert (gdbarch
->skip_entrypoint
!= NULL
);
2553 if (gdbarch_debug
>= 2)
2554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_entrypoint called\n");
2555 return gdbarch
->skip_entrypoint (gdbarch
, ip
);
2559 set_gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
,
2560 gdbarch_skip_entrypoint_ftype skip_entrypoint
)
2562 gdbarch
->skip_entrypoint
= skip_entrypoint
;
2566 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2568 gdb_assert (gdbarch
!= NULL
);
2569 gdb_assert (gdbarch
->inner_than
!= NULL
);
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2572 return gdbarch
->inner_than (lhs
, rhs
);
2576 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2577 gdbarch_inner_than_ftype inner_than
)
2579 gdbarch
->inner_than
= inner_than
;
2583 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2585 gdb_assert (gdbarch
!= NULL
);
2586 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2587 if (gdbarch_debug
>= 2)
2588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2589 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2593 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2594 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2596 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2600 gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *kindptr
)
2602 gdb_assert (gdbarch
!= NULL
);
2603 gdb_assert (gdbarch
->remote_breakpoint_from_pc
!= NULL
);
2604 if (gdbarch_debug
>= 2)
2605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_breakpoint_from_pc called\n");
2606 gdbarch
->remote_breakpoint_from_pc (gdbarch
, pcptr
, kindptr
);
2610 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2611 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc
)
2613 gdbarch
->remote_breakpoint_from_pc
= remote_breakpoint_from_pc
;
2617 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2619 gdb_assert (gdbarch
!= NULL
);
2620 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2624 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2626 gdb_assert (gdbarch
!= NULL
);
2627 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2628 if (gdbarch_debug
>= 2)
2629 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2630 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2634 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2635 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2637 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2641 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2643 gdb_assert (gdbarch
!= NULL
);
2644 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2645 if (gdbarch_debug
>= 2)
2646 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2647 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2651 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2652 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2654 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2658 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2660 gdb_assert (gdbarch
!= NULL
);
2661 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2662 if (gdbarch_debug
>= 2)
2663 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2664 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2668 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2669 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
2671 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
2675 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
2677 gdb_assert (gdbarch
!= NULL
);
2678 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2679 if (gdbarch_debug
>= 2)
2680 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
2681 return gdbarch
->decr_pc_after_break
;
2685 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
2686 CORE_ADDR decr_pc_after_break
)
2688 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
2692 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
2694 gdb_assert (gdbarch
!= NULL
);
2695 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2696 if (gdbarch_debug
>= 2)
2697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
2698 return gdbarch
->deprecated_function_start_offset
;
2702 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
2703 CORE_ADDR deprecated_function_start_offset
)
2705 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
2709 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
2711 gdb_assert (gdbarch
!= NULL
);
2712 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
2713 if (gdbarch_debug
>= 2)
2714 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
2715 return gdbarch
->remote_register_number (gdbarch
, regno
);
2719 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
2720 gdbarch_remote_register_number_ftype remote_register_number
)
2722 gdbarch
->remote_register_number
= remote_register_number
;
2726 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
2728 gdb_assert (gdbarch
!= NULL
);
2729 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
2733 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
2735 gdb_assert (gdbarch
!= NULL
);
2736 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
2739 return gdbarch
->fetch_tls_load_module_address (objfile
);
2743 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
2744 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
2746 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
2750 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
2752 gdb_assert (gdbarch
!= NULL
);
2753 /* Skip verify of frame_args_skip, invalid_p == 0 */
2754 if (gdbarch_debug
>= 2)
2755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
2756 return gdbarch
->frame_args_skip
;
2760 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
2761 CORE_ADDR frame_args_skip
)
2763 gdbarch
->frame_args_skip
= frame_args_skip
;
2767 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
2769 gdb_assert (gdbarch
!= NULL
);
2770 return gdbarch
->unwind_pc
!= NULL
;
2774 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2776 gdb_assert (gdbarch
!= NULL
);
2777 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
2778 if (gdbarch_debug
>= 2)
2779 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
2780 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
2784 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
2785 gdbarch_unwind_pc_ftype unwind_pc
)
2787 gdbarch
->unwind_pc
= unwind_pc
;
2791 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
2793 gdb_assert (gdbarch
!= NULL
);
2794 return gdbarch
->unwind_sp
!= NULL
;
2798 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2800 gdb_assert (gdbarch
!= NULL
);
2801 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
2802 if (gdbarch_debug
>= 2)
2803 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
2804 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
2808 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
2809 gdbarch_unwind_sp_ftype unwind_sp
)
2811 gdbarch
->unwind_sp
= unwind_sp
;
2815 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
2817 gdb_assert (gdbarch
!= NULL
);
2818 return gdbarch
->frame_num_args
!= NULL
;
2822 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2824 gdb_assert (gdbarch
!= NULL
);
2825 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
2826 if (gdbarch_debug
>= 2)
2827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
2828 return gdbarch
->frame_num_args (frame
);
2832 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
2833 gdbarch_frame_num_args_ftype frame_num_args
)
2835 gdbarch
->frame_num_args
= frame_num_args
;
2839 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
2841 gdb_assert (gdbarch
!= NULL
);
2842 return gdbarch
->frame_align
!= NULL
;
2846 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
2848 gdb_assert (gdbarch
!= NULL
);
2849 gdb_assert (gdbarch
->frame_align
!= NULL
);
2850 if (gdbarch_debug
>= 2)
2851 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
2852 return gdbarch
->frame_align (gdbarch
, address
);
2856 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
2857 gdbarch_frame_align_ftype frame_align
)
2859 gdbarch
->frame_align
= frame_align
;
2863 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
2865 gdb_assert (gdbarch
!= NULL
);
2866 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
2867 if (gdbarch_debug
>= 2)
2868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
2869 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
2873 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
2874 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
2876 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
2880 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
2882 gdb_assert (gdbarch
!= NULL
);
2883 if (gdbarch_debug
>= 2)
2884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
2885 return gdbarch
->frame_red_zone_size
;
2889 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
2890 int frame_red_zone_size
)
2892 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
2896 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
2898 gdb_assert (gdbarch
!= NULL
);
2899 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
2900 if (gdbarch_debug
>= 2)
2901 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
2902 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
2906 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
2907 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
2909 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
2913 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2915 gdb_assert (gdbarch
!= NULL
);
2916 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
2917 if (gdbarch_debug
>= 2)
2918 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
2919 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
2923 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
2924 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
2926 gdbarch
->addr_bits_remove
= addr_bits_remove
;
2930 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
2932 gdb_assert (gdbarch
!= NULL
);
2933 return gdbarch
->software_single_step
!= NULL
;
2937 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2939 gdb_assert (gdbarch
!= NULL
);
2940 gdb_assert (gdbarch
->software_single_step
!= NULL
);
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
2943 return gdbarch
->software_single_step (frame
);
2947 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
2948 gdbarch_software_single_step_ftype software_single_step
)
2950 gdbarch
->software_single_step
= software_single_step
;
2954 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
2956 gdb_assert (gdbarch
!= NULL
);
2957 return gdbarch
->single_step_through_delay
!= NULL
;
2961 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2963 gdb_assert (gdbarch
!= NULL
);
2964 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
2965 if (gdbarch_debug
>= 2)
2966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
2967 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
2971 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
2972 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
2974 gdbarch
->single_step_through_delay
= single_step_through_delay
;
2978 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
2980 gdb_assert (gdbarch
!= NULL
);
2981 gdb_assert (gdbarch
->print_insn
!= NULL
);
2982 if (gdbarch_debug
>= 2)
2983 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
2984 return gdbarch
->print_insn (vma
, info
);
2988 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
2989 gdbarch_print_insn_ftype print_insn
)
2991 gdbarch
->print_insn
= print_insn
;
2995 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
2997 gdb_assert (gdbarch
!= NULL
);
2998 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
2999 if (gdbarch_debug
>= 2)
3000 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
3001 return gdbarch
->skip_trampoline_code (frame
, pc
);
3005 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
3006 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
3008 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3012 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3014 gdb_assert (gdbarch
!= NULL
);
3015 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3018 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3022 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3023 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3025 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3029 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, const char *name
)
3031 gdb_assert (gdbarch
!= NULL
);
3032 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3033 if (gdbarch_debug
>= 2)
3034 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3035 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
3039 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3040 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3042 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3046 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3048 gdb_assert (gdbarch
!= NULL
);
3049 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
3050 if (gdbarch_debug
>= 2)
3051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
3052 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
3056 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
3057 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
3059 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
3063 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3065 gdb_assert (gdbarch
!= NULL
);
3066 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3069 gdbarch
->elf_make_msymbol_special (sym
, msym
);
3073 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
3074 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
3076 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
3080 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
3082 gdb_assert (gdbarch
!= NULL
);
3083 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
3084 if (gdbarch_debug
>= 2)
3085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
3086 gdbarch
->coff_make_msymbol_special (val
, msym
);
3090 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
3091 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
3093 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
3097 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
3099 gdb_assert (gdbarch
!= NULL
);
3100 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3101 if (gdbarch_debug
>= 2)
3102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
3103 return gdbarch
->cannot_step_breakpoint
;
3107 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
3108 int cannot_step_breakpoint
)
3110 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
3114 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
3116 gdb_assert (gdbarch
!= NULL
);
3117 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3118 if (gdbarch_debug
>= 2)
3119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
3120 return gdbarch
->have_nonsteppable_watchpoint
;
3124 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
3125 int have_nonsteppable_watchpoint
)
3127 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
3131 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
3133 gdb_assert (gdbarch
!= NULL
);
3134 return gdbarch
->address_class_type_flags
!= NULL
;
3138 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
3140 gdb_assert (gdbarch
!= NULL
);
3141 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
3142 if (gdbarch_debug
>= 2)
3143 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
3144 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
3148 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
3149 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
3151 gdbarch
->address_class_type_flags
= address_class_type_flags
;
3155 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
3157 gdb_assert (gdbarch
!= NULL
);
3158 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
3162 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
3164 gdb_assert (gdbarch
!= NULL
);
3165 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
3166 if (gdbarch_debug
>= 2)
3167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
3168 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
3172 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
3173 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
3175 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
3179 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
3181 gdb_assert (gdbarch
!= NULL
);
3182 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
3186 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
3188 gdb_assert (gdbarch
!= NULL
);
3189 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
3192 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
3196 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
3197 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
3199 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
3203 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
3205 gdb_assert (gdbarch
!= NULL
);
3206 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
3209 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
3213 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
3214 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
3216 gdbarch
->register_reggroup_p
= register_reggroup_p
;
3220 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
3222 gdb_assert (gdbarch
!= NULL
);
3223 return gdbarch
->fetch_pointer_argument
!= NULL
;
3227 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
3229 gdb_assert (gdbarch
!= NULL
);
3230 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
3231 if (gdbarch_debug
>= 2)
3232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
3233 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
3237 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
3238 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
3240 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
3244 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
3246 gdb_assert (gdbarch
!= NULL
);
3247 return gdbarch
->regset_from_core_section
!= NULL
;
3250 const struct regset
*
3251 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
3253 gdb_assert (gdbarch
!= NULL
);
3254 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
3255 if (gdbarch_debug
>= 2)
3256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
3257 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
3261 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
3262 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
3264 gdbarch
->regset_from_core_section
= regset_from_core_section
;
3268 gdbarch_iterate_over_regset_sections_p (struct gdbarch
*gdbarch
)
3270 gdb_assert (gdbarch
!= NULL
);
3271 return gdbarch
->iterate_over_regset_sections
!= NULL
;
3275 gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
, iterate_over_regset_sections_cb
*cb
, void *cb_data
, const struct regcache
*regcache
)
3277 gdb_assert (gdbarch
!= NULL
);
3278 gdb_assert (gdbarch
->iterate_over_regset_sections
!= NULL
);
3279 if (gdbarch_debug
>= 2)
3280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_regset_sections called\n");
3281 gdbarch
->iterate_over_regset_sections (gdbarch
, cb
, cb_data
, regcache
);
3285 set_gdbarch_iterate_over_regset_sections (struct gdbarch
*gdbarch
,
3286 gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections
)
3288 gdbarch
->iterate_over_regset_sections
= iterate_over_regset_sections
;
3292 gdbarch_make_corefile_notes_p (struct gdbarch
*gdbarch
)
3294 gdb_assert (gdbarch
!= NULL
);
3295 return gdbarch
->make_corefile_notes
!= NULL
;
3299 gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
, bfd
*obfd
, int *note_size
)
3301 gdb_assert (gdbarch
!= NULL
);
3302 gdb_assert (gdbarch
->make_corefile_notes
!= NULL
);
3303 if (gdbarch_debug
>= 2)
3304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_corefile_notes called\n");
3305 return gdbarch
->make_corefile_notes (gdbarch
, obfd
, note_size
);
3309 set_gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
,
3310 gdbarch_make_corefile_notes_ftype make_corefile_notes
)
3312 gdbarch
->make_corefile_notes
= make_corefile_notes
;
3316 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch
*gdbarch
)
3318 gdb_assert (gdbarch
!= NULL
);
3319 return gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
;
3323 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
, bfd
*obfd
, char *note_data
, int *note_size
, const struct elf_internal_linux_prpsinfo
*info
)
3325 gdb_assert (gdbarch
!= NULL
);
3326 gdb_assert (gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
);
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3329 return gdbarch
->elfcore_write_linux_prpsinfo (obfd
, note_data
, note_size
, info
);
3333 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
,
3334 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo
)
3336 gdbarch
->elfcore_write_linux_prpsinfo
= elfcore_write_linux_prpsinfo
;
3340 gdbarch_find_memory_regions_p (struct gdbarch
*gdbarch
)
3342 gdb_assert (gdbarch
!= NULL
);
3343 return gdbarch
->find_memory_regions
!= NULL
;
3347 gdbarch_find_memory_regions (struct gdbarch
*gdbarch
, find_memory_region_ftype func
, void *data
)
3349 gdb_assert (gdbarch
!= NULL
);
3350 gdb_assert (gdbarch
->find_memory_regions
!= NULL
);
3351 if (gdbarch_debug
>= 2)
3352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_memory_regions called\n");
3353 return gdbarch
->find_memory_regions (gdbarch
, func
, data
);
3357 set_gdbarch_find_memory_regions (struct gdbarch
*gdbarch
,
3358 gdbarch_find_memory_regions_ftype find_memory_regions
)
3360 gdbarch
->find_memory_regions
= find_memory_regions
;
3364 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3366 gdb_assert (gdbarch
!= NULL
);
3367 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3371 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3373 gdb_assert (gdbarch
!= NULL
);
3374 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3375 if (gdbarch_debug
>= 2)
3376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3377 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3381 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3382 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3384 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3388 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch
*gdbarch
)
3390 gdb_assert (gdbarch
!= NULL
);
3391 return gdbarch
->core_xfer_shared_libraries_aix
!= NULL
;
3395 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3397 gdb_assert (gdbarch
!= NULL
);
3398 gdb_assert (gdbarch
->core_xfer_shared_libraries_aix
!= NULL
);
3399 if (gdbarch_debug
>= 2)
3400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries_aix called\n");
3401 return gdbarch
->core_xfer_shared_libraries_aix (gdbarch
, readbuf
, offset
, len
);
3405 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
,
3406 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix
)
3408 gdbarch
->core_xfer_shared_libraries_aix
= core_xfer_shared_libraries_aix
;
3412 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3414 gdb_assert (gdbarch
!= NULL
);
3415 return gdbarch
->core_pid_to_str
!= NULL
;
3419 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3421 gdb_assert (gdbarch
!= NULL
);
3422 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3425 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3429 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3430 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3432 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3436 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3438 gdb_assert (gdbarch
!= NULL
);
3439 return gdbarch
->gcore_bfd_target
!= 0;
3443 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3445 gdb_assert (gdbarch
!= NULL
);
3446 /* Check variable changed from pre-default. */
3447 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3448 if (gdbarch_debug
>= 2)
3449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3450 return gdbarch
->gcore_bfd_target
;
3454 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3455 const char * gcore_bfd_target
)
3457 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3461 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3463 gdb_assert (gdbarch
!= NULL
);
3464 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3465 if (gdbarch_debug
>= 2)
3466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3467 return gdbarch
->vtable_function_descriptors
;
3471 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3472 int vtable_function_descriptors
)
3474 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3478 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3480 gdb_assert (gdbarch
!= NULL
);
3481 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3482 if (gdbarch_debug
>= 2)
3483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3484 return gdbarch
->vbit_in_delta
;
3488 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3491 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3495 gdbarch_skip_permanent_breakpoint_p (struct gdbarch
*gdbarch
)
3497 gdb_assert (gdbarch
!= NULL
);
3498 return gdbarch
->skip_permanent_breakpoint
!= NULL
;
3502 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3504 gdb_assert (gdbarch
!= NULL
);
3505 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3506 if (gdbarch_debug
>= 2)
3507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3508 gdbarch
->skip_permanent_breakpoint (regcache
);
3512 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3513 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3515 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3519 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3521 gdb_assert (gdbarch
!= NULL
);
3522 return gdbarch
->max_insn_length
!= 0;
3526 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3528 gdb_assert (gdbarch
!= NULL
);
3529 /* Check variable changed from pre-default. */
3530 gdb_assert (gdbarch
->max_insn_length
!= 0);
3531 if (gdbarch_debug
>= 2)
3532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3533 return gdbarch
->max_insn_length
;
3537 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3538 ULONGEST max_insn_length
)
3540 gdbarch
->max_insn_length
= max_insn_length
;
3544 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3546 gdb_assert (gdbarch
!= NULL
);
3547 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3550 struct displaced_step_closure
*
3551 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3553 gdb_assert (gdbarch
!= NULL
);
3554 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3555 if (gdbarch_debug
>= 2)
3556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3557 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
3561 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
3562 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
3564 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
3568 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3570 gdb_assert (gdbarch
!= NULL
);
3571 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
3572 if (gdbarch_debug
>= 2)
3573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
3574 return gdbarch
->displaced_step_hw_singlestep (gdbarch
, closure
);
3578 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
3579 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
3581 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
3585 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
3587 gdb_assert (gdbarch
!= NULL
);
3588 return gdbarch
->displaced_step_fixup
!= NULL
;
3592 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3594 gdb_assert (gdbarch
!= NULL
);
3595 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
3596 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3597 if (gdbarch_debug
>= 2)
3598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
3599 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
3603 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
3604 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
3606 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
3610 gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3612 gdb_assert (gdbarch
!= NULL
);
3613 gdb_assert (gdbarch
->displaced_step_free_closure
!= NULL
);
3614 if (gdbarch_debug
>= 2)
3615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_free_closure called\n");
3616 gdbarch
->displaced_step_free_closure (gdbarch
, closure
);
3620 set_gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
,
3621 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure
)
3623 gdbarch
->displaced_step_free_closure
= displaced_step_free_closure
;
3627 gdbarch_displaced_step_location (struct gdbarch
*gdbarch
)
3629 gdb_assert (gdbarch
!= NULL
);
3630 gdb_assert (gdbarch
->displaced_step_location
!= NULL
);
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_location called\n");
3633 return gdbarch
->displaced_step_location (gdbarch
);
3637 set_gdbarch_displaced_step_location (struct gdbarch
*gdbarch
,
3638 gdbarch_displaced_step_location_ftype displaced_step_location
)
3640 gdbarch
->displaced_step_location
= displaced_step_location
;
3644 gdbarch_relocate_instruction_p (struct gdbarch
*gdbarch
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 return gdbarch
->relocate_instruction
!= NULL
;
3651 gdbarch_relocate_instruction (struct gdbarch
*gdbarch
, CORE_ADDR
*to
, CORE_ADDR from
)
3653 gdb_assert (gdbarch
!= NULL
);
3654 gdb_assert (gdbarch
->relocate_instruction
!= NULL
);
3655 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3656 if (gdbarch_debug
>= 2)
3657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_relocate_instruction called\n");
3658 gdbarch
->relocate_instruction (gdbarch
, to
, from
);
3662 set_gdbarch_relocate_instruction (struct gdbarch
*gdbarch
,
3663 gdbarch_relocate_instruction_ftype relocate_instruction
)
3665 gdbarch
->relocate_instruction
= relocate_instruction
;
3669 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
3671 gdb_assert (gdbarch
!= NULL
);
3672 return gdbarch
->overlay_update
!= NULL
;
3676 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
3678 gdb_assert (gdbarch
!= NULL
);
3679 gdb_assert (gdbarch
->overlay_update
!= NULL
);
3680 if (gdbarch_debug
>= 2)
3681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
3682 gdbarch
->overlay_update (osect
);
3686 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
3687 gdbarch_overlay_update_ftype overlay_update
)
3689 gdbarch
->overlay_update
= overlay_update
;
3693 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
3695 gdb_assert (gdbarch
!= NULL
);
3696 return gdbarch
->core_read_description
!= NULL
;
3699 const struct target_desc
*
3700 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
3702 gdb_assert (gdbarch
!= NULL
);
3703 gdb_assert (gdbarch
->core_read_description
!= NULL
);
3704 if (gdbarch_debug
>= 2)
3705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
3706 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
3710 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
3711 gdbarch_core_read_description_ftype core_read_description
)
3713 gdbarch
->core_read_description
= core_read_description
;
3717 gdbarch_static_transform_name_p (struct gdbarch
*gdbarch
)
3719 gdb_assert (gdbarch
!= NULL
);
3720 return gdbarch
->static_transform_name
!= NULL
;
3724 gdbarch_static_transform_name (struct gdbarch
*gdbarch
, const char *name
)
3726 gdb_assert (gdbarch
!= NULL
);
3727 gdb_assert (gdbarch
->static_transform_name
!= NULL
);
3728 if (gdbarch_debug
>= 2)
3729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_static_transform_name called\n");
3730 return gdbarch
->static_transform_name (name
);
3734 set_gdbarch_static_transform_name (struct gdbarch
*gdbarch
,
3735 gdbarch_static_transform_name_ftype static_transform_name
)
3737 gdbarch
->static_transform_name
= static_transform_name
;
3741 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
3743 gdb_assert (gdbarch
!= NULL
);
3744 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3745 if (gdbarch_debug
>= 2)
3746 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
3747 return gdbarch
->sofun_address_maybe_missing
;
3751 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
3752 int sofun_address_maybe_missing
)
3754 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
3758 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
3760 gdb_assert (gdbarch
!= NULL
);
3761 return gdbarch
->process_record
!= NULL
;
3765 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
3767 gdb_assert (gdbarch
!= NULL
);
3768 gdb_assert (gdbarch
->process_record
!= NULL
);
3769 if (gdbarch_debug
>= 2)
3770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
3771 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
3775 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
3776 gdbarch_process_record_ftype process_record
)
3778 gdbarch
->process_record
= process_record
;
3782 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
3784 gdb_assert (gdbarch
!= NULL
);
3785 return gdbarch
->process_record_signal
!= NULL
;
3789 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum gdb_signal signal
)
3791 gdb_assert (gdbarch
!= NULL
);
3792 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
3793 if (gdbarch_debug
>= 2)
3794 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
3795 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
3799 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
3800 gdbarch_process_record_signal_ftype process_record_signal
)
3802 gdbarch
->process_record_signal
= process_record_signal
;
3806 gdbarch_gdb_signal_from_target_p (struct gdbarch
*gdbarch
)
3808 gdb_assert (gdbarch
!= NULL
);
3809 return gdbarch
->gdb_signal_from_target
!= NULL
;
3813 gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
, int signo
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 gdb_assert (gdbarch
->gdb_signal_from_target
!= NULL
);
3817 if (gdbarch_debug
>= 2)
3818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_from_target called\n");
3819 return gdbarch
->gdb_signal_from_target (gdbarch
, signo
);
3823 set_gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
,
3824 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target
)
3826 gdbarch
->gdb_signal_from_target
= gdb_signal_from_target
;
3830 gdbarch_gdb_signal_to_target_p (struct gdbarch
*gdbarch
)
3832 gdb_assert (gdbarch
!= NULL
);
3833 return gdbarch
->gdb_signal_to_target
!= NULL
;
3837 gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
, enum gdb_signal signal
)
3839 gdb_assert (gdbarch
!= NULL
);
3840 gdb_assert (gdbarch
->gdb_signal_to_target
!= NULL
);
3841 if (gdbarch_debug
>= 2)
3842 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_to_target called\n");
3843 return gdbarch
->gdb_signal_to_target (gdbarch
, signal
);
3847 set_gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
,
3848 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target
)
3850 gdbarch
->gdb_signal_to_target
= gdb_signal_to_target
;
3854 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
3856 gdb_assert (gdbarch
!= NULL
);
3857 return gdbarch
->get_siginfo_type
!= NULL
;
3861 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
3863 gdb_assert (gdbarch
!= NULL
);
3864 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
3865 if (gdbarch_debug
>= 2)
3866 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
3867 return gdbarch
->get_siginfo_type (gdbarch
);
3871 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
3872 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
3874 gdbarch
->get_siginfo_type
= get_siginfo_type
;
3878 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
3880 gdb_assert (gdbarch
!= NULL
);
3881 return gdbarch
->record_special_symbol
!= NULL
;
3885 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
3887 gdb_assert (gdbarch
!= NULL
);
3888 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
3889 if (gdbarch_debug
>= 2)
3890 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
3891 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
3895 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
3896 gdbarch_record_special_symbol_ftype record_special_symbol
)
3898 gdbarch
->record_special_symbol
= record_special_symbol
;
3902 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
3904 gdb_assert (gdbarch
!= NULL
);
3905 return gdbarch
->get_syscall_number
!= NULL
;
3909 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, ptid_t ptid
)
3911 gdb_assert (gdbarch
!= NULL
);
3912 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
3913 if (gdbarch_debug
>= 2)
3914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
3915 return gdbarch
->get_syscall_number (gdbarch
, ptid
);
3919 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
3920 gdbarch_get_syscall_number_ftype get_syscall_number
)
3922 gdbarch
->get_syscall_number
= get_syscall_number
;
3926 gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
)
3928 gdb_assert (gdbarch
!= NULL
);
3929 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_prefixes called\n");
3932 return gdbarch
->stap_integer_prefixes
;
3936 set_gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
,
3937 const char *const * stap_integer_prefixes
)
3939 gdbarch
->stap_integer_prefixes
= stap_integer_prefixes
;
3943 gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
)
3945 gdb_assert (gdbarch
!= NULL
);
3946 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
3947 if (gdbarch_debug
>= 2)
3948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_suffixes called\n");
3949 return gdbarch
->stap_integer_suffixes
;
3953 set_gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
,
3954 const char *const * stap_integer_suffixes
)
3956 gdbarch
->stap_integer_suffixes
= stap_integer_suffixes
;
3960 gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
)
3962 gdb_assert (gdbarch
!= NULL
);
3963 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
3964 if (gdbarch_debug
>= 2)
3965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_prefixes called\n");
3966 return gdbarch
->stap_register_prefixes
;
3970 set_gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
,
3971 const char *const * stap_register_prefixes
)
3973 gdbarch
->stap_register_prefixes
= stap_register_prefixes
;
3977 gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
)
3979 gdb_assert (gdbarch
!= NULL
);
3980 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
3981 if (gdbarch_debug
>= 2)
3982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_suffixes called\n");
3983 return gdbarch
->stap_register_suffixes
;
3987 set_gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
,
3988 const char *const * stap_register_suffixes
)
3990 gdbarch
->stap_register_suffixes
= stap_register_suffixes
;
3994 gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
)
3996 gdb_assert (gdbarch
!= NULL
);
3997 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
3998 if (gdbarch_debug
>= 2)
3999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_prefixes called\n");
4000 return gdbarch
->stap_register_indirection_prefixes
;
4004 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
,
4005 const char *const * stap_register_indirection_prefixes
)
4007 gdbarch
->stap_register_indirection_prefixes
= stap_register_indirection_prefixes
;
4011 gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
)
4013 gdb_assert (gdbarch
!= NULL
);
4014 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
4015 if (gdbarch_debug
>= 2)
4016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_suffixes called\n");
4017 return gdbarch
->stap_register_indirection_suffixes
;
4021 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
,
4022 const char *const * stap_register_indirection_suffixes
)
4024 gdbarch
->stap_register_indirection_suffixes
= stap_register_indirection_suffixes
;
4028 gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
)
4030 gdb_assert (gdbarch
!= NULL
);
4031 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4032 if (gdbarch_debug
>= 2)
4033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_prefix called\n");
4034 return gdbarch
->stap_gdb_register_prefix
;
4038 set_gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
,
4039 const char * stap_gdb_register_prefix
)
4041 gdbarch
->stap_gdb_register_prefix
= stap_gdb_register_prefix
;
4045 gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
)
4047 gdb_assert (gdbarch
!= NULL
);
4048 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4049 if (gdbarch_debug
>= 2)
4050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_suffix called\n");
4051 return gdbarch
->stap_gdb_register_suffix
;
4055 set_gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
,
4056 const char * stap_gdb_register_suffix
)
4058 gdbarch
->stap_gdb_register_suffix
= stap_gdb_register_suffix
;
4062 gdbarch_stap_is_single_operand_p (struct gdbarch
*gdbarch
)
4064 gdb_assert (gdbarch
!= NULL
);
4065 return gdbarch
->stap_is_single_operand
!= NULL
;
4069 gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
, const char *s
)
4071 gdb_assert (gdbarch
!= NULL
);
4072 gdb_assert (gdbarch
->stap_is_single_operand
!= NULL
);
4073 if (gdbarch_debug
>= 2)
4074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_is_single_operand called\n");
4075 return gdbarch
->stap_is_single_operand (gdbarch
, s
);
4079 set_gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
,
4080 gdbarch_stap_is_single_operand_ftype stap_is_single_operand
)
4082 gdbarch
->stap_is_single_operand
= stap_is_single_operand
;
4086 gdbarch_stap_parse_special_token_p (struct gdbarch
*gdbarch
)
4088 gdb_assert (gdbarch
!= NULL
);
4089 return gdbarch
->stap_parse_special_token
!= NULL
;
4093 gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
)
4095 gdb_assert (gdbarch
!= NULL
);
4096 gdb_assert (gdbarch
->stap_parse_special_token
!= NULL
);
4097 if (gdbarch_debug
>= 2)
4098 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_parse_special_token called\n");
4099 return gdbarch
->stap_parse_special_token (gdbarch
, p
);
4103 set_gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
,
4104 gdbarch_stap_parse_special_token_ftype stap_parse_special_token
)
4106 gdbarch
->stap_parse_special_token
= stap_parse_special_token
;
4110 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
4112 gdb_assert (gdbarch
!= NULL
);
4113 /* Skip verify of has_global_solist, invalid_p == 0 */
4114 if (gdbarch_debug
>= 2)
4115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
4116 return gdbarch
->has_global_solist
;
4120 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
4121 int has_global_solist
)
4123 gdbarch
->has_global_solist
= has_global_solist
;
4127 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
4129 gdb_assert (gdbarch
!= NULL
);
4130 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4131 if (gdbarch_debug
>= 2)
4132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
4133 return gdbarch
->has_global_breakpoints
;
4137 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
4138 int has_global_breakpoints
)
4140 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
4144 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
4146 gdb_assert (gdbarch
!= NULL
);
4147 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
4148 if (gdbarch_debug
>= 2)
4149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
4150 return gdbarch
->has_shared_address_space (gdbarch
);
4154 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
4155 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
4157 gdbarch
->has_shared_address_space
= has_shared_address_space
;
4161 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int *isize
, char **msg
)
4163 gdb_assert (gdbarch
!= NULL
);
4164 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
4167 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, isize
, msg
);
4171 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
4172 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
4174 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
4178 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
4180 gdb_assert (gdbarch
!= NULL
);
4181 gdb_assert (gdbarch
->auto_charset
!= NULL
);
4182 if (gdbarch_debug
>= 2)
4183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
4184 return gdbarch
->auto_charset ();
4188 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
4189 gdbarch_auto_charset_ftype auto_charset
)
4191 gdbarch
->auto_charset
= auto_charset
;
4195 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
4197 gdb_assert (gdbarch
!= NULL
);
4198 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
4199 if (gdbarch_debug
>= 2)
4200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
4201 return gdbarch
->auto_wide_charset ();
4205 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
4206 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
4208 gdbarch
->auto_wide_charset
= auto_wide_charset
;
4212 gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
)
4214 gdb_assert (gdbarch
!= NULL
);
4215 if (gdbarch_debug
>= 2)
4216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_solib_symbols_extension called\n");
4217 return gdbarch
->solib_symbols_extension
;
4221 set_gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
,
4222 const char * solib_symbols_extension
)
4224 gdbarch
->solib_symbols_extension
= solib_symbols_extension
;
4228 gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
)
4230 gdb_assert (gdbarch
!= NULL
);
4231 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4232 if (gdbarch_debug
>= 2)
4233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_dos_based_file_system called\n");
4234 return gdbarch
->has_dos_based_file_system
;
4238 set_gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
,
4239 int has_dos_based_file_system
)
4241 gdbarch
->has_dos_based_file_system
= has_dos_based_file_system
;
4245 gdbarch_gen_return_address (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, struct axs_value
*value
, CORE_ADDR scope
)
4247 gdb_assert (gdbarch
!= NULL
);
4248 gdb_assert (gdbarch
->gen_return_address
!= NULL
);
4249 if (gdbarch_debug
>= 2)
4250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gen_return_address called\n");
4251 gdbarch
->gen_return_address (gdbarch
, ax
, value
, scope
);
4255 set_gdbarch_gen_return_address (struct gdbarch
*gdbarch
,
4256 gdbarch_gen_return_address_ftype gen_return_address
)
4258 gdbarch
->gen_return_address
= gen_return_address
;
4262 gdbarch_info_proc_p (struct gdbarch
*gdbarch
)
4264 gdb_assert (gdbarch
!= NULL
);
4265 return gdbarch
->info_proc
!= NULL
;
4269 gdbarch_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4271 gdb_assert (gdbarch
!= NULL
);
4272 gdb_assert (gdbarch
->info_proc
!= NULL
);
4273 if (gdbarch_debug
>= 2)
4274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_info_proc called\n");
4275 gdbarch
->info_proc (gdbarch
, args
, what
);
4279 set_gdbarch_info_proc (struct gdbarch
*gdbarch
,
4280 gdbarch_info_proc_ftype info_proc
)
4282 gdbarch
->info_proc
= info_proc
;
4286 gdbarch_core_info_proc_p (struct gdbarch
*gdbarch
)
4288 gdb_assert (gdbarch
!= NULL
);
4289 return gdbarch
->core_info_proc
!= NULL
;
4293 gdbarch_core_info_proc (struct gdbarch
*gdbarch
, const char *args
, enum info_proc_what what
)
4295 gdb_assert (gdbarch
!= NULL
);
4296 gdb_assert (gdbarch
->core_info_proc
!= NULL
);
4297 if (gdbarch_debug
>= 2)
4298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_info_proc called\n");
4299 gdbarch
->core_info_proc (gdbarch
, args
, what
);
4303 set_gdbarch_core_info_proc (struct gdbarch
*gdbarch
,
4304 gdbarch_core_info_proc_ftype core_info_proc
)
4306 gdbarch
->core_info_proc
= core_info_proc
;
4310 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
)
4312 gdb_assert (gdbarch
!= NULL
);
4313 gdb_assert (gdbarch
->iterate_over_objfiles_in_search_order
!= NULL
);
4314 if (gdbarch_debug
>= 2)
4315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4316 gdbarch
->iterate_over_objfiles_in_search_order (gdbarch
, cb
, cb_data
, current_objfile
);
4320 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch
*gdbarch
,
4321 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order
)
4323 gdbarch
->iterate_over_objfiles_in_search_order
= iterate_over_objfiles_in_search_order
;
4326 struct ravenscar_arch_ops
*
4327 gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
)
4329 gdb_assert (gdbarch
!= NULL
);
4330 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4331 if (gdbarch_debug
>= 2)
4332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ravenscar_ops called\n");
4333 return gdbarch
->ravenscar_ops
;
4337 set_gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
,
4338 struct ravenscar_arch_ops
* ravenscar_ops
)
4340 gdbarch
->ravenscar_ops
= ravenscar_ops
;
4344 gdbarch_insn_is_call (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4346 gdb_assert (gdbarch
!= NULL
);
4347 gdb_assert (gdbarch
->insn_is_call
!= NULL
);
4348 if (gdbarch_debug
>= 2)
4349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_call called\n");
4350 return gdbarch
->insn_is_call (gdbarch
, addr
);
4354 set_gdbarch_insn_is_call (struct gdbarch
*gdbarch
,
4355 gdbarch_insn_is_call_ftype insn_is_call
)
4357 gdbarch
->insn_is_call
= insn_is_call
;
4361 gdbarch_insn_is_ret (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4363 gdb_assert (gdbarch
!= NULL
);
4364 gdb_assert (gdbarch
->insn_is_ret
!= NULL
);
4365 if (gdbarch_debug
>= 2)
4366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_ret called\n");
4367 return gdbarch
->insn_is_ret (gdbarch
, addr
);
4371 set_gdbarch_insn_is_ret (struct gdbarch
*gdbarch
,
4372 gdbarch_insn_is_ret_ftype insn_is_ret
)
4374 gdbarch
->insn_is_ret
= insn_is_ret
;
4378 gdbarch_insn_is_jump (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4380 gdb_assert (gdbarch
!= NULL
);
4381 gdb_assert (gdbarch
->insn_is_jump
!= NULL
);
4382 if (gdbarch_debug
>= 2)
4383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_jump called\n");
4384 return gdbarch
->insn_is_jump (gdbarch
, addr
);
4388 set_gdbarch_insn_is_jump (struct gdbarch
*gdbarch
,
4389 gdbarch_insn_is_jump_ftype insn_is_jump
)
4391 gdbarch
->insn_is_jump
= insn_is_jump
;
4395 gdbarch_auxv_parse_p (struct gdbarch
*gdbarch
)
4397 gdb_assert (gdbarch
!= NULL
);
4398 return gdbarch
->auxv_parse
!= NULL
;
4402 gdbarch_auxv_parse (struct gdbarch
*gdbarch
, gdb_byte
**readptr
, gdb_byte
*endptr
, CORE_ADDR
*typep
, CORE_ADDR
*valp
)
4404 gdb_assert (gdbarch
!= NULL
);
4405 gdb_assert (gdbarch
->auxv_parse
!= NULL
);
4406 if (gdbarch_debug
>= 2)
4407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auxv_parse called\n");
4408 return gdbarch
->auxv_parse (gdbarch
, readptr
, endptr
, typep
, valp
);
4412 set_gdbarch_auxv_parse (struct gdbarch
*gdbarch
,
4413 gdbarch_auxv_parse_ftype auxv_parse
)
4415 gdbarch
->auxv_parse
= auxv_parse
;
4419 /* Keep a registry of per-architecture data-pointers required by GDB
4426 gdbarch_data_pre_init_ftype
*pre_init
;
4427 gdbarch_data_post_init_ftype
*post_init
;
4430 struct gdbarch_data_registration
4432 struct gdbarch_data
*data
;
4433 struct gdbarch_data_registration
*next
;
4436 struct gdbarch_data_registry
4439 struct gdbarch_data_registration
*registrations
;
4442 struct gdbarch_data_registry gdbarch_data_registry
=
4447 static struct gdbarch_data
*
4448 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4449 gdbarch_data_post_init_ftype
*post_init
)
4451 struct gdbarch_data_registration
**curr
;
4453 /* Append the new registration. */
4454 for (curr
= &gdbarch_data_registry
.registrations
;
4456 curr
= &(*curr
)->next
);
4457 (*curr
) = XNEW (struct gdbarch_data_registration
);
4458 (*curr
)->next
= NULL
;
4459 (*curr
)->data
= XNEW (struct gdbarch_data
);
4460 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4461 (*curr
)->data
->pre_init
= pre_init
;
4462 (*curr
)->data
->post_init
= post_init
;
4463 (*curr
)->data
->init_p
= 1;
4464 return (*curr
)->data
;
4467 struct gdbarch_data
*
4468 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4470 return gdbarch_data_register (pre_init
, NULL
);
4473 struct gdbarch_data
*
4474 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
4476 return gdbarch_data_register (NULL
, post_init
);
4479 /* Create/delete the gdbarch data vector. */
4482 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4484 gdb_assert (gdbarch
->data
== NULL
);
4485 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4486 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
4489 /* Initialize the current value of the specified per-architecture
4493 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
4494 struct gdbarch_data
*data
,
4497 gdb_assert (data
->index
< gdbarch
->nr_data
);
4498 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
4499 gdb_assert (data
->pre_init
== NULL
);
4500 gdbarch
->data
[data
->index
] = pointer
;
4503 /* Return the current value of the specified per-architecture
4507 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4509 gdb_assert (data
->index
< gdbarch
->nr_data
);
4510 if (gdbarch
->data
[data
->index
] == NULL
)
4512 /* The data-pointer isn't initialized, call init() to get a
4514 if (data
->pre_init
!= NULL
)
4515 /* Mid architecture creation: pass just the obstack, and not
4516 the entire architecture, as that way it isn't possible for
4517 pre-init code to refer to undefined architecture
4519 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
4520 else if (gdbarch
->initialized_p
4521 && data
->post_init
!= NULL
)
4522 /* Post architecture creation: pass the entire architecture
4523 (as all fields are valid), but be careful to also detect
4524 recursive references. */
4526 gdb_assert (data
->init_p
);
4528 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
4532 /* The architecture initialization hasn't completed - punt -
4533 hope that the caller knows what they are doing. Once
4534 deprecated_set_gdbarch_data has been initialized, this can be
4535 changed to an internal error. */
4537 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4539 return gdbarch
->data
[data
->index
];
4543 /* Keep a registry of the architectures known by GDB. */
4545 struct gdbarch_registration
4547 enum bfd_architecture bfd_architecture
;
4548 gdbarch_init_ftype
*init
;
4549 gdbarch_dump_tdep_ftype
*dump_tdep
;
4550 struct gdbarch_list
*arches
;
4551 struct gdbarch_registration
*next
;
4554 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4557 append_name (const char ***buf
, int *nr
, const char *name
)
4559 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4565 gdbarch_printable_names (void)
4567 /* Accumulate a list of names based on the registed list of
4570 const char **arches
= NULL
;
4571 struct gdbarch_registration
*rego
;
4573 for (rego
= gdbarch_registry
;
4577 const struct bfd_arch_info
*ap
;
4578 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4580 internal_error (__FILE__
, __LINE__
,
4581 _("gdbarch_architecture_names: multi-arch unknown"));
4584 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4589 append_name (&arches
, &nr_arches
, NULL
);
4595 gdbarch_register (enum bfd_architecture bfd_architecture
,
4596 gdbarch_init_ftype
*init
,
4597 gdbarch_dump_tdep_ftype
*dump_tdep
)
4599 struct gdbarch_registration
**curr
;
4600 const struct bfd_arch_info
*bfd_arch_info
;
4602 /* Check that BFD recognizes this architecture */
4603 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4604 if (bfd_arch_info
== NULL
)
4606 internal_error (__FILE__
, __LINE__
,
4607 _("gdbarch: Attempt to register "
4608 "unknown architecture (%d)"),
4611 /* Check that we haven't seen this architecture before. */
4612 for (curr
= &gdbarch_registry
;
4614 curr
= &(*curr
)->next
)
4616 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4617 internal_error (__FILE__
, __LINE__
,
4618 _("gdbarch: Duplicate registration "
4619 "of architecture (%s)"),
4620 bfd_arch_info
->printable_name
);
4624 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
4625 bfd_arch_info
->printable_name
,
4626 host_address_to_string (init
));
4628 (*curr
) = XNEW (struct gdbarch_registration
);
4629 (*curr
)->bfd_architecture
= bfd_architecture
;
4630 (*curr
)->init
= init
;
4631 (*curr
)->dump_tdep
= dump_tdep
;
4632 (*curr
)->arches
= NULL
;
4633 (*curr
)->next
= NULL
;
4637 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4638 gdbarch_init_ftype
*init
)
4640 gdbarch_register (bfd_architecture
, init
, NULL
);
4644 /* Look for an architecture using gdbarch_info. */
4646 struct gdbarch_list
*
4647 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4648 const struct gdbarch_info
*info
)
4650 for (; arches
!= NULL
; arches
= arches
->next
)
4652 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4654 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4656 if (info
->osabi
!= arches
->gdbarch
->osabi
)
4658 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
4666 /* Find an architecture that matches the specified INFO. Create a new
4667 architecture if needed. Return that new architecture. */
4670 gdbarch_find_by_info (struct gdbarch_info info
)
4672 struct gdbarch
*new_gdbarch
;
4673 struct gdbarch_registration
*rego
;
4675 /* Fill in missing parts of the INFO struct using a number of
4676 sources: "set ..."; INFOabfd supplied; and the global
4678 gdbarch_info_fill (&info
);
4680 /* Must have found some sort of architecture. */
4681 gdb_assert (info
.bfd_arch_info
!= NULL
);
4685 fprintf_unfiltered (gdb_stdlog
,
4686 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4687 (info
.bfd_arch_info
!= NULL
4688 ? info
.bfd_arch_info
->printable_name
4690 fprintf_unfiltered (gdb_stdlog
,
4691 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4693 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4694 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4696 fprintf_unfiltered (gdb_stdlog
,
4697 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4698 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
4699 fprintf_unfiltered (gdb_stdlog
,
4700 "gdbarch_find_by_info: info.abfd %s\n",
4701 host_address_to_string (info
.abfd
));
4702 fprintf_unfiltered (gdb_stdlog
,
4703 "gdbarch_find_by_info: info.tdep_info %s\n",
4704 host_address_to_string (info
.tdep_info
));
4707 /* Find the tdep code that knows about this architecture. */
4708 for (rego
= gdbarch_registry
;
4711 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4717 "No matching architecture\n");
4721 /* Ask the tdep code for an architecture that matches "info". */
4722 new_gdbarch
= rego
->init (info
, rego
->arches
);
4724 /* Did the tdep code like it? No. Reject the change and revert to
4725 the old architecture. */
4726 if (new_gdbarch
== NULL
)
4729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4730 "Target rejected architecture\n");
4734 /* Is this a pre-existing architecture (as determined by already
4735 being initialized)? Move it to the front of the architecture
4736 list (keeping the list sorted Most Recently Used). */
4737 if (new_gdbarch
->initialized_p
)
4739 struct gdbarch_list
**list
;
4740 struct gdbarch_list
*this;
4742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4743 "Previous architecture %s (%s) selected\n",
4744 host_address_to_string (new_gdbarch
),
4745 new_gdbarch
->bfd_arch_info
->printable_name
);
4746 /* Find the existing arch in the list. */
4747 for (list
= ®o
->arches
;
4748 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
4749 list
= &(*list
)->next
);
4750 /* It had better be in the list of architectures. */
4751 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
4754 (*list
) = this->next
;
4755 /* Insert THIS at the front. */
4756 this->next
= rego
->arches
;
4757 rego
->arches
= this;
4762 /* It's a new architecture. */
4764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4765 "New architecture %s (%s) selected\n",
4766 host_address_to_string (new_gdbarch
),
4767 new_gdbarch
->bfd_arch_info
->printable_name
);
4769 /* Insert the new architecture into the front of the architecture
4770 list (keep the list sorted Most Recently Used). */
4772 struct gdbarch_list
*this = XNEW (struct gdbarch_list
);
4773 this->next
= rego
->arches
;
4774 this->gdbarch
= new_gdbarch
;
4775 rego
->arches
= this;
4778 /* Check that the newly installed architecture is valid. Plug in
4779 any post init values. */
4780 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4781 verify_gdbarch (new_gdbarch
);
4782 new_gdbarch
->initialized_p
= 1;
4785 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
4790 /* Make the specified architecture current. */
4793 set_target_gdbarch (struct gdbarch
*new_gdbarch
)
4795 gdb_assert (new_gdbarch
!= NULL
);
4796 gdb_assert (new_gdbarch
->initialized_p
);
4797 current_inferior ()->gdbarch
= new_gdbarch
;
4798 observer_notify_architecture_changed (new_gdbarch
);
4799 registers_changed ();
4802 /* Return the current inferior's arch. */
4805 target_gdbarch (void)
4807 return current_inferior ()->gdbarch
;
4810 extern void _initialize_gdbarch (void);
4813 _initialize_gdbarch (void)
4815 add_setshow_zuinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
4816 Set architecture debugging."), _("\
4817 Show architecture debugging."), _("\
4818 When non-zero, architecture debugging is enabled."),
4821 &setdebuglist
, &showdebuglist
);