1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2007, 2008, 2009 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"
46 #include "gdb_string.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 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)
90 /* Maintain the struct gdbarch object. */
94 /* Has this architecture been fully initialized? */
97 /* An obstack bound to the lifetime of the architecture. */
98 struct obstack *obstack;
100 /* basic architectural information. */
101 const struct bfd_arch_info * bfd_arch_info;
103 int byte_order_for_code;
104 enum gdb_osabi osabi;
105 const struct target_desc * target_desc;
107 /* target specific vector. */
108 struct gdbarch_tdep *tdep;
109 gdbarch_dump_tdep_ftype *dump_tdep;
111 /* per-architecture data-pointers. */
115 /* per-architecture swap-regions. */
116 struct gdbarch_swap *swap;
118 /* Multi-arch values.
120 When extending this structure you must:
124 Declare set/get functions and define the corresponding
127 gdbarch_alloc(): If zero/NULL is not a suitable default,
128 initialize the new field.
130 verify_gdbarch(): Confirm that the target updated the field
133 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
136 ``startup_gdbarch()'': Append an initial value to the static
137 variable (base values on the host's c-type system).
139 get_gdbarch(): Implement the set/get functions (probably using
140 the macro's as shortcuts).
149 int long_long_align_bit;
151 const struct floatformat ** half_format;
153 const struct floatformat ** float_format;
155 const struct floatformat ** double_format;
157 const struct floatformat ** long_double_format;
160 int dwarf2_addr_size;
162 gdbarch_read_pc_ftype *read_pc;
163 gdbarch_write_pc_ftype *write_pc;
164 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
165 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
166 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value;
167 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
170 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect;
171 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack;
176 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
177 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
178 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
179 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
180 gdbarch_register_name_ftype *register_name;
181 gdbarch_register_type_ftype *register_type;
182 gdbarch_dummy_id_ftype *dummy_id;
183 int deprecated_fp_regnum;
184 gdbarch_push_dummy_call_ftype *push_dummy_call;
185 int call_dummy_location;
186 gdbarch_push_dummy_code_ftype *push_dummy_code;
187 gdbarch_print_registers_info_ftype *print_registers_info;
188 gdbarch_print_float_info_ftype *print_float_info;
189 gdbarch_print_vector_info_ftype *print_vector_info;
190 gdbarch_register_sim_regno_ftype *register_sim_regno;
191 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
192 gdbarch_cannot_store_register_ftype *cannot_store_register;
193 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
194 int believe_pcc_promotion;
195 gdbarch_convert_register_p_ftype *convert_register_p;
196 gdbarch_register_to_value_ftype *register_to_value;
197 gdbarch_value_to_register_ftype *value_to_register;
198 gdbarch_value_from_register_ftype *value_from_register;
199 gdbarch_pointer_to_address_ftype *pointer_to_address;
200 gdbarch_address_to_pointer_ftype *address_to_pointer;
201 gdbarch_integer_to_address_ftype *integer_to_address;
202 gdbarch_return_value_ftype *return_value;
203 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p;
204 gdbarch_skip_prologue_ftype *skip_prologue;
205 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
206 gdbarch_inner_than_ftype *inner_than;
207 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
208 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc;
209 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
210 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
211 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
212 CORE_ADDR decr_pc_after_break;
213 CORE_ADDR deprecated_function_start_offset;
214 gdbarch_remote_register_number_ftype *remote_register_number;
215 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
216 CORE_ADDR frame_args_skip;
217 gdbarch_unwind_pc_ftype *unwind_pc;
218 gdbarch_unwind_sp_ftype *unwind_sp;
219 gdbarch_frame_num_args_ftype *frame_num_args;
220 gdbarch_frame_align_ftype *frame_align;
221 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
222 int frame_red_zone_size;
223 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
224 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
225 gdbarch_smash_text_address_ftype *smash_text_address;
226 gdbarch_software_single_step_ftype *software_single_step;
227 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
228 gdbarch_print_insn_ftype *print_insn;
229 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
230 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
231 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
232 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
233 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
234 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
235 int cannot_step_breakpoint;
236 int have_nonsteppable_watchpoint;
237 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
238 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
239 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
240 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
241 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
242 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
243 struct core_regset_section * core_regset_sections;
244 gdbarch_make_corefile_notes_ftype *make_corefile_notes;
245 gdbarch_find_memory_regions_ftype *find_memory_regions;
246 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
247 gdbarch_core_pid_to_str_ftype *core_pid_to_str;
248 const char * gcore_bfd_target;
249 int vtable_function_descriptors;
251 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
252 ULONGEST max_insn_length;
253 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
254 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep;
255 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
256 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
257 gdbarch_displaced_step_location_ftype *displaced_step_location;
258 gdbarch_relocate_instruction_ftype *relocate_instruction;
259 gdbarch_overlay_update_ftype *overlay_update;
260 gdbarch_core_read_description_ftype *core_read_description;
261 gdbarch_static_transform_name_ftype *static_transform_name;
262 int sofun_address_maybe_missing;
263 gdbarch_process_record_ftype *process_record;
264 gdbarch_process_record_signal_ftype *process_record_signal;
265 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target;
266 gdbarch_get_siginfo_type_ftype *get_siginfo_type;
267 gdbarch_record_special_symbol_ftype *record_special_symbol;
268 gdbarch_get_syscall_number_ftype *get_syscall_number;
269 const char * stap_integer_prefix;
270 const char * stap_integer_suffix;
271 const char * stap_register_prefix;
272 const char * stap_register_suffix;
273 const char * stap_register_indirection_prefix;
274 const char * stap_register_indirection_suffix;
275 const char * stap_gdb_register_prefix;
276 const char * stap_gdb_register_suffix;
277 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
278 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
279 int has_global_solist;
280 int has_global_breakpoints;
281 gdbarch_has_shared_address_space_ftype *has_shared_address_space;
282 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at;
283 gdbarch_auto_charset_ftype *auto_charset;
284 gdbarch_auto_wide_charset_ftype *auto_wide_charset;
285 const char * solib_symbols_extension;
286 int has_dos_based_file_system;
287 gdbarch_gen_return_address_ftype *gen_return_address;
288 gdbarch_info_proc_ftype *info_proc;
289 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order;
293 /* The default architecture uses host values (for want of a better
296 extern const struct bfd_arch_info bfd_default_arch_struct;
298 struct gdbarch startup_gdbarch =
300 1, /* Always initialized. */
301 NULL, /* The obstack. */
302 /* basic architecture information. */
303 &bfd_default_arch_struct, /* bfd_arch_info */
304 BFD_ENDIAN_BIG, /* byte_order */
305 BFD_ENDIAN_BIG, /* byte_order_for_code */
306 GDB_OSABI_UNKNOWN, /* osabi */
308 /* target specific vector and its dump routine. */
310 /*per-architecture data-pointers and swap regions. */
312 /* Multi-arch values */
313 1, /* bits_big_endian */
314 8 * sizeof (short), /* short_bit */
315 8 * sizeof (int), /* int_bit */
316 8 * sizeof (long), /* long_bit */
317 8 * sizeof (LONGEST), /* long_long_bit */
318 8 * sizeof (LONGEST), /* long_long_align_bit */
321 8 * sizeof (float), /* float_bit */
322 0, /* float_format */
323 8 * sizeof (double), /* double_bit */
324 0, /* double_format */
325 8 * sizeof (long double), /* long_double_bit */
326 0, /* long_double_format */
327 8 * sizeof (void*), /* ptr_bit */
328 8 * sizeof (void*), /* addr_bit */
329 sizeof (void*), /* dwarf2_addr_size */
333 legacy_virtual_frame_pointer, /* virtual_frame_pointer */
334 0, /* pseudo_register_read */
335 0, /* pseudo_register_read_value */
336 0, /* pseudo_register_write */
338 0, /* num_pseudo_regs */
339 0, /* ax_pseudo_register_collect */
340 0, /* ax_pseudo_register_push_stack */
345 no_op_reg_to_regnum, /* stab_reg_to_regnum */
346 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
347 no_op_reg_to_regnum, /* sdb_reg_to_regnum */
348 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
349 0, /* register_name */
350 0, /* register_type */
352 -1, /* deprecated_fp_regnum */
353 0, /* push_dummy_call */
354 0, /* call_dummy_location */
355 0, /* push_dummy_code */
356 default_print_registers_info, /* print_registers_info */
357 0, /* print_float_info */
358 0, /* print_vector_info */
359 legacy_register_sim_regno, /* register_sim_regno */
360 cannot_register_not, /* cannot_fetch_register */
361 cannot_register_not, /* cannot_store_register */
362 0, /* get_longjmp_target */
363 0, /* believe_pcc_promotion */
364 generic_convert_register_p, /* convert_register_p */
365 0, /* register_to_value */
366 0, /* value_to_register */
367 0, /* value_from_register */
368 unsigned_pointer_to_address, /* pointer_to_address */
369 unsigned_address_to_pointer, /* address_to_pointer */
370 0, /* integer_to_address */
371 0, /* return_value */
372 default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */
373 0, /* skip_prologue */
374 0, /* skip_main_prologue */
376 0, /* breakpoint_from_pc */
377 default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */
378 0, /* adjust_breakpoint_address */
379 default_memory_insert_breakpoint, /* memory_insert_breakpoint */
380 default_memory_remove_breakpoint, /* memory_remove_breakpoint */
381 0, /* decr_pc_after_break */
382 0, /* deprecated_function_start_offset */
383 default_remote_register_number, /* remote_register_number */
384 0, /* fetch_tls_load_module_address */
385 0, /* frame_args_skip */
388 0, /* frame_num_args */
390 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
391 0, /* frame_red_zone_size */
392 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
393 core_addr_identity, /* addr_bits_remove */
394 core_addr_identity, /* smash_text_address */
395 0, /* software_single_step */
396 0, /* single_step_through_delay */
398 0, /* skip_trampoline_code */
399 generic_skip_solib_resolver, /* skip_solib_resolver */
400 generic_in_solib_return_trampoline, /* in_solib_return_trampoline */
401 generic_in_function_epilogue_p, /* in_function_epilogue_p */
402 0, /* elf_make_msymbol_special */
403 0, /* coff_make_msymbol_special */
404 0, /* cannot_step_breakpoint */
405 0, /* have_nonsteppable_watchpoint */
406 0, /* address_class_type_flags */
407 0, /* address_class_type_flags_to_name */
408 0, /* address_class_name_to_type_flags */
409 default_register_reggroup_p, /* register_reggroup_p */
410 0, /* fetch_pointer_argument */
411 0, /* regset_from_core_section */
412 0, /* core_regset_sections */
413 0, /* make_corefile_notes */
414 0, /* find_memory_regions */
415 0, /* core_xfer_shared_libraries */
416 0, /* core_pid_to_str */
417 0, /* gcore_bfd_target */
418 0, /* vtable_function_descriptors */
419 0, /* vbit_in_delta */
420 0, /* skip_permanent_breakpoint */
421 0, /* max_insn_length */
422 0, /* displaced_step_copy_insn */
423 default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */
424 0, /* displaced_step_fixup */
425 NULL, /* displaced_step_free_closure */
426 NULL, /* displaced_step_location */
427 0, /* relocate_instruction */
428 0, /* overlay_update */
429 0, /* core_read_description */
430 0, /* static_transform_name */
431 0, /* sofun_address_maybe_missing */
432 0, /* process_record */
433 0, /* process_record_signal */
434 0, /* gdb_signal_from_target */
435 0, /* get_siginfo_type */
436 0, /* record_special_symbol */
437 0, /* get_syscall_number */
438 0, /* stap_integer_prefix */
439 0, /* stap_integer_suffix */
440 0, /* stap_register_prefix */
441 0, /* stap_register_suffix */
442 0, /* stap_register_indirection_prefix */
443 0, /* stap_register_indirection_suffix */
444 0, /* stap_gdb_register_prefix */
445 0, /* stap_gdb_register_suffix */
446 0, /* stap_is_single_operand */
447 0, /* stap_parse_special_token */
448 0, /* has_global_solist */
449 0, /* has_global_breakpoints */
450 default_has_shared_address_space, /* has_shared_address_space */
451 default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */
452 default_auto_charset, /* auto_charset */
453 default_auto_wide_charset, /* auto_wide_charset */
454 0, /* solib_symbols_extension */
455 0, /* has_dos_based_file_system */
456 default_gen_return_address, /* gen_return_address */
458 default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */
459 /* startup_gdbarch() */
462 struct gdbarch *target_gdbarch = &startup_gdbarch;
464 /* Create a new ``struct gdbarch'' based on information provided by
465 ``struct gdbarch_info''. */
468 gdbarch_alloc (const struct gdbarch_info *info,
469 struct gdbarch_tdep *tdep)
471 struct gdbarch *gdbarch;
473 /* Create an obstack for allocating all the per-architecture memory,
474 then use that to allocate the architecture vector. */
475 struct obstack *obstack = XMALLOC (struct obstack);
476 obstack_init (obstack);
477 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
478 memset (gdbarch, 0, sizeof (*gdbarch));
479 gdbarch->obstack = obstack;
481 alloc_gdbarch_data (gdbarch);
483 gdbarch->tdep = tdep;
485 gdbarch->bfd_arch_info = info->bfd_arch_info;
486 gdbarch->byte_order = info->byte_order;
487 gdbarch->byte_order_for_code = info->byte_order_for_code;
488 gdbarch->osabi = info->osabi;
489 gdbarch->target_desc = info->target_desc;
491 /* Force the explicit initialization of these. */
492 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
493 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
494 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
495 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
496 gdbarch->long_long_bit = 2*gdbarch->long_bit;
497 gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
498 gdbarch->half_bit = 2*TARGET_CHAR_BIT;
499 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
500 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
501 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
502 gdbarch->ptr_bit = gdbarch->int_bit;
503 gdbarch->char_signed = -1;
504 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
505 gdbarch->num_regs = -1;
506 gdbarch->sp_regnum = -1;
507 gdbarch->pc_regnum = -1;
508 gdbarch->ps_regnum = -1;
509 gdbarch->fp0_regnum = -1;
510 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
511 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
512 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
513 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
514 gdbarch->deprecated_fp_regnum = -1;
515 gdbarch->call_dummy_location = AT_ENTRY_POINT;
516 gdbarch->print_registers_info = default_print_registers_info;
517 gdbarch->register_sim_regno = legacy_register_sim_regno;
518 gdbarch->cannot_fetch_register = cannot_register_not;
519 gdbarch->cannot_store_register = cannot_register_not;
520 gdbarch->convert_register_p = generic_convert_register_p;
521 gdbarch->value_from_register = default_value_from_register;
522 gdbarch->pointer_to_address = unsigned_pointer_to_address;
523 gdbarch->address_to_pointer = unsigned_address_to_pointer;
524 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p;
525 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc;
526 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
527 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
528 gdbarch->remote_register_number = default_remote_register_number;
529 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
530 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
531 gdbarch->addr_bits_remove = core_addr_identity;
532 gdbarch->smash_text_address = core_addr_identity;
533 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
534 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
535 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
536 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
537 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
538 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
539 gdbarch->register_reggroup_p = default_register_reggroup_p;
540 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
541 gdbarch->displaced_step_fixup = NULL;
542 gdbarch->displaced_step_free_closure = NULL;
543 gdbarch->displaced_step_location = NULL;
544 gdbarch->relocate_instruction = NULL;
545 gdbarch->has_shared_address_space = default_has_shared_address_space;
546 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at;
547 gdbarch->auto_charset = default_auto_charset;
548 gdbarch->auto_wide_charset = default_auto_wide_charset;
549 gdbarch->gen_return_address = default_gen_return_address;
550 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order;
551 /* gdbarch_alloc() */
557 /* Allocate extra space using the per-architecture obstack. */
560 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
562 void *data = obstack_alloc (arch->obstack, size);
564 memset (data, 0, size);
569 /* Free a gdbarch struct. This should never happen in normal
570 operation --- once you've created a gdbarch, you keep it around.
571 However, if an architecture's init function encounters an error
572 building the structure, it may need to clean up a partially
573 constructed gdbarch. */
576 gdbarch_free (struct gdbarch *arch)
578 struct obstack *obstack;
580 gdb_assert (arch != NULL);
581 gdb_assert (!arch->initialized_p);
582 obstack = arch->obstack;
583 obstack_free (obstack, 0); /* Includes the ARCH. */
588 /* Ensure that all values in a GDBARCH are reasonable. */
591 verify_gdbarch (struct gdbarch *gdbarch)
594 struct cleanup *cleanups;
598 log = mem_fileopen ();
599 cleanups = make_cleanup_ui_file_delete (log);
601 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
602 fprintf_unfiltered (log, "\n\tbyte-order");
603 if (gdbarch->bfd_arch_info == NULL)
604 fprintf_unfiltered (log, "\n\tbfd_arch_info");
605 /* Check those that need to be defined for the given multi-arch level. */
606 /* Skip verify of bits_big_endian, invalid_p == 0 */
607 /* Skip verify of short_bit, invalid_p == 0 */
608 /* Skip verify of int_bit, invalid_p == 0 */
609 /* Skip verify of long_bit, invalid_p == 0 */
610 /* Skip verify of long_long_bit, invalid_p == 0 */
611 /* Skip verify of long_long_align_bit, invalid_p == 0 */
612 /* Skip verify of half_bit, invalid_p == 0 */
613 if (gdbarch->half_format == 0)
614 gdbarch->half_format = floatformats_ieee_half;
615 /* Skip verify of float_bit, invalid_p == 0 */
616 if (gdbarch->float_format == 0)
617 gdbarch->float_format = floatformats_ieee_single;
618 /* Skip verify of double_bit, invalid_p == 0 */
619 if (gdbarch->double_format == 0)
620 gdbarch->double_format = floatformats_ieee_double;
621 /* Skip verify of long_double_bit, invalid_p == 0 */
622 if (gdbarch->long_double_format == 0)
623 gdbarch->long_double_format = floatformats_ieee_double;
624 /* Skip verify of ptr_bit, invalid_p == 0 */
625 if (gdbarch->addr_bit == 0)
626 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
627 if (gdbarch->dwarf2_addr_size == 0)
628 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
629 if (gdbarch->char_signed == -1)
630 gdbarch->char_signed = 1;
631 /* Skip verify of read_pc, has predicate. */
632 /* Skip verify of write_pc, has predicate. */
633 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
634 /* Skip verify of pseudo_register_read, has predicate. */
635 /* Skip verify of pseudo_register_read_value, has predicate. */
636 /* Skip verify of pseudo_register_write, has predicate. */
637 if (gdbarch->num_regs == -1)
638 fprintf_unfiltered (log, "\n\tnum_regs");
639 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
640 /* Skip verify of ax_pseudo_register_collect, has predicate. */
641 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */
642 /* Skip verify of sp_regnum, invalid_p == 0 */
643 /* Skip verify of pc_regnum, invalid_p == 0 */
644 /* Skip verify of ps_regnum, invalid_p == 0 */
645 /* Skip verify of fp0_regnum, invalid_p == 0 */
646 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
647 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
648 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
649 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
650 if (gdbarch->register_name == 0)
651 fprintf_unfiltered (log, "\n\tregister_name");
652 /* Skip verify of register_type, has predicate. */
653 /* Skip verify of dummy_id, has predicate. */
654 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
655 /* Skip verify of push_dummy_call, has predicate. */
656 /* Skip verify of call_dummy_location, invalid_p == 0 */
657 /* Skip verify of push_dummy_code, has predicate. */
658 /* Skip verify of print_registers_info, invalid_p == 0 */
659 /* Skip verify of print_float_info, has predicate. */
660 /* Skip verify of print_vector_info, has predicate. */
661 /* Skip verify of register_sim_regno, invalid_p == 0 */
662 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
663 /* Skip verify of cannot_store_register, invalid_p == 0 */
664 /* Skip verify of get_longjmp_target, has predicate. */
665 /* Skip verify of convert_register_p, invalid_p == 0 */
666 /* Skip verify of value_from_register, invalid_p == 0 */
667 /* Skip verify of pointer_to_address, invalid_p == 0 */
668 /* Skip verify of address_to_pointer, invalid_p == 0 */
669 /* Skip verify of integer_to_address, has predicate. */
670 /* Skip verify of return_value, has predicate. */
671 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */
672 if (gdbarch->skip_prologue == 0)
673 fprintf_unfiltered (log, "\n\tskip_prologue");
674 /* Skip verify of skip_main_prologue, has predicate. */
675 if (gdbarch->inner_than == 0)
676 fprintf_unfiltered (log, "\n\tinner_than");
677 if (gdbarch->breakpoint_from_pc == 0)
678 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
679 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
680 /* Skip verify of adjust_breakpoint_address, has predicate. */
681 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
682 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
683 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
684 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
685 /* Skip verify of remote_register_number, invalid_p == 0 */
686 /* Skip verify of fetch_tls_load_module_address, has predicate. */
687 /* Skip verify of frame_args_skip, invalid_p == 0 */
688 /* Skip verify of unwind_pc, has predicate. */
689 /* Skip verify of unwind_sp, has predicate. */
690 /* Skip verify of frame_num_args, has predicate. */
691 /* Skip verify of frame_align, has predicate. */
692 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
693 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
694 /* Skip verify of addr_bits_remove, invalid_p == 0 */
695 /* Skip verify of smash_text_address, invalid_p == 0 */
696 /* Skip verify of software_single_step, has predicate. */
697 /* Skip verify of single_step_through_delay, has predicate. */
698 if (gdbarch->print_insn == 0)
699 fprintf_unfiltered (log, "\n\tprint_insn");
700 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
701 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
702 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
703 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
704 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
705 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
706 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
707 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
708 /* Skip verify of address_class_type_flags, has predicate. */
709 /* Skip verify of address_class_type_flags_to_name, has predicate. */
710 /* Skip verify of address_class_name_to_type_flags, has predicate. */
711 /* Skip verify of register_reggroup_p, invalid_p == 0 */
712 /* Skip verify of fetch_pointer_argument, has predicate. */
713 /* Skip verify of regset_from_core_section, has predicate. */
714 /* Skip verify of make_corefile_notes, has predicate. */
715 /* Skip verify of find_memory_regions, has predicate. */
716 /* Skip verify of core_xfer_shared_libraries, has predicate. */
717 /* Skip verify of core_pid_to_str, has predicate. */
718 /* Skip verify of gcore_bfd_target, has predicate. */
719 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
720 /* Skip verify of vbit_in_delta, invalid_p == 0 */
721 /* Skip verify of skip_permanent_breakpoint, has predicate. */
722 /* Skip verify of max_insn_length, has predicate. */
723 /* Skip verify of displaced_step_copy_insn, has predicate. */
724 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
725 /* Skip verify of displaced_step_fixup, has predicate. */
726 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
727 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
728 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
729 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
730 /* Skip verify of relocate_instruction, has predicate. */
731 /* Skip verify of overlay_update, has predicate. */
732 /* Skip verify of core_read_description, has predicate. */
733 /* Skip verify of static_transform_name, has predicate. */
734 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
735 /* Skip verify of process_record, has predicate. */
736 /* Skip verify of process_record_signal, has predicate. */
737 /* Skip verify of gdb_signal_from_target, has predicate. */
738 /* Skip verify of get_siginfo_type, has predicate. */
739 /* Skip verify of record_special_symbol, has predicate. */
740 /* Skip verify of get_syscall_number, has predicate. */
741 /* Skip verify of stap_integer_prefix, invalid_p == 0 */
742 /* Skip verify of stap_integer_suffix, invalid_p == 0 */
743 /* Skip verify of stap_register_prefix, invalid_p == 0 */
744 /* Skip verify of stap_register_suffix, invalid_p == 0 */
745 /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */
746 /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */
747 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
748 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
749 /* Skip verify of stap_is_single_operand, has predicate. */
750 /* Skip verify of stap_parse_special_token, has predicate. */
751 /* Skip verify of has_global_solist, invalid_p == 0 */
752 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
753 /* Skip verify of has_shared_address_space, invalid_p == 0 */
754 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
755 /* Skip verify of auto_charset, invalid_p == 0 */
756 /* Skip verify of auto_wide_charset, invalid_p == 0 */
757 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
758 /* Skip verify of gen_return_address, invalid_p == 0 */
759 /* Skip verify of info_proc, has predicate. */
760 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */
761 buf = ui_file_xstrdup (log, &length);
762 make_cleanup (xfree, buf);
764 internal_error (__FILE__, __LINE__,
765 _("verify_gdbarch: the following are invalid ...%s"),
767 do_cleanups (cleanups);
771 /* Print out the details of the current architecture. */
774 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
776 const char *gdb_nm_file = "<not-defined>";
778 #if defined (GDB_NM_FILE)
779 gdb_nm_file = GDB_NM_FILE;
781 fprintf_unfiltered (file,
782 "gdbarch_dump: GDB_NM_FILE = %s\n",
784 fprintf_unfiltered (file,
785 "gdbarch_dump: addr_bit = %s\n",
786 plongest (gdbarch->addr_bit));
787 fprintf_unfiltered (file,
788 "gdbarch_dump: addr_bits_remove = <%s>\n",
789 host_address_to_string (gdbarch->addr_bits_remove));
790 fprintf_unfiltered (file,
791 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
792 gdbarch_address_class_name_to_type_flags_p (gdbarch));
793 fprintf_unfiltered (file,
794 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
795 host_address_to_string (gdbarch->address_class_name_to_type_flags));
796 fprintf_unfiltered (file,
797 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
798 gdbarch_address_class_type_flags_p (gdbarch));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: address_class_type_flags = <%s>\n",
801 host_address_to_string (gdbarch->address_class_type_flags));
802 fprintf_unfiltered (file,
803 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
804 gdbarch_address_class_type_flags_to_name_p (gdbarch));
805 fprintf_unfiltered (file,
806 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
807 host_address_to_string (gdbarch->address_class_type_flags_to_name));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: address_to_pointer = <%s>\n",
810 host_address_to_string (gdbarch->address_to_pointer));
811 fprintf_unfiltered (file,
812 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
813 gdbarch_adjust_breakpoint_address_p (gdbarch));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
816 host_address_to_string (gdbarch->adjust_breakpoint_address));
817 fprintf_unfiltered (file,
818 "gdbarch_dump: auto_charset = <%s>\n",
819 host_address_to_string (gdbarch->auto_charset));
820 fprintf_unfiltered (file,
821 "gdbarch_dump: auto_wide_charset = <%s>\n",
822 host_address_to_string (gdbarch->auto_wide_charset));
823 fprintf_unfiltered (file,
824 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n",
825 gdbarch_ax_pseudo_register_collect_p (gdbarch));
826 fprintf_unfiltered (file,
827 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n",
828 host_address_to_string (gdbarch->ax_pseudo_register_collect));
829 fprintf_unfiltered (file,
830 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n",
831 gdbarch_ax_pseudo_register_push_stack_p (gdbarch));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n",
834 host_address_to_string (gdbarch->ax_pseudo_register_push_stack));
835 fprintf_unfiltered (file,
836 "gdbarch_dump: believe_pcc_promotion = %s\n",
837 plongest (gdbarch->believe_pcc_promotion));
838 fprintf_unfiltered (file,
839 "gdbarch_dump: bfd_arch_info = %s\n",
840 gdbarch_bfd_arch_info (gdbarch)->printable_name);
841 fprintf_unfiltered (file,
842 "gdbarch_dump: bits_big_endian = %s\n",
843 plongest (gdbarch->bits_big_endian));
844 fprintf_unfiltered (file,
845 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
846 host_address_to_string (gdbarch->breakpoint_from_pc));
847 fprintf_unfiltered (file,
848 "gdbarch_dump: byte_order = %s\n",
849 plongest (gdbarch->byte_order));
850 fprintf_unfiltered (file,
851 "gdbarch_dump: byte_order_for_code = %s\n",
852 plongest (gdbarch->byte_order_for_code));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: call_dummy_location = %s\n",
855 plongest (gdbarch->call_dummy_location));
856 fprintf_unfiltered (file,
857 "gdbarch_dump: cannot_fetch_register = <%s>\n",
858 host_address_to_string (gdbarch->cannot_fetch_register));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: cannot_step_breakpoint = %s\n",
861 plongest (gdbarch->cannot_step_breakpoint));
862 fprintf_unfiltered (file,
863 "gdbarch_dump: cannot_store_register = <%s>\n",
864 host_address_to_string (gdbarch->cannot_store_register));
865 fprintf_unfiltered (file,
866 "gdbarch_dump: char_signed = %s\n",
867 plongest (gdbarch->char_signed));
868 fprintf_unfiltered (file,
869 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
870 host_address_to_string (gdbarch->coff_make_msymbol_special));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
873 host_address_to_string (gdbarch->convert_from_func_ptr_addr));
874 fprintf_unfiltered (file,
875 "gdbarch_dump: convert_register_p = <%s>\n",
876 host_address_to_string (gdbarch->convert_register_p));
877 fprintf_unfiltered (file,
878 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
879 gdbarch_core_pid_to_str_p (gdbarch));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: core_pid_to_str = <%s>\n",
882 host_address_to_string (gdbarch->core_pid_to_str));
883 fprintf_unfiltered (file,
884 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
885 gdbarch_core_read_description_p (gdbarch));
886 fprintf_unfiltered (file,
887 "gdbarch_dump: core_read_description = <%s>\n",
888 host_address_to_string (gdbarch->core_read_description));
889 fprintf_unfiltered (file,
890 "gdbarch_dump: core_regset_sections = %s\n",
891 host_address_to_string (gdbarch->core_regset_sections));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
894 gdbarch_core_xfer_shared_libraries_p (gdbarch));
895 fprintf_unfiltered (file,
896 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
897 host_address_to_string (gdbarch->core_xfer_shared_libraries));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: decr_pc_after_break = %s\n",
900 core_addr_to_string_nz (gdbarch->decr_pc_after_break));
901 fprintf_unfiltered (file,
902 "gdbarch_dump: deprecated_fp_regnum = %s\n",
903 plongest (gdbarch->deprecated_fp_regnum));
904 fprintf_unfiltered (file,
905 "gdbarch_dump: deprecated_function_start_offset = %s\n",
906 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
907 fprintf_unfiltered (file,
908 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
909 gdbarch_displaced_step_copy_insn_p (gdbarch));
910 fprintf_unfiltered (file,
911 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
912 host_address_to_string (gdbarch->displaced_step_copy_insn));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
915 gdbarch_displaced_step_fixup_p (gdbarch));
916 fprintf_unfiltered (file,
917 "gdbarch_dump: displaced_step_fixup = <%s>\n",
918 host_address_to_string (gdbarch->displaced_step_fixup));
919 fprintf_unfiltered (file,
920 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
921 host_address_to_string (gdbarch->displaced_step_free_closure));
922 fprintf_unfiltered (file,
923 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
924 host_address_to_string (gdbarch->displaced_step_hw_singlestep));
925 fprintf_unfiltered (file,
926 "gdbarch_dump: displaced_step_location = <%s>\n",
927 host_address_to_string (gdbarch->displaced_step_location));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: double_bit = %s\n",
930 plongest (gdbarch->double_bit));
931 fprintf_unfiltered (file,
932 "gdbarch_dump: double_format = %s\n",
933 pformat (gdbarch->double_format));
934 fprintf_unfiltered (file,
935 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
936 gdbarch_dummy_id_p (gdbarch));
937 fprintf_unfiltered (file,
938 "gdbarch_dump: dummy_id = <%s>\n",
939 host_address_to_string (gdbarch->dummy_id));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: dwarf2_addr_size = %s\n",
942 plongest (gdbarch->dwarf2_addr_size));
943 fprintf_unfiltered (file,
944 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
945 host_address_to_string (gdbarch->dwarf2_reg_to_regnum));
946 fprintf_unfiltered (file,
947 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
948 host_address_to_string (gdbarch->ecoff_reg_to_regnum));
949 fprintf_unfiltered (file,
950 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
951 host_address_to_string (gdbarch->elf_make_msymbol_special));
952 fprintf_unfiltered (file,
953 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
954 host_address_to_string (gdbarch->fast_tracepoint_valid_at));
955 fprintf_unfiltered (file,
956 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
957 gdbarch_fetch_pointer_argument_p (gdbarch));
958 fprintf_unfiltered (file,
959 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
960 host_address_to_string (gdbarch->fetch_pointer_argument));
961 fprintf_unfiltered (file,
962 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
963 gdbarch_fetch_tls_load_module_address_p (gdbarch));
964 fprintf_unfiltered (file,
965 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
966 host_address_to_string (gdbarch->fetch_tls_load_module_address));
967 fprintf_unfiltered (file,
968 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n",
969 gdbarch_find_memory_regions_p (gdbarch));
970 fprintf_unfiltered (file,
971 "gdbarch_dump: find_memory_regions = <%s>\n",
972 host_address_to_string (gdbarch->find_memory_regions));
973 fprintf_unfiltered (file,
974 "gdbarch_dump: float_bit = %s\n",
975 plongest (gdbarch->float_bit));
976 fprintf_unfiltered (file,
977 "gdbarch_dump: float_format = %s\n",
978 pformat (gdbarch->float_format));
979 fprintf_unfiltered (file,
980 "gdbarch_dump: fp0_regnum = %s\n",
981 plongest (gdbarch->fp0_regnum));
982 fprintf_unfiltered (file,
983 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
984 gdbarch_frame_align_p (gdbarch));
985 fprintf_unfiltered (file,
986 "gdbarch_dump: frame_align = <%s>\n",
987 host_address_to_string (gdbarch->frame_align));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: frame_args_skip = %s\n",
990 core_addr_to_string_nz (gdbarch->frame_args_skip));
991 fprintf_unfiltered (file,
992 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
993 gdbarch_frame_num_args_p (gdbarch));
994 fprintf_unfiltered (file,
995 "gdbarch_dump: frame_num_args = <%s>\n",
996 host_address_to_string (gdbarch->frame_num_args));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: frame_red_zone_size = %s\n",
999 plongest (gdbarch->frame_red_zone_size));
1000 fprintf_unfiltered (file,
1001 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
1002 gdbarch_gcore_bfd_target_p (gdbarch));
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: gcore_bfd_target = %s\n",
1005 pstring (gdbarch->gcore_bfd_target));
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n",
1008 gdbarch_gdb_signal_from_target_p (gdbarch));
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: gdb_signal_from_target = <%s>\n",
1011 host_address_to_string (gdbarch->gdb_signal_from_target));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: gen_return_address = <%s>\n",
1014 host_address_to_string (gdbarch->gen_return_address));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1017 gdbarch_get_longjmp_target_p (gdbarch));
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: get_longjmp_target = <%s>\n",
1020 host_address_to_string (gdbarch->get_longjmp_target));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
1023 gdbarch_get_siginfo_type_p (gdbarch));
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: get_siginfo_type = <%s>\n",
1026 host_address_to_string (gdbarch->get_siginfo_type));
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
1029 gdbarch_get_syscall_number_p (gdbarch));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: get_syscall_number = <%s>\n",
1032 host_address_to_string (gdbarch->get_syscall_number));
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: half_bit = %s\n",
1035 plongest (gdbarch->half_bit));
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: half_format = %s\n",
1038 pformat (gdbarch->half_format));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: has_dos_based_file_system = %s\n",
1041 plongest (gdbarch->has_dos_based_file_system));
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: has_global_breakpoints = %s\n",
1044 plongest (gdbarch->has_global_breakpoints));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: has_global_solist = %s\n",
1047 plongest (gdbarch->has_global_solist));
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: has_shared_address_space = <%s>\n",
1050 host_address_to_string (gdbarch->has_shared_address_space));
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1053 plongest (gdbarch->have_nonsteppable_watchpoint));
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
1056 host_address_to_string (gdbarch->in_function_epilogue_p));
1057 fprintf_unfiltered (file,
1058 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
1059 host_address_to_string (gdbarch->in_solib_return_trampoline));
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: gdbarch_info_proc_p() = %d\n",
1062 gdbarch_info_proc_p (gdbarch));
1063 fprintf_unfiltered (file,
1064 "gdbarch_dump: info_proc = <%s>\n",
1065 host_address_to_string (gdbarch->info_proc));
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: inner_than = <%s>\n",
1068 host_address_to_string (gdbarch->inner_than));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: int_bit = %s\n",
1071 plongest (gdbarch->int_bit));
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1074 gdbarch_integer_to_address_p (gdbarch));
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: integer_to_address = <%s>\n",
1077 host_address_to_string (gdbarch->integer_to_address));
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n",
1080 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order));
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: long_bit = %s\n",
1083 plongest (gdbarch->long_bit));
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: long_double_bit = %s\n",
1086 plongest (gdbarch->long_double_bit));
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: long_double_format = %s\n",
1089 pformat (gdbarch->long_double_format));
1090 fprintf_unfiltered (file,
1091 "gdbarch_dump: long_long_align_bit = %s\n",
1092 plongest (gdbarch->long_long_align_bit));
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: long_long_bit = %s\n",
1095 plongest (gdbarch->long_long_bit));
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n",
1098 gdbarch_make_corefile_notes_p (gdbarch));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: make_corefile_notes = <%s>\n",
1101 host_address_to_string (gdbarch->make_corefile_notes));
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
1104 gdbarch_max_insn_length_p (gdbarch));
1105 fprintf_unfiltered (file,
1106 "gdbarch_dump: max_insn_length = %s\n",
1107 plongest (gdbarch->max_insn_length));
1108 fprintf_unfiltered (file,
1109 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
1110 host_address_to_string (gdbarch->memory_insert_breakpoint));
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
1113 host_address_to_string (gdbarch->memory_remove_breakpoint));
1114 fprintf_unfiltered (file,
1115 "gdbarch_dump: num_pseudo_regs = %s\n",
1116 plongest (gdbarch->num_pseudo_regs));
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: num_regs = %s\n",
1119 plongest (gdbarch->num_regs));
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: osabi = %s\n",
1122 plongest (gdbarch->osabi));
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1125 gdbarch_overlay_update_p (gdbarch));
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: overlay_update = <%s>\n",
1128 host_address_to_string (gdbarch->overlay_update));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: pc_regnum = %s\n",
1131 plongest (gdbarch->pc_regnum));
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: pointer_to_address = <%s>\n",
1134 host_address_to_string (gdbarch->pointer_to_address));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1137 gdbarch_print_float_info_p (gdbarch));
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: print_float_info = <%s>\n",
1140 host_address_to_string (gdbarch->print_float_info));
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: print_insn = <%s>\n",
1143 host_address_to_string (gdbarch->print_insn));
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: print_registers_info = <%s>\n",
1146 host_address_to_string (gdbarch->print_registers_info));
1147 fprintf_unfiltered (file,
1148 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1149 gdbarch_print_vector_info_p (gdbarch));
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: print_vector_info = <%s>\n",
1152 host_address_to_string (gdbarch->print_vector_info));
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1155 gdbarch_process_record_p (gdbarch));
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: process_record = <%s>\n",
1158 host_address_to_string (gdbarch->process_record));
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1161 gdbarch_process_record_signal_p (gdbarch));
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: process_record_signal = <%s>\n",
1164 host_address_to_string (gdbarch->process_record_signal));
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: ps_regnum = %s\n",
1167 plongest (gdbarch->ps_regnum));
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1170 gdbarch_pseudo_register_read_p (gdbarch));
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: pseudo_register_read = <%s>\n",
1173 host_address_to_string (gdbarch->pseudo_register_read));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n",
1176 gdbarch_pseudo_register_read_value_p (gdbarch));
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: pseudo_register_read_value = <%s>\n",
1179 host_address_to_string (gdbarch->pseudo_register_read_value));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1182 gdbarch_pseudo_register_write_p (gdbarch));
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: pseudo_register_write = <%s>\n",
1185 host_address_to_string (gdbarch->pseudo_register_write));
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: ptr_bit = %s\n",
1188 plongest (gdbarch->ptr_bit));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1191 gdbarch_push_dummy_call_p (gdbarch));
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: push_dummy_call = <%s>\n",
1194 host_address_to_string (gdbarch->push_dummy_call));
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1197 gdbarch_push_dummy_code_p (gdbarch));
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: push_dummy_code = <%s>\n",
1200 host_address_to_string (gdbarch->push_dummy_code));
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1203 gdbarch_read_pc_p (gdbarch));
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: read_pc = <%s>\n",
1206 host_address_to_string (gdbarch->read_pc));
1207 fprintf_unfiltered (file,
1208 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1209 gdbarch_record_special_symbol_p (gdbarch));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: record_special_symbol = <%s>\n",
1212 host_address_to_string (gdbarch->record_special_symbol));
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: register_name = <%s>\n",
1215 host_address_to_string (gdbarch->register_name));
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: register_reggroup_p = <%s>\n",
1218 host_address_to_string (gdbarch->register_reggroup_p));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: register_sim_regno = <%s>\n",
1221 host_address_to_string (gdbarch->register_sim_regno));
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: register_to_value = <%s>\n",
1224 host_address_to_string (gdbarch->register_to_value));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1227 gdbarch_register_type_p (gdbarch));
1228 fprintf_unfiltered (file,
1229 "gdbarch_dump: register_type = <%s>\n",
1230 host_address_to_string (gdbarch->register_type));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1233 gdbarch_regset_from_core_section_p (gdbarch));
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: regset_from_core_section = <%s>\n",
1236 host_address_to_string (gdbarch->regset_from_core_section));
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n",
1239 gdbarch_relocate_instruction_p (gdbarch));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: relocate_instruction = <%s>\n",
1242 host_address_to_string (gdbarch->relocate_instruction));
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1245 host_address_to_string (gdbarch->remote_breakpoint_from_pc));
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: remote_register_number = <%s>\n",
1248 host_address_to_string (gdbarch->remote_register_number));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n",
1251 host_address_to_string (gdbarch->return_in_first_hidden_param_p));
1252 fprintf_unfiltered (file,
1253 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1254 gdbarch_return_value_p (gdbarch));
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: return_value = <%s>\n",
1257 host_address_to_string (gdbarch->return_value));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1260 host_address_to_string (gdbarch->sdb_reg_to_regnum));
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: short_bit = %s\n",
1263 plongest (gdbarch->short_bit));
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1266 gdbarch_single_step_through_delay_p (gdbarch));
1267 fprintf_unfiltered (file,
1268 "gdbarch_dump: single_step_through_delay = <%s>\n",
1269 host_address_to_string (gdbarch->single_step_through_delay));
1270 fprintf_unfiltered (file,
1271 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1272 gdbarch_skip_main_prologue_p (gdbarch));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: skip_main_prologue = <%s>\n",
1275 host_address_to_string (gdbarch->skip_main_prologue));
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1278 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1281 host_address_to_string (gdbarch->skip_permanent_breakpoint));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: skip_prologue = <%s>\n",
1284 host_address_to_string (gdbarch->skip_prologue));
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1287 host_address_to_string (gdbarch->skip_solib_resolver));
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1290 host_address_to_string (gdbarch->skip_trampoline_code));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: smash_text_address = <%s>\n",
1293 host_address_to_string (gdbarch->smash_text_address));
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1296 gdbarch_software_single_step_p (gdbarch));
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: software_single_step = <%s>\n",
1299 host_address_to_string (gdbarch->software_single_step));
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1302 plongest (gdbarch->sofun_address_maybe_missing));
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: solib_symbols_extension = %s\n",
1305 pstring (gdbarch->solib_symbols_extension));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: sp_regnum = %s\n",
1308 plongest (gdbarch->sp_regnum));
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1311 host_address_to_string (gdbarch->stab_reg_to_regnum));
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1314 host_address_to_string (gdbarch->stabs_argument_has_addr));
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: stap_gdb_register_prefix = %s\n",
1317 gdbarch->stap_gdb_register_prefix);
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: stap_gdb_register_suffix = %s\n",
1320 gdbarch->stap_gdb_register_suffix);
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: stap_integer_prefix = %s\n",
1323 gdbarch->stap_integer_prefix);
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: stap_integer_suffix = %s\n",
1326 gdbarch->stap_integer_suffix);
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n",
1329 gdbarch_stap_is_single_operand_p (gdbarch));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: stap_is_single_operand = <%s>\n",
1332 host_address_to_string (gdbarch->stap_is_single_operand));
1333 fprintf_unfiltered (file,
1334 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n",
1335 gdbarch_stap_parse_special_token_p (gdbarch));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: stap_parse_special_token = <%s>\n",
1338 host_address_to_string (gdbarch->stap_parse_special_token));
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: stap_register_indirection_prefix = %s\n",
1341 gdbarch->stap_register_indirection_prefix);
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: stap_register_indirection_suffix = %s\n",
1344 gdbarch->stap_register_indirection_suffix);
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: stap_register_prefix = %s\n",
1347 gdbarch->stap_register_prefix);
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: stap_register_suffix = %s\n",
1350 gdbarch->stap_register_suffix);
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1353 gdbarch_static_transform_name_p (gdbarch));
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: static_transform_name = <%s>\n",
1356 host_address_to_string (gdbarch->static_transform_name));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: target_desc = %s\n",
1359 host_address_to_string (gdbarch->target_desc));
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1362 gdbarch_unwind_pc_p (gdbarch));
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: unwind_pc = <%s>\n",
1365 host_address_to_string (gdbarch->unwind_pc));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1368 gdbarch_unwind_sp_p (gdbarch));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: unwind_sp = <%s>\n",
1371 host_address_to_string (gdbarch->unwind_sp));
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: value_from_register = <%s>\n",
1374 host_address_to_string (gdbarch->value_from_register));
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: value_to_register = <%s>\n",
1377 host_address_to_string (gdbarch->value_to_register));
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: vbit_in_delta = %s\n",
1380 plongest (gdbarch->vbit_in_delta));
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1383 host_address_to_string (gdbarch->virtual_frame_pointer));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: vtable_function_descriptors = %s\n",
1386 plongest (gdbarch->vtable_function_descriptors));
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1389 gdbarch_write_pc_p (gdbarch));
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: write_pc = <%s>\n",
1392 host_address_to_string (gdbarch->write_pc));
1393 if (gdbarch->dump_tdep != NULL)
1394 gdbarch->dump_tdep (gdbarch, file);
1397 struct gdbarch_tdep *
1398 gdbarch_tdep (struct gdbarch *gdbarch)
1400 if (gdbarch_debug >= 2)
1401 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1402 return gdbarch->tdep;
1406 const struct bfd_arch_info *
1407 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1409 gdb_assert (gdbarch != NULL);
1410 if (gdbarch_debug >= 2)
1411 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1412 return gdbarch->bfd_arch_info;
1416 gdbarch_byte_order (struct gdbarch *gdbarch)
1418 gdb_assert (gdbarch != NULL);
1419 if (gdbarch_debug >= 2)
1420 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1421 return gdbarch->byte_order;
1425 gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
1427 gdb_assert (gdbarch != NULL);
1428 if (gdbarch_debug >= 2)
1429 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
1430 return gdbarch->byte_order_for_code;
1434 gdbarch_osabi (struct gdbarch *gdbarch)
1436 gdb_assert (gdbarch != NULL);
1437 if (gdbarch_debug >= 2)
1438 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1439 return gdbarch->osabi;
1442 const struct target_desc *
1443 gdbarch_target_desc (struct gdbarch *gdbarch)
1445 gdb_assert (gdbarch != NULL);
1446 if (gdbarch_debug >= 2)
1447 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1448 return gdbarch->target_desc;
1452 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1454 gdb_assert (gdbarch != NULL);
1455 /* Skip verify of bits_big_endian, invalid_p == 0 */
1456 if (gdbarch_debug >= 2)
1457 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1458 return gdbarch->bits_big_endian;
1462 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1463 int bits_big_endian)
1465 gdbarch->bits_big_endian = bits_big_endian;
1469 gdbarch_short_bit (struct gdbarch *gdbarch)
1471 gdb_assert (gdbarch != NULL);
1472 /* Skip verify of short_bit, invalid_p == 0 */
1473 if (gdbarch_debug >= 2)
1474 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1475 return gdbarch->short_bit;
1479 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1482 gdbarch->short_bit = short_bit;
1486 gdbarch_int_bit (struct gdbarch *gdbarch)
1488 gdb_assert (gdbarch != NULL);
1489 /* Skip verify of int_bit, invalid_p == 0 */
1490 if (gdbarch_debug >= 2)
1491 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1492 return gdbarch->int_bit;
1496 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1499 gdbarch->int_bit = int_bit;
1503 gdbarch_long_bit (struct gdbarch *gdbarch)
1505 gdb_assert (gdbarch != NULL);
1506 /* Skip verify of long_bit, invalid_p == 0 */
1507 if (gdbarch_debug >= 2)
1508 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1509 return gdbarch->long_bit;
1513 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1516 gdbarch->long_bit = long_bit;
1520 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1522 gdb_assert (gdbarch != NULL);
1523 /* Skip verify of long_long_bit, invalid_p == 0 */
1524 if (gdbarch_debug >= 2)
1525 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1526 return gdbarch->long_long_bit;
1530 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1533 gdbarch->long_long_bit = long_long_bit;
1537 gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
1539 gdb_assert (gdbarch != NULL);
1540 /* Skip verify of long_long_align_bit, invalid_p == 0 */
1541 if (gdbarch_debug >= 2)
1542 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
1543 return gdbarch->long_long_align_bit;
1547 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
1548 int long_long_align_bit)
1550 gdbarch->long_long_align_bit = long_long_align_bit;
1554 gdbarch_half_bit (struct gdbarch *gdbarch)
1556 gdb_assert (gdbarch != NULL);
1557 /* Skip verify of half_bit, invalid_p == 0 */
1558 if (gdbarch_debug >= 2)
1559 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n");
1560 return gdbarch->half_bit;
1564 set_gdbarch_half_bit (struct gdbarch *gdbarch,
1567 gdbarch->half_bit = half_bit;
1570 const struct floatformat **
1571 gdbarch_half_format (struct gdbarch *gdbarch)
1573 gdb_assert (gdbarch != NULL);
1574 if (gdbarch_debug >= 2)
1575 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n");
1576 return gdbarch->half_format;
1580 set_gdbarch_half_format (struct gdbarch *gdbarch,
1581 const struct floatformat ** half_format)
1583 gdbarch->half_format = half_format;
1587 gdbarch_float_bit (struct gdbarch *gdbarch)
1589 gdb_assert (gdbarch != NULL);
1590 /* Skip verify of float_bit, invalid_p == 0 */
1591 if (gdbarch_debug >= 2)
1592 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1593 return gdbarch->float_bit;
1597 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1600 gdbarch->float_bit = float_bit;
1603 const struct floatformat **
1604 gdbarch_float_format (struct gdbarch *gdbarch)
1606 gdb_assert (gdbarch != NULL);
1607 if (gdbarch_debug >= 2)
1608 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1609 return gdbarch->float_format;
1613 set_gdbarch_float_format (struct gdbarch *gdbarch,
1614 const struct floatformat ** float_format)
1616 gdbarch->float_format = float_format;
1620 gdbarch_double_bit (struct gdbarch *gdbarch)
1622 gdb_assert (gdbarch != NULL);
1623 /* Skip verify of double_bit, invalid_p == 0 */
1624 if (gdbarch_debug >= 2)
1625 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1626 return gdbarch->double_bit;
1630 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1633 gdbarch->double_bit = double_bit;
1636 const struct floatformat **
1637 gdbarch_double_format (struct gdbarch *gdbarch)
1639 gdb_assert (gdbarch != NULL);
1640 if (gdbarch_debug >= 2)
1641 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1642 return gdbarch->double_format;
1646 set_gdbarch_double_format (struct gdbarch *gdbarch,
1647 const struct floatformat ** double_format)
1649 gdbarch->double_format = double_format;
1653 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1655 gdb_assert (gdbarch != NULL);
1656 /* Skip verify of long_double_bit, invalid_p == 0 */
1657 if (gdbarch_debug >= 2)
1658 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1659 return gdbarch->long_double_bit;
1663 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1664 int long_double_bit)
1666 gdbarch->long_double_bit = long_double_bit;
1669 const struct floatformat **
1670 gdbarch_long_double_format (struct gdbarch *gdbarch)
1672 gdb_assert (gdbarch != NULL);
1673 if (gdbarch_debug >= 2)
1674 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1675 return gdbarch->long_double_format;
1679 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1680 const struct floatformat ** long_double_format)
1682 gdbarch->long_double_format = long_double_format;
1686 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1688 gdb_assert (gdbarch != NULL);
1689 /* Skip verify of ptr_bit, invalid_p == 0 */
1690 if (gdbarch_debug >= 2)
1691 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1692 return gdbarch->ptr_bit;
1696 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1699 gdbarch->ptr_bit = ptr_bit;
1703 gdbarch_addr_bit (struct gdbarch *gdbarch)
1705 gdb_assert (gdbarch != NULL);
1706 /* Check variable changed from pre-default. */
1707 gdb_assert (gdbarch->addr_bit != 0);
1708 if (gdbarch_debug >= 2)
1709 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1710 return gdbarch->addr_bit;
1714 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1717 gdbarch->addr_bit = addr_bit;
1721 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch)
1723 gdb_assert (gdbarch != NULL);
1724 /* Check variable changed from pre-default. */
1725 gdb_assert (gdbarch->dwarf2_addr_size != 0);
1726 if (gdbarch_debug >= 2)
1727 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n");
1728 return gdbarch->dwarf2_addr_size;
1732 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch,
1733 int dwarf2_addr_size)
1735 gdbarch->dwarf2_addr_size = dwarf2_addr_size;
1739 gdbarch_char_signed (struct gdbarch *gdbarch)
1741 gdb_assert (gdbarch != NULL);
1742 /* Check variable changed from pre-default. */
1743 gdb_assert (gdbarch->char_signed != -1);
1744 if (gdbarch_debug >= 2)
1745 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1746 return gdbarch->char_signed;
1750 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1753 gdbarch->char_signed = char_signed;
1757 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1759 gdb_assert (gdbarch != NULL);
1760 return gdbarch->read_pc != NULL;
1764 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1766 gdb_assert (gdbarch != NULL);
1767 gdb_assert (gdbarch->read_pc != NULL);
1768 if (gdbarch_debug >= 2)
1769 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1770 return gdbarch->read_pc (regcache);
1774 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1775 gdbarch_read_pc_ftype read_pc)
1777 gdbarch->read_pc = read_pc;
1781 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1783 gdb_assert (gdbarch != NULL);
1784 return gdbarch->write_pc != NULL;
1788 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1790 gdb_assert (gdbarch != NULL);
1791 gdb_assert (gdbarch->write_pc != NULL);
1792 if (gdbarch_debug >= 2)
1793 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1794 gdbarch->write_pc (regcache, val);
1798 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1799 gdbarch_write_pc_ftype write_pc)
1801 gdbarch->write_pc = write_pc;
1805 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1807 gdb_assert (gdbarch != NULL);
1808 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1809 if (gdbarch_debug >= 2)
1810 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1811 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1815 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1816 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1818 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1822 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1824 gdb_assert (gdbarch != NULL);
1825 return gdbarch->pseudo_register_read != NULL;
1828 enum register_status
1829 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1831 gdb_assert (gdbarch != NULL);
1832 gdb_assert (gdbarch->pseudo_register_read != NULL);
1833 if (gdbarch_debug >= 2)
1834 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1835 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1839 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1840 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1842 gdbarch->pseudo_register_read = pseudo_register_read;
1846 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch)
1848 gdb_assert (gdbarch != NULL);
1849 return gdbarch->pseudo_register_read_value != NULL;
1853 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum)
1855 gdb_assert (gdbarch != NULL);
1856 gdb_assert (gdbarch->pseudo_register_read_value != NULL);
1857 if (gdbarch_debug >= 2)
1858 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n");
1859 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum);
1863 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch,
1864 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
1866 gdbarch->pseudo_register_read_value = pseudo_register_read_value;
1870 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1872 gdb_assert (gdbarch != NULL);
1873 return gdbarch->pseudo_register_write != NULL;
1877 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1879 gdb_assert (gdbarch != NULL);
1880 gdb_assert (gdbarch->pseudo_register_write != NULL);
1881 if (gdbarch_debug >= 2)
1882 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1883 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1887 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1888 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1890 gdbarch->pseudo_register_write = pseudo_register_write;
1894 gdbarch_num_regs (struct gdbarch *gdbarch)
1896 gdb_assert (gdbarch != NULL);
1897 /* Check variable changed from pre-default. */
1898 gdb_assert (gdbarch->num_regs != -1);
1899 if (gdbarch_debug >= 2)
1900 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1901 return gdbarch->num_regs;
1905 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1908 gdbarch->num_regs = num_regs;
1912 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1914 gdb_assert (gdbarch != NULL);
1915 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1916 if (gdbarch_debug >= 2)
1917 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1918 return gdbarch->num_pseudo_regs;
1922 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1923 int num_pseudo_regs)
1925 gdbarch->num_pseudo_regs = num_pseudo_regs;
1929 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch)
1931 gdb_assert (gdbarch != NULL);
1932 return gdbarch->ax_pseudo_register_collect != NULL;
1936 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1938 gdb_assert (gdbarch != NULL);
1939 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL);
1940 if (gdbarch_debug >= 2)
1941 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n");
1942 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg);
1946 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch,
1947 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect)
1949 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect;
1953 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch)
1955 gdb_assert (gdbarch != NULL);
1956 return gdbarch->ax_pseudo_register_push_stack != NULL;
1960 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg)
1962 gdb_assert (gdbarch != NULL);
1963 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL);
1964 if (gdbarch_debug >= 2)
1965 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n");
1966 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg);
1970 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
1971 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack)
1973 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack;
1977 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1979 gdb_assert (gdbarch != NULL);
1980 /* Skip verify of sp_regnum, invalid_p == 0 */
1981 if (gdbarch_debug >= 2)
1982 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1983 return gdbarch->sp_regnum;
1987 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1990 gdbarch->sp_regnum = sp_regnum;
1994 gdbarch_pc_regnum (struct gdbarch *gdbarch)
1996 gdb_assert (gdbarch != NULL);
1997 /* Skip verify of pc_regnum, invalid_p == 0 */
1998 if (gdbarch_debug >= 2)
1999 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2000 return gdbarch->pc_regnum;
2004 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2007 gdbarch->pc_regnum = pc_regnum;
2011 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2013 gdb_assert (gdbarch != NULL);
2014 /* Skip verify of ps_regnum, invalid_p == 0 */
2015 if (gdbarch_debug >= 2)
2016 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2017 return gdbarch->ps_regnum;
2021 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2024 gdbarch->ps_regnum = ps_regnum;
2028 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2030 gdb_assert (gdbarch != NULL);
2031 /* Skip verify of fp0_regnum, invalid_p == 0 */
2032 if (gdbarch_debug >= 2)
2033 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2034 return gdbarch->fp0_regnum;
2038 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2041 gdbarch->fp0_regnum = fp0_regnum;
2045 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2047 gdb_assert (gdbarch != NULL);
2048 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2049 if (gdbarch_debug >= 2)
2050 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2051 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
2055 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2056 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2058 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2062 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2064 gdb_assert (gdbarch != NULL);
2065 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2066 if (gdbarch_debug >= 2)
2067 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2068 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
2072 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2073 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2075 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2079 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2081 gdb_assert (gdbarch != NULL);
2082 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2083 if (gdbarch_debug >= 2)
2084 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2085 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
2089 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2090 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2092 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2096 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2098 gdb_assert (gdbarch != NULL);
2099 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2100 if (gdbarch_debug >= 2)
2101 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2102 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
2106 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2107 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2109 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2113 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2115 gdb_assert (gdbarch != NULL);
2116 gdb_assert (gdbarch->register_name != NULL);
2117 if (gdbarch_debug >= 2)
2118 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2119 return gdbarch->register_name (gdbarch, regnr);
2123 set_gdbarch_register_name (struct gdbarch *gdbarch,
2124 gdbarch_register_name_ftype register_name)
2126 gdbarch->register_name = register_name;
2130 gdbarch_register_type_p (struct gdbarch *gdbarch)
2132 gdb_assert (gdbarch != NULL);
2133 return gdbarch->register_type != NULL;
2137 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2139 gdb_assert (gdbarch != NULL);
2140 gdb_assert (gdbarch->register_type != NULL);
2141 if (gdbarch_debug >= 2)
2142 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2143 return gdbarch->register_type (gdbarch, reg_nr);
2147 set_gdbarch_register_type (struct gdbarch *gdbarch,
2148 gdbarch_register_type_ftype register_type)
2150 gdbarch->register_type = register_type;
2154 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
2156 gdb_assert (gdbarch != NULL);
2157 return gdbarch->dummy_id != NULL;
2161 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
2163 gdb_assert (gdbarch != NULL);
2164 gdb_assert (gdbarch->dummy_id != NULL);
2165 if (gdbarch_debug >= 2)
2166 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
2167 return gdbarch->dummy_id (gdbarch, this_frame);
2171 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
2172 gdbarch_dummy_id_ftype dummy_id)
2174 gdbarch->dummy_id = dummy_id;
2178 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2180 gdb_assert (gdbarch != NULL);
2181 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2182 if (gdbarch_debug >= 2)
2183 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2184 return gdbarch->deprecated_fp_regnum;
2188 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2189 int deprecated_fp_regnum)
2191 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2195 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2197 gdb_assert (gdbarch != NULL);
2198 return gdbarch->push_dummy_call != NULL;
2202 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)
2204 gdb_assert (gdbarch != NULL);
2205 gdb_assert (gdbarch->push_dummy_call != NULL);
2206 if (gdbarch_debug >= 2)
2207 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2208 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2212 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2213 gdbarch_push_dummy_call_ftype push_dummy_call)
2215 gdbarch->push_dummy_call = push_dummy_call;
2219 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2221 gdb_assert (gdbarch != NULL);
2222 /* Skip verify of call_dummy_location, invalid_p == 0 */
2223 if (gdbarch_debug >= 2)
2224 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2225 return gdbarch->call_dummy_location;
2229 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2230 int call_dummy_location)
2232 gdbarch->call_dummy_location = call_dummy_location;
2236 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2238 gdb_assert (gdbarch != NULL);
2239 return gdbarch->push_dummy_code != NULL;
2243 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)
2245 gdb_assert (gdbarch != NULL);
2246 gdb_assert (gdbarch->push_dummy_code != NULL);
2247 if (gdbarch_debug >= 2)
2248 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2249 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
2253 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2254 gdbarch_push_dummy_code_ftype push_dummy_code)
2256 gdbarch->push_dummy_code = push_dummy_code;
2260 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2262 gdb_assert (gdbarch != NULL);
2263 gdb_assert (gdbarch->print_registers_info != NULL);
2264 if (gdbarch_debug >= 2)
2265 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2266 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2270 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2271 gdbarch_print_registers_info_ftype print_registers_info)
2273 gdbarch->print_registers_info = print_registers_info;
2277 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2279 gdb_assert (gdbarch != NULL);
2280 return gdbarch->print_float_info != NULL;
2284 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2286 gdb_assert (gdbarch != NULL);
2287 gdb_assert (gdbarch->print_float_info != NULL);
2288 if (gdbarch_debug >= 2)
2289 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2290 gdbarch->print_float_info (gdbarch, file, frame, args);
2294 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2295 gdbarch_print_float_info_ftype print_float_info)
2297 gdbarch->print_float_info = print_float_info;
2301 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2303 gdb_assert (gdbarch != NULL);
2304 return gdbarch->print_vector_info != NULL;
2308 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2310 gdb_assert (gdbarch != NULL);
2311 gdb_assert (gdbarch->print_vector_info != NULL);
2312 if (gdbarch_debug >= 2)
2313 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2314 gdbarch->print_vector_info (gdbarch, file, frame, args);
2318 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2319 gdbarch_print_vector_info_ftype print_vector_info)
2321 gdbarch->print_vector_info = print_vector_info;
2325 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2327 gdb_assert (gdbarch != NULL);
2328 gdb_assert (gdbarch->register_sim_regno != NULL);
2329 if (gdbarch_debug >= 2)
2330 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2331 return gdbarch->register_sim_regno (gdbarch, reg_nr);
2335 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2336 gdbarch_register_sim_regno_ftype register_sim_regno)
2338 gdbarch->register_sim_regno = register_sim_regno;
2342 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2344 gdb_assert (gdbarch != NULL);
2345 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2346 if (gdbarch_debug >= 2)
2347 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2348 return gdbarch->cannot_fetch_register (gdbarch, regnum);
2352 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2353 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2355 gdbarch->cannot_fetch_register = cannot_fetch_register;
2359 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2361 gdb_assert (gdbarch != NULL);
2362 gdb_assert (gdbarch->cannot_store_register != NULL);
2363 if (gdbarch_debug >= 2)
2364 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2365 return gdbarch->cannot_store_register (gdbarch, regnum);
2369 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2370 gdbarch_cannot_store_register_ftype cannot_store_register)
2372 gdbarch->cannot_store_register = cannot_store_register;
2376 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2378 gdb_assert (gdbarch != NULL);
2379 return gdbarch->get_longjmp_target != NULL;
2383 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
2385 gdb_assert (gdbarch != NULL);
2386 gdb_assert (gdbarch->get_longjmp_target != NULL);
2387 if (gdbarch_debug >= 2)
2388 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2389 return gdbarch->get_longjmp_target (frame, pc);
2393 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2394 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2396 gdbarch->get_longjmp_target = get_longjmp_target;
2400 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2402 gdb_assert (gdbarch != NULL);
2403 if (gdbarch_debug >= 2)
2404 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2405 return gdbarch->believe_pcc_promotion;
2409 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2410 int believe_pcc_promotion)
2412 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2416 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2418 gdb_assert (gdbarch != NULL);
2419 gdb_assert (gdbarch->convert_register_p != NULL);
2420 if (gdbarch_debug >= 2)
2421 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2422 return gdbarch->convert_register_p (gdbarch, regnum, type);
2426 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2427 gdbarch_convert_register_p_ftype convert_register_p)
2429 gdbarch->convert_register_p = convert_register_p;
2433 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep)
2435 gdb_assert (gdbarch != NULL);
2436 gdb_assert (gdbarch->register_to_value != NULL);
2437 if (gdbarch_debug >= 2)
2438 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2439 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep);
2443 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2444 gdbarch_register_to_value_ftype register_to_value)
2446 gdbarch->register_to_value = register_to_value;
2450 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2452 gdb_assert (gdbarch != NULL);
2453 gdb_assert (gdbarch->value_to_register != NULL);
2454 if (gdbarch_debug >= 2)
2455 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2456 gdbarch->value_to_register (frame, regnum, type, buf);
2460 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2461 gdbarch_value_to_register_ftype value_to_register)
2463 gdbarch->value_to_register = value_to_register;
2467 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2469 gdb_assert (gdbarch != NULL);
2470 gdb_assert (gdbarch->value_from_register != NULL);
2471 if (gdbarch_debug >= 2)
2472 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2473 return gdbarch->value_from_register (type, regnum, frame);
2477 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2478 gdbarch_value_from_register_ftype value_from_register)
2480 gdbarch->value_from_register = value_from_register;
2484 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2486 gdb_assert (gdbarch != NULL);
2487 gdb_assert (gdbarch->pointer_to_address != NULL);
2488 if (gdbarch_debug >= 2)
2489 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2490 return gdbarch->pointer_to_address (gdbarch, type, buf);
2494 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2495 gdbarch_pointer_to_address_ftype pointer_to_address)
2497 gdbarch->pointer_to_address = pointer_to_address;
2501 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2503 gdb_assert (gdbarch != NULL);
2504 gdb_assert (gdbarch->address_to_pointer != NULL);
2505 if (gdbarch_debug >= 2)
2506 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2507 gdbarch->address_to_pointer (gdbarch, type, buf, addr);
2511 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2512 gdbarch_address_to_pointer_ftype address_to_pointer)
2514 gdbarch->address_to_pointer = address_to_pointer;
2518 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2520 gdb_assert (gdbarch != NULL);
2521 return gdbarch->integer_to_address != NULL;
2525 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2527 gdb_assert (gdbarch != NULL);
2528 gdb_assert (gdbarch->integer_to_address != NULL);
2529 if (gdbarch_debug >= 2)
2530 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2531 return gdbarch->integer_to_address (gdbarch, type, buf);
2535 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2536 gdbarch_integer_to_address_ftype integer_to_address)
2538 gdbarch->integer_to_address = integer_to_address;
2542 gdbarch_return_value_p (struct gdbarch *gdbarch)
2544 gdb_assert (gdbarch != NULL);
2545 return gdbarch->return_value != NULL;
2548 enum return_value_convention
2549 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2551 gdb_assert (gdbarch != NULL);
2552 gdb_assert (gdbarch->return_value != NULL);
2553 if (gdbarch_debug >= 2)
2554 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2555 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf);
2559 set_gdbarch_return_value (struct gdbarch *gdbarch,
2560 gdbarch_return_value_ftype return_value)
2562 gdbarch->return_value = return_value;
2566 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
2568 gdb_assert (gdbarch != NULL);
2569 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL);
2570 if (gdbarch_debug >= 2)
2571 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n");
2572 return gdbarch->return_in_first_hidden_param_p (gdbarch, type);
2576 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
2577 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p)
2579 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p;
2583 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2585 gdb_assert (gdbarch != NULL);
2586 gdb_assert (gdbarch->skip_prologue != NULL);
2587 if (gdbarch_debug >= 2)
2588 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2589 return gdbarch->skip_prologue (gdbarch, ip);
2593 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2594 gdbarch_skip_prologue_ftype skip_prologue)
2596 gdbarch->skip_prologue = skip_prologue;
2600 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2602 gdb_assert (gdbarch != NULL);
2603 return gdbarch->skip_main_prologue != NULL;
2607 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2609 gdb_assert (gdbarch != NULL);
2610 gdb_assert (gdbarch->skip_main_prologue != NULL);
2611 if (gdbarch_debug >= 2)
2612 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2613 return gdbarch->skip_main_prologue (gdbarch, ip);
2617 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2618 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2620 gdbarch->skip_main_prologue = skip_main_prologue;
2624 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2626 gdb_assert (gdbarch != NULL);
2627 gdb_assert (gdbarch->inner_than != NULL);
2628 if (gdbarch_debug >= 2)
2629 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2630 return gdbarch->inner_than (lhs, rhs);
2634 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2635 gdbarch_inner_than_ftype inner_than)
2637 gdbarch->inner_than = inner_than;
2641 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2643 gdb_assert (gdbarch != NULL);
2644 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2645 if (gdbarch_debug >= 2)
2646 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2647 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2651 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2652 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2654 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2658 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr)
2660 gdb_assert (gdbarch != NULL);
2661 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL);
2662 if (gdbarch_debug >= 2)
2663 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n");
2664 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr);
2668 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch,
2669 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc)
2671 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc;
2675 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2677 gdb_assert (gdbarch != NULL);
2678 return gdbarch->adjust_breakpoint_address != NULL;
2682 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2684 gdb_assert (gdbarch != NULL);
2685 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2686 if (gdbarch_debug >= 2)
2687 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2688 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2692 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2693 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2695 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2699 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2701 gdb_assert (gdbarch != NULL);
2702 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2703 if (gdbarch_debug >= 2)
2704 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2705 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2709 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2710 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2712 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2716 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2718 gdb_assert (gdbarch != NULL);
2719 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2720 if (gdbarch_debug >= 2)
2721 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2722 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2726 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2727 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2729 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2733 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2735 gdb_assert (gdbarch != NULL);
2736 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2737 if (gdbarch_debug >= 2)
2738 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2739 return gdbarch->decr_pc_after_break;
2743 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2744 CORE_ADDR decr_pc_after_break)
2746 gdbarch->decr_pc_after_break = decr_pc_after_break;
2750 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2752 gdb_assert (gdbarch != NULL);
2753 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2754 if (gdbarch_debug >= 2)
2755 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2756 return gdbarch->deprecated_function_start_offset;
2760 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2761 CORE_ADDR deprecated_function_start_offset)
2763 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2767 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2769 gdb_assert (gdbarch != NULL);
2770 gdb_assert (gdbarch->remote_register_number != NULL);
2771 if (gdbarch_debug >= 2)
2772 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2773 return gdbarch->remote_register_number (gdbarch, regno);
2777 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2778 gdbarch_remote_register_number_ftype remote_register_number)
2780 gdbarch->remote_register_number = remote_register_number;
2784 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2786 gdb_assert (gdbarch != NULL);
2787 return gdbarch->fetch_tls_load_module_address != NULL;
2791 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2793 gdb_assert (gdbarch != NULL);
2794 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2795 if (gdbarch_debug >= 2)
2796 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2797 return gdbarch->fetch_tls_load_module_address (objfile);
2801 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2802 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2804 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2808 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2810 gdb_assert (gdbarch != NULL);
2811 /* Skip verify of frame_args_skip, invalid_p == 0 */
2812 if (gdbarch_debug >= 2)
2813 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2814 return gdbarch->frame_args_skip;
2818 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2819 CORE_ADDR frame_args_skip)
2821 gdbarch->frame_args_skip = frame_args_skip;
2825 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2827 gdb_assert (gdbarch != NULL);
2828 return gdbarch->unwind_pc != NULL;
2832 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2834 gdb_assert (gdbarch != NULL);
2835 gdb_assert (gdbarch->unwind_pc != NULL);
2836 if (gdbarch_debug >= 2)
2837 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2838 return gdbarch->unwind_pc (gdbarch, next_frame);
2842 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2843 gdbarch_unwind_pc_ftype unwind_pc)
2845 gdbarch->unwind_pc = unwind_pc;
2849 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2851 gdb_assert (gdbarch != NULL);
2852 return gdbarch->unwind_sp != NULL;
2856 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2858 gdb_assert (gdbarch != NULL);
2859 gdb_assert (gdbarch->unwind_sp != NULL);
2860 if (gdbarch_debug >= 2)
2861 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2862 return gdbarch->unwind_sp (gdbarch, next_frame);
2866 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2867 gdbarch_unwind_sp_ftype unwind_sp)
2869 gdbarch->unwind_sp = unwind_sp;
2873 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2875 gdb_assert (gdbarch != NULL);
2876 return gdbarch->frame_num_args != NULL;
2880 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2882 gdb_assert (gdbarch != NULL);
2883 gdb_assert (gdbarch->frame_num_args != NULL);
2884 if (gdbarch_debug >= 2)
2885 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2886 return gdbarch->frame_num_args (frame);
2890 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2891 gdbarch_frame_num_args_ftype frame_num_args)
2893 gdbarch->frame_num_args = frame_num_args;
2897 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2899 gdb_assert (gdbarch != NULL);
2900 return gdbarch->frame_align != NULL;
2904 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2906 gdb_assert (gdbarch != NULL);
2907 gdb_assert (gdbarch->frame_align != NULL);
2908 if (gdbarch_debug >= 2)
2909 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2910 return gdbarch->frame_align (gdbarch, address);
2914 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2915 gdbarch_frame_align_ftype frame_align)
2917 gdbarch->frame_align = frame_align;
2921 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2923 gdb_assert (gdbarch != NULL);
2924 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
2925 if (gdbarch_debug >= 2)
2926 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
2927 return gdbarch->stabs_argument_has_addr (gdbarch, type);
2931 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
2932 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
2934 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
2938 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
2940 gdb_assert (gdbarch != NULL);
2941 if (gdbarch_debug >= 2)
2942 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
2943 return gdbarch->frame_red_zone_size;
2947 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
2948 int frame_red_zone_size)
2950 gdbarch->frame_red_zone_size = frame_red_zone_size;
2954 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
2956 gdb_assert (gdbarch != NULL);
2957 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
2958 if (gdbarch_debug >= 2)
2959 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
2960 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
2964 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
2965 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
2967 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
2971 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
2973 gdb_assert (gdbarch != NULL);
2974 gdb_assert (gdbarch->addr_bits_remove != NULL);
2975 if (gdbarch_debug >= 2)
2976 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
2977 return gdbarch->addr_bits_remove (gdbarch, addr);
2981 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
2982 gdbarch_addr_bits_remove_ftype addr_bits_remove)
2984 gdbarch->addr_bits_remove = addr_bits_remove;
2988 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
2990 gdb_assert (gdbarch != NULL);
2991 gdb_assert (gdbarch->smash_text_address != NULL);
2992 if (gdbarch_debug >= 2)
2993 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
2994 return gdbarch->smash_text_address (gdbarch, addr);
2998 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
2999 gdbarch_smash_text_address_ftype smash_text_address)
3001 gdbarch->smash_text_address = smash_text_address;
3005 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3007 gdb_assert (gdbarch != NULL);
3008 return gdbarch->software_single_step != NULL;
3012 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
3014 gdb_assert (gdbarch != NULL);
3015 gdb_assert (gdbarch->software_single_step != NULL);
3016 if (gdbarch_debug >= 2)
3017 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3018 return gdbarch->software_single_step (frame);
3022 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3023 gdbarch_software_single_step_ftype software_single_step)
3025 gdbarch->software_single_step = software_single_step;
3029 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3031 gdb_assert (gdbarch != NULL);
3032 return gdbarch->single_step_through_delay != NULL;
3036 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3038 gdb_assert (gdbarch != NULL);
3039 gdb_assert (gdbarch->single_step_through_delay != NULL);
3040 if (gdbarch_debug >= 2)
3041 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3042 return gdbarch->single_step_through_delay (gdbarch, frame);
3046 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3047 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3049 gdbarch->single_step_through_delay = single_step_through_delay;
3053 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3055 gdb_assert (gdbarch != NULL);
3056 gdb_assert (gdbarch->print_insn != NULL);
3057 if (gdbarch_debug >= 2)
3058 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3059 return gdbarch->print_insn (vma, info);
3063 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3064 gdbarch_print_insn_ftype print_insn)
3066 gdbarch->print_insn = print_insn;
3070 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
3072 gdb_assert (gdbarch != NULL);
3073 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3074 if (gdbarch_debug >= 2)
3075 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3076 return gdbarch->skip_trampoline_code (frame, pc);
3080 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3081 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3083 gdbarch->skip_trampoline_code = skip_trampoline_code;
3087 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3089 gdb_assert (gdbarch != NULL);
3090 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3091 if (gdbarch_debug >= 2)
3092 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3093 return gdbarch->skip_solib_resolver (gdbarch, pc);
3097 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3098 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3100 gdbarch->skip_solib_resolver = skip_solib_resolver;
3104 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name)
3106 gdb_assert (gdbarch != NULL);
3107 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3108 if (gdbarch_debug >= 2)
3109 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3110 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name);
3114 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3115 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3117 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3121 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3123 gdb_assert (gdbarch != NULL);
3124 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3125 if (gdbarch_debug >= 2)
3126 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3127 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3131 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3132 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3134 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3138 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3140 gdb_assert (gdbarch != NULL);
3141 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3142 if (gdbarch_debug >= 2)
3143 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3144 gdbarch->elf_make_msymbol_special (sym, msym);
3148 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3149 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3151 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3155 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3157 gdb_assert (gdbarch != NULL);
3158 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3159 if (gdbarch_debug >= 2)
3160 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3161 gdbarch->coff_make_msymbol_special (val, msym);
3165 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3166 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3168 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3172 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3174 gdb_assert (gdbarch != NULL);
3175 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3176 if (gdbarch_debug >= 2)
3177 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3178 return gdbarch->cannot_step_breakpoint;
3182 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3183 int cannot_step_breakpoint)
3185 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3189 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3191 gdb_assert (gdbarch != NULL);
3192 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3193 if (gdbarch_debug >= 2)
3194 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3195 return gdbarch->have_nonsteppable_watchpoint;
3199 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3200 int have_nonsteppable_watchpoint)
3202 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3206 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3208 gdb_assert (gdbarch != NULL);
3209 return gdbarch->address_class_type_flags != NULL;
3213 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3215 gdb_assert (gdbarch != NULL);
3216 gdb_assert (gdbarch->address_class_type_flags != NULL);
3217 if (gdbarch_debug >= 2)
3218 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3219 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3223 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3224 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3226 gdbarch->address_class_type_flags = address_class_type_flags;
3230 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3232 gdb_assert (gdbarch != NULL);
3233 return gdbarch->address_class_type_flags_to_name != NULL;
3237 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3239 gdb_assert (gdbarch != NULL);
3240 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3241 if (gdbarch_debug >= 2)
3242 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3243 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3247 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3248 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3250 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3254 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3256 gdb_assert (gdbarch != NULL);
3257 return gdbarch->address_class_name_to_type_flags != NULL;
3261 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3263 gdb_assert (gdbarch != NULL);
3264 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3265 if (gdbarch_debug >= 2)
3266 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3267 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3271 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3272 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3274 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3278 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3280 gdb_assert (gdbarch != NULL);
3281 gdb_assert (gdbarch->register_reggroup_p != NULL);
3282 if (gdbarch_debug >= 2)
3283 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3284 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3288 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3289 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3291 gdbarch->register_reggroup_p = register_reggroup_p;
3295 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3297 gdb_assert (gdbarch != NULL);
3298 return gdbarch->fetch_pointer_argument != NULL;
3302 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3304 gdb_assert (gdbarch != NULL);
3305 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3306 if (gdbarch_debug >= 2)
3307 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3308 return gdbarch->fetch_pointer_argument (frame, argi, type);
3312 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3313 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3315 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3319 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3321 gdb_assert (gdbarch != NULL);
3322 return gdbarch->regset_from_core_section != NULL;
3325 const struct regset *
3326 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3328 gdb_assert (gdbarch != NULL);
3329 gdb_assert (gdbarch->regset_from_core_section != NULL);
3330 if (gdbarch_debug >= 2)
3331 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3332 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3336 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3337 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3339 gdbarch->regset_from_core_section = regset_from_core_section;
3342 struct core_regset_section *
3343 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
3345 gdb_assert (gdbarch != NULL);
3346 if (gdbarch_debug >= 2)
3347 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
3348 return gdbarch->core_regset_sections;
3352 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
3353 struct core_regset_section * core_regset_sections)
3355 gdbarch->core_regset_sections = core_regset_sections;
3359 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch)
3361 gdb_assert (gdbarch != NULL);
3362 return gdbarch->make_corefile_notes != NULL;
3366 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
3368 gdb_assert (gdbarch != NULL);
3369 gdb_assert (gdbarch->make_corefile_notes != NULL);
3370 if (gdbarch_debug >= 2)
3371 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n");
3372 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size);
3376 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch,
3377 gdbarch_make_corefile_notes_ftype make_corefile_notes)
3379 gdbarch->make_corefile_notes = make_corefile_notes;
3383 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch)
3385 gdb_assert (gdbarch != NULL);
3386 return gdbarch->find_memory_regions != NULL;
3390 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data)
3392 gdb_assert (gdbarch != NULL);
3393 gdb_assert (gdbarch->find_memory_regions != NULL);
3394 if (gdbarch_debug >= 2)
3395 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n");
3396 return gdbarch->find_memory_regions (gdbarch, func, data);
3400 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch,
3401 gdbarch_find_memory_regions_ftype find_memory_regions)
3403 gdbarch->find_memory_regions = find_memory_regions;
3407 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
3409 gdb_assert (gdbarch != NULL);
3410 return gdbarch->core_xfer_shared_libraries != NULL;
3414 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
3416 gdb_assert (gdbarch != NULL);
3417 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
3418 if (gdbarch_debug >= 2)
3419 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
3420 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
3424 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
3425 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
3427 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
3431 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch)
3433 gdb_assert (gdbarch != NULL);
3434 return gdbarch->core_pid_to_str != NULL;
3438 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
3440 gdb_assert (gdbarch != NULL);
3441 gdb_assert (gdbarch->core_pid_to_str != NULL);
3442 if (gdbarch_debug >= 2)
3443 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n");
3444 return gdbarch->core_pid_to_str (gdbarch, ptid);
3448 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch,
3449 gdbarch_core_pid_to_str_ftype core_pid_to_str)
3451 gdbarch->core_pid_to_str = core_pid_to_str;
3455 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch)
3457 gdb_assert (gdbarch != NULL);
3458 return gdbarch->gcore_bfd_target != 0;
3462 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch)
3464 gdb_assert (gdbarch != NULL);
3465 /* Check variable changed from pre-default. */
3466 gdb_assert (gdbarch->gcore_bfd_target != 0);
3467 if (gdbarch_debug >= 2)
3468 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n");
3469 return gdbarch->gcore_bfd_target;
3473 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
3474 const char * gcore_bfd_target)
3476 gdbarch->gcore_bfd_target = gcore_bfd_target;
3480 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3482 gdb_assert (gdbarch != NULL);
3483 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3484 if (gdbarch_debug >= 2)
3485 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3486 return gdbarch->vtable_function_descriptors;
3490 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3491 int vtable_function_descriptors)
3493 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3497 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3499 gdb_assert (gdbarch != NULL);
3500 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3501 if (gdbarch_debug >= 2)
3502 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3503 return gdbarch->vbit_in_delta;
3507 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3510 gdbarch->vbit_in_delta = vbit_in_delta;
3514 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3516 gdb_assert (gdbarch != NULL);
3517 return gdbarch->skip_permanent_breakpoint != NULL;
3521 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3523 gdb_assert (gdbarch != NULL);
3524 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3525 if (gdbarch_debug >= 2)
3526 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3527 gdbarch->skip_permanent_breakpoint (regcache);
3531 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3532 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3534 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3538 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
3540 gdb_assert (gdbarch != NULL);
3541 return gdbarch->max_insn_length != 0;
3545 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3547 gdb_assert (gdbarch != NULL);
3548 /* Check variable changed from pre-default. */
3549 gdb_assert (gdbarch->max_insn_length != 0);
3550 if (gdbarch_debug >= 2)
3551 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3552 return gdbarch->max_insn_length;
3556 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3557 ULONGEST max_insn_length)
3559 gdbarch->max_insn_length = max_insn_length;
3563 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3565 gdb_assert (gdbarch != NULL);
3566 return gdbarch->displaced_step_copy_insn != NULL;
3569 struct displaced_step_closure *
3570 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3572 gdb_assert (gdbarch != NULL);
3573 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3574 if (gdbarch_debug >= 2)
3575 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3576 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3580 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3581 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3583 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3587 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3589 gdb_assert (gdbarch != NULL);
3590 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
3591 if (gdbarch_debug >= 2)
3592 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
3593 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
3597 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
3598 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep)
3600 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep;
3604 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3606 gdb_assert (gdbarch != NULL);
3607 return gdbarch->displaced_step_fixup != NULL;
3611 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3613 gdb_assert (gdbarch != NULL);
3614 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3615 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3616 if (gdbarch_debug >= 2)
3617 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3618 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3622 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3623 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3625 gdbarch->displaced_step_fixup = displaced_step_fixup;
3629 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3631 gdb_assert (gdbarch != NULL);
3632 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3633 if (gdbarch_debug >= 2)
3634 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3635 gdbarch->displaced_step_free_closure (gdbarch, closure);
3639 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3640 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3642 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3646 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3648 gdb_assert (gdbarch != NULL);
3649 gdb_assert (gdbarch->displaced_step_location != NULL);
3650 if (gdbarch_debug >= 2)
3651 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3652 return gdbarch->displaced_step_location (gdbarch);
3656 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3657 gdbarch_displaced_step_location_ftype displaced_step_location)
3659 gdbarch->displaced_step_location = displaced_step_location;
3663 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch)
3665 gdb_assert (gdbarch != NULL);
3666 return gdbarch->relocate_instruction != NULL;
3670 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from)
3672 gdb_assert (gdbarch != NULL);
3673 gdb_assert (gdbarch->relocate_instruction != NULL);
3674 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */
3675 if (gdbarch_debug >= 2)
3676 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n");
3677 gdbarch->relocate_instruction (gdbarch, to, from);
3681 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch,
3682 gdbarch_relocate_instruction_ftype relocate_instruction)
3684 gdbarch->relocate_instruction = relocate_instruction;
3688 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3690 gdb_assert (gdbarch != NULL);
3691 return gdbarch->overlay_update != NULL;
3695 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3697 gdb_assert (gdbarch != NULL);
3698 gdb_assert (gdbarch->overlay_update != NULL);
3699 if (gdbarch_debug >= 2)
3700 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3701 gdbarch->overlay_update (osect);
3705 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3706 gdbarch_overlay_update_ftype overlay_update)
3708 gdbarch->overlay_update = overlay_update;
3712 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3714 gdb_assert (gdbarch != NULL);
3715 return gdbarch->core_read_description != NULL;
3718 const struct target_desc *
3719 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3721 gdb_assert (gdbarch != NULL);
3722 gdb_assert (gdbarch->core_read_description != NULL);
3723 if (gdbarch_debug >= 2)
3724 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3725 return gdbarch->core_read_description (gdbarch, target, abfd);
3729 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3730 gdbarch_core_read_description_ftype core_read_description)
3732 gdbarch->core_read_description = core_read_description;
3736 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3738 gdb_assert (gdbarch != NULL);
3739 return gdbarch->static_transform_name != NULL;
3743 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name)
3745 gdb_assert (gdbarch != NULL);
3746 gdb_assert (gdbarch->static_transform_name != NULL);
3747 if (gdbarch_debug >= 2)
3748 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3749 return gdbarch->static_transform_name (name);
3753 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3754 gdbarch_static_transform_name_ftype static_transform_name)
3756 gdbarch->static_transform_name = static_transform_name;
3760 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3762 gdb_assert (gdbarch != NULL);
3763 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3764 if (gdbarch_debug >= 2)
3765 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3766 return gdbarch->sofun_address_maybe_missing;
3770 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3771 int sofun_address_maybe_missing)
3773 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3777 gdbarch_process_record_p (struct gdbarch *gdbarch)
3779 gdb_assert (gdbarch != NULL);
3780 return gdbarch->process_record != NULL;
3784 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr)
3786 gdb_assert (gdbarch != NULL);
3787 gdb_assert (gdbarch->process_record != NULL);
3788 if (gdbarch_debug >= 2)
3789 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
3790 return gdbarch->process_record (gdbarch, regcache, addr);
3794 set_gdbarch_process_record (struct gdbarch *gdbarch,
3795 gdbarch_process_record_ftype process_record)
3797 gdbarch->process_record = process_record;
3801 gdbarch_process_record_signal_p (struct gdbarch *gdbarch)
3803 gdb_assert (gdbarch != NULL);
3804 return gdbarch->process_record_signal != NULL;
3808 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal)
3810 gdb_assert (gdbarch != NULL);
3811 gdb_assert (gdbarch->process_record_signal != NULL);
3812 if (gdbarch_debug >= 2)
3813 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n");
3814 return gdbarch->process_record_signal (gdbarch, regcache, signal);
3818 set_gdbarch_process_record_signal (struct gdbarch *gdbarch,
3819 gdbarch_process_record_signal_ftype process_record_signal)
3821 gdbarch->process_record_signal = process_record_signal;
3825 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch)
3827 gdb_assert (gdbarch != NULL);
3828 return gdbarch->gdb_signal_from_target != NULL;
3832 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo)
3834 gdb_assert (gdbarch != NULL);
3835 gdb_assert (gdbarch->gdb_signal_from_target != NULL);
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n");
3838 return gdbarch->gdb_signal_from_target (gdbarch, signo);
3842 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch,
3843 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target)
3845 gdbarch->gdb_signal_from_target = gdb_signal_from_target;
3849 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch)
3851 gdb_assert (gdbarch != NULL);
3852 return gdbarch->get_siginfo_type != NULL;
3856 gdbarch_get_siginfo_type (struct gdbarch *gdbarch)
3858 gdb_assert (gdbarch != NULL);
3859 gdb_assert (gdbarch->get_siginfo_type != NULL);
3860 if (gdbarch_debug >= 2)
3861 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n");
3862 return gdbarch->get_siginfo_type (gdbarch);
3866 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch,
3867 gdbarch_get_siginfo_type_ftype get_siginfo_type)
3869 gdbarch->get_siginfo_type = get_siginfo_type;
3873 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
3875 gdb_assert (gdbarch != NULL);
3876 return gdbarch->record_special_symbol != NULL;
3880 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
3882 gdb_assert (gdbarch != NULL);
3883 gdb_assert (gdbarch->record_special_symbol != NULL);
3884 if (gdbarch_debug >= 2)
3885 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
3886 gdbarch->record_special_symbol (gdbarch, objfile, sym);
3890 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
3891 gdbarch_record_special_symbol_ftype record_special_symbol)
3893 gdbarch->record_special_symbol = record_special_symbol;
3897 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch)
3899 gdb_assert (gdbarch != NULL);
3900 return gdbarch->get_syscall_number != NULL;
3904 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid)
3906 gdb_assert (gdbarch != NULL);
3907 gdb_assert (gdbarch->get_syscall_number != NULL);
3908 if (gdbarch_debug >= 2)
3909 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n");
3910 return gdbarch->get_syscall_number (gdbarch, ptid);
3914 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch,
3915 gdbarch_get_syscall_number_ftype get_syscall_number)
3917 gdbarch->get_syscall_number = get_syscall_number;
3921 gdbarch_stap_integer_prefix (struct gdbarch *gdbarch)
3923 gdb_assert (gdbarch != NULL);
3924 /* Skip verify of stap_integer_prefix, invalid_p == 0 */
3925 if (gdbarch_debug >= 2)
3926 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefix called\n");
3927 return gdbarch->stap_integer_prefix;
3931 set_gdbarch_stap_integer_prefix (struct gdbarch *gdbarch,
3932 const char * stap_integer_prefix)
3934 gdbarch->stap_integer_prefix = stap_integer_prefix;
3938 gdbarch_stap_integer_suffix (struct gdbarch *gdbarch)
3940 gdb_assert (gdbarch != NULL);
3941 /* Skip verify of stap_integer_suffix, invalid_p == 0 */
3942 if (gdbarch_debug >= 2)
3943 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffix called\n");
3944 return gdbarch->stap_integer_suffix;
3948 set_gdbarch_stap_integer_suffix (struct gdbarch *gdbarch,
3949 const char * stap_integer_suffix)
3951 gdbarch->stap_integer_suffix = stap_integer_suffix;
3955 gdbarch_stap_register_prefix (struct gdbarch *gdbarch)
3957 gdb_assert (gdbarch != NULL);
3958 /* Skip verify of stap_register_prefix, invalid_p == 0 */
3959 if (gdbarch_debug >= 2)
3960 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefix called\n");
3961 return gdbarch->stap_register_prefix;
3965 set_gdbarch_stap_register_prefix (struct gdbarch *gdbarch,
3966 const char * stap_register_prefix)
3968 gdbarch->stap_register_prefix = stap_register_prefix;
3972 gdbarch_stap_register_suffix (struct gdbarch *gdbarch)
3974 gdb_assert (gdbarch != NULL);
3975 /* Skip verify of stap_register_suffix, invalid_p == 0 */
3976 if (gdbarch_debug >= 2)
3977 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffix called\n");
3978 return gdbarch->stap_register_suffix;
3982 set_gdbarch_stap_register_suffix (struct gdbarch *gdbarch,
3983 const char * stap_register_suffix)
3985 gdbarch->stap_register_suffix = stap_register_suffix;
3989 gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch)
3991 gdb_assert (gdbarch != NULL);
3992 /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */
3993 if (gdbarch_debug >= 2)
3994 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefix called\n");
3995 return gdbarch->stap_register_indirection_prefix;
3999 set_gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch,
4000 const char * stap_register_indirection_prefix)
4002 gdbarch->stap_register_indirection_prefix = stap_register_indirection_prefix;
4006 gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch)
4008 gdb_assert (gdbarch != NULL);
4009 /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */
4010 if (gdbarch_debug >= 2)
4011 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffix called\n");
4012 return gdbarch->stap_register_indirection_suffix;
4016 set_gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch,
4017 const char * stap_register_indirection_suffix)
4019 gdbarch->stap_register_indirection_suffix = stap_register_indirection_suffix;
4023 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch)
4025 gdb_assert (gdbarch != NULL);
4026 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */
4027 if (gdbarch_debug >= 2)
4028 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n");
4029 return gdbarch->stap_gdb_register_prefix;
4033 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch,
4034 const char * stap_gdb_register_prefix)
4036 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix;
4040 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch)
4042 gdb_assert (gdbarch != NULL);
4043 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
4044 if (gdbarch_debug >= 2)
4045 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n");
4046 return gdbarch->stap_gdb_register_suffix;
4050 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch,
4051 const char * stap_gdb_register_suffix)
4053 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix;
4057 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch)
4059 gdb_assert (gdbarch != NULL);
4060 return gdbarch->stap_is_single_operand != NULL;
4064 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s)
4066 gdb_assert (gdbarch != NULL);
4067 gdb_assert (gdbarch->stap_is_single_operand != NULL);
4068 if (gdbarch_debug >= 2)
4069 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n");
4070 return gdbarch->stap_is_single_operand (gdbarch, s);
4074 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch,
4075 gdbarch_stap_is_single_operand_ftype stap_is_single_operand)
4077 gdbarch->stap_is_single_operand = stap_is_single_operand;
4081 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch)
4083 gdb_assert (gdbarch != NULL);
4084 return gdbarch->stap_parse_special_token != NULL;
4088 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p)
4090 gdb_assert (gdbarch != NULL);
4091 gdb_assert (gdbarch->stap_parse_special_token != NULL);
4092 if (gdbarch_debug >= 2)
4093 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n");
4094 return gdbarch->stap_parse_special_token (gdbarch, p);
4098 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch,
4099 gdbarch_stap_parse_special_token_ftype stap_parse_special_token)
4101 gdbarch->stap_parse_special_token = stap_parse_special_token;
4105 gdbarch_has_global_solist (struct gdbarch *gdbarch)
4107 gdb_assert (gdbarch != NULL);
4108 /* Skip verify of has_global_solist, invalid_p == 0 */
4109 if (gdbarch_debug >= 2)
4110 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
4111 return gdbarch->has_global_solist;
4115 set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
4116 int has_global_solist)
4118 gdbarch->has_global_solist = has_global_solist;
4122 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
4124 gdb_assert (gdbarch != NULL);
4125 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
4126 if (gdbarch_debug >= 2)
4127 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
4128 return gdbarch->has_global_breakpoints;
4132 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
4133 int has_global_breakpoints)
4135 gdbarch->has_global_breakpoints = has_global_breakpoints;
4139 gdbarch_has_shared_address_space (struct gdbarch *gdbarch)
4141 gdb_assert (gdbarch != NULL);
4142 gdb_assert (gdbarch->has_shared_address_space != NULL);
4143 if (gdbarch_debug >= 2)
4144 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n");
4145 return gdbarch->has_shared_address_space (gdbarch);
4149 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch,
4150 gdbarch_has_shared_address_space_ftype has_shared_address_space)
4152 gdbarch->has_shared_address_space = has_shared_address_space;
4156 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
4158 gdb_assert (gdbarch != NULL);
4159 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
4160 if (gdbarch_debug >= 2)
4161 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
4162 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
4166 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
4167 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at)
4169 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at;
4173 gdbarch_auto_charset (struct gdbarch *gdbarch)
4175 gdb_assert (gdbarch != NULL);
4176 gdb_assert (gdbarch->auto_charset != NULL);
4177 if (gdbarch_debug >= 2)
4178 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n");
4179 return gdbarch->auto_charset ();
4183 set_gdbarch_auto_charset (struct gdbarch *gdbarch,
4184 gdbarch_auto_charset_ftype auto_charset)
4186 gdbarch->auto_charset = auto_charset;
4190 gdbarch_auto_wide_charset (struct gdbarch *gdbarch)
4192 gdb_assert (gdbarch != NULL);
4193 gdb_assert (gdbarch->auto_wide_charset != NULL);
4194 if (gdbarch_debug >= 2)
4195 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n");
4196 return gdbarch->auto_wide_charset ();
4200 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
4201 gdbarch_auto_wide_charset_ftype auto_wide_charset)
4203 gdbarch->auto_wide_charset = auto_wide_charset;
4207 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
4209 gdb_assert (gdbarch != NULL);
4210 if (gdbarch_debug >= 2)
4211 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
4212 return gdbarch->solib_symbols_extension;
4216 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
4217 const char * solib_symbols_extension)
4219 gdbarch->solib_symbols_extension = solib_symbols_extension;
4223 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
4225 gdb_assert (gdbarch != NULL);
4226 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */
4227 if (gdbarch_debug >= 2)
4228 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n");
4229 return gdbarch->has_dos_based_file_system;
4233 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch,
4234 int has_dos_based_file_system)
4236 gdbarch->has_dos_based_file_system = has_dos_based_file_system;
4240 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
4242 gdb_assert (gdbarch != NULL);
4243 gdb_assert (gdbarch->gen_return_address != NULL);
4244 if (gdbarch_debug >= 2)
4245 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n");
4246 gdbarch->gen_return_address (gdbarch, ax, value, scope);
4250 set_gdbarch_gen_return_address (struct gdbarch *gdbarch,
4251 gdbarch_gen_return_address_ftype gen_return_address)
4253 gdbarch->gen_return_address = gen_return_address;
4257 gdbarch_info_proc_p (struct gdbarch *gdbarch)
4259 gdb_assert (gdbarch != NULL);
4260 return gdbarch->info_proc != NULL;
4264 gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what)
4266 gdb_assert (gdbarch != NULL);
4267 gdb_assert (gdbarch->info_proc != NULL);
4268 if (gdbarch_debug >= 2)
4269 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n");
4270 gdbarch->info_proc (gdbarch, args, what);
4274 set_gdbarch_info_proc (struct gdbarch *gdbarch,
4275 gdbarch_info_proc_ftype info_proc)
4277 gdbarch->info_proc = info_proc;
4281 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)
4283 gdb_assert (gdbarch != NULL);
4284 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL);
4285 if (gdbarch_debug >= 2)
4286 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n");
4287 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile);
4291 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch,
4292 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order)
4294 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order;
4298 /* Keep a registry of per-architecture data-pointers required by GDB
4305 gdbarch_data_pre_init_ftype *pre_init;
4306 gdbarch_data_post_init_ftype *post_init;
4309 struct gdbarch_data_registration
4311 struct gdbarch_data *data;
4312 struct gdbarch_data_registration *next;
4315 struct gdbarch_data_registry
4318 struct gdbarch_data_registration *registrations;
4321 struct gdbarch_data_registry gdbarch_data_registry =
4326 static struct gdbarch_data *
4327 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4328 gdbarch_data_post_init_ftype *post_init)
4330 struct gdbarch_data_registration **curr;
4332 /* Append the new registration. */
4333 for (curr = &gdbarch_data_registry.registrations;
4335 curr = &(*curr)->next);
4336 (*curr) = XMALLOC (struct gdbarch_data_registration);
4337 (*curr)->next = NULL;
4338 (*curr)->data = XMALLOC (struct gdbarch_data);
4339 (*curr)->data->index = gdbarch_data_registry.nr++;
4340 (*curr)->data->pre_init = pre_init;
4341 (*curr)->data->post_init = post_init;
4342 (*curr)->data->init_p = 1;
4343 return (*curr)->data;
4346 struct gdbarch_data *
4347 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4349 return gdbarch_data_register (pre_init, NULL);
4352 struct gdbarch_data *
4353 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4355 return gdbarch_data_register (NULL, post_init);
4358 /* Create/delete the gdbarch data vector. */
4361 alloc_gdbarch_data (struct gdbarch *gdbarch)
4363 gdb_assert (gdbarch->data == NULL);
4364 gdbarch->nr_data = gdbarch_data_registry.nr;
4365 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4368 /* Initialize the current value of the specified per-architecture
4372 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4373 struct gdbarch_data *data,
4376 gdb_assert (data->index < gdbarch->nr_data);
4377 gdb_assert (gdbarch->data[data->index] == NULL);
4378 gdb_assert (data->pre_init == NULL);
4379 gdbarch->data[data->index] = pointer;
4382 /* Return the current value of the specified per-architecture
4386 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4388 gdb_assert (data->index < gdbarch->nr_data);
4389 if (gdbarch->data[data->index] == NULL)
4391 /* The data-pointer isn't initialized, call init() to get a
4393 if (data->pre_init != NULL)
4394 /* Mid architecture creation: pass just the obstack, and not
4395 the entire architecture, as that way it isn't possible for
4396 pre-init code to refer to undefined architecture
4398 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4399 else if (gdbarch->initialized_p
4400 && data->post_init != NULL)
4401 /* Post architecture creation: pass the entire architecture
4402 (as all fields are valid), but be careful to also detect
4403 recursive references. */
4405 gdb_assert (data->init_p);
4407 gdbarch->data[data->index] = data->post_init (gdbarch);
4411 /* The architecture initialization hasn't completed - punt -
4412 hope that the caller knows what they are doing. Once
4413 deprecated_set_gdbarch_data has been initialized, this can be
4414 changed to an internal error. */
4416 gdb_assert (gdbarch->data[data->index] != NULL);
4418 return gdbarch->data[data->index];
4422 /* Keep a registry of the architectures known by GDB. */
4424 struct gdbarch_registration
4426 enum bfd_architecture bfd_architecture;
4427 gdbarch_init_ftype *init;
4428 gdbarch_dump_tdep_ftype *dump_tdep;
4429 struct gdbarch_list *arches;
4430 struct gdbarch_registration *next;
4433 static struct gdbarch_registration *gdbarch_registry = NULL;
4436 append_name (const char ***buf, int *nr, const char *name)
4438 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4444 gdbarch_printable_names (void)
4446 /* Accumulate a list of names based on the registed list of
4449 const char **arches = NULL;
4450 struct gdbarch_registration *rego;
4452 for (rego = gdbarch_registry;
4456 const struct bfd_arch_info *ap;
4457 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4459 internal_error (__FILE__, __LINE__,
4460 _("gdbarch_architecture_names: multi-arch unknown"));
4463 append_name (&arches, &nr_arches, ap->printable_name);
4468 append_name (&arches, &nr_arches, NULL);
4474 gdbarch_register (enum bfd_architecture bfd_architecture,
4475 gdbarch_init_ftype *init,
4476 gdbarch_dump_tdep_ftype *dump_tdep)
4478 struct gdbarch_registration **curr;
4479 const struct bfd_arch_info *bfd_arch_info;
4481 /* Check that BFD recognizes this architecture */
4482 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4483 if (bfd_arch_info == NULL)
4485 internal_error (__FILE__, __LINE__,
4486 _("gdbarch: Attempt to register "
4487 "unknown architecture (%d)"),
4490 /* Check that we haven't seen this architecture before. */
4491 for (curr = &gdbarch_registry;
4493 curr = &(*curr)->next)
4495 if (bfd_architecture == (*curr)->bfd_architecture)
4496 internal_error (__FILE__, __LINE__,
4497 _("gdbarch: Duplicate registration "
4498 "of architecture (%s)"),
4499 bfd_arch_info->printable_name);
4503 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n",
4504 bfd_arch_info->printable_name,
4505 host_address_to_string (init));
4507 (*curr) = XMALLOC (struct gdbarch_registration);
4508 (*curr)->bfd_architecture = bfd_architecture;
4509 (*curr)->init = init;
4510 (*curr)->dump_tdep = dump_tdep;
4511 (*curr)->arches = NULL;
4512 (*curr)->next = NULL;
4516 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4517 gdbarch_init_ftype *init)
4519 gdbarch_register (bfd_architecture, init, NULL);
4523 /* Look for an architecture using gdbarch_info. */
4525 struct gdbarch_list *
4526 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4527 const struct gdbarch_info *info)
4529 for (; arches != NULL; arches = arches->next)
4531 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4533 if (info->byte_order != arches->gdbarch->byte_order)
4535 if (info->osabi != arches->gdbarch->osabi)
4537 if (info->target_desc != arches->gdbarch->target_desc)
4545 /* Find an architecture that matches the specified INFO. Create a new
4546 architecture if needed. Return that new architecture. */
4549 gdbarch_find_by_info (struct gdbarch_info info)
4551 struct gdbarch *new_gdbarch;
4552 struct gdbarch_registration *rego;
4554 /* Fill in missing parts of the INFO struct using a number of
4555 sources: "set ..."; INFOabfd supplied; and the global
4557 gdbarch_info_fill (&info);
4559 /* Must have found some sort of architecture. */
4560 gdb_assert (info.bfd_arch_info != NULL);
4564 fprintf_unfiltered (gdb_stdlog,
4565 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
4566 (info.bfd_arch_info != NULL
4567 ? info.bfd_arch_info->printable_name
4569 fprintf_unfiltered (gdb_stdlog,
4570 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
4572 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4573 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4575 fprintf_unfiltered (gdb_stdlog,
4576 "gdbarch_find_by_info: info.osabi %d (%s)\n",
4577 info.osabi, gdbarch_osabi_name (info.osabi));
4578 fprintf_unfiltered (gdb_stdlog,
4579 "gdbarch_find_by_info: info.abfd %s\n",
4580 host_address_to_string (info.abfd));
4581 fprintf_unfiltered (gdb_stdlog,
4582 "gdbarch_find_by_info: info.tdep_info %s\n",
4583 host_address_to_string (info.tdep_info));
4586 /* Find the tdep code that knows about this architecture. */
4587 for (rego = gdbarch_registry;
4590 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4595 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4596 "No matching architecture\n");
4600 /* Ask the tdep code for an architecture that matches "info". */
4601 new_gdbarch = rego->init (info, rego->arches);
4603 /* Did the tdep code like it? No. Reject the change and revert to
4604 the old architecture. */
4605 if (new_gdbarch == NULL)
4608 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4609 "Target rejected architecture\n");
4613 /* Is this a pre-existing architecture (as determined by already
4614 being initialized)? Move it to the front of the architecture
4615 list (keeping the list sorted Most Recently Used). */
4616 if (new_gdbarch->initialized_p)
4618 struct gdbarch_list **list;
4619 struct gdbarch_list *this;
4621 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4622 "Previous architecture %s (%s) selected\n",
4623 host_address_to_string (new_gdbarch),
4624 new_gdbarch->bfd_arch_info->printable_name);
4625 /* Find the existing arch in the list. */
4626 for (list = ®o->arches;
4627 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4628 list = &(*list)->next);
4629 /* It had better be in the list of architectures. */
4630 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4633 (*list) = this->next;
4634 /* Insert THIS at the front. */
4635 this->next = rego->arches;
4636 rego->arches = this;
4641 /* It's a new architecture. */
4643 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
4644 "New architecture %s (%s) selected\n",
4645 host_address_to_string (new_gdbarch),
4646 new_gdbarch->bfd_arch_info->printable_name);
4648 /* Insert the new architecture into the front of the architecture
4649 list (keep the list sorted Most Recently Used). */
4651 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4652 this->next = rego->arches;
4653 this->gdbarch = new_gdbarch;
4654 rego->arches = this;
4657 /* Check that the newly installed architecture is valid. Plug in
4658 any post init values. */
4659 new_gdbarch->dump_tdep = rego->dump_tdep;
4660 verify_gdbarch (new_gdbarch);
4661 new_gdbarch->initialized_p = 1;
4664 gdbarch_dump (new_gdbarch, gdb_stdlog);
4669 /* Make the specified architecture current. */
4672 deprecated_target_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4674 gdb_assert (new_gdbarch != NULL);
4675 gdb_assert (new_gdbarch->initialized_p);
4676 target_gdbarch = new_gdbarch;
4677 observer_notify_architecture_changed (new_gdbarch);
4678 registers_changed ();
4681 extern void _initialize_gdbarch (void);
4684 _initialize_gdbarch (void)
4686 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4687 Set architecture debugging."), _("\
4688 Show architecture debugging."), _("\
4689 When non-zero, architecture debugging is enabled."),
4692 &setdebuglist, &showdebuglist);