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, 2007
6 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"
52 /* Static function declarations */
54 static void alloc_gdbarch_data (struct gdbarch *);
56 /* Non-zero if we want to trace architecture code. */
59 #define GDBARCH_DEBUG 0
61 int gdbarch_debug = GDBARCH_DEBUG;
63 show_gdbarch_debug (struct ui_file *file, int from_tty,
64 struct cmd_list_element *c, const char *value)
66 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
70 pformat (const struct floatformat **format)
75 /* Just print out one of them - this is only for diagnostics. */
76 return format[0]->name;
80 /* Maintain the struct gdbarch object */
84 /* Has this architecture been fully initialized? */
87 /* An obstack bound to the lifetime of the architecture. */
88 struct obstack *obstack;
90 /* basic architectural information */
91 const struct bfd_arch_info * bfd_arch_info;
94 const struct target_desc * target_desc;
96 /* target specific vector. */
97 struct gdbarch_tdep *tdep;
98 gdbarch_dump_tdep_ftype *dump_tdep;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap *swap;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
139 const struct floatformat ** float_format;
141 const struct floatformat ** double_format;
143 const struct floatformat ** long_double_format;
147 gdbarch_read_pc_ftype *read_pc;
148 gdbarch_write_pc_ftype *write_pc;
149 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
150 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
151 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
158 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
159 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
160 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
161 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
162 gdbarch_register_name_ftype *register_name;
163 gdbarch_register_type_ftype *register_type;
164 gdbarch_dummy_id_ftype *dummy_id;
165 int deprecated_fp_regnum;
166 gdbarch_push_dummy_call_ftype *push_dummy_call;
167 int call_dummy_location;
168 gdbarch_push_dummy_code_ftype *push_dummy_code;
169 gdbarch_print_registers_info_ftype *print_registers_info;
170 gdbarch_print_float_info_ftype *print_float_info;
171 gdbarch_print_vector_info_ftype *print_vector_info;
172 gdbarch_register_sim_regno_ftype *register_sim_regno;
173 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
174 gdbarch_cannot_store_register_ftype *cannot_store_register;
175 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
176 int believe_pcc_promotion;
177 gdbarch_convert_register_p_ftype *convert_register_p;
178 gdbarch_register_to_value_ftype *register_to_value;
179 gdbarch_value_to_register_ftype *value_to_register;
180 gdbarch_value_from_register_ftype *value_from_register;
181 gdbarch_pointer_to_address_ftype *pointer_to_address;
182 gdbarch_address_to_pointer_ftype *address_to_pointer;
183 gdbarch_integer_to_address_ftype *integer_to_address;
184 gdbarch_return_value_ftype *return_value;
185 gdbarch_skip_prologue_ftype *skip_prologue;
186 gdbarch_skip_main_prologue_ftype *skip_main_prologue;
187 gdbarch_inner_than_ftype *inner_than;
188 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
189 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
190 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
191 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
192 CORE_ADDR decr_pc_after_break;
193 CORE_ADDR deprecated_function_start_offset;
194 gdbarch_remote_register_number_ftype *remote_register_number;
195 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
196 CORE_ADDR frame_args_skip;
197 gdbarch_unwind_pc_ftype *unwind_pc;
198 gdbarch_unwind_sp_ftype *unwind_sp;
199 gdbarch_frame_num_args_ftype *frame_num_args;
200 gdbarch_frame_align_ftype *frame_align;
201 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
202 int frame_red_zone_size;
203 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
204 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
205 gdbarch_smash_text_address_ftype *smash_text_address;
206 gdbarch_software_single_step_ftype *software_single_step;
207 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
208 gdbarch_print_insn_ftype *print_insn;
209 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
210 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
211 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
212 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
213 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
214 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
215 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
216 const char * name_of_malloc;
217 int cannot_step_breakpoint;
218 int have_nonsteppable_watchpoint;
219 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
220 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
221 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
222 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
223 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
224 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
225 struct core_regset_section * core_regset_sections;
226 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries;
227 int vtable_function_descriptors;
229 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
230 ULONGEST max_insn_length;
231 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn;
232 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup;
233 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure;
234 gdbarch_displaced_step_location_ftype *displaced_step_location;
235 gdbarch_overlay_update_ftype *overlay_update;
236 gdbarch_core_read_description_ftype *core_read_description;
237 gdbarch_static_transform_name_ftype *static_transform_name;
238 int sofun_address_maybe_missing;
239 gdbarch_target_signal_from_host_ftype *target_signal_from_host;
240 gdbarch_target_signal_to_host_ftype *target_signal_to_host;
241 gdbarch_record_special_symbol_ftype *record_special_symbol;
245 /* The default architecture uses host values (for want of a better
248 extern const struct bfd_arch_info bfd_default_arch_struct;
250 struct gdbarch startup_gdbarch =
252 1, /* Always initialized. */
253 NULL, /* The obstack. */
254 /* basic architecture information */
255 &bfd_default_arch_struct, /* bfd_arch_info */
256 BFD_ENDIAN_BIG, /* byte_order */
257 GDB_OSABI_UNKNOWN, /* osabi */
259 /* target specific vector and its dump routine */
261 /*per-architecture data-pointers and swap regions */
263 /* Multi-arch values */
264 1, /* bits_big_endian */
265 8 * sizeof (short), /* short_bit */
266 8 * sizeof (int), /* int_bit */
267 8 * sizeof (long), /* long_bit */
268 8 * sizeof (LONGEST), /* long_long_bit */
269 8 * sizeof (float), /* float_bit */
270 0, /* float_format */
271 8 * sizeof (double), /* double_bit */
272 0, /* double_format */
273 8 * sizeof (long double), /* long_double_bit */
274 0, /* long_double_format */
275 8 * sizeof (void*), /* ptr_bit */
276 8 * sizeof (void*), /* addr_bit */
280 legacy_virtual_frame_pointer, /* virtual_frame_pointer */
281 0, /* pseudo_register_read */
282 0, /* pseudo_register_write */
284 0, /* num_pseudo_regs */
289 no_op_reg_to_regnum, /* stab_reg_to_regnum */
290 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */
291 no_op_reg_to_regnum, /* sdb_reg_to_regnum */
292 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */
293 0, /* register_name */
294 0, /* register_type */
296 -1, /* deprecated_fp_regnum */
297 0, /* push_dummy_call */
298 0, /* call_dummy_location */
299 0, /* push_dummy_code */
300 default_print_registers_info, /* print_registers_info */
301 0, /* print_float_info */
302 0, /* print_vector_info */
303 legacy_register_sim_regno, /* register_sim_regno */
304 cannot_register_not, /* cannot_fetch_register */
305 cannot_register_not, /* cannot_store_register */
306 0, /* get_longjmp_target */
307 0, /* believe_pcc_promotion */
308 generic_convert_register_p, /* convert_register_p */
309 0, /* register_to_value */
310 0, /* value_to_register */
311 0, /* value_from_register */
312 0, /* pointer_to_address */
313 0, /* address_to_pointer */
314 0, /* integer_to_address */
315 0, /* return_value */
316 0, /* skip_prologue */
317 0, /* skip_main_prologue */
319 0, /* breakpoint_from_pc */
320 0, /* adjust_breakpoint_address */
321 default_memory_insert_breakpoint, /* memory_insert_breakpoint */
322 default_memory_remove_breakpoint, /* memory_remove_breakpoint */
323 0, /* decr_pc_after_break */
324 0, /* deprecated_function_start_offset */
325 default_remote_register_number, /* remote_register_number */
326 0, /* fetch_tls_load_module_address */
327 0, /* frame_args_skip */
330 0, /* frame_num_args */
332 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
333 0, /* frame_red_zone_size */
334 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
335 0, /* addr_bits_remove */
336 0, /* smash_text_address */
337 0, /* software_single_step */
338 0, /* single_step_through_delay */
340 0, /* skip_trampoline_code */
341 generic_skip_solib_resolver, /* skip_solib_resolver */
342 0, /* in_solib_return_trampoline */
343 generic_in_function_epilogue_p, /* in_function_epilogue_p */
344 construct_inferior_arguments, /* construct_inferior_arguments */
345 0, /* elf_make_msymbol_special */
346 0, /* coff_make_msymbol_special */
347 "malloc", /* name_of_malloc */
348 0, /* cannot_step_breakpoint */
349 0, /* have_nonsteppable_watchpoint */
350 0, /* address_class_type_flags */
351 0, /* address_class_type_flags_to_name */
352 0, /* address_class_name_to_type_flags */
353 default_register_reggroup_p, /* register_reggroup_p */
354 0, /* fetch_pointer_argument */
355 0, /* regset_from_core_section */
356 0, /* core_regset_sections */
357 0, /* core_xfer_shared_libraries */
358 0, /* vtable_function_descriptors */
359 0, /* vbit_in_delta */
360 0, /* skip_permanent_breakpoint */
361 0, /* max_insn_length */
362 0, /* displaced_step_copy_insn */
363 0, /* displaced_step_fixup */
364 NULL, /* displaced_step_free_closure */
365 NULL, /* displaced_step_location */
366 0, /* overlay_update */
367 0, /* core_read_description */
368 0, /* static_transform_name */
369 0, /* sofun_address_maybe_missing */
370 default_target_signal_from_host, /* target_signal_from_host */
371 default_target_signal_to_host, /* target_signal_to_host */
372 0, /* record_special_symbol */
373 /* startup_gdbarch() */
376 struct gdbarch *current_gdbarch = &startup_gdbarch;
378 /* Create a new ``struct gdbarch'' based on information provided by
379 ``struct gdbarch_info''. */
382 gdbarch_alloc (const struct gdbarch_info *info,
383 struct gdbarch_tdep *tdep)
385 struct gdbarch *gdbarch;
387 /* Create an obstack for allocating all the per-architecture memory,
388 then use that to allocate the architecture vector. */
389 struct obstack *obstack = XMALLOC (struct obstack);
390 obstack_init (obstack);
391 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
392 memset (gdbarch, 0, sizeof (*gdbarch));
393 gdbarch->obstack = obstack;
395 alloc_gdbarch_data (gdbarch);
397 gdbarch->tdep = tdep;
399 gdbarch->bfd_arch_info = info->bfd_arch_info;
400 gdbarch->byte_order = info->byte_order;
401 gdbarch->osabi = info->osabi;
402 gdbarch->target_desc = info->target_desc;
404 /* Force the explicit initialization of these. */
405 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
406 gdbarch->short_bit = 2*TARGET_CHAR_BIT;
407 gdbarch->int_bit = 4*TARGET_CHAR_BIT;
408 gdbarch->long_bit = 4*TARGET_CHAR_BIT;
409 gdbarch->long_long_bit = 2*gdbarch->long_bit;
410 gdbarch->float_bit = 4*TARGET_CHAR_BIT;
411 gdbarch->double_bit = 8*TARGET_CHAR_BIT;
412 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
413 gdbarch->ptr_bit = gdbarch->int_bit;
414 gdbarch->char_signed = -1;
415 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
416 gdbarch->num_regs = -1;
417 gdbarch->sp_regnum = -1;
418 gdbarch->pc_regnum = -1;
419 gdbarch->ps_regnum = -1;
420 gdbarch->fp0_regnum = -1;
421 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
422 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
423 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
424 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
425 gdbarch->deprecated_fp_regnum = -1;
426 gdbarch->call_dummy_location = AT_ENTRY_POINT;
427 gdbarch->print_registers_info = default_print_registers_info;
428 gdbarch->register_sim_regno = legacy_register_sim_regno;
429 gdbarch->cannot_fetch_register = cannot_register_not;
430 gdbarch->cannot_store_register = cannot_register_not;
431 gdbarch->convert_register_p = generic_convert_register_p;
432 gdbarch->value_from_register = default_value_from_register;
433 gdbarch->pointer_to_address = unsigned_pointer_to_address;
434 gdbarch->address_to_pointer = unsigned_address_to_pointer;
435 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
436 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
437 gdbarch->remote_register_number = default_remote_register_number;
438 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
439 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
440 gdbarch->addr_bits_remove = core_addr_identity;
441 gdbarch->smash_text_address = core_addr_identity;
442 gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
443 gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
444 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
445 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
446 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
447 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
448 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
449 gdbarch->name_of_malloc = "malloc";
450 gdbarch->register_reggroup_p = default_register_reggroup_p;
451 gdbarch->displaced_step_fixup = NULL;
452 gdbarch->displaced_step_free_closure = NULL;
453 gdbarch->displaced_step_location = NULL;
454 gdbarch->target_signal_from_host = default_target_signal_from_host;
455 gdbarch->target_signal_to_host = default_target_signal_to_host;
456 /* gdbarch_alloc() */
462 /* Allocate extra space using the per-architecture obstack. */
465 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
467 void *data = obstack_alloc (arch->obstack, size);
468 memset (data, 0, size);
473 /* Free a gdbarch struct. This should never happen in normal
474 operation --- once you've created a gdbarch, you keep it around.
475 However, if an architecture's init function encounters an error
476 building the structure, it may need to clean up a partially
477 constructed gdbarch. */
480 gdbarch_free (struct gdbarch *arch)
482 struct obstack *obstack;
483 gdb_assert (arch != NULL);
484 gdb_assert (!arch->initialized_p);
485 obstack = arch->obstack;
486 obstack_free (obstack, 0); /* Includes the ARCH. */
491 /* Ensure that all values in a GDBARCH are reasonable. */
494 verify_gdbarch (struct gdbarch *gdbarch)
497 struct cleanup *cleanups;
500 log = mem_fileopen ();
501 cleanups = make_cleanup_ui_file_delete (log);
503 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
504 fprintf_unfiltered (log, "\n\tbyte-order");
505 if (gdbarch->bfd_arch_info == NULL)
506 fprintf_unfiltered (log, "\n\tbfd_arch_info");
507 /* Check those that need to be defined for the given multi-arch level. */
508 /* Skip verify of bits_big_endian, invalid_p == 0 */
509 /* Skip verify of short_bit, invalid_p == 0 */
510 /* Skip verify of int_bit, invalid_p == 0 */
511 /* Skip verify of long_bit, invalid_p == 0 */
512 /* Skip verify of long_long_bit, invalid_p == 0 */
513 /* Skip verify of float_bit, invalid_p == 0 */
514 if (gdbarch->float_format == 0)
515 gdbarch->float_format = floatformats_ieee_single;
516 /* Skip verify of double_bit, invalid_p == 0 */
517 if (gdbarch->double_format == 0)
518 gdbarch->double_format = floatformats_ieee_double;
519 /* Skip verify of long_double_bit, invalid_p == 0 */
520 if (gdbarch->long_double_format == 0)
521 gdbarch->long_double_format = floatformats_ieee_double;
522 /* Skip verify of ptr_bit, invalid_p == 0 */
523 if (gdbarch->addr_bit == 0)
524 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch);
525 if (gdbarch->char_signed == -1)
526 gdbarch->char_signed = 1;
527 /* Skip verify of read_pc, has predicate */
528 /* Skip verify of write_pc, has predicate */
529 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
530 /* Skip verify of pseudo_register_read, has predicate */
531 /* Skip verify of pseudo_register_write, has predicate */
532 if (gdbarch->num_regs == -1)
533 fprintf_unfiltered (log, "\n\tnum_regs");
534 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
535 /* Skip verify of sp_regnum, invalid_p == 0 */
536 /* Skip verify of pc_regnum, invalid_p == 0 */
537 /* Skip verify of ps_regnum, invalid_p == 0 */
538 /* Skip verify of fp0_regnum, invalid_p == 0 */
539 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
540 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
541 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
542 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
543 if (gdbarch->register_name == 0)
544 fprintf_unfiltered (log, "\n\tregister_name");
545 /* Skip verify of register_type, has predicate */
546 /* Skip verify of dummy_id, has predicate */
547 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
548 /* Skip verify of push_dummy_call, has predicate */
549 /* Skip verify of call_dummy_location, invalid_p == 0 */
550 /* Skip verify of push_dummy_code, has predicate */
551 /* Skip verify of print_registers_info, invalid_p == 0 */
552 /* Skip verify of print_float_info, has predicate */
553 /* Skip verify of print_vector_info, has predicate */
554 /* Skip verify of register_sim_regno, invalid_p == 0 */
555 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
556 /* Skip verify of cannot_store_register, invalid_p == 0 */
557 /* Skip verify of get_longjmp_target, has predicate */
558 /* Skip verify of convert_register_p, invalid_p == 0 */
559 /* Skip verify of value_from_register, invalid_p == 0 */
560 /* Skip verify of pointer_to_address, invalid_p == 0 */
561 /* Skip verify of address_to_pointer, invalid_p == 0 */
562 /* Skip verify of integer_to_address, has predicate */
563 /* Skip verify of return_value, has predicate */
564 if (gdbarch->skip_prologue == 0)
565 fprintf_unfiltered (log, "\n\tskip_prologue");
566 /* Skip verify of skip_main_prologue, has predicate */
567 if (gdbarch->inner_than == 0)
568 fprintf_unfiltered (log, "\n\tinner_than");
569 if (gdbarch->breakpoint_from_pc == 0)
570 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
571 /* Skip verify of adjust_breakpoint_address, has predicate */
572 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
573 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
574 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
575 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
576 /* Skip verify of remote_register_number, invalid_p == 0 */
577 /* Skip verify of fetch_tls_load_module_address, has predicate */
578 /* Skip verify of frame_args_skip, invalid_p == 0 */
579 /* Skip verify of unwind_pc, has predicate */
580 /* Skip verify of unwind_sp, has predicate */
581 /* Skip verify of frame_num_args, has predicate */
582 /* Skip verify of frame_align, has predicate */
583 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
584 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
585 /* Skip verify of addr_bits_remove, invalid_p == 0 */
586 /* Skip verify of smash_text_address, invalid_p == 0 */
587 /* Skip verify of software_single_step, has predicate */
588 /* Skip verify of single_step_through_delay, has predicate */
589 if (gdbarch->print_insn == 0)
590 fprintf_unfiltered (log, "\n\tprint_insn");
591 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
592 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
593 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
594 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
595 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
596 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
597 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
598 /* Skip verify of name_of_malloc, invalid_p == 0 */
599 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
600 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
601 /* Skip verify of address_class_type_flags, has predicate */
602 /* Skip verify of address_class_type_flags_to_name, has predicate */
603 /* Skip verify of address_class_name_to_type_flags, has predicate */
604 /* Skip verify of register_reggroup_p, invalid_p == 0 */
605 /* Skip verify of fetch_pointer_argument, has predicate */
606 /* Skip verify of regset_from_core_section, has predicate */
607 /* Skip verify of core_xfer_shared_libraries, has predicate */
608 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
609 /* Skip verify of vbit_in_delta, invalid_p == 0 */
610 /* Skip verify of skip_permanent_breakpoint, has predicate */
611 /* Skip verify of max_insn_length, has predicate */
612 /* Skip verify of displaced_step_copy_insn, has predicate */
613 /* Skip verify of displaced_step_fixup, has predicate */
614 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
615 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
616 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
617 fprintf_unfiltered (log, "\n\tdisplaced_step_location");
618 /* Skip verify of overlay_update, has predicate */
619 /* Skip verify of core_read_description, has predicate */
620 /* Skip verify of static_transform_name, has predicate */
621 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
622 /* Skip verify of target_signal_from_host, invalid_p == 0 */
623 /* Skip verify of target_signal_to_host, invalid_p == 0 */
624 /* Skip verify of record_special_symbol, has predicate */
625 buf = ui_file_xstrdup (log, &dummy);
626 make_cleanup (xfree, buf);
627 if (strlen (buf) > 0)
628 internal_error (__FILE__, __LINE__,
629 _("verify_gdbarch: the following are invalid ...%s"),
631 do_cleanups (cleanups);
635 /* Print out the details of the current architecture. */
638 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
640 const char *gdb_nm_file = "<not-defined>";
641 #if defined (GDB_NM_FILE)
642 gdb_nm_file = GDB_NM_FILE;
644 fprintf_unfiltered (file,
645 "gdbarch_dump: GDB_NM_FILE = %s\n",
647 fprintf_unfiltered (file,
648 "gdbarch_dump: addr_bit = %s\n",
649 paddr_d (gdbarch->addr_bit));
650 fprintf_unfiltered (file,
651 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
652 (long) gdbarch->addr_bits_remove);
653 fprintf_unfiltered (file,
654 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
655 gdbarch_address_class_name_to_type_flags_p (gdbarch));
656 fprintf_unfiltered (file,
657 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
658 (long) gdbarch->address_class_name_to_type_flags);
659 fprintf_unfiltered (file,
660 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
661 gdbarch_address_class_type_flags_p (gdbarch));
662 fprintf_unfiltered (file,
663 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
664 (long) gdbarch->address_class_type_flags);
665 fprintf_unfiltered (file,
666 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
667 gdbarch_address_class_type_flags_to_name_p (gdbarch));
668 fprintf_unfiltered (file,
669 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
670 (long) gdbarch->address_class_type_flags_to_name);
671 fprintf_unfiltered (file,
672 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
673 (long) gdbarch->address_to_pointer);
674 fprintf_unfiltered (file,
675 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
676 gdbarch_adjust_breakpoint_address_p (gdbarch));
677 fprintf_unfiltered (file,
678 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
679 (long) gdbarch->adjust_breakpoint_address);
680 fprintf_unfiltered (file,
681 "gdbarch_dump: believe_pcc_promotion = %s\n",
682 paddr_d (gdbarch->believe_pcc_promotion));
683 fprintf_unfiltered (file,
684 "gdbarch_dump: bfd_arch_info = %s\n",
685 gdbarch_bfd_arch_info (gdbarch)->printable_name);
686 fprintf_unfiltered (file,
687 "gdbarch_dump: bits_big_endian = %s\n",
688 paddr_d (gdbarch->bits_big_endian));
689 fprintf_unfiltered (file,
690 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
691 (long) gdbarch->breakpoint_from_pc);
692 fprintf_unfiltered (file,
693 "gdbarch_dump: byte_order = %s\n",
694 paddr_d (gdbarch->byte_order));
695 fprintf_unfiltered (file,
696 "gdbarch_dump: call_dummy_location = %s\n",
697 paddr_d (gdbarch->call_dummy_location));
698 fprintf_unfiltered (file,
699 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
700 (long) gdbarch->cannot_fetch_register);
701 fprintf_unfiltered (file,
702 "gdbarch_dump: cannot_step_breakpoint = %s\n",
703 paddr_d (gdbarch->cannot_step_breakpoint));
704 fprintf_unfiltered (file,
705 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
706 (long) gdbarch->cannot_store_register);
707 fprintf_unfiltered (file,
708 "gdbarch_dump: char_signed = %s\n",
709 paddr_d (gdbarch->char_signed));
710 fprintf_unfiltered (file,
711 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
712 (long) gdbarch->coff_make_msymbol_special);
713 fprintf_unfiltered (file,
714 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
715 (long) gdbarch->construct_inferior_arguments);
716 fprintf_unfiltered (file,
717 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
718 (long) gdbarch->convert_from_func_ptr_addr);
719 fprintf_unfiltered (file,
720 "gdbarch_dump: convert_register_p = <0x%lx>\n",
721 (long) gdbarch->convert_register_p);
722 fprintf_unfiltered (file,
723 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
724 gdbarch_core_read_description_p (gdbarch));
725 fprintf_unfiltered (file,
726 "gdbarch_dump: core_read_description = <0x%lx>\n",
727 (long) gdbarch->core_read_description);
728 fprintf_unfiltered (file,
729 "gdbarch_dump: core_regset_sections = %s\n",
730 host_address_to_string (gdbarch->core_regset_sections));
731 fprintf_unfiltered (file,
732 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
733 gdbarch_core_xfer_shared_libraries_p (gdbarch));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: core_xfer_shared_libraries = <0x%lx>\n",
736 (long) gdbarch->core_xfer_shared_libraries);
737 fprintf_unfiltered (file,
738 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
739 paddr_nz (gdbarch->decr_pc_after_break));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: deprecated_fp_regnum = %s\n",
742 paddr_d (gdbarch->deprecated_fp_regnum));
743 fprintf_unfiltered (file,
744 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
745 paddr_nz (gdbarch->deprecated_function_start_offset));
746 fprintf_unfiltered (file,
747 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
748 gdbarch_displaced_step_copy_insn_p (gdbarch));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: displaced_step_copy_insn = <0x%lx>\n",
751 (long) gdbarch->displaced_step_copy_insn);
752 fprintf_unfiltered (file,
753 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
754 gdbarch_displaced_step_fixup_p (gdbarch));
755 fprintf_unfiltered (file,
756 "gdbarch_dump: displaced_step_fixup = <0x%lx>\n",
757 (long) gdbarch->displaced_step_fixup);
758 fprintf_unfiltered (file,
759 "gdbarch_dump: displaced_step_free_closure = <0x%lx>\n",
760 (long) gdbarch->displaced_step_free_closure);
761 fprintf_unfiltered (file,
762 "gdbarch_dump: displaced_step_location = <0x%lx>\n",
763 (long) gdbarch->displaced_step_location);
764 fprintf_unfiltered (file,
765 "gdbarch_dump: double_bit = %s\n",
766 paddr_d (gdbarch->double_bit));
767 fprintf_unfiltered (file,
768 "gdbarch_dump: double_format = %s\n",
769 pformat (gdbarch->double_format));
770 fprintf_unfiltered (file,
771 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
772 gdbarch_dummy_id_p (gdbarch));
773 fprintf_unfiltered (file,
774 "gdbarch_dump: dummy_id = <0x%lx>\n",
775 (long) gdbarch->dummy_id);
776 fprintf_unfiltered (file,
777 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
778 (long) gdbarch->dwarf2_reg_to_regnum);
779 fprintf_unfiltered (file,
780 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
781 (long) gdbarch->ecoff_reg_to_regnum);
782 fprintf_unfiltered (file,
783 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
784 (long) gdbarch->elf_make_msymbol_special);
785 fprintf_unfiltered (file,
786 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
787 gdbarch_fetch_pointer_argument_p (gdbarch));
788 fprintf_unfiltered (file,
789 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
790 (long) gdbarch->fetch_pointer_argument);
791 fprintf_unfiltered (file,
792 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
793 gdbarch_fetch_tls_load_module_address_p (gdbarch));
794 fprintf_unfiltered (file,
795 "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
796 (long) gdbarch->fetch_tls_load_module_address);
797 fprintf_unfiltered (file,
798 "gdbarch_dump: float_bit = %s\n",
799 paddr_d (gdbarch->float_bit));
800 fprintf_unfiltered (file,
801 "gdbarch_dump: float_format = %s\n",
802 pformat (gdbarch->float_format));
803 fprintf_unfiltered (file,
804 "gdbarch_dump: fp0_regnum = %s\n",
805 paddr_d (gdbarch->fp0_regnum));
806 fprintf_unfiltered (file,
807 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
808 gdbarch_frame_align_p (gdbarch));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: frame_align = <0x%lx>\n",
811 (long) gdbarch->frame_align);
812 fprintf_unfiltered (file,
813 "gdbarch_dump: frame_args_skip = 0x%s\n",
814 paddr_nz (gdbarch->frame_args_skip));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
817 gdbarch_frame_num_args_p (gdbarch));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: frame_num_args = <0x%lx>\n",
820 (long) gdbarch->frame_num_args);
821 fprintf_unfiltered (file,
822 "gdbarch_dump: frame_red_zone_size = %s\n",
823 paddr_d (gdbarch->frame_red_zone_size));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
826 gdbarch_get_longjmp_target_p (gdbarch));
827 fprintf_unfiltered (file,
828 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
829 (long) gdbarch->get_longjmp_target);
830 fprintf_unfiltered (file,
831 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
832 paddr_d (gdbarch->have_nonsteppable_watchpoint));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
835 (long) gdbarch->in_function_epilogue_p);
836 fprintf_unfiltered (file,
837 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
838 (long) gdbarch->in_solib_return_trampoline);
839 fprintf_unfiltered (file,
840 "gdbarch_dump: inner_than = <0x%lx>\n",
841 (long) gdbarch->inner_than);
842 fprintf_unfiltered (file,
843 "gdbarch_dump: int_bit = %s\n",
844 paddr_d (gdbarch->int_bit));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
847 gdbarch_integer_to_address_p (gdbarch));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: integer_to_address = <0x%lx>\n",
850 (long) gdbarch->integer_to_address);
851 fprintf_unfiltered (file,
852 "gdbarch_dump: long_bit = %s\n",
853 paddr_d (gdbarch->long_bit));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: long_double_bit = %s\n",
856 paddr_d (gdbarch->long_double_bit));
857 fprintf_unfiltered (file,
858 "gdbarch_dump: long_double_format = %s\n",
859 pformat (gdbarch->long_double_format));
860 fprintf_unfiltered (file,
861 "gdbarch_dump: long_long_bit = %s\n",
862 paddr_d (gdbarch->long_long_bit));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
865 gdbarch_max_insn_length_p (gdbarch));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: max_insn_length = %s\n",
868 paddr_d (gdbarch->max_insn_length));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
871 (long) gdbarch->memory_insert_breakpoint);
872 fprintf_unfiltered (file,
873 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
874 (long) gdbarch->memory_remove_breakpoint);
875 fprintf_unfiltered (file,
876 "gdbarch_dump: name_of_malloc = %s\n",
877 gdbarch->name_of_malloc);
878 fprintf_unfiltered (file,
879 "gdbarch_dump: num_pseudo_regs = %s\n",
880 paddr_d (gdbarch->num_pseudo_regs));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: num_regs = %s\n",
883 paddr_d (gdbarch->num_regs));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: osabi = %s\n",
886 paddr_d (gdbarch->osabi));
887 fprintf_unfiltered (file,
888 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
889 gdbarch_overlay_update_p (gdbarch));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: overlay_update = <0x%lx>\n",
892 (long) gdbarch->overlay_update);
893 fprintf_unfiltered (file,
894 "gdbarch_dump: pc_regnum = %s\n",
895 paddr_d (gdbarch->pc_regnum));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
898 (long) gdbarch->pointer_to_address);
899 fprintf_unfiltered (file,
900 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
901 gdbarch_print_float_info_p (gdbarch));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: print_float_info = <0x%lx>\n",
904 (long) gdbarch->print_float_info);
905 fprintf_unfiltered (file,
906 "gdbarch_dump: print_insn = <0x%lx>\n",
907 (long) gdbarch->print_insn);
908 fprintf_unfiltered (file,
909 "gdbarch_dump: print_registers_info = <0x%lx>\n",
910 (long) gdbarch->print_registers_info);
911 fprintf_unfiltered (file,
912 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
913 gdbarch_print_vector_info_p (gdbarch));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: print_vector_info = <0x%lx>\n",
916 (long) gdbarch->print_vector_info);
917 fprintf_unfiltered (file,
918 "gdbarch_dump: ps_regnum = %s\n",
919 paddr_d (gdbarch->ps_regnum));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
922 gdbarch_pseudo_register_read_p (gdbarch));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
925 (long) gdbarch->pseudo_register_read);
926 fprintf_unfiltered (file,
927 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
928 gdbarch_pseudo_register_write_p (gdbarch));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
931 (long) gdbarch->pseudo_register_write);
932 fprintf_unfiltered (file,
933 "gdbarch_dump: ptr_bit = %s\n",
934 paddr_d (gdbarch->ptr_bit));
935 fprintf_unfiltered (file,
936 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
937 gdbarch_push_dummy_call_p (gdbarch));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
940 (long) gdbarch->push_dummy_call);
941 fprintf_unfiltered (file,
942 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
943 gdbarch_push_dummy_code_p (gdbarch));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
946 (long) gdbarch->push_dummy_code);
947 fprintf_unfiltered (file,
948 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
949 gdbarch_read_pc_p (gdbarch));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: read_pc = <0x%lx>\n",
952 (long) gdbarch->read_pc);
953 fprintf_unfiltered (file,
954 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
955 gdbarch_record_special_symbol_p (gdbarch));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: record_special_symbol = <0x%lx>\n",
958 (long) gdbarch->record_special_symbol);
959 fprintf_unfiltered (file,
960 "gdbarch_dump: register_name = <0x%lx>\n",
961 (long) gdbarch->register_name);
962 fprintf_unfiltered (file,
963 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
964 (long) gdbarch->register_reggroup_p);
965 fprintf_unfiltered (file,
966 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
967 (long) gdbarch->register_sim_regno);
968 fprintf_unfiltered (file,
969 "gdbarch_dump: register_to_value = <0x%lx>\n",
970 (long) gdbarch->register_to_value);
971 fprintf_unfiltered (file,
972 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
973 gdbarch_register_type_p (gdbarch));
974 fprintf_unfiltered (file,
975 "gdbarch_dump: register_type = <0x%lx>\n",
976 (long) gdbarch->register_type);
977 fprintf_unfiltered (file,
978 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
979 gdbarch_regset_from_core_section_p (gdbarch));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
982 (long) gdbarch->regset_from_core_section);
983 fprintf_unfiltered (file,
984 "gdbarch_dump: remote_register_number = <0x%lx>\n",
985 (long) gdbarch->remote_register_number);
986 fprintf_unfiltered (file,
987 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
988 gdbarch_return_value_p (gdbarch));
989 fprintf_unfiltered (file,
990 "gdbarch_dump: return_value = <0x%lx>\n",
991 (long) gdbarch->return_value);
992 fprintf_unfiltered (file,
993 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
994 (long) gdbarch->sdb_reg_to_regnum);
995 fprintf_unfiltered (file,
996 "gdbarch_dump: short_bit = %s\n",
997 paddr_d (gdbarch->short_bit));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1000 gdbarch_single_step_through_delay_p (gdbarch));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
1003 (long) gdbarch->single_step_through_delay);
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1006 gdbarch_skip_main_prologue_p (gdbarch));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: skip_main_prologue = <0x%lx>\n",
1009 (long) gdbarch->skip_main_prologue);
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1012 gdbarch_skip_permanent_breakpoint_p (gdbarch));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: skip_permanent_breakpoint = <0x%lx>\n",
1015 (long) gdbarch->skip_permanent_breakpoint);
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1018 (long) gdbarch->skip_prologue);
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1021 (long) gdbarch->skip_solib_resolver);
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1024 (long) gdbarch->skip_trampoline_code);
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1027 (long) gdbarch->smash_text_address);
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1030 gdbarch_software_single_step_p (gdbarch));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: software_single_step = <0x%lx>\n",
1033 (long) gdbarch->software_single_step);
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1036 paddr_d (gdbarch->sofun_address_maybe_missing));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: sp_regnum = %s\n",
1039 paddr_d (gdbarch->sp_regnum));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1042 (long) gdbarch->stab_reg_to_regnum);
1043 fprintf_unfiltered (file,
1044 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1045 (long) gdbarch->stabs_argument_has_addr);
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1048 gdbarch_static_transform_name_p (gdbarch));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: static_transform_name = <0x%lx>\n",
1051 (long) gdbarch->static_transform_name);
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: target_desc = %s\n",
1054 paddr_d ((long) gdbarch->target_desc));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: target_signal_from_host = <0x%lx>\n",
1057 (long) gdbarch->target_signal_from_host);
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: target_signal_to_host = <0x%lx>\n",
1060 (long) gdbarch->target_signal_to_host);
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1063 gdbarch_unwind_pc_p (gdbarch));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1066 (long) gdbarch->unwind_pc);
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1069 gdbarch_unwind_sp_p (gdbarch));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1072 (long) gdbarch->unwind_sp);
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: value_from_register = <0x%lx>\n",
1075 (long) gdbarch->value_from_register);
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: value_to_register = <0x%lx>\n",
1078 (long) gdbarch->value_to_register);
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: vbit_in_delta = %s\n",
1081 paddr_d (gdbarch->vbit_in_delta));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1084 (long) gdbarch->virtual_frame_pointer);
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: vtable_function_descriptors = %s\n",
1087 paddr_d (gdbarch->vtable_function_descriptors));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1090 gdbarch_write_pc_p (gdbarch));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: write_pc = <0x%lx>\n",
1093 (long) gdbarch->write_pc);
1094 if (gdbarch->dump_tdep != NULL)
1095 gdbarch->dump_tdep (gdbarch, file);
1098 struct gdbarch_tdep *
1099 gdbarch_tdep (struct gdbarch *gdbarch)
1101 if (gdbarch_debug >= 2)
1102 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1103 return gdbarch->tdep;
1107 const struct bfd_arch_info *
1108 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1110 gdb_assert (gdbarch != NULL);
1111 if (gdbarch_debug >= 2)
1112 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1113 return gdbarch->bfd_arch_info;
1117 gdbarch_byte_order (struct gdbarch *gdbarch)
1119 gdb_assert (gdbarch != NULL);
1120 if (gdbarch_debug >= 2)
1121 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1122 return gdbarch->byte_order;
1126 gdbarch_osabi (struct gdbarch *gdbarch)
1128 gdb_assert (gdbarch != NULL);
1129 if (gdbarch_debug >= 2)
1130 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1131 return gdbarch->osabi;
1134 const struct target_desc *
1135 gdbarch_target_desc (struct gdbarch *gdbarch)
1137 gdb_assert (gdbarch != NULL);
1138 if (gdbarch_debug >= 2)
1139 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1140 return gdbarch->target_desc;
1144 gdbarch_bits_big_endian (struct gdbarch *gdbarch)
1146 gdb_assert (gdbarch != NULL);
1147 /* Skip verify of bits_big_endian, invalid_p == 0 */
1148 if (gdbarch_debug >= 2)
1149 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
1150 return gdbarch->bits_big_endian;
1154 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
1155 int bits_big_endian)
1157 gdbarch->bits_big_endian = bits_big_endian;
1161 gdbarch_short_bit (struct gdbarch *gdbarch)
1163 gdb_assert (gdbarch != NULL);
1164 /* Skip verify of short_bit, invalid_p == 0 */
1165 if (gdbarch_debug >= 2)
1166 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1167 return gdbarch->short_bit;
1171 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1174 gdbarch->short_bit = short_bit;
1178 gdbarch_int_bit (struct gdbarch *gdbarch)
1180 gdb_assert (gdbarch != NULL);
1181 /* Skip verify of int_bit, invalid_p == 0 */
1182 if (gdbarch_debug >= 2)
1183 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1184 return gdbarch->int_bit;
1188 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1191 gdbarch->int_bit = int_bit;
1195 gdbarch_long_bit (struct gdbarch *gdbarch)
1197 gdb_assert (gdbarch != NULL);
1198 /* Skip verify of long_bit, invalid_p == 0 */
1199 if (gdbarch_debug >= 2)
1200 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1201 return gdbarch->long_bit;
1205 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1208 gdbarch->long_bit = long_bit;
1212 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1214 gdb_assert (gdbarch != NULL);
1215 /* Skip verify of long_long_bit, invalid_p == 0 */
1216 if (gdbarch_debug >= 2)
1217 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1218 return gdbarch->long_long_bit;
1222 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1225 gdbarch->long_long_bit = long_long_bit;
1229 gdbarch_float_bit (struct gdbarch *gdbarch)
1231 gdb_assert (gdbarch != NULL);
1232 /* Skip verify of float_bit, invalid_p == 0 */
1233 if (gdbarch_debug >= 2)
1234 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1235 return gdbarch->float_bit;
1239 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1242 gdbarch->float_bit = float_bit;
1245 const struct floatformat **
1246 gdbarch_float_format (struct gdbarch *gdbarch)
1248 gdb_assert (gdbarch != NULL);
1249 if (gdbarch_debug >= 2)
1250 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1251 return gdbarch->float_format;
1255 set_gdbarch_float_format (struct gdbarch *gdbarch,
1256 const struct floatformat ** float_format)
1258 gdbarch->float_format = float_format;
1262 gdbarch_double_bit (struct gdbarch *gdbarch)
1264 gdb_assert (gdbarch != NULL);
1265 /* Skip verify of double_bit, invalid_p == 0 */
1266 if (gdbarch_debug >= 2)
1267 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1268 return gdbarch->double_bit;
1272 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1275 gdbarch->double_bit = double_bit;
1278 const struct floatformat **
1279 gdbarch_double_format (struct gdbarch *gdbarch)
1281 gdb_assert (gdbarch != NULL);
1282 if (gdbarch_debug >= 2)
1283 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1284 return gdbarch->double_format;
1288 set_gdbarch_double_format (struct gdbarch *gdbarch,
1289 const struct floatformat ** double_format)
1291 gdbarch->double_format = double_format;
1295 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1297 gdb_assert (gdbarch != NULL);
1298 /* Skip verify of long_double_bit, invalid_p == 0 */
1299 if (gdbarch_debug >= 2)
1300 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1301 return gdbarch->long_double_bit;
1305 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1306 int long_double_bit)
1308 gdbarch->long_double_bit = long_double_bit;
1311 const struct floatformat **
1312 gdbarch_long_double_format (struct gdbarch *gdbarch)
1314 gdb_assert (gdbarch != NULL);
1315 if (gdbarch_debug >= 2)
1316 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1317 return gdbarch->long_double_format;
1321 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1322 const struct floatformat ** long_double_format)
1324 gdbarch->long_double_format = long_double_format;
1328 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1330 gdb_assert (gdbarch != NULL);
1331 /* Skip verify of ptr_bit, invalid_p == 0 */
1332 if (gdbarch_debug >= 2)
1333 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1334 return gdbarch->ptr_bit;
1338 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1341 gdbarch->ptr_bit = ptr_bit;
1345 gdbarch_addr_bit (struct gdbarch *gdbarch)
1347 gdb_assert (gdbarch != NULL);
1348 /* Check variable changed from pre-default. */
1349 gdb_assert (gdbarch->addr_bit != 0);
1350 if (gdbarch_debug >= 2)
1351 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1352 return gdbarch->addr_bit;
1356 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1359 gdbarch->addr_bit = addr_bit;
1363 gdbarch_char_signed (struct gdbarch *gdbarch)
1365 gdb_assert (gdbarch != NULL);
1366 /* Check variable changed from pre-default. */
1367 gdb_assert (gdbarch->char_signed != -1);
1368 if (gdbarch_debug >= 2)
1369 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1370 return gdbarch->char_signed;
1374 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1377 gdbarch->char_signed = char_signed;
1381 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1383 gdb_assert (gdbarch != NULL);
1384 return gdbarch->read_pc != NULL;
1388 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache)
1390 gdb_assert (gdbarch != NULL);
1391 gdb_assert (gdbarch->read_pc != NULL);
1392 if (gdbarch_debug >= 2)
1393 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1394 return gdbarch->read_pc (regcache);
1398 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1399 gdbarch_read_pc_ftype read_pc)
1401 gdbarch->read_pc = read_pc;
1405 gdbarch_write_pc_p (struct gdbarch *gdbarch)
1407 gdb_assert (gdbarch != NULL);
1408 return gdbarch->write_pc != NULL;
1412 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val)
1414 gdb_assert (gdbarch != NULL);
1415 gdb_assert (gdbarch->write_pc != NULL);
1416 if (gdbarch_debug >= 2)
1417 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1418 gdbarch->write_pc (regcache, val);
1422 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1423 gdbarch_write_pc_ftype write_pc)
1425 gdbarch->write_pc = write_pc;
1429 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1431 gdb_assert (gdbarch != NULL);
1432 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1433 if (gdbarch_debug >= 2)
1434 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1435 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset);
1439 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1440 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1442 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1446 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1448 gdb_assert (gdbarch != NULL);
1449 return gdbarch->pseudo_register_read != NULL;
1453 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1455 gdb_assert (gdbarch != NULL);
1456 gdb_assert (gdbarch->pseudo_register_read != NULL);
1457 if (gdbarch_debug >= 2)
1458 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1459 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1463 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1464 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1466 gdbarch->pseudo_register_read = pseudo_register_read;
1470 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1472 gdb_assert (gdbarch != NULL);
1473 return gdbarch->pseudo_register_write != NULL;
1477 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1479 gdb_assert (gdbarch != NULL);
1480 gdb_assert (gdbarch->pseudo_register_write != NULL);
1481 if (gdbarch_debug >= 2)
1482 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1483 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1487 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1488 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1490 gdbarch->pseudo_register_write = pseudo_register_write;
1494 gdbarch_num_regs (struct gdbarch *gdbarch)
1496 gdb_assert (gdbarch != NULL);
1497 /* Check variable changed from pre-default. */
1498 gdb_assert (gdbarch->num_regs != -1);
1499 if (gdbarch_debug >= 2)
1500 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
1501 return gdbarch->num_regs;
1505 set_gdbarch_num_regs (struct gdbarch *gdbarch,
1508 gdbarch->num_regs = num_regs;
1512 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
1514 gdb_assert (gdbarch != NULL);
1515 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1516 if (gdbarch_debug >= 2)
1517 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
1518 return gdbarch->num_pseudo_regs;
1522 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
1523 int num_pseudo_regs)
1525 gdbarch->num_pseudo_regs = num_pseudo_regs;
1529 gdbarch_sp_regnum (struct gdbarch *gdbarch)
1531 gdb_assert (gdbarch != NULL);
1532 /* Skip verify of sp_regnum, invalid_p == 0 */
1533 if (gdbarch_debug >= 2)
1534 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
1535 return gdbarch->sp_regnum;
1539 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
1542 gdbarch->sp_regnum = sp_regnum;
1546 gdbarch_pc_regnum (struct gdbarch *gdbarch)
1548 gdb_assert (gdbarch != NULL);
1549 /* Skip verify of pc_regnum, invalid_p == 0 */
1550 if (gdbarch_debug >= 2)
1551 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
1552 return gdbarch->pc_regnum;
1556 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
1559 gdbarch->pc_regnum = pc_regnum;
1563 gdbarch_ps_regnum (struct gdbarch *gdbarch)
1565 gdb_assert (gdbarch != NULL);
1566 /* Skip verify of ps_regnum, invalid_p == 0 */
1567 if (gdbarch_debug >= 2)
1568 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
1569 return gdbarch->ps_regnum;
1573 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
1576 gdbarch->ps_regnum = ps_regnum;
1580 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
1582 gdb_assert (gdbarch != NULL);
1583 /* Skip verify of fp0_regnum, invalid_p == 0 */
1584 if (gdbarch_debug >= 2)
1585 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
1586 return gdbarch->fp0_regnum;
1590 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
1593 gdbarch->fp0_regnum = fp0_regnum;
1597 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
1599 gdb_assert (gdbarch != NULL);
1600 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
1601 if (gdbarch_debug >= 2)
1602 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
1603 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr);
1607 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
1608 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
1610 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
1614 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
1616 gdb_assert (gdbarch != NULL);
1617 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
1618 if (gdbarch_debug >= 2)
1619 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
1620 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr);
1624 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
1625 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
1627 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
1631 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
1633 gdb_assert (gdbarch != NULL);
1634 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
1635 if (gdbarch_debug >= 2)
1636 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
1637 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr);
1641 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
1642 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
1644 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
1648 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
1650 gdb_assert (gdbarch != NULL);
1651 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
1652 if (gdbarch_debug >= 2)
1653 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
1654 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr);
1658 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
1659 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
1661 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
1665 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
1667 gdb_assert (gdbarch != NULL);
1668 gdb_assert (gdbarch->register_name != NULL);
1669 if (gdbarch_debug >= 2)
1670 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
1671 return gdbarch->register_name (gdbarch, regnr);
1675 set_gdbarch_register_name (struct gdbarch *gdbarch,
1676 gdbarch_register_name_ftype register_name)
1678 gdbarch->register_name = register_name;
1682 gdbarch_register_type_p (struct gdbarch *gdbarch)
1684 gdb_assert (gdbarch != NULL);
1685 return gdbarch->register_type != NULL;
1689 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
1691 gdb_assert (gdbarch != NULL);
1692 gdb_assert (gdbarch->register_type != NULL);
1693 if (gdbarch_debug >= 2)
1694 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
1695 return gdbarch->register_type (gdbarch, reg_nr);
1699 set_gdbarch_register_type (struct gdbarch *gdbarch,
1700 gdbarch_register_type_ftype register_type)
1702 gdbarch->register_type = register_type;
1706 gdbarch_dummy_id_p (struct gdbarch *gdbarch)
1708 gdb_assert (gdbarch != NULL);
1709 return gdbarch->dummy_id != NULL;
1713 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
1715 gdb_assert (gdbarch != NULL);
1716 gdb_assert (gdbarch->dummy_id != NULL);
1717 if (gdbarch_debug >= 2)
1718 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n");
1719 return gdbarch->dummy_id (gdbarch, this_frame);
1723 set_gdbarch_dummy_id (struct gdbarch *gdbarch,
1724 gdbarch_dummy_id_ftype dummy_id)
1726 gdbarch->dummy_id = dummy_id;
1730 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
1732 gdb_assert (gdbarch != NULL);
1733 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
1734 if (gdbarch_debug >= 2)
1735 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
1736 return gdbarch->deprecated_fp_regnum;
1740 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
1741 int deprecated_fp_regnum)
1743 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
1747 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
1749 gdb_assert (gdbarch != NULL);
1750 return gdbarch->push_dummy_call != NULL;
1754 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)
1756 gdb_assert (gdbarch != NULL);
1757 gdb_assert (gdbarch->push_dummy_call != NULL);
1758 if (gdbarch_debug >= 2)
1759 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
1760 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
1764 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
1765 gdbarch_push_dummy_call_ftype push_dummy_call)
1767 gdbarch->push_dummy_call = push_dummy_call;
1771 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
1773 gdb_assert (gdbarch != NULL);
1774 /* Skip verify of call_dummy_location, invalid_p == 0 */
1775 if (gdbarch_debug >= 2)
1776 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
1777 return gdbarch->call_dummy_location;
1781 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
1782 int call_dummy_location)
1784 gdbarch->call_dummy_location = call_dummy_location;
1788 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
1790 gdb_assert (gdbarch != NULL);
1791 return gdbarch->push_dummy_code != NULL;
1795 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)
1797 gdb_assert (gdbarch != NULL);
1798 gdb_assert (gdbarch->push_dummy_code != NULL);
1799 if (gdbarch_debug >= 2)
1800 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
1801 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
1805 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
1806 gdbarch_push_dummy_code_ftype push_dummy_code)
1808 gdbarch->push_dummy_code = push_dummy_code;
1812 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
1814 gdb_assert (gdbarch != NULL);
1815 gdb_assert (gdbarch->print_registers_info != NULL);
1816 if (gdbarch_debug >= 2)
1817 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
1818 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
1822 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
1823 gdbarch_print_registers_info_ftype print_registers_info)
1825 gdbarch->print_registers_info = print_registers_info;
1829 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
1831 gdb_assert (gdbarch != NULL);
1832 return gdbarch->print_float_info != NULL;
1836 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
1838 gdb_assert (gdbarch != NULL);
1839 gdb_assert (gdbarch->print_float_info != NULL);
1840 if (gdbarch_debug >= 2)
1841 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
1842 gdbarch->print_float_info (gdbarch, file, frame, args);
1846 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
1847 gdbarch_print_float_info_ftype print_float_info)
1849 gdbarch->print_float_info = print_float_info;
1853 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
1855 gdb_assert (gdbarch != NULL);
1856 return gdbarch->print_vector_info != NULL;
1860 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
1862 gdb_assert (gdbarch != NULL);
1863 gdb_assert (gdbarch->print_vector_info != NULL);
1864 if (gdbarch_debug >= 2)
1865 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
1866 gdbarch->print_vector_info (gdbarch, file, frame, args);
1870 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
1871 gdbarch_print_vector_info_ftype print_vector_info)
1873 gdbarch->print_vector_info = print_vector_info;
1877 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
1879 gdb_assert (gdbarch != NULL);
1880 gdb_assert (gdbarch->register_sim_regno != NULL);
1881 if (gdbarch_debug >= 2)
1882 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
1883 return gdbarch->register_sim_regno (gdbarch, reg_nr);
1887 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
1888 gdbarch_register_sim_regno_ftype register_sim_regno)
1890 gdbarch->register_sim_regno = register_sim_regno;
1894 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
1896 gdb_assert (gdbarch != NULL);
1897 gdb_assert (gdbarch->cannot_fetch_register != NULL);
1898 if (gdbarch_debug >= 2)
1899 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
1900 return gdbarch->cannot_fetch_register (gdbarch, regnum);
1904 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
1905 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
1907 gdbarch->cannot_fetch_register = cannot_fetch_register;
1911 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
1913 gdb_assert (gdbarch != NULL);
1914 gdb_assert (gdbarch->cannot_store_register != NULL);
1915 if (gdbarch_debug >= 2)
1916 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
1917 return gdbarch->cannot_store_register (gdbarch, regnum);
1921 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
1922 gdbarch_cannot_store_register_ftype cannot_store_register)
1924 gdbarch->cannot_store_register = cannot_store_register;
1928 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
1930 gdb_assert (gdbarch != NULL);
1931 return gdbarch->get_longjmp_target != NULL;
1935 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc)
1937 gdb_assert (gdbarch != NULL);
1938 gdb_assert (gdbarch->get_longjmp_target != NULL);
1939 if (gdbarch_debug >= 2)
1940 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
1941 return gdbarch->get_longjmp_target (frame, pc);
1945 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
1946 gdbarch_get_longjmp_target_ftype get_longjmp_target)
1948 gdbarch->get_longjmp_target = get_longjmp_target;
1952 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
1954 gdb_assert (gdbarch != NULL);
1955 if (gdbarch_debug >= 2)
1956 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
1957 return gdbarch->believe_pcc_promotion;
1961 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
1962 int believe_pcc_promotion)
1964 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
1968 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
1970 gdb_assert (gdbarch != NULL);
1971 gdb_assert (gdbarch->convert_register_p != NULL);
1972 if (gdbarch_debug >= 2)
1973 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
1974 return gdbarch->convert_register_p (gdbarch, regnum, type);
1978 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
1979 gdbarch_convert_register_p_ftype convert_register_p)
1981 gdbarch->convert_register_p = convert_register_p;
1985 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
1987 gdb_assert (gdbarch != NULL);
1988 gdb_assert (gdbarch->register_to_value != NULL);
1989 if (gdbarch_debug >= 2)
1990 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
1991 gdbarch->register_to_value (frame, regnum, type, buf);
1995 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
1996 gdbarch_register_to_value_ftype register_to_value)
1998 gdbarch->register_to_value = register_to_value;
2002 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2004 gdb_assert (gdbarch != NULL);
2005 gdb_assert (gdbarch->value_to_register != NULL);
2006 if (gdbarch_debug >= 2)
2007 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2008 gdbarch->value_to_register (frame, regnum, type, buf);
2012 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2013 gdbarch_value_to_register_ftype value_to_register)
2015 gdbarch->value_to_register = value_to_register;
2019 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2021 gdb_assert (gdbarch != NULL);
2022 gdb_assert (gdbarch->value_from_register != NULL);
2023 if (gdbarch_debug >= 2)
2024 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2025 return gdbarch->value_from_register (type, regnum, frame);
2029 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2030 gdbarch_value_from_register_ftype value_from_register)
2032 gdbarch->value_from_register = value_from_register;
2036 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2038 gdb_assert (gdbarch != NULL);
2039 gdb_assert (gdbarch->pointer_to_address != NULL);
2040 if (gdbarch_debug >= 2)
2041 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2042 return gdbarch->pointer_to_address (type, buf);
2046 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2047 gdbarch_pointer_to_address_ftype pointer_to_address)
2049 gdbarch->pointer_to_address = pointer_to_address;
2053 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2055 gdb_assert (gdbarch != NULL);
2056 gdb_assert (gdbarch->address_to_pointer != NULL);
2057 if (gdbarch_debug >= 2)
2058 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2059 gdbarch->address_to_pointer (type, buf, addr);
2063 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2064 gdbarch_address_to_pointer_ftype address_to_pointer)
2066 gdbarch->address_to_pointer = address_to_pointer;
2070 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2072 gdb_assert (gdbarch != NULL);
2073 return gdbarch->integer_to_address != NULL;
2077 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2079 gdb_assert (gdbarch != NULL);
2080 gdb_assert (gdbarch->integer_to_address != NULL);
2081 if (gdbarch_debug >= 2)
2082 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2083 return gdbarch->integer_to_address (gdbarch, type, buf);
2087 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2088 gdbarch_integer_to_address_ftype integer_to_address)
2090 gdbarch->integer_to_address = integer_to_address;
2094 gdbarch_return_value_p (struct gdbarch *gdbarch)
2096 gdb_assert (gdbarch != NULL);
2097 return gdbarch->return_value != NULL;
2100 enum return_value_convention
2101 gdbarch_return_value (struct gdbarch *gdbarch, struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2103 gdb_assert (gdbarch != NULL);
2104 gdb_assert (gdbarch->return_value != NULL);
2105 if (gdbarch_debug >= 2)
2106 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2107 return gdbarch->return_value (gdbarch, functype, valtype, regcache, readbuf, writebuf);
2111 set_gdbarch_return_value (struct gdbarch *gdbarch,
2112 gdbarch_return_value_ftype return_value)
2114 gdbarch->return_value = return_value;
2118 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2120 gdb_assert (gdbarch != NULL);
2121 gdb_assert (gdbarch->skip_prologue != NULL);
2122 if (gdbarch_debug >= 2)
2123 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2124 return gdbarch->skip_prologue (gdbarch, ip);
2128 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2129 gdbarch_skip_prologue_ftype skip_prologue)
2131 gdbarch->skip_prologue = skip_prologue;
2135 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch)
2137 gdb_assert (gdbarch != NULL);
2138 return gdbarch->skip_main_prologue != NULL;
2142 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2144 gdb_assert (gdbarch != NULL);
2145 gdb_assert (gdbarch->skip_main_prologue != NULL);
2146 if (gdbarch_debug >= 2)
2147 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n");
2148 return gdbarch->skip_main_prologue (gdbarch, ip);
2152 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
2153 gdbarch_skip_main_prologue_ftype skip_main_prologue)
2155 gdbarch->skip_main_prologue = skip_main_prologue;
2159 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2161 gdb_assert (gdbarch != NULL);
2162 gdb_assert (gdbarch->inner_than != NULL);
2163 if (gdbarch_debug >= 2)
2164 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2165 return gdbarch->inner_than (lhs, rhs);
2169 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2170 gdbarch_inner_than_ftype inner_than)
2172 gdbarch->inner_than = inner_than;
2176 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2178 gdb_assert (gdbarch != NULL);
2179 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2180 if (gdbarch_debug >= 2)
2181 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2182 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr);
2186 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2187 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2189 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2193 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2195 gdb_assert (gdbarch != NULL);
2196 return gdbarch->adjust_breakpoint_address != NULL;
2200 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2202 gdb_assert (gdbarch != NULL);
2203 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2204 if (gdbarch_debug >= 2)
2205 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2206 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2210 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2211 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2213 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2217 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2219 gdb_assert (gdbarch != NULL);
2220 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2221 if (gdbarch_debug >= 2)
2222 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2223 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt);
2227 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2228 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2230 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2234 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2236 gdb_assert (gdbarch != NULL);
2237 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2238 if (gdbarch_debug >= 2)
2239 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2240 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt);
2244 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2245 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2247 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2251 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2253 gdb_assert (gdbarch != NULL);
2254 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2255 if (gdbarch_debug >= 2)
2256 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2257 return gdbarch->decr_pc_after_break;
2261 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2262 CORE_ADDR decr_pc_after_break)
2264 gdbarch->decr_pc_after_break = decr_pc_after_break;
2268 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2270 gdb_assert (gdbarch != NULL);
2271 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2272 if (gdbarch_debug >= 2)
2273 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2274 return gdbarch->deprecated_function_start_offset;
2278 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2279 CORE_ADDR deprecated_function_start_offset)
2281 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2285 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2287 gdb_assert (gdbarch != NULL);
2288 gdb_assert (gdbarch->remote_register_number != NULL);
2289 if (gdbarch_debug >= 2)
2290 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2291 return gdbarch->remote_register_number (gdbarch, regno);
2295 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2296 gdbarch_remote_register_number_ftype remote_register_number)
2298 gdbarch->remote_register_number = remote_register_number;
2302 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2304 gdb_assert (gdbarch != NULL);
2305 return gdbarch->fetch_tls_load_module_address != NULL;
2309 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2311 gdb_assert (gdbarch != NULL);
2312 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2313 if (gdbarch_debug >= 2)
2314 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2315 return gdbarch->fetch_tls_load_module_address (objfile);
2319 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2320 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2322 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2326 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2328 gdb_assert (gdbarch != NULL);
2329 /* Skip verify of frame_args_skip, invalid_p == 0 */
2330 if (gdbarch_debug >= 2)
2331 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2332 return gdbarch->frame_args_skip;
2336 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2337 CORE_ADDR frame_args_skip)
2339 gdbarch->frame_args_skip = frame_args_skip;
2343 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2345 gdb_assert (gdbarch != NULL);
2346 return gdbarch->unwind_pc != NULL;
2350 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2352 gdb_assert (gdbarch != NULL);
2353 gdb_assert (gdbarch->unwind_pc != NULL);
2354 if (gdbarch_debug >= 2)
2355 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2356 return gdbarch->unwind_pc (gdbarch, next_frame);
2360 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2361 gdbarch_unwind_pc_ftype unwind_pc)
2363 gdbarch->unwind_pc = unwind_pc;
2367 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2369 gdb_assert (gdbarch != NULL);
2370 return gdbarch->unwind_sp != NULL;
2374 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2376 gdb_assert (gdbarch != NULL);
2377 gdb_assert (gdbarch->unwind_sp != NULL);
2378 if (gdbarch_debug >= 2)
2379 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2380 return gdbarch->unwind_sp (gdbarch, next_frame);
2384 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
2385 gdbarch_unwind_sp_ftype unwind_sp)
2387 gdbarch->unwind_sp = unwind_sp;
2391 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
2393 gdb_assert (gdbarch != NULL);
2394 return gdbarch->frame_num_args != NULL;
2398 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
2400 gdb_assert (gdbarch != NULL);
2401 gdb_assert (gdbarch->frame_num_args != NULL);
2402 if (gdbarch_debug >= 2)
2403 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
2404 return gdbarch->frame_num_args (frame);
2408 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
2409 gdbarch_frame_num_args_ftype frame_num_args)
2411 gdbarch->frame_num_args = frame_num_args;
2415 gdbarch_frame_align_p (struct gdbarch *gdbarch)
2417 gdb_assert (gdbarch != NULL);
2418 return gdbarch->frame_align != NULL;
2422 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
2424 gdb_assert (gdbarch != NULL);
2425 gdb_assert (gdbarch->frame_align != NULL);
2426 if (gdbarch_debug >= 2)
2427 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
2428 return gdbarch->frame_align (gdbarch, address);
2432 set_gdbarch_frame_align (struct gdbarch *gdbarch,
2433 gdbarch_frame_align_ftype frame_align)
2435 gdbarch->frame_align = frame_align;
2439 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
2441 gdb_assert (gdbarch != NULL);
2442 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
2443 if (gdbarch_debug >= 2)
2444 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
2445 return gdbarch->stabs_argument_has_addr (gdbarch, type);
2449 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
2450 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
2452 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
2456 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
2458 gdb_assert (gdbarch != NULL);
2459 if (gdbarch_debug >= 2)
2460 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
2461 return gdbarch->frame_red_zone_size;
2465 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
2466 int frame_red_zone_size)
2468 gdbarch->frame_red_zone_size = frame_red_zone_size;
2472 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
2474 gdb_assert (gdbarch != NULL);
2475 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
2476 if (gdbarch_debug >= 2)
2477 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
2478 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
2482 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
2483 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
2485 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
2489 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
2491 gdb_assert (gdbarch != NULL);
2492 gdb_assert (gdbarch->addr_bits_remove != NULL);
2493 if (gdbarch_debug >= 2)
2494 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
2495 return gdbarch->addr_bits_remove (addr);
2499 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
2500 gdbarch_addr_bits_remove_ftype addr_bits_remove)
2502 gdbarch->addr_bits_remove = addr_bits_remove;
2506 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
2508 gdb_assert (gdbarch != NULL);
2509 gdb_assert (gdbarch->smash_text_address != NULL);
2510 if (gdbarch_debug >= 2)
2511 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
2512 return gdbarch->smash_text_address (addr);
2516 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
2517 gdbarch_smash_text_address_ftype smash_text_address)
2519 gdbarch->smash_text_address = smash_text_address;
2523 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
2525 gdb_assert (gdbarch != NULL);
2526 return gdbarch->software_single_step != NULL;
2530 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame)
2532 gdb_assert (gdbarch != NULL);
2533 gdb_assert (gdbarch->software_single_step != NULL);
2534 if (gdbarch_debug >= 2)
2535 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
2536 return gdbarch->software_single_step (frame);
2540 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
2541 gdbarch_software_single_step_ftype software_single_step)
2543 gdbarch->software_single_step = software_single_step;
2547 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
2549 gdb_assert (gdbarch != NULL);
2550 return gdbarch->single_step_through_delay != NULL;
2554 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
2556 gdb_assert (gdbarch != NULL);
2557 gdb_assert (gdbarch->single_step_through_delay != NULL);
2558 if (gdbarch_debug >= 2)
2559 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
2560 return gdbarch->single_step_through_delay (gdbarch, frame);
2564 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
2565 gdbarch_single_step_through_delay_ftype single_step_through_delay)
2567 gdbarch->single_step_through_delay = single_step_through_delay;
2571 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
2573 gdb_assert (gdbarch != NULL);
2574 gdb_assert (gdbarch->print_insn != NULL);
2575 if (gdbarch_debug >= 2)
2576 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
2577 return gdbarch->print_insn (vma, info);
2581 set_gdbarch_print_insn (struct gdbarch *gdbarch,
2582 gdbarch_print_insn_ftype print_insn)
2584 gdbarch->print_insn = print_insn;
2588 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc)
2590 gdb_assert (gdbarch != NULL);
2591 gdb_assert (gdbarch->skip_trampoline_code != NULL);
2592 if (gdbarch_debug >= 2)
2593 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
2594 return gdbarch->skip_trampoline_code (frame, pc);
2598 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
2599 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
2601 gdbarch->skip_trampoline_code = skip_trampoline_code;
2605 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
2607 gdb_assert (gdbarch != NULL);
2608 gdb_assert (gdbarch->skip_solib_resolver != NULL);
2609 if (gdbarch_debug >= 2)
2610 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
2611 return gdbarch->skip_solib_resolver (gdbarch, pc);
2615 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
2616 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
2618 gdbarch->skip_solib_resolver = skip_solib_resolver;
2622 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
2624 gdb_assert (gdbarch != NULL);
2625 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
2626 if (gdbarch_debug >= 2)
2627 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
2628 return gdbarch->in_solib_return_trampoline (pc, name);
2632 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
2633 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
2635 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
2639 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
2641 gdb_assert (gdbarch != NULL);
2642 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
2643 if (gdbarch_debug >= 2)
2644 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
2645 return gdbarch->in_function_epilogue_p (gdbarch, addr);
2649 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
2650 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
2652 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
2656 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
2658 gdb_assert (gdbarch != NULL);
2659 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
2660 if (gdbarch_debug >= 2)
2661 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
2662 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
2666 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
2667 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
2669 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
2673 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
2675 gdb_assert (gdbarch != NULL);
2676 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
2677 if (gdbarch_debug >= 2)
2678 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
2679 gdbarch->elf_make_msymbol_special (sym, msym);
2683 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
2684 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
2686 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
2690 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
2692 gdb_assert (gdbarch != NULL);
2693 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
2694 if (gdbarch_debug >= 2)
2695 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
2696 gdbarch->coff_make_msymbol_special (val, msym);
2700 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
2701 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
2703 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
2707 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
2709 gdb_assert (gdbarch != NULL);
2710 /* Skip verify of name_of_malloc, invalid_p == 0 */
2711 if (gdbarch_debug >= 2)
2712 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
2713 return gdbarch->name_of_malloc;
2717 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
2718 const char * name_of_malloc)
2720 gdbarch->name_of_malloc = name_of_malloc;
2724 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
2726 gdb_assert (gdbarch != NULL);
2727 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
2728 if (gdbarch_debug >= 2)
2729 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
2730 return gdbarch->cannot_step_breakpoint;
2734 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
2735 int cannot_step_breakpoint)
2737 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
2741 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
2743 gdb_assert (gdbarch != NULL);
2744 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
2745 if (gdbarch_debug >= 2)
2746 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
2747 return gdbarch->have_nonsteppable_watchpoint;
2751 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
2752 int have_nonsteppable_watchpoint)
2754 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
2758 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
2760 gdb_assert (gdbarch != NULL);
2761 return gdbarch->address_class_type_flags != NULL;
2765 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
2767 gdb_assert (gdbarch != NULL);
2768 gdb_assert (gdbarch->address_class_type_flags != NULL);
2769 if (gdbarch_debug >= 2)
2770 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
2771 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
2775 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
2776 gdbarch_address_class_type_flags_ftype address_class_type_flags)
2778 gdbarch->address_class_type_flags = address_class_type_flags;
2782 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
2784 gdb_assert (gdbarch != NULL);
2785 return gdbarch->address_class_type_flags_to_name != NULL;
2789 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
2791 gdb_assert (gdbarch != NULL);
2792 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
2793 if (gdbarch_debug >= 2)
2794 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
2795 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
2799 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
2800 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
2802 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
2806 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
2808 gdb_assert (gdbarch != NULL);
2809 return gdbarch->address_class_name_to_type_flags != NULL;
2813 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
2815 gdb_assert (gdbarch != NULL);
2816 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
2817 if (gdbarch_debug >= 2)
2818 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
2819 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
2823 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
2824 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
2826 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
2830 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
2832 gdb_assert (gdbarch != NULL);
2833 gdb_assert (gdbarch->register_reggroup_p != NULL);
2834 if (gdbarch_debug >= 2)
2835 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
2836 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
2840 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
2841 gdbarch_register_reggroup_p_ftype register_reggroup_p)
2843 gdbarch->register_reggroup_p = register_reggroup_p;
2847 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
2849 gdb_assert (gdbarch != NULL);
2850 return gdbarch->fetch_pointer_argument != NULL;
2854 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
2856 gdb_assert (gdbarch != NULL);
2857 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
2858 if (gdbarch_debug >= 2)
2859 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
2860 return gdbarch->fetch_pointer_argument (frame, argi, type);
2864 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
2865 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
2867 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
2871 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
2873 gdb_assert (gdbarch != NULL);
2874 return gdbarch->regset_from_core_section != NULL;
2877 const struct regset *
2878 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
2880 gdb_assert (gdbarch != NULL);
2881 gdb_assert (gdbarch->regset_from_core_section != NULL);
2882 if (gdbarch_debug >= 2)
2883 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
2884 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
2888 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
2889 gdbarch_regset_from_core_section_ftype regset_from_core_section)
2891 gdbarch->regset_from_core_section = regset_from_core_section;
2894 struct core_regset_section *
2895 gdbarch_core_regset_sections (struct gdbarch *gdbarch)
2897 gdb_assert (gdbarch != NULL);
2898 if (gdbarch_debug >= 2)
2899 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n");
2900 return gdbarch->core_regset_sections;
2904 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch,
2905 struct core_regset_section * core_regset_sections)
2907 gdbarch->core_regset_sections = core_regset_sections;
2911 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
2913 gdb_assert (gdbarch != NULL);
2914 return gdbarch->core_xfer_shared_libraries != NULL;
2918 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
2920 gdb_assert (gdbarch != NULL);
2921 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL);
2922 if (gdbarch_debug >= 2)
2923 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n");
2924 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len);
2928 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch,
2929 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries)
2931 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries;
2935 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
2937 gdb_assert (gdbarch != NULL);
2938 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
2939 if (gdbarch_debug >= 2)
2940 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
2941 return gdbarch->vtable_function_descriptors;
2945 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
2946 int vtable_function_descriptors)
2948 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
2952 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
2954 gdb_assert (gdbarch != NULL);
2955 /* Skip verify of vbit_in_delta, invalid_p == 0 */
2956 if (gdbarch_debug >= 2)
2957 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
2958 return gdbarch->vbit_in_delta;
2962 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
2965 gdbarch->vbit_in_delta = vbit_in_delta;
2969 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
2971 gdb_assert (gdbarch != NULL);
2972 return gdbarch->skip_permanent_breakpoint != NULL;
2976 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
2978 gdb_assert (gdbarch != NULL);
2979 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
2980 if (gdbarch_debug >= 2)
2981 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
2982 gdbarch->skip_permanent_breakpoint (regcache);
2986 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
2987 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
2989 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
2993 gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
2995 gdb_assert (gdbarch != NULL);
2996 return gdbarch->max_insn_length != 0;
3000 gdbarch_max_insn_length (struct gdbarch *gdbarch)
3002 gdb_assert (gdbarch != NULL);
3003 /* Check variable changed from pre-default. */
3004 gdb_assert (gdbarch->max_insn_length != 0);
3005 if (gdbarch_debug >= 2)
3006 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n");
3007 return gdbarch->max_insn_length;
3011 set_gdbarch_max_insn_length (struct gdbarch *gdbarch,
3012 ULONGEST max_insn_length)
3014 gdbarch->max_insn_length = max_insn_length;
3018 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch)
3020 gdb_assert (gdbarch != NULL);
3021 return gdbarch->displaced_step_copy_insn != NULL;
3024 struct displaced_step_closure *
3025 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3027 gdb_assert (gdbarch != NULL);
3028 gdb_assert (gdbarch->displaced_step_copy_insn != NULL);
3029 if (gdbarch_debug >= 2)
3030 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n");
3031 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs);
3035 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch,
3036 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn)
3038 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn;
3042 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch)
3044 gdb_assert (gdbarch != NULL);
3045 return gdbarch->displaced_step_fixup != NULL;
3049 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
3051 gdb_assert (gdbarch != NULL);
3052 gdb_assert (gdbarch->displaced_step_fixup != NULL);
3053 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3054 if (gdbarch_debug >= 2)
3055 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n");
3056 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs);
3060 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch,
3061 gdbarch_displaced_step_fixup_ftype displaced_step_fixup)
3063 gdbarch->displaced_step_fixup = displaced_step_fixup;
3067 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
3069 gdb_assert (gdbarch != NULL);
3070 gdb_assert (gdbarch->displaced_step_free_closure != NULL);
3071 if (gdbarch_debug >= 2)
3072 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n");
3073 gdbarch->displaced_step_free_closure (gdbarch, closure);
3077 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch,
3078 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure)
3080 gdbarch->displaced_step_free_closure = displaced_step_free_closure;
3084 gdbarch_displaced_step_location (struct gdbarch *gdbarch)
3086 gdb_assert (gdbarch != NULL);
3087 gdb_assert (gdbarch->displaced_step_location != NULL);
3088 if (gdbarch_debug >= 2)
3089 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n");
3090 return gdbarch->displaced_step_location (gdbarch);
3094 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch,
3095 gdbarch_displaced_step_location_ftype displaced_step_location)
3097 gdbarch->displaced_step_location = displaced_step_location;
3101 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3103 gdb_assert (gdbarch != NULL);
3104 return gdbarch->overlay_update != NULL;
3108 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3110 gdb_assert (gdbarch != NULL);
3111 gdb_assert (gdbarch->overlay_update != NULL);
3112 if (gdbarch_debug >= 2)
3113 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3114 gdbarch->overlay_update (osect);
3118 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3119 gdbarch_overlay_update_ftype overlay_update)
3121 gdbarch->overlay_update = overlay_update;
3125 gdbarch_core_read_description_p (struct gdbarch *gdbarch)
3127 gdb_assert (gdbarch != NULL);
3128 return gdbarch->core_read_description != NULL;
3131 const struct target_desc *
3132 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd)
3134 gdb_assert (gdbarch != NULL);
3135 gdb_assert (gdbarch->core_read_description != NULL);
3136 if (gdbarch_debug >= 2)
3137 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n");
3138 return gdbarch->core_read_description (gdbarch, target, abfd);
3142 set_gdbarch_core_read_description (struct gdbarch *gdbarch,
3143 gdbarch_core_read_description_ftype core_read_description)
3145 gdbarch->core_read_description = core_read_description;
3149 gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
3151 gdb_assert (gdbarch != NULL);
3152 return gdbarch->static_transform_name != NULL;
3156 gdbarch_static_transform_name (struct gdbarch *gdbarch, char *name)
3158 gdb_assert (gdbarch != NULL);
3159 gdb_assert (gdbarch->static_transform_name != NULL);
3160 if (gdbarch_debug >= 2)
3161 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
3162 return gdbarch->static_transform_name (name);
3166 set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
3167 gdbarch_static_transform_name_ftype static_transform_name)
3169 gdbarch->static_transform_name = static_transform_name;
3173 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
3175 gdb_assert (gdbarch != NULL);
3176 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3177 if (gdbarch_debug >= 2)
3178 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
3179 return gdbarch->sofun_address_maybe_missing;
3183 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
3184 int sofun_address_maybe_missing)
3186 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
3190 gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo)
3192 gdb_assert (gdbarch != NULL);
3193 gdb_assert (gdbarch->target_signal_from_host != NULL);
3194 if (gdbarch_debug >= 2)
3195 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_from_host called\n");
3196 return gdbarch->target_signal_from_host (gdbarch, signo);
3200 set_gdbarch_target_signal_from_host (struct gdbarch *gdbarch,
3201 gdbarch_target_signal_from_host_ftype target_signal_from_host)
3203 gdbarch->target_signal_from_host = target_signal_from_host;
3207 gdbarch_target_signal_to_host (struct gdbarch *gdbarch, enum target_signal ts)
3209 gdb_assert (gdbarch != NULL);
3210 gdb_assert (gdbarch->target_signal_to_host != NULL);
3211 if (gdbarch_debug >= 2)
3212 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_signal_to_host called\n");
3213 return gdbarch->target_signal_to_host (gdbarch, ts);
3217 set_gdbarch_target_signal_to_host (struct gdbarch *gdbarch,
3218 gdbarch_target_signal_to_host_ftype target_signal_to_host)
3220 gdbarch->target_signal_to_host = target_signal_to_host;
3224 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch)
3226 gdb_assert (gdbarch != NULL);
3227 return gdbarch->record_special_symbol != NULL;
3231 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym)
3233 gdb_assert (gdbarch != NULL);
3234 gdb_assert (gdbarch->record_special_symbol != NULL);
3235 if (gdbarch_debug >= 2)
3236 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n");
3237 gdbarch->record_special_symbol (gdbarch, objfile, sym);
3241 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
3242 gdbarch_record_special_symbol_ftype record_special_symbol)
3244 gdbarch->record_special_symbol = record_special_symbol;
3248 /* Keep a registry of per-architecture data-pointers required by GDB
3255 gdbarch_data_pre_init_ftype *pre_init;
3256 gdbarch_data_post_init_ftype *post_init;
3259 struct gdbarch_data_registration
3261 struct gdbarch_data *data;
3262 struct gdbarch_data_registration *next;
3265 struct gdbarch_data_registry
3268 struct gdbarch_data_registration *registrations;
3271 struct gdbarch_data_registry gdbarch_data_registry =
3276 static struct gdbarch_data *
3277 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3278 gdbarch_data_post_init_ftype *post_init)
3280 struct gdbarch_data_registration **curr;
3281 /* Append the new registraration. */
3282 for (curr = &gdbarch_data_registry.registrations;
3284 curr = &(*curr)->next);
3285 (*curr) = XMALLOC (struct gdbarch_data_registration);
3286 (*curr)->next = NULL;
3287 (*curr)->data = XMALLOC (struct gdbarch_data);
3288 (*curr)->data->index = gdbarch_data_registry.nr++;
3289 (*curr)->data->pre_init = pre_init;
3290 (*curr)->data->post_init = post_init;
3291 (*curr)->data->init_p = 1;
3292 return (*curr)->data;
3295 struct gdbarch_data *
3296 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3298 return gdbarch_data_register (pre_init, NULL);
3301 struct gdbarch_data *
3302 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3304 return gdbarch_data_register (NULL, post_init);
3307 /* Create/delete the gdbarch data vector. */
3310 alloc_gdbarch_data (struct gdbarch *gdbarch)
3312 gdb_assert (gdbarch->data == NULL);
3313 gdbarch->nr_data = gdbarch_data_registry.nr;
3314 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3317 /* Initialize the current value of the specified per-architecture
3321 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3322 struct gdbarch_data *data,
3325 gdb_assert (data->index < gdbarch->nr_data);
3326 gdb_assert (gdbarch->data[data->index] == NULL);
3327 gdb_assert (data->pre_init == NULL);
3328 gdbarch->data[data->index] = pointer;
3331 /* Return the current value of the specified per-architecture
3335 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3337 gdb_assert (data->index < gdbarch->nr_data);
3338 if (gdbarch->data[data->index] == NULL)
3340 /* The data-pointer isn't initialized, call init() to get a
3342 if (data->pre_init != NULL)
3343 /* Mid architecture creation: pass just the obstack, and not
3344 the entire architecture, as that way it isn't possible for
3345 pre-init code to refer to undefined architecture
3347 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3348 else if (gdbarch->initialized_p
3349 && data->post_init != NULL)
3350 /* Post architecture creation: pass the entire architecture
3351 (as all fields are valid), but be careful to also detect
3352 recursive references. */
3354 gdb_assert (data->init_p);
3356 gdbarch->data[data->index] = data->post_init (gdbarch);
3360 /* The architecture initialization hasn't completed - punt -
3361 hope that the caller knows what they are doing. Once
3362 deprecated_set_gdbarch_data has been initialized, this can be
3363 changed to an internal error. */
3365 gdb_assert (gdbarch->data[data->index] != NULL);
3367 return gdbarch->data[data->index];
3371 /* Keep a registry of the architectures known by GDB. */
3373 struct gdbarch_registration
3375 enum bfd_architecture bfd_architecture;
3376 gdbarch_init_ftype *init;
3377 gdbarch_dump_tdep_ftype *dump_tdep;
3378 struct gdbarch_list *arches;
3379 struct gdbarch_registration *next;
3382 static struct gdbarch_registration *gdbarch_registry = NULL;
3385 append_name (const char ***buf, int *nr, const char *name)
3387 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3393 gdbarch_printable_names (void)
3395 /* Accumulate a list of names based on the registed list of
3397 enum bfd_architecture a;
3399 const char **arches = NULL;
3400 struct gdbarch_registration *rego;
3401 for (rego = gdbarch_registry;
3405 const struct bfd_arch_info *ap;
3406 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3408 internal_error (__FILE__, __LINE__,
3409 _("gdbarch_architecture_names: multi-arch unknown"));
3412 append_name (&arches, &nr_arches, ap->printable_name);
3417 append_name (&arches, &nr_arches, NULL);
3423 gdbarch_register (enum bfd_architecture bfd_architecture,
3424 gdbarch_init_ftype *init,
3425 gdbarch_dump_tdep_ftype *dump_tdep)
3427 struct gdbarch_registration **curr;
3428 const struct bfd_arch_info *bfd_arch_info;
3429 /* Check that BFD recognizes this architecture */
3430 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3431 if (bfd_arch_info == NULL)
3433 internal_error (__FILE__, __LINE__,
3434 _("gdbarch: Attempt to register unknown architecture (%d)"),
3437 /* Check that we haven't seen this architecture before */
3438 for (curr = &gdbarch_registry;
3440 curr = &(*curr)->next)
3442 if (bfd_architecture == (*curr)->bfd_architecture)
3443 internal_error (__FILE__, __LINE__,
3444 _("gdbarch: Duplicate registraration of architecture (%s)"),
3445 bfd_arch_info->printable_name);
3449 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3450 bfd_arch_info->printable_name,
3453 (*curr) = XMALLOC (struct gdbarch_registration);
3454 (*curr)->bfd_architecture = bfd_architecture;
3455 (*curr)->init = init;
3456 (*curr)->dump_tdep = dump_tdep;
3457 (*curr)->arches = NULL;
3458 (*curr)->next = NULL;
3462 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3463 gdbarch_init_ftype *init)
3465 gdbarch_register (bfd_architecture, init, NULL);
3469 /* Look for an architecture using gdbarch_info. */
3471 struct gdbarch_list *
3472 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3473 const struct gdbarch_info *info)
3475 for (; arches != NULL; arches = arches->next)
3477 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3479 if (info->byte_order != arches->gdbarch->byte_order)
3481 if (info->osabi != arches->gdbarch->osabi)
3483 if (info->target_desc != arches->gdbarch->target_desc)
3491 /* Find an architecture that matches the specified INFO. Create a new
3492 architecture if needed. Return that new architecture. Assumes
3493 that there is no current architecture. */
3495 static struct gdbarch *
3496 find_arch_by_info (struct gdbarch_info info)
3498 struct gdbarch *new_gdbarch;
3499 struct gdbarch_registration *rego;
3501 /* The existing architecture has been swapped out - all this code
3502 works from a clean slate. */
3503 gdb_assert (current_gdbarch == NULL);
3505 /* Fill in missing parts of the INFO struct using a number of
3506 sources: "set ..."; INFOabfd supplied; and the global
3508 gdbarch_info_fill (&info);
3510 /* Must have found some sort of architecture. */
3511 gdb_assert (info.bfd_arch_info != NULL);
3515 fprintf_unfiltered (gdb_stdlog,
3516 "find_arch_by_info: info.bfd_arch_info %s\n",
3517 (info.bfd_arch_info != NULL
3518 ? info.bfd_arch_info->printable_name
3520 fprintf_unfiltered (gdb_stdlog,
3521 "find_arch_by_info: info.byte_order %d (%s)\n",
3523 (info.byte_order == BFD_ENDIAN_BIG ? "big"
3524 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
3526 fprintf_unfiltered (gdb_stdlog,
3527 "find_arch_by_info: info.osabi %d (%s)\n",
3528 info.osabi, gdbarch_osabi_name (info.osabi));
3529 fprintf_unfiltered (gdb_stdlog,
3530 "find_arch_by_info: info.abfd 0x%lx\n",
3532 fprintf_unfiltered (gdb_stdlog,
3533 "find_arch_by_info: info.tdep_info 0x%lx\n",
3534 (long) info.tdep_info);
3537 /* Find the tdep code that knows about this architecture. */
3538 for (rego = gdbarch_registry;
3541 if (rego->bfd_architecture == info.bfd_arch_info->arch)
3546 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3547 "No matching architecture\n");
3551 /* Ask the tdep code for an architecture that matches "info". */
3552 new_gdbarch = rego->init (info, rego->arches);
3554 /* Did the tdep code like it? No. Reject the change and revert to
3555 the old architecture. */
3556 if (new_gdbarch == NULL)
3559 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3560 "Target rejected architecture\n");
3564 /* Is this a pre-existing architecture (as determined by already
3565 being initialized)? Move it to the front of the architecture
3566 list (keeping the list sorted Most Recently Used). */
3567 if (new_gdbarch->initialized_p)
3569 struct gdbarch_list **list;
3570 struct gdbarch_list *this;
3572 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3573 "Previous architecture 0x%08lx (%s) selected\n",
3575 new_gdbarch->bfd_arch_info->printable_name);
3576 /* Find the existing arch in the list. */
3577 for (list = ®o->arches;
3578 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
3579 list = &(*list)->next);
3580 /* It had better be in the list of architectures. */
3581 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
3584 (*list) = this->next;
3585 /* Insert THIS at the front. */
3586 this->next = rego->arches;
3587 rego->arches = this;
3592 /* It's a new architecture. */
3594 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
3595 "New architecture 0x%08lx (%s) selected\n",
3597 new_gdbarch->bfd_arch_info->printable_name);
3599 /* Insert the new architecture into the front of the architecture
3600 list (keep the list sorted Most Recently Used). */
3602 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
3603 this->next = rego->arches;
3604 this->gdbarch = new_gdbarch;
3605 rego->arches = this;
3608 /* Check that the newly installed architecture is valid. Plug in
3609 any post init values. */
3610 new_gdbarch->dump_tdep = rego->dump_tdep;
3611 verify_gdbarch (new_gdbarch);
3612 new_gdbarch->initialized_p = 1;
3615 gdbarch_dump (new_gdbarch, gdb_stdlog);
3621 gdbarch_find_by_info (struct gdbarch_info info)
3623 struct gdbarch *new_gdbarch;
3625 /* Save the previously selected architecture, setting the global to
3626 NULL. This stops things like gdbarch->init() trying to use the
3627 previous architecture's configuration. The previous architecture
3628 may not even be of the same architecture family. The most recent
3629 architecture of the same family is found at the head of the
3630 rego->arches list. */
3631 struct gdbarch *old_gdbarch = current_gdbarch;
3632 current_gdbarch = NULL;
3634 /* Find the specified architecture. */
3635 new_gdbarch = find_arch_by_info (info);
3637 /* Restore the existing architecture. */
3638 gdb_assert (current_gdbarch == NULL);
3639 current_gdbarch = old_gdbarch;
3644 /* Make the specified architecture current. */
3647 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
3649 gdb_assert (new_gdbarch != NULL);
3650 gdb_assert (current_gdbarch != NULL);
3651 gdb_assert (new_gdbarch->initialized_p);
3652 current_gdbarch = new_gdbarch;
3653 observer_notify_architecture_changed (new_gdbarch);
3654 reinit_frame_cache ();
3657 extern void _initialize_gdbarch (void);
3660 _initialize_gdbarch (void)
3662 struct cmd_list_element *c;
3664 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
3665 Set architecture debugging."), _("\
3666 Show architecture debugging."), _("\
3667 When non-zero, architecture debugging is enabled."),
3670 &setdebuglist, &showdebuglist);