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"
45 #include "gdb_assert.h"
47 #include "reggroups.h"
49 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch
*);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 unsigned int gdbarch_debug
= GDBARCH_DEBUG
;
65 show_gdbarch_debug (struct ui_file
*file
, int from_tty
,
66 struct cmd_list_element
*c
, const char *value
)
68 fprintf_filtered (file
, _("Architecture debugging is %s.\n"), value
);
72 pformat (const struct floatformat
**format
)
77 /* Just print out one of them - this is only for diagnostics. */
78 return format
[0]->name
;
82 pstring (const char *string
)
89 /* Helper function to print a list of strings, represented as "const
90 char *const *". The list is printed comma-separated. */
93 pstring_list (const char *const *list
)
103 for (p
= list
; *p
!= NULL
&& offset
< sizeof (ret
); ++p
)
105 size_t s
= xsnprintf (ret
+ offset
, sizeof (ret
) - offset
, "%s, ", *p
);
111 gdb_assert (offset
- 2 < sizeof (ret
));
112 ret
[offset
- 2] = '\0';
119 /* Maintain the struct gdbarch object. */
123 /* Has this architecture been fully initialized? */
126 /* An obstack bound to the lifetime of the architecture. */
127 struct obstack
*obstack
;
129 /* basic architectural information. */
130 const struct bfd_arch_info
* bfd_arch_info
;
131 enum bfd_endian byte_order
;
132 enum bfd_endian byte_order_for_code
;
133 enum gdb_osabi osabi
;
134 const struct target_desc
* target_desc
;
136 /* target specific vector. */
137 struct gdbarch_tdep
*tdep
;
138 gdbarch_dump_tdep_ftype
*dump_tdep
;
140 /* per-architecture data-pointers. */
144 /* Multi-arch values.
146 When extending this structure you must:
150 Declare set/get functions and define the corresponding
153 gdbarch_alloc(): If zero/NULL is not a suitable default,
154 initialize the new field.
156 verify_gdbarch(): Confirm that the target updated the field
159 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
162 get_gdbarch(): Implement the set/get functions (probably using
163 the macro's as shortcuts).
172 int long_long_align_bit
;
174 const struct floatformat
** half_format
;
176 const struct floatformat
** float_format
;
178 const struct floatformat
** double_format
;
180 const struct floatformat
** long_double_format
;
183 int dwarf2_addr_size
;
185 gdbarch_read_pc_ftype
*read_pc
;
186 gdbarch_write_pc_ftype
*write_pc
;
187 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
188 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
189 gdbarch_pseudo_register_read_value_ftype
*pseudo_register_read_value
;
190 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
193 gdbarch_ax_pseudo_register_collect_ftype
*ax_pseudo_register_collect
;
194 gdbarch_ax_pseudo_register_push_stack_ftype
*ax_pseudo_register_push_stack
;
199 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
200 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
201 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
202 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
203 gdbarch_register_name_ftype
*register_name
;
204 gdbarch_register_type_ftype
*register_type
;
205 gdbarch_dummy_id_ftype
*dummy_id
;
206 int deprecated_fp_regnum
;
207 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
208 int call_dummy_location
;
209 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
210 gdbarch_print_registers_info_ftype
*print_registers_info
;
211 gdbarch_print_float_info_ftype
*print_float_info
;
212 gdbarch_print_vector_info_ftype
*print_vector_info
;
213 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
214 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
215 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
216 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
217 int believe_pcc_promotion
;
218 gdbarch_convert_register_p_ftype
*convert_register_p
;
219 gdbarch_register_to_value_ftype
*register_to_value
;
220 gdbarch_value_to_register_ftype
*value_to_register
;
221 gdbarch_value_from_register_ftype
*value_from_register
;
222 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
223 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
224 gdbarch_integer_to_address_ftype
*integer_to_address
;
225 gdbarch_return_value_ftype
*return_value
;
226 gdbarch_return_in_first_hidden_param_p_ftype
*return_in_first_hidden_param_p
;
227 gdbarch_skip_prologue_ftype
*skip_prologue
;
228 gdbarch_skip_main_prologue_ftype
*skip_main_prologue
;
229 gdbarch_skip_entrypoint_ftype
*skip_entrypoint
;
230 gdbarch_inner_than_ftype
*inner_than
;
231 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
232 gdbarch_remote_breakpoint_from_pc_ftype
*remote_breakpoint_from_pc
;
233 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
234 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
235 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
236 CORE_ADDR decr_pc_after_break
;
237 CORE_ADDR deprecated_function_start_offset
;
238 gdbarch_remote_register_number_ftype
*remote_register_number
;
239 gdbarch_fetch_tls_load_module_address_ftype
*fetch_tls_load_module_address
;
240 CORE_ADDR frame_args_skip
;
241 gdbarch_unwind_pc_ftype
*unwind_pc
;
242 gdbarch_unwind_sp_ftype
*unwind_sp
;
243 gdbarch_frame_num_args_ftype
*frame_num_args
;
244 gdbarch_frame_align_ftype
*frame_align
;
245 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
246 int frame_red_zone_size
;
247 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
248 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
249 gdbarch_software_single_step_ftype
*software_single_step
;
250 gdbarch_single_step_through_delay_ftype
*single_step_through_delay
;
251 gdbarch_print_insn_ftype
*print_insn
;
252 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
253 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
254 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
255 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
256 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
257 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
258 int cannot_step_breakpoint
;
259 int have_nonsteppable_watchpoint
;
260 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
261 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
262 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
263 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
264 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
265 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
266 struct core_regset_section
* core_regset_sections
;
267 gdbarch_make_corefile_notes_ftype
*make_corefile_notes
;
268 gdbarch_elfcore_write_linux_prpsinfo_ftype
*elfcore_write_linux_prpsinfo
;
269 gdbarch_find_memory_regions_ftype
*find_memory_regions
;
270 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
271 gdbarch_core_xfer_shared_libraries_aix_ftype
*core_xfer_shared_libraries_aix
;
272 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
273 const char * gcore_bfd_target
;
274 int vtable_function_descriptors
;
276 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
277 ULONGEST max_insn_length
;
278 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
279 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
280 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
281 gdbarch_displaced_step_free_closure_ftype
*displaced_step_free_closure
;
282 gdbarch_displaced_step_location_ftype
*displaced_step_location
;
283 gdbarch_relocate_instruction_ftype
*relocate_instruction
;
284 gdbarch_overlay_update_ftype
*overlay_update
;
285 gdbarch_core_read_description_ftype
*core_read_description
;
286 gdbarch_static_transform_name_ftype
*static_transform_name
;
287 int sofun_address_maybe_missing
;
288 gdbarch_process_record_ftype
*process_record
;
289 gdbarch_process_record_signal_ftype
*process_record_signal
;
290 gdbarch_gdb_signal_from_target_ftype
*gdb_signal_from_target
;
291 gdbarch_gdb_signal_to_target_ftype
*gdb_signal_to_target
;
292 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
293 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
294 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
295 const char *const * stap_integer_prefixes
;
296 const char *const * stap_integer_suffixes
;
297 const char *const * stap_register_prefixes
;
298 const char *const * stap_register_suffixes
;
299 const char *const * stap_register_indirection_prefixes
;
300 const char *const * stap_register_indirection_suffixes
;
301 const char * stap_gdb_register_prefix
;
302 const char * stap_gdb_register_suffix
;
303 gdbarch_stap_is_single_operand_ftype
*stap_is_single_operand
;
304 gdbarch_stap_parse_special_token_ftype
*stap_parse_special_token
;
305 int has_global_solist
;
306 int has_global_breakpoints
;
307 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
308 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
309 gdbarch_auto_charset_ftype
*auto_charset
;
310 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
311 const char * solib_symbols_extension
;
312 int has_dos_based_file_system
;
313 gdbarch_gen_return_address_ftype
*gen_return_address
;
314 gdbarch_info_proc_ftype
*info_proc
;
315 gdbarch_core_info_proc_ftype
*core_info_proc
;
316 gdbarch_iterate_over_objfiles_in_search_order_ftype
*iterate_over_objfiles_in_search_order
;
317 struct ravenscar_arch_ops
* ravenscar_ops
;
318 gdbarch_insn_is_call_ftype
*insn_is_call
;
319 gdbarch_insn_is_ret_ftype
*insn_is_ret
;
320 gdbarch_insn_is_jump_ftype
*insn_is_jump
;
323 /* Create a new ``struct gdbarch'' based on information provided by
324 ``struct gdbarch_info''. */
327 gdbarch_alloc (const struct gdbarch_info
*info
,
328 struct gdbarch_tdep
*tdep
)
330 struct gdbarch
*gdbarch
;
332 /* Create an obstack for allocating all the per-architecture memory,
333 then use that to allocate the architecture vector. */
334 struct obstack
*obstack
= XNEW (struct obstack
);
335 obstack_init (obstack
);
336 gdbarch
= obstack_alloc (obstack
, sizeof (*gdbarch
));
337 memset (gdbarch
, 0, sizeof (*gdbarch
));
338 gdbarch
->obstack
= obstack
;
340 alloc_gdbarch_data (gdbarch
);
342 gdbarch
->tdep
= tdep
;
344 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
345 gdbarch
->byte_order
= info
->byte_order
;
346 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
347 gdbarch
->osabi
= info
->osabi
;
348 gdbarch
->target_desc
= info
->target_desc
;
350 /* Force the explicit initialization of these. */
351 gdbarch
->bits_big_endian
= (gdbarch
->byte_order
== BFD_ENDIAN_BIG
);
352 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
353 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
354 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
355 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
356 gdbarch
->long_long_align_bit
= 2*gdbarch
->long_bit
;
357 gdbarch
->half_bit
= 2*TARGET_CHAR_BIT
;
358 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
359 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
360 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
361 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
362 gdbarch
->char_signed
= -1;
363 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
364 gdbarch
->num_regs
= -1;
365 gdbarch
->sp_regnum
= -1;
366 gdbarch
->pc_regnum
= -1;
367 gdbarch
->ps_regnum
= -1;
368 gdbarch
->fp0_regnum
= -1;
369 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
370 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
371 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
372 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
373 gdbarch
->deprecated_fp_regnum
= -1;
374 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
375 gdbarch
->print_registers_info
= default_print_registers_info
;
376 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
377 gdbarch
->cannot_fetch_register
= cannot_register_not
;
378 gdbarch
->cannot_store_register
= cannot_register_not
;
379 gdbarch
->convert_register_p
= generic_convert_register_p
;
380 gdbarch
->value_from_register
= default_value_from_register
;
381 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
382 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
383 gdbarch
->return_in_first_hidden_param_p
= default_return_in_first_hidden_param_p
;
384 gdbarch
->remote_breakpoint_from_pc
= default_remote_breakpoint_from_pc
;
385 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
386 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
387 gdbarch
->remote_register_number
= default_remote_register_number
;
388 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
389 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
390 gdbarch
->addr_bits_remove
= core_addr_identity
;
391 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
392 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
393 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
394 gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
395 gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
396 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
397 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
398 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
399 gdbarch
->displaced_step_fixup
= NULL
;
400 gdbarch
->displaced_step_free_closure
= NULL
;
401 gdbarch
->displaced_step_location
= NULL
;
402 gdbarch
->relocate_instruction
= NULL
;
403 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
404 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
405 gdbarch
->auto_charset
= default_auto_charset
;
406 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
407 gdbarch
->gen_return_address
= default_gen_return_address
;
408 gdbarch
->iterate_over_objfiles_in_search_order
= default_iterate_over_objfiles_in_search_order
;
409 gdbarch
->ravenscar_ops
= NULL
;
410 gdbarch
->insn_is_call
= default_insn_is_call
;
411 gdbarch
->insn_is_ret
= default_insn_is_ret
;
412 gdbarch
->insn_is_jump
= default_insn_is_jump
;
413 /* gdbarch_alloc() */
419 /* Allocate extra space using the per-architecture obstack. */
422 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
424 void *data
= obstack_alloc (arch
->obstack
, size
);
426 memset (data
, 0, size
);
431 /* Free a gdbarch struct. This should never happen in normal
432 operation --- once you've created a gdbarch, you keep it around.
433 However, if an architecture's init function encounters an error
434 building the structure, it may need to clean up a partially
435 constructed gdbarch. */
438 gdbarch_free (struct gdbarch
*arch
)
440 struct obstack
*obstack
;
442 gdb_assert (arch
!= NULL
);
443 gdb_assert (!arch
->initialized_p
);
444 obstack
= arch
->obstack
;
445 obstack_free (obstack
, 0); /* Includes the ARCH. */
450 /* Ensure that all values in a GDBARCH are reasonable. */
453 verify_gdbarch (struct gdbarch
*gdbarch
)
456 struct cleanup
*cleanups
;
460 log
= mem_fileopen ();
461 cleanups
= make_cleanup_ui_file_delete (log
);
463 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
464 fprintf_unfiltered (log
, "\n\tbyte-order");
465 if (gdbarch
->bfd_arch_info
== NULL
)
466 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
467 /* Check those that need to be defined for the given multi-arch level. */
468 /* Skip verify of bits_big_endian, invalid_p == 0 */
469 /* Skip verify of short_bit, invalid_p == 0 */
470 /* Skip verify of int_bit, invalid_p == 0 */
471 /* Skip verify of long_bit, invalid_p == 0 */
472 /* Skip verify of long_long_bit, invalid_p == 0 */
473 /* Skip verify of long_long_align_bit, invalid_p == 0 */
474 /* Skip verify of half_bit, invalid_p == 0 */
475 if (gdbarch
->half_format
== 0)
476 gdbarch
->half_format
= floatformats_ieee_half
;
477 /* Skip verify of float_bit, invalid_p == 0 */
478 if (gdbarch
->float_format
== 0)
479 gdbarch
->float_format
= floatformats_ieee_single
;
480 /* Skip verify of double_bit, invalid_p == 0 */
481 if (gdbarch
->double_format
== 0)
482 gdbarch
->double_format
= floatformats_ieee_double
;
483 /* Skip verify of long_double_bit, invalid_p == 0 */
484 if (gdbarch
->long_double_format
== 0)
485 gdbarch
->long_double_format
= floatformats_ieee_double
;
486 /* Skip verify of ptr_bit, invalid_p == 0 */
487 if (gdbarch
->addr_bit
== 0)
488 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
489 if (gdbarch
->dwarf2_addr_size
== 0)
490 gdbarch
->dwarf2_addr_size
= gdbarch_ptr_bit (gdbarch
) / TARGET_CHAR_BIT
;
491 if (gdbarch
->char_signed
== -1)
492 gdbarch
->char_signed
= 1;
493 /* Skip verify of read_pc, has predicate. */
494 /* Skip verify of write_pc, has predicate. */
495 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
496 /* Skip verify of pseudo_register_read, has predicate. */
497 /* Skip verify of pseudo_register_read_value, has predicate. */
498 /* Skip verify of pseudo_register_write, has predicate. */
499 if (gdbarch
->num_regs
== -1)
500 fprintf_unfiltered (log
, "\n\tnum_regs");
501 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
502 /* Skip verify of ax_pseudo_register_collect, has predicate. */
503 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
504 /* Skip verify of sp_regnum, invalid_p == 0 */
505 /* Skip verify of pc_regnum, invalid_p == 0 */
506 /* Skip verify of ps_regnum, invalid_p == 0 */
507 /* Skip verify of fp0_regnum, invalid_p == 0 */
508 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
509 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
510 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
511 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
512 if (gdbarch
->register_name
== 0)
513 fprintf_unfiltered (log
, "\n\tregister_name");
514 /* Skip verify of register_type, has predicate. */
515 /* Skip verify of dummy_id, has predicate. */
516 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
517 /* Skip verify of push_dummy_call, has predicate. */
518 /* Skip verify of call_dummy_location, invalid_p == 0 */
519 /* Skip verify of push_dummy_code, has predicate. */
520 /* Skip verify of print_registers_info, invalid_p == 0 */
521 /* Skip verify of print_float_info, has predicate. */
522 /* Skip verify of print_vector_info, has predicate. */
523 /* Skip verify of register_sim_regno, invalid_p == 0 */
524 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
525 /* Skip verify of cannot_store_register, invalid_p == 0 */
526 /* Skip verify of get_longjmp_target, has predicate. */
527 /* Skip verify of convert_register_p, invalid_p == 0 */
528 /* Skip verify of value_from_register, invalid_p == 0 */
529 /* Skip verify of pointer_to_address, invalid_p == 0 */
530 /* Skip verify of address_to_pointer, invalid_p == 0 */
531 /* Skip verify of integer_to_address, has predicate. */
532 /* Skip verify of return_value, has predicate. */
533 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
534 if (gdbarch
->skip_prologue
== 0)
535 fprintf_unfiltered (log
, "\n\tskip_prologue");
536 /* Skip verify of skip_main_prologue, has predicate. */
537 /* Skip verify of skip_entrypoint, has predicate. */
538 if (gdbarch
->inner_than
== 0)
539 fprintf_unfiltered (log
, "\n\tinner_than");
540 if (gdbarch
->breakpoint_from_pc
== 0)
541 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
542 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
543 /* Skip verify of adjust_breakpoint_address, has predicate. */
544 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
545 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
546 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
547 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
548 /* Skip verify of remote_register_number, invalid_p == 0 */
549 /* Skip verify of fetch_tls_load_module_address, has predicate. */
550 /* Skip verify of frame_args_skip, invalid_p == 0 */
551 /* Skip verify of unwind_pc, has predicate. */
552 /* Skip verify of unwind_sp, has predicate. */
553 /* Skip verify of frame_num_args, has predicate. */
554 /* Skip verify of frame_align, has predicate. */
555 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
556 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
557 /* Skip verify of addr_bits_remove, invalid_p == 0 */
558 /* Skip verify of software_single_step, has predicate. */
559 /* Skip verify of single_step_through_delay, has predicate. */
560 if (gdbarch
->print_insn
== 0)
561 fprintf_unfiltered (log
, "\n\tprint_insn");
562 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
563 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
564 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
565 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
566 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
567 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
568 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
569 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
570 /* Skip verify of address_class_type_flags, has predicate. */
571 /* Skip verify of address_class_type_flags_to_name, has predicate. */
572 /* Skip verify of address_class_name_to_type_flags, has predicate. */
573 /* Skip verify of register_reggroup_p, invalid_p == 0 */
574 /* Skip verify of fetch_pointer_argument, has predicate. */
575 /* Skip verify of regset_from_core_section, has predicate. */
576 /* Skip verify of make_corefile_notes, has predicate. */
577 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */
578 /* Skip verify of find_memory_regions, has predicate. */
579 /* Skip verify of core_xfer_shared_libraries, has predicate. */
580 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */
581 /* Skip verify of core_pid_to_str, has predicate. */
582 /* Skip verify of gcore_bfd_target, has predicate. */
583 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
584 /* Skip verify of vbit_in_delta, invalid_p == 0 */
585 /* Skip verify of skip_permanent_breakpoint, has predicate. */
586 /* Skip verify of max_insn_length, has predicate. */
587 /* Skip verify of displaced_step_copy_insn, has predicate. */
588 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
589 /* Skip verify of displaced_step_fixup, has predicate. */
590 if ((! gdbarch
->displaced_step_free_closure
) != (! gdbarch
->displaced_step_copy_insn
))
591 fprintf_unfiltered (log
, "\n\tdisplaced_step_free_closure");
592 if ((! gdbarch
->displaced_step_location
) != (! gdbarch
->displaced_step_copy_insn
))
593 fprintf_unfiltered (log
, "\n\tdisplaced_step_location");
594 /* Skip verify of relocate_instruction, has predicate. */
595 /* Skip verify of overlay_update, has predicate. */
596 /* Skip verify of core_read_description, has predicate. */
597 /* Skip verify of static_transform_name, has predicate. */
598 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
599 /* Skip verify of process_record, has predicate. */
600 /* Skip verify of process_record_signal, has predicate. */
601 /* Skip verify of gdb_signal_from_target, has predicate. */
602 /* Skip verify of gdb_signal_to_target, has predicate. */
603 /* Skip verify of get_siginfo_type, has predicate. */
604 /* Skip verify of record_special_symbol, has predicate. */
605 /* Skip verify of get_syscall_number, has predicate. */
606 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
607 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
608 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
609 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
610 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
611 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
612 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
613 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
614 /* Skip verify of stap_is_single_operand, has predicate. */
615 /* Skip verify of stap_parse_special_token, has predicate. */
616 /* Skip verify of has_global_solist, invalid_p == 0 */
617 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
618 /* Skip verify of has_shared_address_space, invalid_p == 0 */
619 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
620 /* Skip verify of auto_charset, invalid_p == 0 */
621 /* Skip verify of auto_wide_charset, invalid_p == 0 */
622 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
623 /* Skip verify of gen_return_address, invalid_p == 0 */
624 /* Skip verify of info_proc, has predicate. */
625 /* Skip verify of core_info_proc, has predicate. */
626 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
627 /* Skip verify of ravenscar_ops, invalid_p == 0 */
628 /* Skip verify of insn_is_call, invalid_p == 0 */
629 /* Skip verify of insn_is_ret, invalid_p == 0 */
630 /* Skip verify of insn_is_jump, invalid_p == 0 */
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_ax_pseudo_register_collect_p() = %d\n",
695 gdbarch_ax_pseudo_register_collect_p (gdbarch
));
696 fprintf_unfiltered (file
,
697 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
698 host_address_to_string (gdbarch
->ax_pseudo_register_collect
));
699 fprintf_unfiltered (file
,
700 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
701 gdbarch_ax_pseudo_register_push_stack_p (gdbarch
));
702 fprintf_unfiltered (file
,
703 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
704 host_address_to_string (gdbarch
->ax_pseudo_register_push_stack
));
705 fprintf_unfiltered (file
,
706 "gdbarch_dump: believe_pcc_promotion = %s\n",
707 plongest (gdbarch
->believe_pcc_promotion
));
708 fprintf_unfiltered (file
,
709 "gdbarch_dump: bfd_arch_info = %s\n",
710 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
711 fprintf_unfiltered (file
,
712 "gdbarch_dump: bits_big_endian = %s\n",
713 plongest (gdbarch
->bits_big_endian
));
714 fprintf_unfiltered (file
,
715 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
716 host_address_to_string (gdbarch
->breakpoint_from_pc
));
717 fprintf_unfiltered (file
,
718 "gdbarch_dump: byte_order = %s\n",
719 plongest (gdbarch
->byte_order
));
720 fprintf_unfiltered (file
,
721 "gdbarch_dump: byte_order_for_code = %s\n",
722 plongest (gdbarch
->byte_order_for_code
));
723 fprintf_unfiltered (file
,
724 "gdbarch_dump: call_dummy_location = %s\n",
725 plongest (gdbarch
->call_dummy_location
));
726 fprintf_unfiltered (file
,
727 "gdbarch_dump: cannot_fetch_register = <%s>\n",
728 host_address_to_string (gdbarch
->cannot_fetch_register
));
729 fprintf_unfiltered (file
,
730 "gdbarch_dump: cannot_step_breakpoint = %s\n",
731 plongest (gdbarch
->cannot_step_breakpoint
));
732 fprintf_unfiltered (file
,
733 "gdbarch_dump: cannot_store_register = <%s>\n",
734 host_address_to_string (gdbarch
->cannot_store_register
));
735 fprintf_unfiltered (file
,
736 "gdbarch_dump: char_signed = %s\n",
737 plongest (gdbarch
->char_signed
));
738 fprintf_unfiltered (file
,
739 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
740 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
741 fprintf_unfiltered (file
,
742 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
743 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
744 fprintf_unfiltered (file
,
745 "gdbarch_dump: convert_register_p = <%s>\n",
746 host_address_to_string (gdbarch
->convert_register_p
));
747 fprintf_unfiltered (file
,
748 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n",
749 gdbarch_core_info_proc_p (gdbarch
));
750 fprintf_unfiltered (file
,
751 "gdbarch_dump: core_info_proc = <%s>\n",
752 host_address_to_string (gdbarch
->core_info_proc
));
753 fprintf_unfiltered (file
,
754 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
755 gdbarch_core_pid_to_str_p (gdbarch
));
756 fprintf_unfiltered (file
,
757 "gdbarch_dump: core_pid_to_str = <%s>\n",
758 host_address_to_string (gdbarch
->core_pid_to_str
));
759 fprintf_unfiltered (file
,
760 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
761 gdbarch_core_read_description_p (gdbarch
));
762 fprintf_unfiltered (file
,
763 "gdbarch_dump: core_read_description = <%s>\n",
764 host_address_to_string (gdbarch
->core_read_description
));
765 fprintf_unfiltered (file
,
766 "gdbarch_dump: core_regset_sections = %s\n",
767 host_address_to_string (gdbarch
->core_regset_sections
));
768 fprintf_unfiltered (file
,
769 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
770 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
771 fprintf_unfiltered (file
,
772 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
773 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
774 fprintf_unfiltered (file
,
775 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n",
776 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch
));
777 fprintf_unfiltered (file
,
778 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n",
779 host_address_to_string (gdbarch
->core_xfer_shared_libraries_aix
));
780 fprintf_unfiltered (file
,
781 "gdbarch_dump: decr_pc_after_break = %s\n",
782 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
783 fprintf_unfiltered (file
,
784 "gdbarch_dump: deprecated_fp_regnum = %s\n",
785 plongest (gdbarch
->deprecated_fp_regnum
));
786 fprintf_unfiltered (file
,
787 "gdbarch_dump: deprecated_function_start_offset = %s\n",
788 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
789 fprintf_unfiltered (file
,
790 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
791 gdbarch_displaced_step_copy_insn_p (gdbarch
));
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
794 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
797 gdbarch_displaced_step_fixup_p (gdbarch
));
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: displaced_step_fixup = <%s>\n",
800 host_address_to_string (gdbarch
->displaced_step_fixup
));
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
803 host_address_to_string (gdbarch
->displaced_step_free_closure
));
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
806 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: displaced_step_location = <%s>\n",
809 host_address_to_string (gdbarch
->displaced_step_location
));
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: double_bit = %s\n",
812 plongest (gdbarch
->double_bit
));
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: double_format = %s\n",
815 pformat (gdbarch
->double_format
));
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
818 gdbarch_dummy_id_p (gdbarch
));
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: dummy_id = <%s>\n",
821 host_address_to_string (gdbarch
->dummy_id
));
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: dwarf2_addr_size = %s\n",
824 plongest (gdbarch
->dwarf2_addr_size
));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
827 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
830 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
833 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n",
836 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch
));
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n",
839 host_address_to_string (gdbarch
->elfcore_write_linux_prpsinfo
));
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
842 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
845 gdbarch_fetch_pointer_argument_p (gdbarch
));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
848 host_address_to_string (gdbarch
->fetch_pointer_argument
));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
851 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
854 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
857 gdbarch_find_memory_regions_p (gdbarch
));
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: find_memory_regions = <%s>\n",
860 host_address_to_string (gdbarch
->find_memory_regions
));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: float_bit = %s\n",
863 plongest (gdbarch
->float_bit
));
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: float_format = %s\n",
866 pformat (gdbarch
->float_format
));
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: fp0_regnum = %s\n",
869 plongest (gdbarch
->fp0_regnum
));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
872 gdbarch_frame_align_p (gdbarch
));
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: frame_align = <%s>\n",
875 host_address_to_string (gdbarch
->frame_align
));
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: frame_args_skip = %s\n",
878 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
881 gdbarch_frame_num_args_p (gdbarch
));
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: frame_num_args = <%s>\n",
884 host_address_to_string (gdbarch
->frame_num_args
));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: frame_red_zone_size = %s\n",
887 plongest (gdbarch
->frame_red_zone_size
));
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
890 gdbarch_gcore_bfd_target_p (gdbarch
));
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: gcore_bfd_target = %s\n",
893 pstring (gdbarch
->gcore_bfd_target
));
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
896 gdbarch_gdb_signal_from_target_p (gdbarch
));
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
899 host_address_to_string (gdbarch
->gdb_signal_from_target
));
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n",
902 gdbarch_gdb_signal_to_target_p (gdbarch
));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: gdb_signal_to_target = <%s>\n",
905 host_address_to_string (gdbarch
->gdb_signal_to_target
));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: gen_return_address = <%s>\n",
908 host_address_to_string (gdbarch
->gen_return_address
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
911 gdbarch_get_longjmp_target_p (gdbarch
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: get_longjmp_target = <%s>\n",
914 host_address_to_string (gdbarch
->get_longjmp_target
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
917 gdbarch_get_siginfo_type_p (gdbarch
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: get_siginfo_type = <%s>\n",
920 host_address_to_string (gdbarch
->get_siginfo_type
));
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
923 gdbarch_get_syscall_number_p (gdbarch
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: get_syscall_number = <%s>\n",
926 host_address_to_string (gdbarch
->get_syscall_number
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: half_bit = %s\n",
929 plongest (gdbarch
->half_bit
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: half_format = %s\n",
932 pformat (gdbarch
->half_format
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: has_dos_based_file_system = %s\n",
935 plongest (gdbarch
->has_dos_based_file_system
));
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: has_global_breakpoints = %s\n",
938 plongest (gdbarch
->has_global_breakpoints
));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: has_global_solist = %s\n",
941 plongest (gdbarch
->has_global_solist
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: has_shared_address_space = <%s>\n",
944 host_address_to_string (gdbarch
->has_shared_address_space
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
947 plongest (gdbarch
->have_nonsteppable_watchpoint
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
950 host_address_to_string (gdbarch
->in_function_epilogue_p
));
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
953 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
956 gdbarch_info_proc_p (gdbarch
));
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: info_proc = <%s>\n",
959 host_address_to_string (gdbarch
->info_proc
));
960 fprintf_unfiltered (file
,
961 "gdbarch_dump: inner_than = <%s>\n",
962 host_address_to_string (gdbarch
->inner_than
));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: insn_is_call = <%s>\n",
965 host_address_to_string (gdbarch
->insn_is_call
));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: insn_is_jump = <%s>\n",
968 host_address_to_string (gdbarch
->insn_is_jump
));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: insn_is_ret = <%s>\n",
971 host_address_to_string (gdbarch
->insn_is_ret
));
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: int_bit = %s\n",
974 plongest (gdbarch
->int_bit
));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
977 gdbarch_integer_to_address_p (gdbarch
));
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: integer_to_address = <%s>\n",
980 host_address_to_string (gdbarch
->integer_to_address
));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
983 host_address_to_string (gdbarch
->iterate_over_objfiles_in_search_order
));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: long_bit = %s\n",
986 plongest (gdbarch
->long_bit
));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: long_double_bit = %s\n",
989 plongest (gdbarch
->long_double_bit
));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: long_double_format = %s\n",
992 pformat (gdbarch
->long_double_format
));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: long_long_align_bit = %s\n",
995 plongest (gdbarch
->long_long_align_bit
));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: long_long_bit = %s\n",
998 plongest (gdbarch
->long_long_bit
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1001 gdbarch_make_corefile_notes_p (gdbarch
));
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: make_corefile_notes = <%s>\n",
1004 host_address_to_string (gdbarch
->make_corefile_notes
));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1007 gdbarch_max_insn_length_p (gdbarch
));
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: max_insn_length = %s\n",
1010 plongest (gdbarch
->max_insn_length
));
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1013 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1016 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: num_pseudo_regs = %s\n",
1019 plongest (gdbarch
->num_pseudo_regs
));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: num_regs = %s\n",
1022 plongest (gdbarch
->num_regs
));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: osabi = %s\n",
1025 plongest (gdbarch
->osabi
));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1028 gdbarch_overlay_update_p (gdbarch
));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: overlay_update = <%s>\n",
1031 host_address_to_string (gdbarch
->overlay_update
));
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: pc_regnum = %s\n",
1034 plongest (gdbarch
->pc_regnum
));
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: pointer_to_address = <%s>\n",
1037 host_address_to_string (gdbarch
->pointer_to_address
));
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1040 gdbarch_print_float_info_p (gdbarch
));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: print_float_info = <%s>\n",
1043 host_address_to_string (gdbarch
->print_float_info
));
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: print_insn = <%s>\n",
1046 host_address_to_string (gdbarch
->print_insn
));
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: print_registers_info = <%s>\n",
1049 host_address_to_string (gdbarch
->print_registers_info
));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1052 gdbarch_print_vector_info_p (gdbarch
));
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: print_vector_info = <%s>\n",
1055 host_address_to_string (gdbarch
->print_vector_info
));
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1058 gdbarch_process_record_p (gdbarch
));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: process_record = <%s>\n",
1061 host_address_to_string (gdbarch
->process_record
));
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1064 gdbarch_process_record_signal_p (gdbarch
));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: process_record_signal = <%s>\n",
1067 host_address_to_string (gdbarch
->process_record_signal
));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: ps_regnum = %s\n",
1070 plongest (gdbarch
->ps_regnum
));
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1073 gdbarch_pseudo_register_read_p (gdbarch
));
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: pseudo_register_read = <%s>\n",
1076 host_address_to_string (gdbarch
->pseudo_register_read
));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1079 gdbarch_pseudo_register_read_value_p (gdbarch
));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1082 host_address_to_string (gdbarch
->pseudo_register_read_value
));
1083 fprintf_unfiltered (file
,
1084 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1085 gdbarch_pseudo_register_write_p (gdbarch
));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: pseudo_register_write = <%s>\n",
1088 host_address_to_string (gdbarch
->pseudo_register_write
));
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: ptr_bit = %s\n",
1091 plongest (gdbarch
->ptr_bit
));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1094 gdbarch_push_dummy_call_p (gdbarch
));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: push_dummy_call = <%s>\n",
1097 host_address_to_string (gdbarch
->push_dummy_call
));
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1100 gdbarch_push_dummy_code_p (gdbarch
));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: push_dummy_code = <%s>\n",
1103 host_address_to_string (gdbarch
->push_dummy_code
));
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: ravenscar_ops = %s\n",
1106 host_address_to_string (gdbarch
->ravenscar_ops
));
1107 fprintf_unfiltered (file
,
1108 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1109 gdbarch_read_pc_p (gdbarch
));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: read_pc = <%s>\n",
1112 host_address_to_string (gdbarch
->read_pc
));
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1115 gdbarch_record_special_symbol_p (gdbarch
));
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: record_special_symbol = <%s>\n",
1118 host_address_to_string (gdbarch
->record_special_symbol
));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: register_name = <%s>\n",
1121 host_address_to_string (gdbarch
->register_name
));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: register_reggroup_p = <%s>\n",
1124 host_address_to_string (gdbarch
->register_reggroup_p
));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: register_sim_regno = <%s>\n",
1127 host_address_to_string (gdbarch
->register_sim_regno
));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: register_to_value = <%s>\n",
1130 host_address_to_string (gdbarch
->register_to_value
));
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1133 gdbarch_register_type_p (gdbarch
));
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: register_type = <%s>\n",
1136 host_address_to_string (gdbarch
->register_type
));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1139 gdbarch_regset_from_core_section_p (gdbarch
));
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: regset_from_core_section = <%s>\n",
1142 host_address_to_string (gdbarch
->regset_from_core_section
));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1145 gdbarch_relocate_instruction_p (gdbarch
));
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: relocate_instruction = <%s>\n",
1148 host_address_to_string (gdbarch
->relocate_instruction
));
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1151 host_address_to_string (gdbarch
->remote_breakpoint_from_pc
));
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: remote_register_number = <%s>\n",
1154 host_address_to_string (gdbarch
->remote_register_number
));
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1157 host_address_to_string (gdbarch
->return_in_first_hidden_param_p
));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1160 gdbarch_return_value_p (gdbarch
));
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: return_value = <%s>\n",
1163 host_address_to_string (gdbarch
->return_value
));
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1166 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: short_bit = %s\n",
1169 plongest (gdbarch
->short_bit
));
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1172 gdbarch_single_step_through_delay_p (gdbarch
));
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: single_step_through_delay = <%s>\n",
1175 host_address_to_string (gdbarch
->single_step_through_delay
));
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n",
1178 gdbarch_skip_entrypoint_p (gdbarch
));
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: skip_entrypoint = <%s>\n",
1181 host_address_to_string (gdbarch
->skip_entrypoint
));
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1184 gdbarch_skip_main_prologue_p (gdbarch
));
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: skip_main_prologue = <%s>\n",
1187 host_address_to_string (gdbarch
->skip_main_prologue
));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1190 gdbarch_skip_permanent_breakpoint_p (gdbarch
));
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1193 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: skip_prologue = <%s>\n",
1196 host_address_to_string (gdbarch
->skip_prologue
));
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1199 host_address_to_string (gdbarch
->skip_solib_resolver
));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1202 host_address_to_string (gdbarch
->skip_trampoline_code
));
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1205 gdbarch_software_single_step_p (gdbarch
));
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: software_single_step = <%s>\n",
1208 host_address_to_string (gdbarch
->software_single_step
));
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1211 plongest (gdbarch
->sofun_address_maybe_missing
));
1212 fprintf_unfiltered (file
,
1213 "gdbarch_dump: solib_symbols_extension = %s\n",
1214 pstring (gdbarch
->solib_symbols_extension
));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: sp_regnum = %s\n",
1217 plongest (gdbarch
->sp_regnum
));
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1220 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1223 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1226 pstring (gdbarch
->stap_gdb_register_prefix
));
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1229 pstring (gdbarch
->stap_gdb_register_suffix
));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: stap_integer_prefixes = %s\n",
1232 pstring_list (gdbarch
->stap_integer_prefixes
));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: stap_integer_suffixes = %s\n",
1235 pstring_list (gdbarch
->stap_integer_suffixes
));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1238 gdbarch_stap_is_single_operand_p (gdbarch
));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1241 host_address_to_string (gdbarch
->stap_is_single_operand
));
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1244 gdbarch_stap_parse_special_token_p (gdbarch
));
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1247 host_address_to_string (gdbarch
->stap_parse_special_token
));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: stap_register_indirection_prefixes = %s\n",
1250 pstring_list (gdbarch
->stap_register_indirection_prefixes
));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: stap_register_indirection_suffixes = %s\n",
1253 pstring_list (gdbarch
->stap_register_indirection_suffixes
));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: stap_register_prefixes = %s\n",
1256 pstring_list (gdbarch
->stap_register_prefixes
));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: stap_register_suffixes = %s\n",
1259 pstring_list (gdbarch
->stap_register_suffixes
));
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1262 gdbarch_static_transform_name_p (gdbarch
));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: static_transform_name = <%s>\n",
1265 host_address_to_string (gdbarch
->static_transform_name
));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: target_desc = %s\n",
1268 host_address_to_string (gdbarch
->target_desc
));
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1271 gdbarch_unwind_pc_p (gdbarch
));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: unwind_pc = <%s>\n",
1274 host_address_to_string (gdbarch
->unwind_pc
));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1277 gdbarch_unwind_sp_p (gdbarch
));
1278 fprintf_unfiltered (file
,
1279 "gdbarch_dump: unwind_sp = <%s>\n",
1280 host_address_to_string (gdbarch
->unwind_sp
));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: value_from_register = <%s>\n",
1283 host_address_to_string (gdbarch
->value_from_register
));
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: value_to_register = <%s>\n",
1286 host_address_to_string (gdbarch
->value_to_register
));
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: vbit_in_delta = %s\n",
1289 plongest (gdbarch
->vbit_in_delta
));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1292 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: vtable_function_descriptors = %s\n",
1295 plongest (gdbarch
->vtable_function_descriptors
));
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1298 gdbarch_write_pc_p (gdbarch
));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: write_pc = <%s>\n",
1301 host_address_to_string (gdbarch
->write_pc
));
1302 if (gdbarch
->dump_tdep
!= NULL
)
1303 gdbarch
->dump_tdep (gdbarch
, file
);
1306 struct gdbarch_tdep
*
1307 gdbarch_tdep (struct gdbarch
*gdbarch
)
1309 if (gdbarch_debug
>= 2)
1310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1311 return gdbarch
->tdep
;
1315 const struct bfd_arch_info
*
1316 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1318 gdb_assert (gdbarch
!= NULL
);
1319 if (gdbarch_debug
>= 2)
1320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1321 return gdbarch
->bfd_arch_info
;
1325 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1327 gdb_assert (gdbarch
!= NULL
);
1328 if (gdbarch_debug
>= 2)
1329 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1330 return gdbarch
->byte_order
;
1334 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1336 gdb_assert (gdbarch
!= NULL
);
1337 if (gdbarch_debug
>= 2)
1338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1339 return gdbarch
->byte_order_for_code
;
1343 gdbarch_osabi (struct gdbarch
*gdbarch
)
1345 gdb_assert (gdbarch
!= NULL
);
1346 if (gdbarch_debug
>= 2)
1347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1348 return gdbarch
->osabi
;
1351 const struct target_desc
*
1352 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1354 gdb_assert (gdbarch
!= NULL
);
1355 if (gdbarch_debug
>= 2)
1356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1357 return gdbarch
->target_desc
;
1361 gdbarch_bits_big_endian (struct gdbarch
*gdbarch
)
1363 gdb_assert (gdbarch
!= NULL
);
1364 /* Skip verify of bits_big_endian, invalid_p == 0 */
1365 if (gdbarch_debug
>= 2)
1366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bits_big_endian called\n");
1367 return gdbarch
->bits_big_endian
;
1371 set_gdbarch_bits_big_endian (struct gdbarch
*gdbarch
,
1372 int bits_big_endian
)
1374 gdbarch
->bits_big_endian
= bits_big_endian
;
1378 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1380 gdb_assert (gdbarch
!= NULL
);
1381 /* Skip verify of short_bit, invalid_p == 0 */
1382 if (gdbarch_debug
>= 2)
1383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1384 return gdbarch
->short_bit
;
1388 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1391 gdbarch
->short_bit
= short_bit
;
1395 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1397 gdb_assert (gdbarch
!= NULL
);
1398 /* Skip verify of int_bit, invalid_p == 0 */
1399 if (gdbarch_debug
>= 2)
1400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1401 return gdbarch
->int_bit
;
1405 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1408 gdbarch
->int_bit
= int_bit
;
1412 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1414 gdb_assert (gdbarch
!= NULL
);
1415 /* Skip verify of long_bit, invalid_p == 0 */
1416 if (gdbarch_debug
>= 2)
1417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1418 return gdbarch
->long_bit
;
1422 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1425 gdbarch
->long_bit
= long_bit
;
1429 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1431 gdb_assert (gdbarch
!= NULL
);
1432 /* Skip verify of long_long_bit, invalid_p == 0 */
1433 if (gdbarch_debug
>= 2)
1434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1435 return gdbarch
->long_long_bit
;
1439 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1442 gdbarch
->long_long_bit
= long_long_bit
;
1446 gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
)
1448 gdb_assert (gdbarch
!= NULL
);
1449 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1450 if (gdbarch_debug
>= 2)
1451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_align_bit called\n");
1452 return gdbarch
->long_long_align_bit
;
1456 set_gdbarch_long_long_align_bit (struct gdbarch
*gdbarch
,
1457 int long_long_align_bit
)
1459 gdbarch
->long_long_align_bit
= long_long_align_bit
;
1463 gdbarch_half_bit (struct gdbarch
*gdbarch
)
1465 gdb_assert (gdbarch
!= NULL
);
1466 /* Skip verify of half_bit, invalid_p == 0 */
1467 if (gdbarch_debug
>= 2)
1468 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_bit called\n");
1469 return gdbarch
->half_bit
;
1473 set_gdbarch_half_bit (struct gdbarch
*gdbarch
,
1476 gdbarch
->half_bit
= half_bit
;
1479 const struct floatformat
**
1480 gdbarch_half_format (struct gdbarch
*gdbarch
)
1482 gdb_assert (gdbarch
!= NULL
);
1483 if (gdbarch_debug
>= 2)
1484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_half_format called\n");
1485 return gdbarch
->half_format
;
1489 set_gdbarch_half_format (struct gdbarch
*gdbarch
,
1490 const struct floatformat
** half_format
)
1492 gdbarch
->half_format
= half_format
;
1496 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1498 gdb_assert (gdbarch
!= NULL
);
1499 /* Skip verify of float_bit, invalid_p == 0 */
1500 if (gdbarch_debug
>= 2)
1501 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1502 return gdbarch
->float_bit
;
1506 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1509 gdbarch
->float_bit
= float_bit
;
1512 const struct floatformat
**
1513 gdbarch_float_format (struct gdbarch
*gdbarch
)
1515 gdb_assert (gdbarch
!= NULL
);
1516 if (gdbarch_debug
>= 2)
1517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1518 return gdbarch
->float_format
;
1522 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1523 const struct floatformat
** float_format
)
1525 gdbarch
->float_format
= float_format
;
1529 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1531 gdb_assert (gdbarch
!= NULL
);
1532 /* Skip verify of double_bit, invalid_p == 0 */
1533 if (gdbarch_debug
>= 2)
1534 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1535 return gdbarch
->double_bit
;
1539 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1542 gdbarch
->double_bit
= double_bit
;
1545 const struct floatformat
**
1546 gdbarch_double_format (struct gdbarch
*gdbarch
)
1548 gdb_assert (gdbarch
!= NULL
);
1549 if (gdbarch_debug
>= 2)
1550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1551 return gdbarch
->double_format
;
1555 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1556 const struct floatformat
** double_format
)
1558 gdbarch
->double_format
= double_format
;
1562 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1564 gdb_assert (gdbarch
!= NULL
);
1565 /* Skip verify of long_double_bit, invalid_p == 0 */
1566 if (gdbarch_debug
>= 2)
1567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1568 return gdbarch
->long_double_bit
;
1572 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1573 int long_double_bit
)
1575 gdbarch
->long_double_bit
= long_double_bit
;
1578 const struct floatformat
**
1579 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1581 gdb_assert (gdbarch
!= NULL
);
1582 if (gdbarch_debug
>= 2)
1583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1584 return gdbarch
->long_double_format
;
1588 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1589 const struct floatformat
** long_double_format
)
1591 gdbarch
->long_double_format
= long_double_format
;
1595 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1597 gdb_assert (gdbarch
!= NULL
);
1598 /* Skip verify of ptr_bit, invalid_p == 0 */
1599 if (gdbarch_debug
>= 2)
1600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1601 return gdbarch
->ptr_bit
;
1605 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1608 gdbarch
->ptr_bit
= ptr_bit
;
1612 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1614 gdb_assert (gdbarch
!= NULL
);
1615 /* Check variable changed from pre-default. */
1616 gdb_assert (gdbarch
->addr_bit
!= 0);
1617 if (gdbarch_debug
>= 2)
1618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1619 return gdbarch
->addr_bit
;
1623 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1626 gdbarch
->addr_bit
= addr_bit
;
1630 gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
)
1632 gdb_assert (gdbarch
!= NULL
);
1633 /* Check variable changed from pre-default. */
1634 gdb_assert (gdbarch
->dwarf2_addr_size
!= 0);
1635 if (gdbarch_debug
>= 2)
1636 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_addr_size called\n");
1637 return gdbarch
->dwarf2_addr_size
;
1641 set_gdbarch_dwarf2_addr_size (struct gdbarch
*gdbarch
,
1642 int dwarf2_addr_size
)
1644 gdbarch
->dwarf2_addr_size
= dwarf2_addr_size
;
1648 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1650 gdb_assert (gdbarch
!= NULL
);
1651 /* Check variable changed from pre-default. */
1652 gdb_assert (gdbarch
->char_signed
!= -1);
1653 if (gdbarch_debug
>= 2)
1654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1655 return gdbarch
->char_signed
;
1659 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1662 gdbarch
->char_signed
= char_signed
;
1666 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1668 gdb_assert (gdbarch
!= NULL
);
1669 return gdbarch
->read_pc
!= NULL
;
1673 gdbarch_read_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
1675 gdb_assert (gdbarch
!= NULL
);
1676 gdb_assert (gdbarch
->read_pc
!= NULL
);
1677 if (gdbarch_debug
>= 2)
1678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1679 return gdbarch
->read_pc (regcache
);
1683 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1684 gdbarch_read_pc_ftype read_pc
)
1686 gdbarch
->read_pc
= read_pc
;
1690 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1692 gdb_assert (gdbarch
!= NULL
);
1693 return gdbarch
->write_pc
!= NULL
;
1697 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1699 gdb_assert (gdbarch
!= NULL
);
1700 gdb_assert (gdbarch
->write_pc
!= NULL
);
1701 if (gdbarch_debug
>= 2)
1702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1703 gdbarch
->write_pc (regcache
, val
);
1707 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1708 gdbarch_write_pc_ftype write_pc
)
1710 gdbarch
->write_pc
= write_pc
;
1714 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1716 gdb_assert (gdbarch
!= NULL
);
1717 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1718 if (gdbarch_debug
>= 2)
1719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1720 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
1724 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
1725 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
1727 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
1731 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
1733 gdb_assert (gdbarch
!= NULL
);
1734 return gdbarch
->pseudo_register_read
!= NULL
;
1737 enum register_status
1738 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
1740 gdb_assert (gdbarch
!= NULL
);
1741 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
1742 if (gdbarch_debug
>= 2)
1743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
1744 return gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
1748 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
1749 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
1751 gdbarch
->pseudo_register_read
= pseudo_register_read
;
1755 gdbarch_pseudo_register_read_value_p (struct gdbarch
*gdbarch
)
1757 gdb_assert (gdbarch
!= NULL
);
1758 return gdbarch
->pseudo_register_read_value
!= NULL
;
1762 gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
)
1764 gdb_assert (gdbarch
!= NULL
);
1765 gdb_assert (gdbarch
->pseudo_register_read_value
!= NULL
);
1766 if (gdbarch_debug
>= 2)
1767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read_value called\n");
1768 return gdbarch
->pseudo_register_read_value (gdbarch
, regcache
, cookednum
);
1772 set_gdbarch_pseudo_register_read_value (struct gdbarch
*gdbarch
,
1773 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value
)
1775 gdbarch
->pseudo_register_read_value
= pseudo_register_read_value
;
1779 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
1781 gdb_assert (gdbarch
!= NULL
);
1782 return gdbarch
->pseudo_register_write
!= NULL
;
1786 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
1788 gdb_assert (gdbarch
!= NULL
);
1789 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
1790 if (gdbarch_debug
>= 2)
1791 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
1792 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
1796 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
1797 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
1799 gdbarch
->pseudo_register_write
= pseudo_register_write
;
1803 gdbarch_num_regs (struct gdbarch
*gdbarch
)
1805 gdb_assert (gdbarch
!= NULL
);
1806 /* Check variable changed from pre-default. */
1807 gdb_assert (gdbarch
->num_regs
!= -1);
1808 if (gdbarch_debug
>= 2)
1809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
1810 return gdbarch
->num_regs
;
1814 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
1817 gdbarch
->num_regs
= num_regs
;
1821 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
1823 gdb_assert (gdbarch
!= NULL
);
1824 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1825 if (gdbarch_debug
>= 2)
1826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
1827 return gdbarch
->num_pseudo_regs
;
1831 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
1832 int num_pseudo_regs
)
1834 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
1838 gdbarch_ax_pseudo_register_collect_p (struct gdbarch
*gdbarch
)
1840 gdb_assert (gdbarch
!= NULL
);
1841 return gdbarch
->ax_pseudo_register_collect
!= NULL
;
1845 gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1847 gdb_assert (gdbarch
!= NULL
);
1848 gdb_assert (gdbarch
->ax_pseudo_register_collect
!= NULL
);
1849 if (gdbarch_debug
>= 2)
1850 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_collect called\n");
1851 return gdbarch
->ax_pseudo_register_collect (gdbarch
, ax
, reg
);
1855 set_gdbarch_ax_pseudo_register_collect (struct gdbarch
*gdbarch
,
1856 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect
)
1858 gdbarch
->ax_pseudo_register_collect
= ax_pseudo_register_collect
;
1862 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch
*gdbarch
)
1864 gdb_assert (gdbarch
!= NULL
);
1865 return gdbarch
->ax_pseudo_register_push_stack
!= NULL
;
1869 gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, int reg
)
1871 gdb_assert (gdbarch
!= NULL
);
1872 gdb_assert (gdbarch
->ax_pseudo_register_push_stack
!= NULL
);
1873 if (gdbarch_debug
>= 2)
1874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ax_pseudo_register_push_stack called\n");
1875 return gdbarch
->ax_pseudo_register_push_stack (gdbarch
, ax
, reg
);
1879 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch
*gdbarch
,
1880 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack
)
1882 gdbarch
->ax_pseudo_register_push_stack
= ax_pseudo_register_push_stack
;
1886 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
1888 gdb_assert (gdbarch
!= NULL
);
1889 /* Skip verify of sp_regnum, invalid_p == 0 */
1890 if (gdbarch_debug
>= 2)
1891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
1892 return gdbarch
->sp_regnum
;
1896 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
1899 gdbarch
->sp_regnum
= sp_regnum
;
1903 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
1905 gdb_assert (gdbarch
!= NULL
);
1906 /* Skip verify of pc_regnum, invalid_p == 0 */
1907 if (gdbarch_debug
>= 2)
1908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
1909 return gdbarch
->pc_regnum
;
1913 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
1916 gdbarch
->pc_regnum
= pc_regnum
;
1920 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
1922 gdb_assert (gdbarch
!= NULL
);
1923 /* Skip verify of ps_regnum, invalid_p == 0 */
1924 if (gdbarch_debug
>= 2)
1925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
1926 return gdbarch
->ps_regnum
;
1930 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
1933 gdbarch
->ps_regnum
= ps_regnum
;
1937 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
1939 gdb_assert (gdbarch
!= NULL
);
1940 /* Skip verify of fp0_regnum, invalid_p == 0 */
1941 if (gdbarch_debug
>= 2)
1942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
1943 return gdbarch
->fp0_regnum
;
1947 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
1950 gdbarch
->fp0_regnum
= fp0_regnum
;
1954 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
1956 gdb_assert (gdbarch
!= NULL
);
1957 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
1958 if (gdbarch_debug
>= 2)
1959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
1960 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
1964 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
1965 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
1967 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
1971 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
1973 gdb_assert (gdbarch
!= NULL
);
1974 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
1975 if (gdbarch_debug
>= 2)
1976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
1977 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
1981 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
1982 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
1984 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
1988 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
1990 gdb_assert (gdbarch
!= NULL
);
1991 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
1992 if (gdbarch_debug
>= 2)
1993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
1994 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
1998 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
1999 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2001 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2005 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2007 gdb_assert (gdbarch
!= NULL
);
2008 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2009 if (gdbarch_debug
>= 2)
2010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2011 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
2015 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2016 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2018 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2022 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2024 gdb_assert (gdbarch
!= NULL
);
2025 gdb_assert (gdbarch
->register_name
!= NULL
);
2026 if (gdbarch_debug
>= 2)
2027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2028 return gdbarch
->register_name (gdbarch
, regnr
);
2032 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2033 gdbarch_register_name_ftype register_name
)
2035 gdbarch
->register_name
= register_name
;
2039 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2041 gdb_assert (gdbarch
!= NULL
);
2042 return gdbarch
->register_type
!= NULL
;
2046 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2048 gdb_assert (gdbarch
!= NULL
);
2049 gdb_assert (gdbarch
->register_type
!= NULL
);
2050 if (gdbarch_debug
>= 2)
2051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2052 return gdbarch
->register_type (gdbarch
, reg_nr
);
2056 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2057 gdbarch_register_type_ftype register_type
)
2059 gdbarch
->register_type
= register_type
;
2063 gdbarch_dummy_id_p (struct gdbarch
*gdbarch
)
2065 gdb_assert (gdbarch
!= NULL
);
2066 return gdbarch
->dummy_id
!= NULL
;
2070 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
2072 gdb_assert (gdbarch
!= NULL
);
2073 gdb_assert (gdbarch
->dummy_id
!= NULL
);
2074 if (gdbarch_debug
>= 2)
2075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
2076 return gdbarch
->dummy_id (gdbarch
, this_frame
);
2080 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
2081 gdbarch_dummy_id_ftype dummy_id
)
2083 gdbarch
->dummy_id
= dummy_id
;
2087 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2089 gdb_assert (gdbarch
!= NULL
);
2090 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2091 if (gdbarch_debug
>= 2)
2092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2093 return gdbarch
->deprecated_fp_regnum
;
2097 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2098 int deprecated_fp_regnum
)
2100 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2104 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2106 gdb_assert (gdbarch
!= NULL
);
2107 return gdbarch
->push_dummy_call
!= NULL
;
2111 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
)
2113 gdb_assert (gdbarch
!= NULL
);
2114 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2115 if (gdbarch_debug
>= 2)
2116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2117 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
2121 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2122 gdbarch_push_dummy_call_ftype push_dummy_call
)
2124 gdbarch
->push_dummy_call
= push_dummy_call
;
2128 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2130 gdb_assert (gdbarch
!= NULL
);
2131 /* Skip verify of call_dummy_location, invalid_p == 0 */
2132 if (gdbarch_debug
>= 2)
2133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2134 return gdbarch
->call_dummy_location
;
2138 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2139 int call_dummy_location
)
2141 gdbarch
->call_dummy_location
= call_dummy_location
;
2145 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2147 gdb_assert (gdbarch
!= NULL
);
2148 return gdbarch
->push_dummy_code
!= NULL
;
2152 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
)
2154 gdb_assert (gdbarch
!= NULL
);
2155 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2156 if (gdbarch_debug
>= 2)
2157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2158 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
2162 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2163 gdbarch_push_dummy_code_ftype push_dummy_code
)
2165 gdbarch
->push_dummy_code
= push_dummy_code
;
2169 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2171 gdb_assert (gdbarch
!= NULL
);
2172 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2173 if (gdbarch_debug
>= 2)
2174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2175 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2179 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2180 gdbarch_print_registers_info_ftype print_registers_info
)
2182 gdbarch
->print_registers_info
= print_registers_info
;
2186 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
2188 gdb_assert (gdbarch
!= NULL
);
2189 return gdbarch
->print_float_info
!= NULL
;
2193 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2195 gdb_assert (gdbarch
!= NULL
);
2196 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2197 if (gdbarch_debug
>= 2)
2198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2199 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2203 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2204 gdbarch_print_float_info_ftype print_float_info
)
2206 gdbarch
->print_float_info
= print_float_info
;
2210 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2212 gdb_assert (gdbarch
!= NULL
);
2213 return gdbarch
->print_vector_info
!= NULL
;
2217 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2219 gdb_assert (gdbarch
!= NULL
);
2220 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2221 if (gdbarch_debug
>= 2)
2222 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2223 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2227 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2228 gdbarch_print_vector_info_ftype print_vector_info
)
2230 gdbarch
->print_vector_info
= print_vector_info
;
2234 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2236 gdb_assert (gdbarch
!= NULL
);
2237 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2238 if (gdbarch_debug
>= 2)
2239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2240 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2244 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2245 gdbarch_register_sim_regno_ftype register_sim_regno
)
2247 gdbarch
->register_sim_regno
= register_sim_regno
;
2251 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2253 gdb_assert (gdbarch
!= NULL
);
2254 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2255 if (gdbarch_debug
>= 2)
2256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2257 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2261 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2262 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2264 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2268 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2270 gdb_assert (gdbarch
!= NULL
);
2271 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2272 if (gdbarch_debug
>= 2)
2273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2274 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2278 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2279 gdbarch_cannot_store_register_ftype cannot_store_register
)
2281 gdbarch
->cannot_store_register
= cannot_store_register
;
2285 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2287 gdb_assert (gdbarch
!= NULL
);
2288 return gdbarch
->get_longjmp_target
!= NULL
;
2292 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2294 gdb_assert (gdbarch
!= NULL
);
2295 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2296 if (gdbarch_debug
>= 2)
2297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2298 return gdbarch
->get_longjmp_target (frame
, pc
);
2302 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2303 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2305 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2309 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2311 gdb_assert (gdbarch
!= NULL
);
2312 if (gdbarch_debug
>= 2)
2313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2314 return gdbarch
->believe_pcc_promotion
;
2318 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2319 int believe_pcc_promotion
)
2321 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2325 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2327 gdb_assert (gdbarch
!= NULL
);
2328 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2329 if (gdbarch_debug
>= 2)
2330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2331 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2335 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2336 gdbarch_convert_register_p_ftype convert_register_p
)
2338 gdbarch
->convert_register_p
= convert_register_p
;
2342 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
, int *optimizedp
, int *unavailablep
)
2344 gdb_assert (gdbarch
!= NULL
);
2345 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2346 if (gdbarch_debug
>= 2)
2347 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2348 return gdbarch
->register_to_value (frame
, regnum
, type
, buf
, optimizedp
, unavailablep
);
2352 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2353 gdbarch_register_to_value_ftype register_to_value
)
2355 gdbarch
->register_to_value
= register_to_value
;
2359 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2361 gdb_assert (gdbarch
!= NULL
);
2362 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2363 if (gdbarch_debug
>= 2)
2364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2365 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2369 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2370 gdbarch_value_to_register_ftype value_to_register
)
2372 gdbarch
->value_to_register
= value_to_register
;
2376 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_info
*frame
)
2378 gdb_assert (gdbarch
!= NULL
);
2379 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2380 if (gdbarch_debug
>= 2)
2381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2382 return gdbarch
->value_from_register (type
, regnum
, frame
);
2386 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2387 gdbarch_value_from_register_ftype value_from_register
)
2389 gdbarch
->value_from_register
= value_from_register
;
2393 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2395 gdb_assert (gdbarch
!= NULL
);
2396 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2397 if (gdbarch_debug
>= 2)
2398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2399 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2403 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2404 gdbarch_pointer_to_address_ftype pointer_to_address
)
2406 gdbarch
->pointer_to_address
= pointer_to_address
;
2410 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2412 gdb_assert (gdbarch
!= NULL
);
2413 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2414 if (gdbarch_debug
>= 2)
2415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2416 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2420 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2421 gdbarch_address_to_pointer_ftype address_to_pointer
)
2423 gdbarch
->address_to_pointer
= address_to_pointer
;
2427 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2429 gdb_assert (gdbarch
!= NULL
);
2430 return gdbarch
->integer_to_address
!= NULL
;
2434 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2436 gdb_assert (gdbarch
!= NULL
);
2437 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2438 if (gdbarch_debug
>= 2)
2439 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2440 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2444 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2445 gdbarch_integer_to_address_ftype integer_to_address
)
2447 gdbarch
->integer_to_address
= integer_to_address
;
2451 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2453 gdb_assert (gdbarch
!= NULL
);
2454 return gdbarch
->return_value
!= NULL
;
2457 enum return_value_convention
2458 gdbarch_return_value (struct gdbarch
*gdbarch
, struct value
*function
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2460 gdb_assert (gdbarch
!= NULL
);
2461 gdb_assert (gdbarch
->return_value
!= NULL
);
2462 if (gdbarch_debug
>= 2)
2463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2464 return gdbarch
->return_value (gdbarch
, function
, valtype
, regcache
, readbuf
, writebuf
);
2468 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2469 gdbarch_return_value_ftype return_value
)
2471 gdbarch
->return_value
= return_value
;
2475 gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
, struct type
*type
)
2477 gdb_assert (gdbarch
!= NULL
);
2478 gdb_assert (gdbarch
->return_in_first_hidden_param_p
!= NULL
);
2479 if (gdbarch_debug
>= 2)
2480 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_in_first_hidden_param_p called\n");
2481 return gdbarch
->return_in_first_hidden_param_p (gdbarch
, type
);
2485 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch
*gdbarch
,
2486 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p
)
2488 gdbarch
->return_in_first_hidden_param_p
= return_in_first_hidden_param_p
;
2492 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2494 gdb_assert (gdbarch
!= NULL
);
2495 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2496 if (gdbarch_debug
>= 2)
2497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2498 return gdbarch
->skip_prologue (gdbarch
, ip
);
2502 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2503 gdbarch_skip_prologue_ftype skip_prologue
)
2505 gdbarch
->skip_prologue
= skip_prologue
;
2509 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2511 gdb_assert (gdbarch
!= NULL
);
2512 return gdbarch
->skip_main_prologue
!= NULL
;
2516 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2518 gdb_assert (gdbarch
!= NULL
);
2519 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2520 if (gdbarch_debug
>= 2)
2521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2522 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2526 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2527 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2529 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2533 gdbarch_skip_entrypoint_p (struct gdbarch
*gdbarch
)
2535 gdb_assert (gdbarch
!= NULL
);
2536 return gdbarch
->skip_entrypoint
!= NULL
;
2540 gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2542 gdb_assert (gdbarch
!= NULL
);
2543 gdb_assert (gdbarch
->skip_entrypoint
!= NULL
);
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_entrypoint called\n");
2546 return gdbarch
->skip_entrypoint (gdbarch
, ip
);
2550 set_gdbarch_skip_entrypoint (struct gdbarch
*gdbarch
,
2551 gdbarch_skip_entrypoint_ftype skip_entrypoint
)
2553 gdbarch
->skip_entrypoint
= skip_entrypoint
;
2557 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2559 gdb_assert (gdbarch
!= NULL
);
2560 gdb_assert (gdbarch
->inner_than
!= NULL
);
2561 if (gdbarch_debug
>= 2)
2562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2563 return gdbarch
->inner_than (lhs
, rhs
);
2567 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2568 gdbarch_inner_than_ftype inner_than
)
2570 gdbarch
->inner_than
= inner_than
;
2574 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2576 gdb_assert (gdbarch
!= NULL
);
2577 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2580 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2584 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2585 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2587 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2591 gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *kindptr
)
2593 gdb_assert (gdbarch
!= NULL
);
2594 gdb_assert (gdbarch
->remote_breakpoint_from_pc
!= NULL
);
2595 if (gdbarch_debug
>= 2)
2596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_breakpoint_from_pc called\n");
2597 gdbarch
->remote_breakpoint_from_pc (gdbarch
, pcptr
, kindptr
);
2601 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2602 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc
)
2604 gdbarch
->remote_breakpoint_from_pc
= remote_breakpoint_from_pc
;
2608 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2610 gdb_assert (gdbarch
!= NULL
);
2611 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2615 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2617 gdb_assert (gdbarch
!= NULL
);
2618 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2619 if (gdbarch_debug
>= 2)
2620 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2621 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2625 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2626 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2628 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2632 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2634 gdb_assert (gdbarch
!= NULL
);
2635 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2636 if (gdbarch_debug
>= 2)
2637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2638 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2642 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2643 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2645 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2649 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2651 gdb_assert (gdbarch
!= NULL
);
2652 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2653 if (gdbarch_debug
>= 2)
2654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2655 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2659 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2660 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
2662 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
2666 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
2668 gdb_assert (gdbarch
!= NULL
);
2669 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2670 if (gdbarch_debug
>= 2)
2671 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
2672 return gdbarch
->decr_pc_after_break
;
2676 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
2677 CORE_ADDR decr_pc_after_break
)
2679 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
2683 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
2685 gdb_assert (gdbarch
!= NULL
);
2686 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2687 if (gdbarch_debug
>= 2)
2688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
2689 return gdbarch
->deprecated_function_start_offset
;
2693 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
2694 CORE_ADDR deprecated_function_start_offset
)
2696 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
2700 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
2702 gdb_assert (gdbarch
!= NULL
);
2703 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
2706 return gdbarch
->remote_register_number (gdbarch
, regno
);
2710 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
2711 gdbarch_remote_register_number_ftype remote_register_number
)
2713 gdbarch
->remote_register_number
= remote_register_number
;
2717 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
2719 gdb_assert (gdbarch
!= NULL
);
2720 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
2724 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
2726 gdb_assert (gdbarch
!= NULL
);
2727 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
2728 if (gdbarch_debug
>= 2)
2729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
2730 return gdbarch
->fetch_tls_load_module_address (objfile
);
2734 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
2735 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
2737 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
2741 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
2743 gdb_assert (gdbarch
!= NULL
);
2744 /* Skip verify of frame_args_skip, invalid_p == 0 */
2745 if (gdbarch_debug
>= 2)
2746 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
2747 return gdbarch
->frame_args_skip
;
2751 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
2752 CORE_ADDR frame_args_skip
)
2754 gdbarch
->frame_args_skip
= frame_args_skip
;
2758 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
2760 gdb_assert (gdbarch
!= NULL
);
2761 return gdbarch
->unwind_pc
!= NULL
;
2765 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2767 gdb_assert (gdbarch
!= NULL
);
2768 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
2769 if (gdbarch_debug
>= 2)
2770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
2771 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
2775 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
2776 gdbarch_unwind_pc_ftype unwind_pc
)
2778 gdbarch
->unwind_pc
= unwind_pc
;
2782 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
2784 gdb_assert (gdbarch
!= NULL
);
2785 return gdbarch
->unwind_sp
!= NULL
;
2789 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2791 gdb_assert (gdbarch
!= NULL
);
2792 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
2793 if (gdbarch_debug
>= 2)
2794 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
2795 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
2799 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
2800 gdbarch_unwind_sp_ftype unwind_sp
)
2802 gdbarch
->unwind_sp
= unwind_sp
;
2806 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
2808 gdb_assert (gdbarch
!= NULL
);
2809 return gdbarch
->frame_num_args
!= NULL
;
2813 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2815 gdb_assert (gdbarch
!= NULL
);
2816 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
2817 if (gdbarch_debug
>= 2)
2818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
2819 return gdbarch
->frame_num_args (frame
);
2823 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
2824 gdbarch_frame_num_args_ftype frame_num_args
)
2826 gdbarch
->frame_num_args
= frame_num_args
;
2830 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
2832 gdb_assert (gdbarch
!= NULL
);
2833 return gdbarch
->frame_align
!= NULL
;
2837 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
2839 gdb_assert (gdbarch
!= NULL
);
2840 gdb_assert (gdbarch
->frame_align
!= NULL
);
2841 if (gdbarch_debug
>= 2)
2842 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
2843 return gdbarch
->frame_align (gdbarch
, address
);
2847 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
2848 gdbarch_frame_align_ftype frame_align
)
2850 gdbarch
->frame_align
= frame_align
;
2854 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
2856 gdb_assert (gdbarch
!= NULL
);
2857 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
2858 if (gdbarch_debug
>= 2)
2859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
2860 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
2864 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
2865 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
2867 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
2871 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
2873 gdb_assert (gdbarch
!= NULL
);
2874 if (gdbarch_debug
>= 2)
2875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
2876 return gdbarch
->frame_red_zone_size
;
2880 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
2881 int frame_red_zone_size
)
2883 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
2887 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
2889 gdb_assert (gdbarch
!= NULL
);
2890 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
2891 if (gdbarch_debug
>= 2)
2892 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
2893 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
2897 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
2898 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
2900 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
2904 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2906 gdb_assert (gdbarch
!= NULL
);
2907 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
2910 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
2914 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
2915 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
2917 gdbarch
->addr_bits_remove
= addr_bits_remove
;
2921 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
2923 gdb_assert (gdbarch
!= NULL
);
2924 return gdbarch
->software_single_step
!= NULL
;
2928 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2930 gdb_assert (gdbarch
!= NULL
);
2931 gdb_assert (gdbarch
->software_single_step
!= NULL
);
2932 if (gdbarch_debug
>= 2)
2933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
2934 return gdbarch
->software_single_step (frame
);
2938 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
2939 gdbarch_software_single_step_ftype software_single_step
)
2941 gdbarch
->software_single_step
= software_single_step
;
2945 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
2947 gdb_assert (gdbarch
!= NULL
);
2948 return gdbarch
->single_step_through_delay
!= NULL
;
2952 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2954 gdb_assert (gdbarch
!= NULL
);
2955 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
2958 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
2962 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
2963 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
2965 gdbarch
->single_step_through_delay
= single_step_through_delay
;
2969 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
2971 gdb_assert (gdbarch
!= NULL
);
2972 gdb_assert (gdbarch
->print_insn
!= NULL
);
2973 if (gdbarch_debug
>= 2)
2974 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
2975 return gdbarch
->print_insn (vma
, info
);
2979 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
2980 gdbarch_print_insn_ftype print_insn
)
2982 gdbarch
->print_insn
= print_insn
;
2986 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
2988 gdb_assert (gdbarch
!= NULL
);
2989 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
2990 if (gdbarch_debug
>= 2)
2991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
2992 return gdbarch
->skip_trampoline_code (frame
, pc
);
2996 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
2997 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
2999 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3003 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3005 gdb_assert (gdbarch
!= NULL
);
3006 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3007 if (gdbarch_debug
>= 2)
3008 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3009 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3013 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3014 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3016 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3020 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, const char *name
)
3022 gdb_assert (gdbarch
!= NULL
);
3023 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3024 if (gdbarch_debug
>= 2)
3025 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3026 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
3030 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3031 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3033 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3037 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3039 gdb_assert (gdbarch
!= NULL
);
3040 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
3041 if (gdbarch_debug
>= 2)
3042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
3043 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
3047 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
3048 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
3050 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
3054 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3056 gdb_assert (gdbarch
!= NULL
);
3057 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3058 if (gdbarch_debug
>= 2)
3059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3060 gdbarch
->elf_make_msymbol_special (sym
, msym
);
3064 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
3065 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
3067 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
3071 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
3073 gdb_assert (gdbarch
!= NULL
);
3074 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
3075 if (gdbarch_debug
>= 2)
3076 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
3077 gdbarch
->coff_make_msymbol_special (val
, msym
);
3081 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
3082 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
3084 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
3088 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
3090 gdb_assert (gdbarch
!= NULL
);
3091 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3092 if (gdbarch_debug
>= 2)
3093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
3094 return gdbarch
->cannot_step_breakpoint
;
3098 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
3099 int cannot_step_breakpoint
)
3101 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
3105 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
3107 gdb_assert (gdbarch
!= NULL
);
3108 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3109 if (gdbarch_debug
>= 2)
3110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
3111 return gdbarch
->have_nonsteppable_watchpoint
;
3115 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
3116 int have_nonsteppable_watchpoint
)
3118 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
3122 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
3124 gdb_assert (gdbarch
!= NULL
);
3125 return gdbarch
->address_class_type_flags
!= NULL
;
3129 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
3131 gdb_assert (gdbarch
!= NULL
);
3132 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
3133 if (gdbarch_debug
>= 2)
3134 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
3135 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
3139 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
3140 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
3142 gdbarch
->address_class_type_flags
= address_class_type_flags
;
3146 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
3148 gdb_assert (gdbarch
!= NULL
);
3149 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
3153 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
3155 gdb_assert (gdbarch
!= NULL
);
3156 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
3157 if (gdbarch_debug
>= 2)
3158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
3159 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
3163 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
3164 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
3166 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
3170 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
3172 gdb_assert (gdbarch
!= NULL
);
3173 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
3177 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
3179 gdb_assert (gdbarch
!= NULL
);
3180 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
3181 if (gdbarch_debug
>= 2)
3182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
3183 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
3187 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
3188 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
3190 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
3194 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
3196 gdb_assert (gdbarch
!= NULL
);
3197 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
3200 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
3204 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
3205 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
3207 gdbarch
->register_reggroup_p
= register_reggroup_p
;
3211 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
3213 gdb_assert (gdbarch
!= NULL
);
3214 return gdbarch
->fetch_pointer_argument
!= NULL
;
3218 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
3220 gdb_assert (gdbarch
!= NULL
);
3221 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
3224 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
3228 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
3229 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
3231 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
3235 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
3237 gdb_assert (gdbarch
!= NULL
);
3238 return gdbarch
->regset_from_core_section
!= NULL
;
3241 const struct regset
*
3242 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
3244 gdb_assert (gdbarch
!= NULL
);
3245 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
3246 if (gdbarch_debug
>= 2)
3247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
3248 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
3252 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
3253 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
3255 gdbarch
->regset_from_core_section
= regset_from_core_section
;
3258 struct core_regset_section
*
3259 gdbarch_core_regset_sections (struct gdbarch
*gdbarch
)
3261 gdb_assert (gdbarch
!= NULL
);
3262 if (gdbarch_debug
>= 2)
3263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_regset_sections called\n");
3264 return gdbarch
->core_regset_sections
;
3268 set_gdbarch_core_regset_sections (struct gdbarch
*gdbarch
,
3269 struct core_regset_section
* core_regset_sections
)
3271 gdbarch
->core_regset_sections
= core_regset_sections
;
3275 gdbarch_make_corefile_notes_p (struct gdbarch
*gdbarch
)
3277 gdb_assert (gdbarch
!= NULL
);
3278 return gdbarch
->make_corefile_notes
!= NULL
;
3282 gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
, bfd
*obfd
, int *note_size
)
3284 gdb_assert (gdbarch
!= NULL
);
3285 gdb_assert (gdbarch
->make_corefile_notes
!= NULL
);
3286 if (gdbarch_debug
>= 2)
3287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_make_corefile_notes called\n");
3288 return gdbarch
->make_corefile_notes (gdbarch
, obfd
, note_size
);
3292 set_gdbarch_make_corefile_notes (struct gdbarch
*gdbarch
,
3293 gdbarch_make_corefile_notes_ftype make_corefile_notes
)
3295 gdbarch
->make_corefile_notes
= make_corefile_notes
;
3299 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch
*gdbarch
)
3301 gdb_assert (gdbarch
!= NULL
);
3302 return gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
;
3306 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
, bfd
*obfd
, char *note_data
, int *note_size
, const struct elf_internal_linux_prpsinfo
*info
)
3308 gdb_assert (gdbarch
!= NULL
);
3309 gdb_assert (gdbarch
->elfcore_write_linux_prpsinfo
!= NULL
);
3310 if (gdbarch_debug
>= 2)
3311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elfcore_write_linux_prpsinfo called\n");
3312 return gdbarch
->elfcore_write_linux_prpsinfo (obfd
, note_data
, note_size
, info
);
3316 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch
*gdbarch
,
3317 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo
)
3319 gdbarch
->elfcore_write_linux_prpsinfo
= elfcore_write_linux_prpsinfo
;
3323 gdbarch_find_memory_regions_p (struct gdbarch
*gdbarch
)
3325 gdb_assert (gdbarch
!= NULL
);
3326 return gdbarch
->find_memory_regions
!= NULL
;
3330 gdbarch_find_memory_regions (struct gdbarch
*gdbarch
, find_memory_region_ftype func
, void *data
)
3332 gdb_assert (gdbarch
!= NULL
);
3333 gdb_assert (gdbarch
->find_memory_regions
!= NULL
);
3334 if (gdbarch_debug
>= 2)
3335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_memory_regions called\n");
3336 return gdbarch
->find_memory_regions (gdbarch
, func
, data
);
3340 set_gdbarch_find_memory_regions (struct gdbarch
*gdbarch
,
3341 gdbarch_find_memory_regions_ftype find_memory_regions
)
3343 gdbarch
->find_memory_regions
= find_memory_regions
;
3347 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3349 gdb_assert (gdbarch
!= NULL
);
3350 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3354 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3356 gdb_assert (gdbarch
!= NULL
);
3357 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3358 if (gdbarch_debug
>= 2)
3359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3360 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3364 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3365 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3367 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3371 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch
*gdbarch
)
3373 gdb_assert (gdbarch
!= NULL
);
3374 return gdbarch
->core_xfer_shared_libraries_aix
!= NULL
;
3378 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, ULONGEST len
)
3380 gdb_assert (gdbarch
!= NULL
);
3381 gdb_assert (gdbarch
->core_xfer_shared_libraries_aix
!= NULL
);
3382 if (gdbarch_debug
>= 2)
3383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries_aix called\n");
3384 return gdbarch
->core_xfer_shared_libraries_aix (gdbarch
, readbuf
, offset
, len
);
3388 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch
*gdbarch
,
3389 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix
)
3391 gdbarch
->core_xfer_shared_libraries_aix
= core_xfer_shared_libraries_aix
;
3395 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3397 gdb_assert (gdbarch
!= NULL
);
3398 return gdbarch
->core_pid_to_str
!= NULL
;
3402 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3404 gdb_assert (gdbarch
!= NULL
);
3405 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3406 if (gdbarch_debug
>= 2)
3407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3408 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3412 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3413 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3415 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3419 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3421 gdb_assert (gdbarch
!= NULL
);
3422 return gdbarch
->gcore_bfd_target
!= 0;
3426 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3428 gdb_assert (gdbarch
!= NULL
);
3429 /* Check variable changed from pre-default. */
3430 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3431 if (gdbarch_debug
>= 2)
3432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3433 return gdbarch
->gcore_bfd_target
;
3437 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3438 const char * gcore_bfd_target
)
3440 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3444 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3446 gdb_assert (gdbarch
!= NULL
);
3447 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3448 if (gdbarch_debug
>= 2)
3449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3450 return gdbarch
->vtable_function_descriptors
;
3454 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3455 int vtable_function_descriptors
)
3457 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3461 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3463 gdb_assert (gdbarch
!= NULL
);
3464 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3465 if (gdbarch_debug
>= 2)
3466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3467 return gdbarch
->vbit_in_delta
;
3471 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3474 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3478 gdbarch_skip_permanent_breakpoint_p (struct gdbarch
*gdbarch
)
3480 gdb_assert (gdbarch
!= NULL
);
3481 return gdbarch
->skip_permanent_breakpoint
!= NULL
;
3485 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3487 gdb_assert (gdbarch
!= NULL
);
3488 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3489 if (gdbarch_debug
>= 2)
3490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3491 gdbarch
->skip_permanent_breakpoint (regcache
);
3495 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3496 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3498 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3502 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3504 gdb_assert (gdbarch
!= NULL
);
3505 return gdbarch
->max_insn_length
!= 0;
3509 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3511 gdb_assert (gdbarch
!= NULL
);
3512 /* Check variable changed from pre-default. */
3513 gdb_assert (gdbarch
->max_insn_length
!= 0);
3514 if (gdbarch_debug
>= 2)
3515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3516 return gdbarch
->max_insn_length
;
3520 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3521 ULONGEST max_insn_length
)
3523 gdbarch
->max_insn_length
= max_insn_length
;
3527 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3529 gdb_assert (gdbarch
!= NULL
);
3530 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3533 struct displaced_step_closure
*
3534 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3536 gdb_assert (gdbarch
!= NULL
);
3537 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3538 if (gdbarch_debug
>= 2)
3539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3540 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
3544 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
3545 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
3547 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
3551 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3553 gdb_assert (gdbarch
!= NULL
);
3554 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
3555 if (gdbarch_debug
>= 2)
3556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
3557 return gdbarch
->displaced_step_hw_singlestep (gdbarch
, closure
);
3561 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
3562 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
3564 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
3568 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
3570 gdb_assert (gdbarch
!= NULL
);
3571 return gdbarch
->displaced_step_fixup
!= NULL
;
3575 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3577 gdb_assert (gdbarch
!= NULL
);
3578 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
3579 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3580 if (gdbarch_debug
>= 2)
3581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
3582 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
3586 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
3587 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
3589 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
3593 gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3595 gdb_assert (gdbarch
!= NULL
);
3596 gdb_assert (gdbarch
->displaced_step_free_closure
!= NULL
);
3597 if (gdbarch_debug
>= 2)
3598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_free_closure called\n");
3599 gdbarch
->displaced_step_free_closure (gdbarch
, closure
);
3603 set_gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
,
3604 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure
)
3606 gdbarch
->displaced_step_free_closure
= displaced_step_free_closure
;
3610 gdbarch_displaced_step_location (struct gdbarch
*gdbarch
)
3612 gdb_assert (gdbarch
!= NULL
);
3613 gdb_assert (gdbarch
->displaced_step_location
!= NULL
);
3614 if (gdbarch_debug
>= 2)
3615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_location called\n");
3616 return gdbarch
->displaced_step_location (gdbarch
);
3620 set_gdbarch_displaced_step_location (struct gdbarch
*gdbarch
,
3621 gdbarch_displaced_step_location_ftype displaced_step_location
)
3623 gdbarch
->displaced_step_location
= displaced_step_location
;
3627 gdbarch_relocate_instruction_p (struct gdbarch
*gdbarch
)
3629 gdb_assert (gdbarch
!= NULL
);
3630 return gdbarch
->relocate_instruction
!= NULL
;
3634 gdbarch_relocate_instruction (struct gdbarch
*gdbarch
, CORE_ADDR
*to
, CORE_ADDR from
)
3636 gdb_assert (gdbarch
!= NULL
);
3637 gdb_assert (gdbarch
->relocate_instruction
!= NULL
);
3638 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_relocate_instruction called\n");
3641 gdbarch
->relocate_instruction (gdbarch
, to
, from
);
3645 set_gdbarch_relocate_instruction (struct gdbarch
*gdbarch
,
3646 gdbarch_relocate_instruction_ftype relocate_instruction
)
3648 gdbarch
->relocate_instruction
= relocate_instruction
;
3652 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
3654 gdb_assert (gdbarch
!= NULL
);
3655 return gdbarch
->overlay_update
!= NULL
;
3659 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
3661 gdb_assert (gdbarch
!= NULL
);
3662 gdb_assert (gdbarch
->overlay_update
!= NULL
);
3663 if (gdbarch_debug
>= 2)
3664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
3665 gdbarch
->overlay_update (osect
);
3669 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
3670 gdbarch_overlay_update_ftype overlay_update
)
3672 gdbarch
->overlay_update
= overlay_update
;
3676 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
3678 gdb_assert (gdbarch
!= NULL
);
3679 return gdbarch
->core_read_description
!= NULL
;
3682 const struct target_desc
*
3683 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
3685 gdb_assert (gdbarch
!= NULL
);
3686 gdb_assert (gdbarch
->core_read_description
!= NULL
);
3687 if (gdbarch_debug
>= 2)
3688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
3689 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
3693 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
3694 gdbarch_core_read_description_ftype core_read_description
)
3696 gdbarch
->core_read_description
= core_read_description
;
3700 gdbarch_static_transform_name_p (struct gdbarch
*gdbarch
)
3702 gdb_assert (gdbarch
!= NULL
);
3703 return gdbarch
->static_transform_name
!= NULL
;
3707 gdbarch_static_transform_name (struct gdbarch
*gdbarch
, const char *name
)
3709 gdb_assert (gdbarch
!= NULL
);
3710 gdb_assert (gdbarch
->static_transform_name
!= NULL
);
3711 if (gdbarch_debug
>= 2)
3712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_static_transform_name called\n");
3713 return gdbarch
->static_transform_name (name
);
3717 set_gdbarch_static_transform_name (struct gdbarch
*gdbarch
,
3718 gdbarch_static_transform_name_ftype static_transform_name
)
3720 gdbarch
->static_transform_name
= static_transform_name
;
3724 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
3726 gdb_assert (gdbarch
!= NULL
);
3727 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3728 if (gdbarch_debug
>= 2)
3729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
3730 return gdbarch
->sofun_address_maybe_missing
;
3734 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
3735 int sofun_address_maybe_missing
)
3737 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
3741 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
3743 gdb_assert (gdbarch
!= NULL
);
3744 return gdbarch
->process_record
!= NULL
;
3748 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
3750 gdb_assert (gdbarch
!= NULL
);
3751 gdb_assert (gdbarch
->process_record
!= NULL
);
3752 if (gdbarch_debug
>= 2)
3753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
3754 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
3758 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
3759 gdbarch_process_record_ftype process_record
)
3761 gdbarch
->process_record
= process_record
;
3765 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
3767 gdb_assert (gdbarch
!= NULL
);
3768 return gdbarch
->process_record_signal
!= NULL
;
3772 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum gdb_signal signal
)
3774 gdb_assert (gdbarch
!= NULL
);
3775 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
3776 if (gdbarch_debug
>= 2)
3777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
3778 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
3782 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
3783 gdbarch_process_record_signal_ftype process_record_signal
)
3785 gdbarch
->process_record_signal
= process_record_signal
;
3789 gdbarch_gdb_signal_from_target_p (struct gdbarch
*gdbarch
)
3791 gdb_assert (gdbarch
!= NULL
);
3792 return gdbarch
->gdb_signal_from_target
!= NULL
;
3796 gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
, int signo
)
3798 gdb_assert (gdbarch
!= NULL
);
3799 gdb_assert (gdbarch
->gdb_signal_from_target
!= NULL
);
3800 if (gdbarch_debug
>= 2)
3801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_from_target called\n");
3802 return gdbarch
->gdb_signal_from_target (gdbarch
, signo
);
3806 set_gdbarch_gdb_signal_from_target (struct gdbarch
*gdbarch
,
3807 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target
)
3809 gdbarch
->gdb_signal_from_target
= gdb_signal_from_target
;
3813 gdbarch_gdb_signal_to_target_p (struct gdbarch
*gdbarch
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 return gdbarch
->gdb_signal_to_target
!= NULL
;
3820 gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
, enum gdb_signal signal
)
3822 gdb_assert (gdbarch
!= NULL
);
3823 gdb_assert (gdbarch
->gdb_signal_to_target
!= NULL
);
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gdb_signal_to_target called\n");
3826 return gdbarch
->gdb_signal_to_target (gdbarch
, signal
);
3830 set_gdbarch_gdb_signal_to_target (struct gdbarch
*gdbarch
,
3831 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target
)
3833 gdbarch
->gdb_signal_to_target
= gdb_signal_to_target
;
3837 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
3839 gdb_assert (gdbarch
!= NULL
);
3840 return gdbarch
->get_siginfo_type
!= NULL
;
3844 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
3846 gdb_assert (gdbarch
!= NULL
);
3847 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
3848 if (gdbarch_debug
>= 2)
3849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
3850 return gdbarch
->get_siginfo_type (gdbarch
);
3854 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
3855 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
3857 gdbarch
->get_siginfo_type
= get_siginfo_type
;
3861 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
3863 gdb_assert (gdbarch
!= NULL
);
3864 return gdbarch
->record_special_symbol
!= NULL
;
3868 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
3870 gdb_assert (gdbarch
!= NULL
);
3871 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
3872 if (gdbarch_debug
>= 2)
3873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
3874 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
3878 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
3879 gdbarch_record_special_symbol_ftype record_special_symbol
)
3881 gdbarch
->record_special_symbol
= record_special_symbol
;
3885 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
3887 gdb_assert (gdbarch
!= NULL
);
3888 return gdbarch
->get_syscall_number
!= NULL
;
3892 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, ptid_t ptid
)
3894 gdb_assert (gdbarch
!= NULL
);
3895 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
3896 if (gdbarch_debug
>= 2)
3897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
3898 return gdbarch
->get_syscall_number (gdbarch
, ptid
);
3902 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
3903 gdbarch_get_syscall_number_ftype get_syscall_number
)
3905 gdbarch
->get_syscall_number
= get_syscall_number
;
3909 gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
)
3911 gdb_assert (gdbarch
!= NULL
);
3912 /* Skip verify of stap_integer_prefixes, invalid_p == 0 */
3913 if (gdbarch_debug
>= 2)
3914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_prefixes called\n");
3915 return gdbarch
->stap_integer_prefixes
;
3919 set_gdbarch_stap_integer_prefixes (struct gdbarch
*gdbarch
,
3920 const char *const * stap_integer_prefixes
)
3922 gdbarch
->stap_integer_prefixes
= stap_integer_prefixes
;
3926 gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
)
3928 gdb_assert (gdbarch
!= NULL
);
3929 /* Skip verify of stap_integer_suffixes, invalid_p == 0 */
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_integer_suffixes called\n");
3932 return gdbarch
->stap_integer_suffixes
;
3936 set_gdbarch_stap_integer_suffixes (struct gdbarch
*gdbarch
,
3937 const char *const * stap_integer_suffixes
)
3939 gdbarch
->stap_integer_suffixes
= stap_integer_suffixes
;
3943 gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
)
3945 gdb_assert (gdbarch
!= NULL
);
3946 /* Skip verify of stap_register_prefixes, invalid_p == 0 */
3947 if (gdbarch_debug
>= 2)
3948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_prefixes called\n");
3949 return gdbarch
->stap_register_prefixes
;
3953 set_gdbarch_stap_register_prefixes (struct gdbarch
*gdbarch
,
3954 const char *const * stap_register_prefixes
)
3956 gdbarch
->stap_register_prefixes
= stap_register_prefixes
;
3960 gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
)
3962 gdb_assert (gdbarch
!= NULL
);
3963 /* Skip verify of stap_register_suffixes, invalid_p == 0 */
3964 if (gdbarch_debug
>= 2)
3965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_suffixes called\n");
3966 return gdbarch
->stap_register_suffixes
;
3970 set_gdbarch_stap_register_suffixes (struct gdbarch
*gdbarch
,
3971 const char *const * stap_register_suffixes
)
3973 gdbarch
->stap_register_suffixes
= stap_register_suffixes
;
3977 gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
)
3979 gdb_assert (gdbarch
!= NULL
);
3980 /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */
3981 if (gdbarch_debug
>= 2)
3982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_prefixes called\n");
3983 return gdbarch
->stap_register_indirection_prefixes
;
3987 set_gdbarch_stap_register_indirection_prefixes (struct gdbarch
*gdbarch
,
3988 const char *const * stap_register_indirection_prefixes
)
3990 gdbarch
->stap_register_indirection_prefixes
= stap_register_indirection_prefixes
;
3994 gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
)
3996 gdb_assert (gdbarch
!= NULL
);
3997 /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */
3998 if (gdbarch_debug
>= 2)
3999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_register_indirection_suffixes called\n");
4000 return gdbarch
->stap_register_indirection_suffixes
;
4004 set_gdbarch_stap_register_indirection_suffixes (struct gdbarch
*gdbarch
,
4005 const char *const * stap_register_indirection_suffixes
)
4007 gdbarch
->stap_register_indirection_suffixes
= stap_register_indirection_suffixes
;
4011 gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
)
4013 gdb_assert (gdbarch
!= NULL
);
4014 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4015 if (gdbarch_debug
>= 2)
4016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_prefix called\n");
4017 return gdbarch
->stap_gdb_register_prefix
;
4021 set_gdbarch_stap_gdb_register_prefix (struct gdbarch
*gdbarch
,
4022 const char * stap_gdb_register_prefix
)
4024 gdbarch
->stap_gdb_register_prefix
= stap_gdb_register_prefix
;
4028 gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
)
4030 gdb_assert (gdbarch
!= NULL
);
4031 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4032 if (gdbarch_debug
>= 2)
4033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_gdb_register_suffix called\n");
4034 return gdbarch
->stap_gdb_register_suffix
;
4038 set_gdbarch_stap_gdb_register_suffix (struct gdbarch
*gdbarch
,
4039 const char * stap_gdb_register_suffix
)
4041 gdbarch
->stap_gdb_register_suffix
= stap_gdb_register_suffix
;
4045 gdbarch_stap_is_single_operand_p (struct gdbarch
*gdbarch
)
4047 gdb_assert (gdbarch
!= NULL
);
4048 return gdbarch
->stap_is_single_operand
!= NULL
;
4052 gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
, const char *s
)
4054 gdb_assert (gdbarch
!= NULL
);
4055 gdb_assert (gdbarch
->stap_is_single_operand
!= NULL
);
4056 if (gdbarch_debug
>= 2)
4057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_is_single_operand called\n");
4058 return gdbarch
->stap_is_single_operand (gdbarch
, s
);
4062 set_gdbarch_stap_is_single_operand (struct gdbarch
*gdbarch
,
4063 gdbarch_stap_is_single_operand_ftype stap_is_single_operand
)
4065 gdbarch
->stap_is_single_operand
= stap_is_single_operand
;
4069 gdbarch_stap_parse_special_token_p (struct gdbarch
*gdbarch
)
4071 gdb_assert (gdbarch
!= NULL
);
4072 return gdbarch
->stap_parse_special_token
!= NULL
;
4076 gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
, struct stap_parse_info
*p
)
4078 gdb_assert (gdbarch
!= NULL
);
4079 gdb_assert (gdbarch
->stap_parse_special_token
!= NULL
);
4080 if (gdbarch_debug
>= 2)
4081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stap_parse_special_token called\n");
4082 return gdbarch
->stap_parse_special_token (gdbarch
, p
);
4086 set_gdbarch_stap_parse_special_token (struct gdbarch
*gdbarch
,
4087 gdbarch_stap_parse_special_token_ftype stap_parse_special_token
)
4089 gdbarch
->stap_parse_special_token
= stap_parse_special_token
;
4093 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
4095 gdb_assert (gdbarch
!= NULL
);
4096 /* Skip verify of has_global_solist, invalid_p == 0 */
4097 if (gdbarch_debug
>= 2)
4098 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
4099 return gdbarch
->has_global_solist
;
4103 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
4104 int has_global_solist
)
4106 gdbarch
->has_global_solist
= has_global_solist
;
4110 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
4112 gdb_assert (gdbarch
!= NULL
);
4113 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4114 if (gdbarch_debug
>= 2)
4115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
4116 return gdbarch
->has_global_breakpoints
;
4120 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
4121 int has_global_breakpoints
)
4123 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
4127 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
4129 gdb_assert (gdbarch
!= NULL
);
4130 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
4131 if (gdbarch_debug
>= 2)
4132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
4133 return gdbarch
->has_shared_address_space (gdbarch
);
4137 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
4138 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
4140 gdbarch
->has_shared_address_space
= has_shared_address_space
;
4144 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int *isize
, char **msg
)
4146 gdb_assert (gdbarch
!= NULL
);
4147 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
4148 if (gdbarch_debug
>= 2)
4149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
4150 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, isize
, msg
);
4154 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
4155 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
4157 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
4161 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
4163 gdb_assert (gdbarch
!= NULL
);
4164 gdb_assert (gdbarch
->auto_charset
!= NULL
);
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
4167 return gdbarch
->auto_charset ();
4171 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
4172 gdbarch_auto_charset_ftype auto_charset
)
4174 gdbarch
->auto_charset
= auto_charset
;
4178 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
4180 gdb_assert (gdbarch
!= NULL
);
4181 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
4182 if (gdbarch_debug
>= 2)
4183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
4184 return gdbarch
->auto_wide_charset ();
4188 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
4189 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
4191 gdbarch
->auto_wide_charset
= auto_wide_charset
;
4195 gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
)
4197 gdb_assert (gdbarch
!= NULL
);
4198 if (gdbarch_debug
>= 2)
4199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_solib_symbols_extension called\n");
4200 return gdbarch
->solib_symbols_extension
;
4204 set_gdbarch_solib_symbols_extension (struct gdbarch
*gdbarch
,
4205 const char * solib_symbols_extension
)
4207 gdbarch
->solib_symbols_extension
= solib_symbols_extension
;
4211 gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
)
4213 gdb_assert (gdbarch
!= NULL
);
4214 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4215 if (gdbarch_debug
>= 2)
4216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_dos_based_file_system called\n");
4217 return gdbarch
->has_dos_based_file_system
;
4221 set_gdbarch_has_dos_based_file_system (struct gdbarch
*gdbarch
,
4222 int has_dos_based_file_system
)
4224 gdbarch
->has_dos_based_file_system
= has_dos_based_file_system
;
4228 gdbarch_gen_return_address (struct gdbarch
*gdbarch
, struct agent_expr
*ax
, struct axs_value
*value
, CORE_ADDR scope
)
4230 gdb_assert (gdbarch
!= NULL
);
4231 gdb_assert (gdbarch
->gen_return_address
!= NULL
);
4232 if (gdbarch_debug
>= 2)
4233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gen_return_address called\n");
4234 gdbarch
->gen_return_address (gdbarch
, ax
, value
, scope
);
4238 set_gdbarch_gen_return_address (struct gdbarch
*gdbarch
,
4239 gdbarch_gen_return_address_ftype gen_return_address
)
4241 gdbarch
->gen_return_address
= gen_return_address
;
4245 gdbarch_info_proc_p (struct gdbarch
*gdbarch
)
4247 gdb_assert (gdbarch
!= NULL
);
4248 return gdbarch
->info_proc
!= NULL
;
4252 gdbarch_info_proc (struct gdbarch
*gdbarch
, char *args
, enum info_proc_what what
)
4254 gdb_assert (gdbarch
!= NULL
);
4255 gdb_assert (gdbarch
->info_proc
!= NULL
);
4256 if (gdbarch_debug
>= 2)
4257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_info_proc called\n");
4258 gdbarch
->info_proc (gdbarch
, args
, what
);
4262 set_gdbarch_info_proc (struct gdbarch
*gdbarch
,
4263 gdbarch_info_proc_ftype info_proc
)
4265 gdbarch
->info_proc
= info_proc
;
4269 gdbarch_core_info_proc_p (struct gdbarch
*gdbarch
)
4271 gdb_assert (gdbarch
!= NULL
);
4272 return gdbarch
->core_info_proc
!= NULL
;
4276 gdbarch_core_info_proc (struct gdbarch
*gdbarch
, char *args
, enum info_proc_what what
)
4278 gdb_assert (gdbarch
!= NULL
);
4279 gdb_assert (gdbarch
->core_info_proc
!= NULL
);
4280 if (gdbarch_debug
>= 2)
4281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_info_proc called\n");
4282 gdbarch
->core_info_proc (gdbarch
, args
, what
);
4286 set_gdbarch_core_info_proc (struct gdbarch
*gdbarch
,
4287 gdbarch_core_info_proc_ftype core_info_proc
)
4289 gdbarch
->core_info_proc
= core_info_proc
;
4293 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
)
4295 gdb_assert (gdbarch
!= NULL
);
4296 gdb_assert (gdbarch
->iterate_over_objfiles_in_search_order
!= NULL
);
4297 if (gdbarch_debug
>= 2)
4298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4299 gdbarch
->iterate_over_objfiles_in_search_order (gdbarch
, cb
, cb_data
, current_objfile
);
4303 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch
*gdbarch
,
4304 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order
)
4306 gdbarch
->iterate_over_objfiles_in_search_order
= iterate_over_objfiles_in_search_order
;
4309 struct ravenscar_arch_ops
*
4310 gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
)
4312 gdb_assert (gdbarch
!= NULL
);
4313 /* Skip verify of ravenscar_ops, invalid_p == 0 */
4314 if (gdbarch_debug
>= 2)
4315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ravenscar_ops called\n");
4316 return gdbarch
->ravenscar_ops
;
4320 set_gdbarch_ravenscar_ops (struct gdbarch
*gdbarch
,
4321 struct ravenscar_arch_ops
* ravenscar_ops
)
4323 gdbarch
->ravenscar_ops
= ravenscar_ops
;
4327 gdbarch_insn_is_call (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4329 gdb_assert (gdbarch
!= NULL
);
4330 gdb_assert (gdbarch
->insn_is_call
!= NULL
);
4331 if (gdbarch_debug
>= 2)
4332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_call called\n");
4333 return gdbarch
->insn_is_call (gdbarch
, addr
);
4337 set_gdbarch_insn_is_call (struct gdbarch
*gdbarch
,
4338 gdbarch_insn_is_call_ftype insn_is_call
)
4340 gdbarch
->insn_is_call
= insn_is_call
;
4344 gdbarch_insn_is_ret (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4346 gdb_assert (gdbarch
!= NULL
);
4347 gdb_assert (gdbarch
->insn_is_ret
!= NULL
);
4348 if (gdbarch_debug
>= 2)
4349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_ret called\n");
4350 return gdbarch
->insn_is_ret (gdbarch
, addr
);
4354 set_gdbarch_insn_is_ret (struct gdbarch
*gdbarch
,
4355 gdbarch_insn_is_ret_ftype insn_is_ret
)
4357 gdbarch
->insn_is_ret
= insn_is_ret
;
4361 gdbarch_insn_is_jump (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4363 gdb_assert (gdbarch
!= NULL
);
4364 gdb_assert (gdbarch
->insn_is_jump
!= NULL
);
4365 if (gdbarch_debug
>= 2)
4366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_insn_is_jump called\n");
4367 return gdbarch
->insn_is_jump (gdbarch
, addr
);
4371 set_gdbarch_insn_is_jump (struct gdbarch
*gdbarch
,
4372 gdbarch_insn_is_jump_ftype insn_is_jump
)
4374 gdbarch
->insn_is_jump
= insn_is_jump
;
4378 /* Keep a registry of per-architecture data-pointers required by GDB
4385 gdbarch_data_pre_init_ftype
*pre_init
;
4386 gdbarch_data_post_init_ftype
*post_init
;
4389 struct gdbarch_data_registration
4391 struct gdbarch_data
*data
;
4392 struct gdbarch_data_registration
*next
;
4395 struct gdbarch_data_registry
4398 struct gdbarch_data_registration
*registrations
;
4401 struct gdbarch_data_registry gdbarch_data_registry
=
4406 static struct gdbarch_data
*
4407 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4408 gdbarch_data_post_init_ftype
*post_init
)
4410 struct gdbarch_data_registration
**curr
;
4412 /* Append the new registration. */
4413 for (curr
= &gdbarch_data_registry
.registrations
;
4415 curr
= &(*curr
)->next
);
4416 (*curr
) = XNEW (struct gdbarch_data_registration
);
4417 (*curr
)->next
= NULL
;
4418 (*curr
)->data
= XNEW (struct gdbarch_data
);
4419 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4420 (*curr
)->data
->pre_init
= pre_init
;
4421 (*curr
)->data
->post_init
= post_init
;
4422 (*curr
)->data
->init_p
= 1;
4423 return (*curr
)->data
;
4426 struct gdbarch_data
*
4427 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4429 return gdbarch_data_register (pre_init
, NULL
);
4432 struct gdbarch_data
*
4433 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
4435 return gdbarch_data_register (NULL
, post_init
);
4438 /* Create/delete the gdbarch data vector. */
4441 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4443 gdb_assert (gdbarch
->data
== NULL
);
4444 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4445 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
4448 /* Initialize the current value of the specified per-architecture
4452 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
4453 struct gdbarch_data
*data
,
4456 gdb_assert (data
->index
< gdbarch
->nr_data
);
4457 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
4458 gdb_assert (data
->pre_init
== NULL
);
4459 gdbarch
->data
[data
->index
] = pointer
;
4462 /* Return the current value of the specified per-architecture
4466 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4468 gdb_assert (data
->index
< gdbarch
->nr_data
);
4469 if (gdbarch
->data
[data
->index
] == NULL
)
4471 /* The data-pointer isn't initialized, call init() to get a
4473 if (data
->pre_init
!= NULL
)
4474 /* Mid architecture creation: pass just the obstack, and not
4475 the entire architecture, as that way it isn't possible for
4476 pre-init code to refer to undefined architecture
4478 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
4479 else if (gdbarch
->initialized_p
4480 && data
->post_init
!= NULL
)
4481 /* Post architecture creation: pass the entire architecture
4482 (as all fields are valid), but be careful to also detect
4483 recursive references. */
4485 gdb_assert (data
->init_p
);
4487 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
4491 /* The architecture initialization hasn't completed - punt -
4492 hope that the caller knows what they are doing. Once
4493 deprecated_set_gdbarch_data has been initialized, this can be
4494 changed to an internal error. */
4496 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4498 return gdbarch
->data
[data
->index
];
4502 /* Keep a registry of the architectures known by GDB. */
4504 struct gdbarch_registration
4506 enum bfd_architecture bfd_architecture
;
4507 gdbarch_init_ftype
*init
;
4508 gdbarch_dump_tdep_ftype
*dump_tdep
;
4509 struct gdbarch_list
*arches
;
4510 struct gdbarch_registration
*next
;
4513 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4516 append_name (const char ***buf
, int *nr
, const char *name
)
4518 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4524 gdbarch_printable_names (void)
4526 /* Accumulate a list of names based on the registed list of
4529 const char **arches
= NULL
;
4530 struct gdbarch_registration
*rego
;
4532 for (rego
= gdbarch_registry
;
4536 const struct bfd_arch_info
*ap
;
4537 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4539 internal_error (__FILE__
, __LINE__
,
4540 _("gdbarch_architecture_names: multi-arch unknown"));
4543 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4548 append_name (&arches
, &nr_arches
, NULL
);
4554 gdbarch_register (enum bfd_architecture bfd_architecture
,
4555 gdbarch_init_ftype
*init
,
4556 gdbarch_dump_tdep_ftype
*dump_tdep
)
4558 struct gdbarch_registration
**curr
;
4559 const struct bfd_arch_info
*bfd_arch_info
;
4561 /* Check that BFD recognizes this architecture */
4562 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4563 if (bfd_arch_info
== NULL
)
4565 internal_error (__FILE__
, __LINE__
,
4566 _("gdbarch: Attempt to register "
4567 "unknown architecture (%d)"),
4570 /* Check that we haven't seen this architecture before. */
4571 for (curr
= &gdbarch_registry
;
4573 curr
= &(*curr
)->next
)
4575 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4576 internal_error (__FILE__
, __LINE__
,
4577 _("gdbarch: Duplicate registration "
4578 "of architecture (%s)"),
4579 bfd_arch_info
->printable_name
);
4583 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
4584 bfd_arch_info
->printable_name
,
4585 host_address_to_string (init
));
4587 (*curr
) = XNEW (struct gdbarch_registration
);
4588 (*curr
)->bfd_architecture
= bfd_architecture
;
4589 (*curr
)->init
= init
;
4590 (*curr
)->dump_tdep
= dump_tdep
;
4591 (*curr
)->arches
= NULL
;
4592 (*curr
)->next
= NULL
;
4596 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4597 gdbarch_init_ftype
*init
)
4599 gdbarch_register (bfd_architecture
, init
, NULL
);
4603 /* Look for an architecture using gdbarch_info. */
4605 struct gdbarch_list
*
4606 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4607 const struct gdbarch_info
*info
)
4609 for (; arches
!= NULL
; arches
= arches
->next
)
4611 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4613 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4615 if (info
->osabi
!= arches
->gdbarch
->osabi
)
4617 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
4625 /* Find an architecture that matches the specified INFO. Create a new
4626 architecture if needed. Return that new architecture. */
4629 gdbarch_find_by_info (struct gdbarch_info info
)
4631 struct gdbarch
*new_gdbarch
;
4632 struct gdbarch_registration
*rego
;
4634 /* Fill in missing parts of the INFO struct using a number of
4635 sources: "set ..."; INFOabfd supplied; and the global
4637 gdbarch_info_fill (&info
);
4639 /* Must have found some sort of architecture. */
4640 gdb_assert (info
.bfd_arch_info
!= NULL
);
4644 fprintf_unfiltered (gdb_stdlog
,
4645 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4646 (info
.bfd_arch_info
!= NULL
4647 ? info
.bfd_arch_info
->printable_name
4649 fprintf_unfiltered (gdb_stdlog
,
4650 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4652 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4653 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4655 fprintf_unfiltered (gdb_stdlog
,
4656 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4657 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
4658 fprintf_unfiltered (gdb_stdlog
,
4659 "gdbarch_find_by_info: info.abfd %s\n",
4660 host_address_to_string (info
.abfd
));
4661 fprintf_unfiltered (gdb_stdlog
,
4662 "gdbarch_find_by_info: info.tdep_info %s\n",
4663 host_address_to_string (info
.tdep_info
));
4666 /* Find the tdep code that knows about this architecture. */
4667 for (rego
= gdbarch_registry
;
4670 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4676 "No matching architecture\n");
4680 /* Ask the tdep code for an architecture that matches "info". */
4681 new_gdbarch
= rego
->init (info
, rego
->arches
);
4683 /* Did the tdep code like it? No. Reject the change and revert to
4684 the old architecture. */
4685 if (new_gdbarch
== NULL
)
4688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4689 "Target rejected architecture\n");
4693 /* Is this a pre-existing architecture (as determined by already
4694 being initialized)? Move it to the front of the architecture
4695 list (keeping the list sorted Most Recently Used). */
4696 if (new_gdbarch
->initialized_p
)
4698 struct gdbarch_list
**list
;
4699 struct gdbarch_list
*this;
4701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4702 "Previous architecture %s (%s) selected\n",
4703 host_address_to_string (new_gdbarch
),
4704 new_gdbarch
->bfd_arch_info
->printable_name
);
4705 /* Find the existing arch in the list. */
4706 for (list
= ®o
->arches
;
4707 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
4708 list
= &(*list
)->next
);
4709 /* It had better be in the list of architectures. */
4710 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
4713 (*list
) = this->next
;
4714 /* Insert THIS at the front. */
4715 this->next
= rego
->arches
;
4716 rego
->arches
= this;
4721 /* It's a new architecture. */
4723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
4724 "New architecture %s (%s) selected\n",
4725 host_address_to_string (new_gdbarch
),
4726 new_gdbarch
->bfd_arch_info
->printable_name
);
4728 /* Insert the new architecture into the front of the architecture
4729 list (keep the list sorted Most Recently Used). */
4731 struct gdbarch_list
*this = XNEW (struct gdbarch_list
);
4732 this->next
= rego
->arches
;
4733 this->gdbarch
= new_gdbarch
;
4734 rego
->arches
= this;
4737 /* Check that the newly installed architecture is valid. Plug in
4738 any post init values. */
4739 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4740 verify_gdbarch (new_gdbarch
);
4741 new_gdbarch
->initialized_p
= 1;
4744 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
4749 /* Make the specified architecture current. */
4752 set_target_gdbarch (struct gdbarch
*new_gdbarch
)
4754 gdb_assert (new_gdbarch
!= NULL
);
4755 gdb_assert (new_gdbarch
->initialized_p
);
4756 current_inferior ()->gdbarch
= new_gdbarch
;
4757 observer_notify_architecture_changed (new_gdbarch
);
4758 registers_changed ();
4761 /* Return the current inferior's arch. */
4764 target_gdbarch (void)
4766 return current_inferior ()->gdbarch
;
4769 extern void _initialize_gdbarch (void);
4772 _initialize_gdbarch (void)
4774 add_setshow_zuinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
4775 Set architecture debugging."), _("\
4776 Show architecture debugging."), _("\
4777 When non-zero, architecture debugging is enabled."),
4780 &setdebuglist
, &showdebuglist
);