1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 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 2 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, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA. */
25 /* This file was created with the aid of ``gdbarch.sh''.
27 The Bourne shell script ``gdbarch.sh'' creates the files
28 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29 against the existing ``gdbarch.[hc]''. Any differences found
32 If editing this file, please also run gdbarch.sh and merge any
33 changes into that script. Conversely, when making sweeping changes
34 to this file, modifying gdbarch.sh and using its output may prove
39 #include "arch-utils.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
45 #include "floatformat.h"
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
52 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch *);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 int gdbarch_debug = GDBARCH_DEBUG;
65 show_gdbarch_debug (struct ui_file *file, int from_tty,
66 struct cmd_list_element *c, const char *value)
68 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value);
72 pformat (const struct floatformat **format)
77 /* Just print out one of them - this is only for diagnostics. */
78 return format[0]->name;
82 /* Maintain the struct gdbarch object */
86 /* Has this architecture been fully initialized? */
89 /* An obstack bound to the lifetime of the architecture. */
90 struct obstack *obstack;
92 /* basic architectural information */
93 const struct bfd_arch_info * bfd_arch_info;
96 const struct target_desc * target_desc;
98 /* target specific vector. */
99 struct gdbarch_tdep *tdep;
100 gdbarch_dump_tdep_ftype *dump_tdep;
102 /* per-architecture data-pointers */
106 /* per-architecture swap-regions */
107 struct gdbarch_swap *swap;
109 /* Multi-arch values.
111 When extending this structure you must:
115 Declare set/get functions and define the corresponding
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
121 verify_gdbarch(): Confirm that the target updated the field
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
140 const struct floatformat ** float_format;
142 const struct floatformat ** double_format;
144 const struct floatformat ** long_double_format;
149 gdbarch_read_pc_ftype *read_pc;
150 gdbarch_write_pc_ftype *write_pc;
151 gdbarch_read_sp_ftype *read_sp;
152 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
153 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
154 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
161 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
162 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
163 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
164 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
165 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
166 gdbarch_register_name_ftype *register_name;
167 gdbarch_register_type_ftype *register_type;
168 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
169 int deprecated_fp_regnum;
170 gdbarch_push_dummy_call_ftype *push_dummy_call;
171 int deprecated_register_size;
172 int call_dummy_location;
173 gdbarch_push_dummy_code_ftype *push_dummy_code;
174 gdbarch_print_registers_info_ftype *print_registers_info;
175 gdbarch_print_float_info_ftype *print_float_info;
176 gdbarch_print_vector_info_ftype *print_vector_info;
177 gdbarch_register_sim_regno_ftype *register_sim_regno;
178 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
179 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
180 gdbarch_cannot_store_register_ftype *cannot_store_register;
181 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
182 int believe_pcc_promotion;
183 gdbarch_convert_register_p_ftype *convert_register_p;
184 gdbarch_register_to_value_ftype *register_to_value;
185 gdbarch_value_to_register_ftype *value_to_register;
186 gdbarch_value_from_register_ftype *value_from_register;
187 gdbarch_pointer_to_address_ftype *pointer_to_address;
188 gdbarch_address_to_pointer_ftype *address_to_pointer;
189 gdbarch_integer_to_address_ftype *integer_to_address;
190 gdbarch_return_value_ftype *return_value;
191 gdbarch_extract_return_value_ftype *extract_return_value;
192 gdbarch_store_return_value_ftype *store_return_value;
193 gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
194 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
195 gdbarch_skip_prologue_ftype *skip_prologue;
196 gdbarch_inner_than_ftype *inner_than;
197 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
198 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
199 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
200 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
201 CORE_ADDR decr_pc_after_break;
202 CORE_ADDR deprecated_function_start_offset;
203 gdbarch_remote_register_number_ftype *remote_register_number;
204 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address;
205 CORE_ADDR frame_args_skip;
206 gdbarch_unwind_pc_ftype *unwind_pc;
207 gdbarch_unwind_sp_ftype *unwind_sp;
208 gdbarch_frame_num_args_ftype *frame_num_args;
209 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
210 gdbarch_frame_align_ftype *frame_align;
211 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
212 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
213 int frame_red_zone_size;
214 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
215 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
216 gdbarch_smash_text_address_ftype *smash_text_address;
217 gdbarch_software_single_step_ftype *software_single_step;
218 gdbarch_single_step_through_delay_ftype *single_step_through_delay;
219 gdbarch_print_insn_ftype *print_insn;
220 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
221 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
222 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
223 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
224 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
225 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
226 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
227 const char * name_of_malloc;
228 int cannot_step_breakpoint;
229 int have_nonsteppable_watchpoint;
230 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
231 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
232 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
233 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
234 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
235 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
236 int vtable_function_descriptors;
238 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
239 gdbarch_overlay_update_ftype *overlay_update;
243 /* The default architecture uses host values (for want of a better
246 extern const struct bfd_arch_info bfd_default_arch_struct;
248 struct gdbarch startup_gdbarch =
250 1, /* Always initialized. */
251 NULL, /* The obstack. */
252 /* basic architecture information */
253 &bfd_default_arch_struct, /* bfd_arch_info */
254 BFD_ENDIAN_BIG, /* byte_order */
255 GDB_OSABI_UNKNOWN, /* osabi */
257 /* target specific vector and its dump routine */
259 /*per-architecture data-pointers and swap regions */
261 /* Multi-arch values */
262 8 * sizeof (short), /* short_bit */
263 8 * sizeof (int), /* int_bit */
264 8 * sizeof (long), /* long_bit */
265 8 * sizeof (LONGEST), /* long_long_bit */
266 8 * sizeof (float), /* float_bit */
267 0, /* float_format */
268 8 * sizeof (double), /* double_bit */
269 0, /* double_format */
270 8 * sizeof (long double), /* long_double_bit */
271 0, /* long_double_format */
272 8 * sizeof (void*), /* ptr_bit */
273 8 * sizeof (void*), /* addr_bit */
274 8 * sizeof (void*), /* bfd_vma_bit */
279 0, /* virtual_frame_pointer */
280 0, /* pseudo_register_read */
281 0, /* pseudo_register_write */
283 0, /* num_pseudo_regs */
288 0, /* stab_reg_to_regnum */
289 0, /* ecoff_reg_to_regnum */
290 0, /* dwarf_reg_to_regnum */
291 0, /* sdb_reg_to_regnum */
292 0, /* dwarf2_reg_to_regnum */
293 0, /* register_name */
294 0, /* register_type */
295 0, /* unwind_dummy_id */
296 -1, /* deprecated_fp_regnum */
297 0, /* push_dummy_call */
298 0, /* deprecated_register_size */
299 0, /* call_dummy_location */
300 0, /* push_dummy_code */
301 default_print_registers_info, /* print_registers_info */
302 0, /* print_float_info */
303 0, /* print_vector_info */
304 0, /* register_sim_regno */
305 0, /* register_bytes_ok */
306 0, /* cannot_fetch_register */
307 0, /* cannot_store_register */
308 0, /* get_longjmp_target */
309 0, /* believe_pcc_promotion */
310 0, /* convert_register_p */
311 0, /* register_to_value */
312 0, /* value_to_register */
313 0, /* value_from_register */
314 0, /* pointer_to_address */
315 0, /* address_to_pointer */
316 0, /* integer_to_address */
317 0, /* return_value */
318 0, /* extract_return_value */
319 0, /* store_return_value */
320 0, /* deprecated_use_struct_convention */
321 0, /* deprecated_extract_struct_value_address */
322 0, /* skip_prologue */
324 0, /* breakpoint_from_pc */
325 0, /* adjust_breakpoint_address */
326 0, /* memory_insert_breakpoint */
327 0, /* memory_remove_breakpoint */
328 0, /* decr_pc_after_break */
329 0, /* deprecated_function_start_offset */
330 default_remote_register_number, /* remote_register_number */
331 0, /* fetch_tls_load_module_address */
332 0, /* frame_args_skip */
335 0, /* frame_num_args */
336 0, /* deprecated_stack_align */
338 0, /* deprecated_reg_struct_has_addr */
339 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
340 0, /* frame_red_zone_size */
341 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
342 0, /* addr_bits_remove */
343 0, /* smash_text_address */
344 0, /* software_single_step */
345 0, /* single_step_through_delay */
347 0, /* skip_trampoline_code */
348 generic_skip_solib_resolver, /* skip_solib_resolver */
349 0, /* in_solib_return_trampoline */
350 generic_in_function_epilogue_p, /* in_function_epilogue_p */
351 construct_inferior_arguments, /* construct_inferior_arguments */
352 0, /* elf_make_msymbol_special */
353 0, /* coff_make_msymbol_special */
354 "malloc", /* name_of_malloc */
355 0, /* cannot_step_breakpoint */
356 0, /* have_nonsteppable_watchpoint */
357 0, /* address_class_type_flags */
358 0, /* address_class_type_flags_to_name */
359 0, /* address_class_name_to_type_flags */
360 default_register_reggroup_p, /* register_reggroup_p */
361 0, /* fetch_pointer_argument */
362 0, /* regset_from_core_section */
363 0, /* vtable_function_descriptors */
364 0, /* vbit_in_delta */
365 0, /* skip_permanent_breakpoint */
366 0, /* overlay_update */
367 /* startup_gdbarch() */
370 struct gdbarch *current_gdbarch = &startup_gdbarch;
372 /* Create a new ``struct gdbarch'' based on information provided by
373 ``struct gdbarch_info''. */
376 gdbarch_alloc (const struct gdbarch_info *info,
377 struct gdbarch_tdep *tdep)
379 /* NOTE: The new architecture variable is named ``current_gdbarch''
380 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
381 the current local architecture and not the previous global
382 architecture. This ensures that the new architectures initial
383 values are not influenced by the previous architecture. Once
384 everything is parameterised with gdbarch, this will go away. */
385 struct gdbarch *current_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 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
392 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
393 current_gdbarch->obstack = obstack;
395 alloc_gdbarch_data (current_gdbarch);
397 current_gdbarch->tdep = tdep;
399 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
400 current_gdbarch->byte_order = info->byte_order;
401 current_gdbarch->osabi = info->osabi;
402 current_gdbarch->target_desc = info->target_desc;
404 /* Force the explicit initialization of these. */
405 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
406 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
407 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
408 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
409 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
410 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
411 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
412 current_gdbarch->ptr_bit = TARGET_INT_BIT;
413 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
414 current_gdbarch->char_signed = -1;
415 current_gdbarch->write_pc = generic_target_write_pc;
416 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
417 current_gdbarch->num_regs = -1;
418 current_gdbarch->sp_regnum = -1;
419 current_gdbarch->pc_regnum = -1;
420 current_gdbarch->ps_regnum = -1;
421 current_gdbarch->fp0_regnum = -1;
422 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
423 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
424 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
425 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
426 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
427 current_gdbarch->deprecated_fp_regnum = -1;
428 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
429 current_gdbarch->print_registers_info = default_print_registers_info;
430 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
431 current_gdbarch->cannot_fetch_register = cannot_register_not;
432 current_gdbarch->cannot_store_register = cannot_register_not;
433 current_gdbarch->convert_register_p = generic_convert_register_p;
434 current_gdbarch->value_from_register = default_value_from_register;
435 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
436 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
437 current_gdbarch->return_value = legacy_return_value;
438 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
439 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
440 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
441 current_gdbarch->remote_register_number = default_remote_register_number;
442 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
443 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
444 current_gdbarch->addr_bits_remove = core_addr_identity;
445 current_gdbarch->smash_text_address = core_addr_identity;
446 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
447 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
448 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
449 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
450 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
451 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
452 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
453 current_gdbarch->name_of_malloc = "malloc";
454 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
455 /* gdbarch_alloc() */
457 return current_gdbarch;
461 /* Allocate extra space using the per-architecture obstack. */
464 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
466 void *data = obstack_alloc (arch->obstack, size);
467 memset (data, 0, size);
472 /* Free a gdbarch struct. This should never happen in normal
473 operation --- once you've created a gdbarch, you keep it around.
474 However, if an architecture's init function encounters an error
475 building the structure, it may need to clean up a partially
476 constructed gdbarch. */
479 gdbarch_free (struct gdbarch *arch)
481 struct obstack *obstack;
482 gdb_assert (arch != NULL);
483 gdb_assert (!arch->initialized_p);
484 obstack = arch->obstack;
485 obstack_free (obstack, 0); /* Includes the ARCH. */
490 /* Ensure that all values in a GDBARCH are reasonable. */
492 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
493 just happens to match the global variable ``current_gdbarch''. That
494 way macros refering to that variable get the local and not the global
495 version - ulgh. Once everything is parameterised with gdbarch, this
499 verify_gdbarch (struct gdbarch *current_gdbarch)
502 struct cleanup *cleanups;
505 log = mem_fileopen ();
506 cleanups = make_cleanup_ui_file_delete (log);
508 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
509 fprintf_unfiltered (log, "\n\tbyte-order");
510 if (current_gdbarch->bfd_arch_info == NULL)
511 fprintf_unfiltered (log, "\n\tbfd_arch_info");
512 /* Check those that need to be defined for the given multi-arch level. */
513 /* Skip verify of short_bit, invalid_p == 0 */
514 /* Skip verify of int_bit, invalid_p == 0 */
515 /* Skip verify of long_bit, invalid_p == 0 */
516 /* Skip verify of long_long_bit, invalid_p == 0 */
517 /* Skip verify of float_bit, invalid_p == 0 */
518 if (current_gdbarch->float_format == 0)
519 current_gdbarch->float_format = floatformats_ieee_single;
520 /* Skip verify of double_bit, invalid_p == 0 */
521 if (current_gdbarch->double_format == 0)
522 current_gdbarch->double_format = floatformats_ieee_double;
523 /* Skip verify of long_double_bit, invalid_p == 0 */
524 if (current_gdbarch->long_double_format == 0)
525 current_gdbarch->long_double_format = floatformats_ieee_double;
526 /* Skip verify of ptr_bit, invalid_p == 0 */
527 if (current_gdbarch->addr_bit == 0)
528 current_gdbarch->addr_bit = TARGET_PTR_BIT;
529 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
530 if (current_gdbarch->char_signed == -1)
531 current_gdbarch->char_signed = 1;
532 /* Skip verify of read_pc, has predicate */
533 /* Skip verify of write_pc, invalid_p == 0 */
534 /* Skip verify of read_sp, has predicate */
535 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
536 /* Skip verify of pseudo_register_read, has predicate */
537 /* Skip verify of pseudo_register_write, has predicate */
538 if (current_gdbarch->num_regs == -1)
539 fprintf_unfiltered (log, "\n\tnum_regs");
540 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
541 /* Skip verify of sp_regnum, invalid_p == 0 */
542 /* Skip verify of pc_regnum, invalid_p == 0 */
543 /* Skip verify of ps_regnum, invalid_p == 0 */
544 /* Skip verify of fp0_regnum, invalid_p == 0 */
545 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
546 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
547 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
548 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
549 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
550 /* Skip verify of register_type, has predicate */
551 /* Skip verify of unwind_dummy_id, has predicate */
552 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
553 /* Skip verify of push_dummy_call, has predicate */
554 /* Skip verify of call_dummy_location, invalid_p == 0 */
555 /* Skip verify of push_dummy_code, has predicate */
556 /* Skip verify of print_registers_info, invalid_p == 0 */
557 /* Skip verify of print_float_info, has predicate */
558 /* Skip verify of print_vector_info, has predicate */
559 /* Skip verify of register_sim_regno, invalid_p == 0 */
560 /* Skip verify of register_bytes_ok, has predicate */
561 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
562 /* Skip verify of cannot_store_register, invalid_p == 0 */
563 /* Skip verify of get_longjmp_target, has predicate */
564 /* Skip verify of convert_register_p, invalid_p == 0 */
565 /* Skip verify of value_from_register, invalid_p == 0 */
566 /* Skip verify of pointer_to_address, invalid_p == 0 */
567 /* Skip verify of address_to_pointer, invalid_p == 0 */
568 /* Skip verify of integer_to_address, has predicate */
569 /* Skip verify of return_value, has predicate */
570 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
571 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
572 if (current_gdbarch->skip_prologue == 0)
573 fprintf_unfiltered (log, "\n\tskip_prologue");
574 if (current_gdbarch->inner_than == 0)
575 fprintf_unfiltered (log, "\n\tinner_than");
576 if (current_gdbarch->breakpoint_from_pc == 0)
577 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
578 /* Skip verify of adjust_breakpoint_address, has predicate */
579 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
580 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
581 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
582 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
583 /* Skip verify of remote_register_number, invalid_p == 0 */
584 /* Skip verify of fetch_tls_load_module_address, has predicate */
585 /* Skip verify of frame_args_skip, invalid_p == 0 */
586 /* Skip verify of unwind_pc, has predicate */
587 /* Skip verify of unwind_sp, has predicate */
588 /* Skip verify of frame_num_args, has predicate */
589 /* Skip verify of deprecated_stack_align, has predicate */
590 /* Skip verify of frame_align, has predicate */
591 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
592 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
593 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
594 /* Skip verify of addr_bits_remove, invalid_p == 0 */
595 /* Skip verify of smash_text_address, invalid_p == 0 */
596 /* Skip verify of software_single_step, has predicate */
597 /* Skip verify of single_step_through_delay, has predicate */
598 if (current_gdbarch->print_insn == 0)
599 fprintf_unfiltered (log, "\n\tprint_insn");
600 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
601 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
602 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
603 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
604 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
605 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
606 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
607 /* Skip verify of name_of_malloc, invalid_p == 0 */
608 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
609 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
610 /* Skip verify of address_class_type_flags, has predicate */
611 /* Skip verify of address_class_type_flags_to_name, has predicate */
612 /* Skip verify of address_class_name_to_type_flags, has predicate */
613 /* Skip verify of register_reggroup_p, invalid_p == 0 */
614 /* Skip verify of fetch_pointer_argument, has predicate */
615 /* Skip verify of regset_from_core_section, has predicate */
616 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
617 /* Skip verify of vbit_in_delta, invalid_p == 0 */
618 /* Skip verify of skip_permanent_breakpoint, has predicate */
619 /* Skip verify of overlay_update, has predicate */
620 buf = ui_file_xstrdup (log, &dummy);
621 make_cleanup (xfree, buf);
622 if (strlen (buf) > 0)
623 internal_error (__FILE__, __LINE__,
624 _("verify_gdbarch: the following are invalid ...%s"),
626 do_cleanups (cleanups);
630 /* Print out the details of the current architecture. */
632 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
633 just happens to match the global variable ``current_gdbarch''. That
634 way macros refering to that variable get the local and not the global
635 version - ulgh. Once everything is parameterised with gdbarch, this
639 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
641 const char *gdb_xm_file = "<not-defined>";
642 const char *gdb_nm_file = "<not-defined>";
643 const char *gdb_tm_file = "<not-defined>";
644 #if defined (GDB_XM_FILE)
645 gdb_xm_file = GDB_XM_FILE;
647 fprintf_unfiltered (file,
648 "gdbarch_dump: GDB_XM_FILE = %s\n",
650 #if defined (GDB_NM_FILE)
651 gdb_nm_file = GDB_NM_FILE;
653 fprintf_unfiltered (file,
654 "gdbarch_dump: GDB_NM_FILE = %s\n",
656 #if defined (GDB_TM_FILE)
657 gdb_tm_file = GDB_TM_FILE;
659 fprintf_unfiltered (file,
660 "gdbarch_dump: GDB_TM_FILE = %s\n",
662 #ifdef TARGET_ADDR_BIT
663 fprintf_unfiltered (file,
664 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
665 XSTRING (TARGET_ADDR_BIT));
667 fprintf_unfiltered (file,
668 "gdbarch_dump: addr_bit = %s\n",
669 paddr_d (current_gdbarch->addr_bit));
670 #ifdef ADDR_BITS_REMOVE
671 fprintf_unfiltered (file,
672 "gdbarch_dump: %s # %s\n",
673 "ADDR_BITS_REMOVE(addr)",
674 XSTRING (ADDR_BITS_REMOVE (addr)));
676 fprintf_unfiltered (file,
677 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
678 (long) current_gdbarch->addr_bits_remove);
679 fprintf_unfiltered (file,
680 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
681 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
682 fprintf_unfiltered (file,
683 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
684 (long) current_gdbarch->address_class_name_to_type_flags);
685 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
686 fprintf_unfiltered (file,
687 "gdbarch_dump: %s # %s\n",
688 "ADDRESS_CLASS_TYPE_FLAGS_P()",
689 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
691 fprintf_unfiltered (file,
692 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
693 gdbarch_address_class_type_flags_p (current_gdbarch));
694 #ifdef ADDRESS_CLASS_TYPE_FLAGS
695 fprintf_unfiltered (file,
696 "gdbarch_dump: %s # %s\n",
697 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
698 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
700 fprintf_unfiltered (file,
701 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
702 (long) current_gdbarch->address_class_type_flags);
703 fprintf_unfiltered (file,
704 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
705 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
706 fprintf_unfiltered (file,
707 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
708 (long) current_gdbarch->address_class_type_flags_to_name);
709 #ifdef ADDRESS_TO_POINTER
710 fprintf_unfiltered (file,
711 "gdbarch_dump: %s # %s\n",
712 "ADDRESS_TO_POINTER(type, buf, addr)",
713 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
715 fprintf_unfiltered (file,
716 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
717 (long) current_gdbarch->address_to_pointer);
718 fprintf_unfiltered (file,
719 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
720 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
721 fprintf_unfiltered (file,
722 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
723 (long) current_gdbarch->adjust_breakpoint_address);
724 #ifdef BELIEVE_PCC_PROMOTION
725 fprintf_unfiltered (file,
726 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
727 XSTRING (BELIEVE_PCC_PROMOTION));
729 fprintf_unfiltered (file,
730 "gdbarch_dump: believe_pcc_promotion = %s\n",
731 paddr_d (current_gdbarch->believe_pcc_promotion));
732 #ifdef TARGET_ARCHITECTURE
733 fprintf_unfiltered (file,
734 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
735 XSTRING (TARGET_ARCHITECTURE));
737 fprintf_unfiltered (file,
738 "gdbarch_dump: bfd_arch_info = %s\n",
739 TARGET_ARCHITECTURE->printable_name);
740 #ifdef TARGET_BFD_VMA_BIT
741 fprintf_unfiltered (file,
742 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
743 XSTRING (TARGET_BFD_VMA_BIT));
745 fprintf_unfiltered (file,
746 "gdbarch_dump: bfd_vma_bit = %s\n",
747 paddr_d (current_gdbarch->bfd_vma_bit));
748 #ifdef BREAKPOINT_FROM_PC
749 fprintf_unfiltered (file,
750 "gdbarch_dump: %s # %s\n",
751 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
752 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
754 fprintf_unfiltered (file,
755 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
756 (long) current_gdbarch->breakpoint_from_pc);
757 #ifdef TARGET_BYTE_ORDER
758 fprintf_unfiltered (file,
759 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
760 XSTRING (TARGET_BYTE_ORDER));
762 fprintf_unfiltered (file,
763 "gdbarch_dump: byte_order = %s\n",
764 paddr_d (current_gdbarch->byte_order));
765 #ifdef CALL_DUMMY_LOCATION
766 fprintf_unfiltered (file,
767 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
768 XSTRING (CALL_DUMMY_LOCATION));
770 fprintf_unfiltered (file,
771 "gdbarch_dump: call_dummy_location = %s\n",
772 paddr_d (current_gdbarch->call_dummy_location));
773 #ifdef CANNOT_FETCH_REGISTER
774 fprintf_unfiltered (file,
775 "gdbarch_dump: %s # %s\n",
776 "CANNOT_FETCH_REGISTER(regnum)",
777 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
779 fprintf_unfiltered (file,
780 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
781 (long) current_gdbarch->cannot_fetch_register);
782 #ifdef CANNOT_STEP_BREAKPOINT
783 fprintf_unfiltered (file,
784 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
785 XSTRING (CANNOT_STEP_BREAKPOINT));
787 fprintf_unfiltered (file,
788 "gdbarch_dump: cannot_step_breakpoint = %s\n",
789 paddr_d (current_gdbarch->cannot_step_breakpoint));
790 #ifdef CANNOT_STORE_REGISTER
791 fprintf_unfiltered (file,
792 "gdbarch_dump: %s # %s\n",
793 "CANNOT_STORE_REGISTER(regnum)",
794 XSTRING (CANNOT_STORE_REGISTER (regnum)));
796 fprintf_unfiltered (file,
797 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
798 (long) current_gdbarch->cannot_store_register);
799 #ifdef TARGET_CHAR_SIGNED
800 fprintf_unfiltered (file,
801 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
802 XSTRING (TARGET_CHAR_SIGNED));
804 fprintf_unfiltered (file,
805 "gdbarch_dump: char_signed = %s\n",
806 paddr_d (current_gdbarch->char_signed));
807 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
808 fprintf_unfiltered (file,
809 "gdbarch_dump: %s # %s\n",
810 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
811 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
813 fprintf_unfiltered (file,
814 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
815 (long) current_gdbarch->coff_make_msymbol_special);
816 fprintf_unfiltered (file,
817 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
818 (long) current_gdbarch->construct_inferior_arguments);
819 fprintf_unfiltered (file,
820 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
821 (long) current_gdbarch->convert_from_func_ptr_addr);
822 #ifdef CONVERT_REGISTER_P
823 fprintf_unfiltered (file,
824 "gdbarch_dump: %s # %s\n",
825 "CONVERT_REGISTER_P(regnum, type)",
826 XSTRING (CONVERT_REGISTER_P (regnum, type)));
828 fprintf_unfiltered (file,
829 "gdbarch_dump: convert_register_p = <0x%lx>\n",
830 (long) current_gdbarch->convert_register_p);
831 #ifdef DECR_PC_AFTER_BREAK
832 fprintf_unfiltered (file,
833 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
834 XSTRING (DECR_PC_AFTER_BREAK));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
838 paddr_nz (current_gdbarch->decr_pc_after_break));
839 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
840 fprintf_unfiltered (file,
841 "gdbarch_dump: %s # %s\n",
842 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
843 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
847 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch));
848 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
849 fprintf_unfiltered (file,
850 "gdbarch_dump: %s # %s\n",
851 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
852 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
856 (long) current_gdbarch->deprecated_extract_struct_value_address);
857 #ifdef DEPRECATED_FP_REGNUM
858 fprintf_unfiltered (file,
859 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
860 XSTRING (DEPRECATED_FP_REGNUM));
862 fprintf_unfiltered (file,
863 "gdbarch_dump: deprecated_fp_regnum = %s\n",
864 paddr_d (current_gdbarch->deprecated_fp_regnum));
865 #ifdef DEPRECATED_FUNCTION_START_OFFSET
866 fprintf_unfiltered (file,
867 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
868 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
870 fprintf_unfiltered (file,
871 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
872 paddr_nz (current_gdbarch->deprecated_function_start_offset));
873 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
874 fprintf_unfiltered (file,
875 "gdbarch_dump: %s # %s\n",
876 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
877 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
879 fprintf_unfiltered (file,
880 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
881 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
882 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
883 fprintf_unfiltered (file,
884 "gdbarch_dump: %s # %s\n",
885 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
886 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
888 fprintf_unfiltered (file,
889 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
890 (long) current_gdbarch->deprecated_reg_struct_has_addr);
891 #ifdef DEPRECATED_REGISTER_SIZE
892 fprintf_unfiltered (file,
893 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
894 XSTRING (DEPRECATED_REGISTER_SIZE));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: deprecated_register_size = %s\n",
898 paddr_d (current_gdbarch->deprecated_register_size));
899 #ifdef DEPRECATED_STACK_ALIGN_P
900 fprintf_unfiltered (file,
901 "gdbarch_dump: %s # %s\n",
902 "DEPRECATED_STACK_ALIGN_P()",
903 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
907 gdbarch_deprecated_stack_align_p (current_gdbarch));
908 #ifdef DEPRECATED_STACK_ALIGN
909 fprintf_unfiltered (file,
910 "gdbarch_dump: %s # %s\n",
911 "DEPRECATED_STACK_ALIGN(sp)",
912 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
914 fprintf_unfiltered (file,
915 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
916 (long) current_gdbarch->deprecated_stack_align);
917 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
918 fprintf_unfiltered (file,
919 "gdbarch_dump: %s # %s\n",
920 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
921 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
925 (long) current_gdbarch->deprecated_use_struct_convention);
926 #ifdef TARGET_DOUBLE_BIT
927 fprintf_unfiltered (file,
928 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
929 XSTRING (TARGET_DOUBLE_BIT));
931 fprintf_unfiltered (file,
932 "gdbarch_dump: double_bit = %s\n",
933 paddr_d (current_gdbarch->double_bit));
934 #ifdef TARGET_DOUBLE_FORMAT
935 fprintf_unfiltered (file,
936 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
937 XSTRING (TARGET_DOUBLE_FORMAT));
939 fprintf_unfiltered (file,
940 "gdbarch_dump: double_format = %s\n",
941 pformat (current_gdbarch->double_format));
942 #ifdef DWARF2_REG_TO_REGNUM
943 fprintf_unfiltered (file,
944 "gdbarch_dump: %s # %s\n",
945 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
946 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
950 (long) current_gdbarch->dwarf2_reg_to_regnum);
951 #ifdef DWARF_REG_TO_REGNUM
952 fprintf_unfiltered (file,
953 "gdbarch_dump: %s # %s\n",
954 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
955 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
957 fprintf_unfiltered (file,
958 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
959 (long) current_gdbarch->dwarf_reg_to_regnum);
960 #ifdef ECOFF_REG_TO_REGNUM
961 fprintf_unfiltered (file,
962 "gdbarch_dump: %s # %s\n",
963 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
964 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
966 fprintf_unfiltered (file,
967 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
968 (long) current_gdbarch->ecoff_reg_to_regnum);
969 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
970 fprintf_unfiltered (file,
971 "gdbarch_dump: %s # %s\n",
972 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
973 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
975 fprintf_unfiltered (file,
976 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
977 (long) current_gdbarch->elf_make_msymbol_special);
978 #ifdef EXTRACT_RETURN_VALUE
979 fprintf_unfiltered (file,
980 "gdbarch_dump: %s # %s\n",
981 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
982 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
984 fprintf_unfiltered (file,
985 "gdbarch_dump: extract_return_value = <0x%lx>\n",
986 (long) current_gdbarch->extract_return_value);
987 #ifdef FETCH_POINTER_ARGUMENT_P
988 fprintf_unfiltered (file,
989 "gdbarch_dump: %s # %s\n",
990 "FETCH_POINTER_ARGUMENT_P()",
991 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
993 fprintf_unfiltered (file,
994 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
995 gdbarch_fetch_pointer_argument_p (current_gdbarch));
996 #ifdef FETCH_POINTER_ARGUMENT
997 fprintf_unfiltered (file,
998 "gdbarch_dump: %s # %s\n",
999 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1000 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1004 (long) current_gdbarch->fetch_pointer_argument);
1005 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS_P
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: %s # %s\n",
1008 "FETCH_TLS_LOAD_MODULE_ADDRESS_P()",
1009 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS_P ()));
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
1013 gdbarch_fetch_tls_load_module_address_p (current_gdbarch));
1014 #ifdef FETCH_TLS_LOAD_MODULE_ADDRESS
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: %s # %s\n",
1017 "FETCH_TLS_LOAD_MODULE_ADDRESS(objfile)",
1018 XSTRING (FETCH_TLS_LOAD_MODULE_ADDRESS (objfile)));
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: fetch_tls_load_module_address = <0x%lx>\n",
1022 (long) current_gdbarch->fetch_tls_load_module_address);
1023 #ifdef TARGET_FLOAT_BIT
1024 fprintf_unfiltered (file,
1025 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1026 XSTRING (TARGET_FLOAT_BIT));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: float_bit = %s\n",
1030 paddr_d (current_gdbarch->float_bit));
1031 #ifdef TARGET_FLOAT_FORMAT
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1034 XSTRING (TARGET_FLOAT_FORMAT));
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: float_format = %s\n",
1038 pformat (current_gdbarch->float_format));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: FP0_REGNUM # %s\n",
1042 XSTRING (FP0_REGNUM));
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: fp0_regnum = %s\n",
1046 paddr_d (current_gdbarch->fp0_regnum));
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1049 gdbarch_frame_align_p (current_gdbarch));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: frame_align = <0x%lx>\n",
1052 (long) current_gdbarch->frame_align);
1053 #ifdef FRAME_ARGS_SKIP
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1056 XSTRING (FRAME_ARGS_SKIP));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: frame_args_skip = 0x%s\n",
1060 paddr_nz (current_gdbarch->frame_args_skip));
1061 #ifdef FRAME_NUM_ARGS_P
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: %s # %s\n",
1064 "FRAME_NUM_ARGS_P()",
1065 XSTRING (FRAME_NUM_ARGS_P ()));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1069 gdbarch_frame_num_args_p (current_gdbarch));
1070 #ifdef FRAME_NUM_ARGS
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: %s # %s\n",
1073 "FRAME_NUM_ARGS(frame)",
1074 XSTRING (FRAME_NUM_ARGS (frame)));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1078 (long) current_gdbarch->frame_num_args);
1079 #ifdef FRAME_RED_ZONE_SIZE
1080 fprintf_unfiltered (file,
1081 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1082 XSTRING (FRAME_RED_ZONE_SIZE));
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: frame_red_zone_size = %s\n",
1086 paddr_d (current_gdbarch->frame_red_zone_size));
1087 #ifdef GET_LONGJMP_TARGET_P
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: %s # %s\n",
1090 "GET_LONGJMP_TARGET_P()",
1091 XSTRING (GET_LONGJMP_TARGET_P ()));
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1095 gdbarch_get_longjmp_target_p (current_gdbarch));
1096 #ifdef GET_LONGJMP_TARGET
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: %s # %s\n",
1099 "GET_LONGJMP_TARGET(pc)",
1100 XSTRING (GET_LONGJMP_TARGET (pc)));
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1104 (long) current_gdbarch->get_longjmp_target);
1105 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1108 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1112 paddr_d (current_gdbarch->have_nonsteppable_watchpoint));
1113 fprintf_unfiltered (file,
1114 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1115 (long) current_gdbarch->in_function_epilogue_p);
1116 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: %s # %s\n",
1119 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1120 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1124 (long) current_gdbarch->in_solib_return_trampoline);
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: %s # %s\n",
1128 "INNER_THAN(lhs, rhs)",
1129 XSTRING (INNER_THAN (lhs, rhs)));
1131 fprintf_unfiltered (file,
1132 "gdbarch_dump: inner_than = <0x%lx>\n",
1133 (long) current_gdbarch->inner_than);
1134 #ifdef TARGET_INT_BIT
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1137 XSTRING (TARGET_INT_BIT));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: int_bit = %s\n",
1141 paddr_d (current_gdbarch->int_bit));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1144 gdbarch_integer_to_address_p (current_gdbarch));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1147 (long) current_gdbarch->integer_to_address);
1148 #ifdef TARGET_LONG_BIT
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1151 XSTRING (TARGET_LONG_BIT));
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: long_bit = %s\n",
1155 paddr_d (current_gdbarch->long_bit));
1156 #ifdef TARGET_LONG_DOUBLE_BIT
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1159 XSTRING (TARGET_LONG_DOUBLE_BIT));
1161 fprintf_unfiltered (file,
1162 "gdbarch_dump: long_double_bit = %s\n",
1163 paddr_d (current_gdbarch->long_double_bit));
1164 #ifdef TARGET_LONG_DOUBLE_FORMAT
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1167 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: long_double_format = %s\n",
1171 pformat (current_gdbarch->long_double_format));
1172 #ifdef TARGET_LONG_LONG_BIT
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1175 XSTRING (TARGET_LONG_LONG_BIT));
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: long_long_bit = %s\n",
1179 paddr_d (current_gdbarch->long_long_bit));
1180 #ifdef MEMORY_INSERT_BREAKPOINT
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: %s # %s\n",
1183 "MEMORY_INSERT_BREAKPOINT(bp_tgt)",
1184 XSTRING (MEMORY_INSERT_BREAKPOINT (bp_tgt)));
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1188 (long) current_gdbarch->memory_insert_breakpoint);
1189 #ifdef MEMORY_REMOVE_BREAKPOINT
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: %s # %s\n",
1192 "MEMORY_REMOVE_BREAKPOINT(bp_tgt)",
1193 XSTRING (MEMORY_REMOVE_BREAKPOINT (bp_tgt)));
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1197 (long) current_gdbarch->memory_remove_breakpoint);
1198 #ifdef NAME_OF_MALLOC
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1201 XSTRING (NAME_OF_MALLOC));
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: name_of_malloc = %s\n",
1206 #ifdef NUM_PSEUDO_REGS
1207 fprintf_unfiltered (file,
1208 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1209 XSTRING (NUM_PSEUDO_REGS));
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: num_pseudo_regs = %s\n",
1213 paddr_d (current_gdbarch->num_pseudo_regs));
1215 fprintf_unfiltered (file,
1216 "gdbarch_dump: NUM_REGS # %s\n",
1217 XSTRING (NUM_REGS));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: num_regs = %s\n",
1221 paddr_d (current_gdbarch->num_regs));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: TARGET_OSABI # %s\n",
1225 XSTRING (TARGET_OSABI));
1227 fprintf_unfiltered (file,
1228 "gdbarch_dump: osabi = %s\n",
1229 paddr_d (current_gdbarch->osabi));
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
1232 gdbarch_overlay_update_p (current_gdbarch));
1233 fprintf_unfiltered (file,
1234 "gdbarch_dump: overlay_update = <0x%lx>\n",
1235 (long) current_gdbarch->overlay_update);
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: PC_REGNUM # %s\n",
1239 XSTRING (PC_REGNUM));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: pc_regnum = %s\n",
1243 paddr_d (current_gdbarch->pc_regnum));
1244 #ifdef POINTER_TO_ADDRESS
1245 fprintf_unfiltered (file,
1246 "gdbarch_dump: %s # %s\n",
1247 "POINTER_TO_ADDRESS(type, buf)",
1248 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1252 (long) current_gdbarch->pointer_to_address);
1253 fprintf_unfiltered (file,
1254 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1255 gdbarch_print_float_info_p (current_gdbarch));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: print_float_info = <0x%lx>\n",
1258 (long) current_gdbarch->print_float_info);
1259 #ifdef TARGET_PRINT_INSN
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: %s # %s\n",
1262 "TARGET_PRINT_INSN(vma, info)",
1263 XSTRING (TARGET_PRINT_INSN (vma, info)));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: print_insn = <0x%lx>\n",
1267 (long) current_gdbarch->print_insn);
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1270 (long) current_gdbarch->print_registers_info);
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1273 gdbarch_print_vector_info_p (current_gdbarch));
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1276 (long) current_gdbarch->print_vector_info);
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: PS_REGNUM # %s\n",
1280 XSTRING (PS_REGNUM));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: ps_regnum = %s\n",
1284 paddr_d (current_gdbarch->ps_regnum));
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1287 gdbarch_pseudo_register_read_p (current_gdbarch));
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1290 (long) current_gdbarch->pseudo_register_read);
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1293 gdbarch_pseudo_register_write_p (current_gdbarch));
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1296 (long) current_gdbarch->pseudo_register_write);
1297 #ifdef TARGET_PTR_BIT
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1300 XSTRING (TARGET_PTR_BIT));
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: ptr_bit = %s\n",
1304 paddr_d (current_gdbarch->ptr_bit));
1305 fprintf_unfiltered (file,
1306 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1307 gdbarch_push_dummy_call_p (current_gdbarch));
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1310 (long) current_gdbarch->push_dummy_call);
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1313 gdbarch_push_dummy_code_p (current_gdbarch));
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1316 (long) current_gdbarch->push_dummy_code);
1317 #ifdef TARGET_READ_PC_P
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: %s # %s\n",
1320 "TARGET_READ_PC_P()",
1321 XSTRING (TARGET_READ_PC_P ()));
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1325 gdbarch_read_pc_p (current_gdbarch));
1326 #ifdef TARGET_READ_PC
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: %s # %s\n",
1329 "TARGET_READ_PC(ptid)",
1330 XSTRING (TARGET_READ_PC (ptid)));
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: read_pc = <0x%lx>\n",
1334 (long) current_gdbarch->read_pc);
1335 #ifdef TARGET_READ_SP_P
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: %s # %s\n",
1338 "TARGET_READ_SP_P()",
1339 XSTRING (TARGET_READ_SP_P ()));
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1343 gdbarch_read_sp_p (current_gdbarch));
1344 #ifdef TARGET_READ_SP
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: %s # %s\n",
1348 XSTRING (TARGET_READ_SP ()));
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: read_sp = <0x%lx>\n",
1352 (long) current_gdbarch->read_sp);
1353 #ifdef REGISTER_BYTES_OK_P
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: %s # %s\n",
1356 "REGISTER_BYTES_OK_P()",
1357 XSTRING (REGISTER_BYTES_OK_P ()));
1359 fprintf_unfiltered (file,
1360 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1361 gdbarch_register_bytes_ok_p (current_gdbarch));
1362 #ifdef REGISTER_BYTES_OK
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: %s # %s\n",
1365 "REGISTER_BYTES_OK(nr_bytes)",
1366 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1370 (long) current_gdbarch->register_bytes_ok);
1371 #ifdef REGISTER_NAME
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: %s # %s\n",
1374 "REGISTER_NAME(regnr)",
1375 XSTRING (REGISTER_NAME (regnr)));
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: register_name = <0x%lx>\n",
1379 (long) current_gdbarch->register_name);
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1382 (long) current_gdbarch->register_reggroup_p);
1383 #ifdef REGISTER_SIM_REGNO
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: %s # %s\n",
1386 "REGISTER_SIM_REGNO(reg_nr)",
1387 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1391 (long) current_gdbarch->register_sim_regno);
1392 #ifdef REGISTER_TO_VALUE
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: %s # %s\n",
1395 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1396 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1398 fprintf_unfiltered (file,
1399 "gdbarch_dump: register_to_value = <0x%lx>\n",
1400 (long) current_gdbarch->register_to_value);
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1403 gdbarch_register_type_p (current_gdbarch));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: register_type = <0x%lx>\n",
1406 (long) current_gdbarch->register_type);
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1409 gdbarch_regset_from_core_section_p (current_gdbarch));
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1412 (long) current_gdbarch->regset_from_core_section);
1413 fprintf_unfiltered (file,
1414 "gdbarch_dump: remote_register_number = <0x%lx>\n",
1415 (long) current_gdbarch->remote_register_number);
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1418 gdbarch_return_value_p (current_gdbarch));
1419 fprintf_unfiltered (file,
1420 "gdbarch_dump: return_value = <0x%lx>\n",
1421 (long) current_gdbarch->return_value);
1422 #ifdef SDB_REG_TO_REGNUM
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: %s # %s\n",
1425 "SDB_REG_TO_REGNUM(sdb_regnr)",
1426 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1430 (long) current_gdbarch->sdb_reg_to_regnum);
1431 #ifdef TARGET_SHORT_BIT
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1434 XSTRING (TARGET_SHORT_BIT));
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: short_bit = %s\n",
1438 paddr_d (current_gdbarch->short_bit));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1441 gdbarch_single_step_through_delay_p (current_gdbarch));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: single_step_through_delay = <0x%lx>\n",
1444 (long) current_gdbarch->single_step_through_delay);
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1447 gdbarch_skip_permanent_breakpoint_p (current_gdbarch));
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: skip_permanent_breakpoint = <0x%lx>\n",
1450 (long) current_gdbarch->skip_permanent_breakpoint);
1451 #ifdef SKIP_PROLOGUE
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: %s # %s\n",
1454 "SKIP_PROLOGUE(ip)",
1455 XSTRING (SKIP_PROLOGUE (ip)));
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1459 (long) current_gdbarch->skip_prologue);
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1462 (long) current_gdbarch->skip_solib_resolver);
1463 #ifdef SKIP_TRAMPOLINE_CODE
1464 fprintf_unfiltered (file,
1465 "gdbarch_dump: %s # %s\n",
1466 "SKIP_TRAMPOLINE_CODE(pc)",
1467 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1469 fprintf_unfiltered (file,
1470 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1471 (long) current_gdbarch->skip_trampoline_code);
1472 #ifdef SMASH_TEXT_ADDRESS
1473 fprintf_unfiltered (file,
1474 "gdbarch_dump: %s # %s\n",
1475 "SMASH_TEXT_ADDRESS(addr)",
1476 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1478 fprintf_unfiltered (file,
1479 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1480 (long) current_gdbarch->smash_text_address);
1481 #ifdef SOFTWARE_SINGLE_STEP_P
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: %s # %s\n",
1484 "SOFTWARE_SINGLE_STEP_P()",
1485 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1489 gdbarch_software_single_step_p (current_gdbarch));
1490 #ifdef SOFTWARE_SINGLE_STEP
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: %s # %s\n",
1493 "SOFTWARE_SINGLE_STEP(regcache)",
1494 XSTRING (SOFTWARE_SINGLE_STEP (regcache)));
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: software_single_step = <0x%lx>\n",
1498 (long) current_gdbarch->software_single_step);
1500 fprintf_unfiltered (file,
1501 "gdbarch_dump: SP_REGNUM # %s\n",
1502 XSTRING (SP_REGNUM));
1504 fprintf_unfiltered (file,
1505 "gdbarch_dump: sp_regnum = %s\n",
1506 paddr_d (current_gdbarch->sp_regnum));
1507 #ifdef STAB_REG_TO_REGNUM
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: %s # %s\n",
1510 "STAB_REG_TO_REGNUM(stab_regnr)",
1511 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1515 (long) current_gdbarch->stab_reg_to_regnum);
1516 fprintf_unfiltered (file,
1517 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1518 (long) current_gdbarch->stabs_argument_has_addr);
1519 #ifdef STORE_RETURN_VALUE
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: %s # %s\n",
1522 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1523 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: store_return_value = <0x%lx>\n",
1527 (long) current_gdbarch->store_return_value);
1528 fprintf_unfiltered (file,
1529 "gdbarch_dump: target_desc = %s\n",
1530 paddr_d ((long) current_gdbarch->target_desc));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1533 gdbarch_unwind_dummy_id_p (current_gdbarch));
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1536 (long) current_gdbarch->unwind_dummy_id);
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1539 gdbarch_unwind_pc_p (current_gdbarch));
1540 fprintf_unfiltered (file,
1541 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1542 (long) current_gdbarch->unwind_pc);
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1545 gdbarch_unwind_sp_p (current_gdbarch));
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1548 (long) current_gdbarch->unwind_sp);
1549 fprintf_unfiltered (file,
1550 "gdbarch_dump: value_from_register = <0x%lx>\n",
1551 (long) current_gdbarch->value_from_register);
1552 #ifdef VALUE_TO_REGISTER
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: %s # %s\n",
1555 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1556 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
1558 fprintf_unfiltered (file,
1559 "gdbarch_dump: value_to_register = <0x%lx>\n",
1560 (long) current_gdbarch->value_to_register);
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: vbit_in_delta = %s\n",
1563 paddr_d (current_gdbarch->vbit_in_delta));
1564 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: %s # %s\n",
1567 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1568 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1572 (long) current_gdbarch->virtual_frame_pointer);
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: vtable_function_descriptors = %s\n",
1575 paddr_d (current_gdbarch->vtable_function_descriptors));
1576 #ifdef TARGET_WRITE_PC
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: %s # %s\n",
1579 "TARGET_WRITE_PC(val, ptid)",
1580 XSTRING (TARGET_WRITE_PC (val, ptid)));
1582 fprintf_unfiltered (file,
1583 "gdbarch_dump: write_pc = <0x%lx>\n",
1584 (long) current_gdbarch->write_pc);
1585 if (current_gdbarch->dump_tdep != NULL)
1586 current_gdbarch->dump_tdep (current_gdbarch, file);
1589 struct gdbarch_tdep *
1590 gdbarch_tdep (struct gdbarch *gdbarch)
1592 if (gdbarch_debug >= 2)
1593 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
1594 return gdbarch->tdep;
1598 const struct bfd_arch_info *
1599 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
1601 gdb_assert (gdbarch != NULL);
1602 if (gdbarch_debug >= 2)
1603 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
1604 return gdbarch->bfd_arch_info;
1608 gdbarch_byte_order (struct gdbarch *gdbarch)
1610 gdb_assert (gdbarch != NULL);
1611 if (gdbarch_debug >= 2)
1612 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
1613 return gdbarch->byte_order;
1617 gdbarch_osabi (struct gdbarch *gdbarch)
1619 gdb_assert (gdbarch != NULL);
1620 if (gdbarch_debug >= 2)
1621 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
1622 return gdbarch->osabi;
1625 const struct target_desc *
1626 gdbarch_target_desc (struct gdbarch *gdbarch)
1628 gdb_assert (gdbarch != NULL);
1629 if (gdbarch_debug >= 2)
1630 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n");
1631 return gdbarch->target_desc;
1635 gdbarch_short_bit (struct gdbarch *gdbarch)
1637 gdb_assert (gdbarch != NULL);
1638 /* Skip verify of short_bit, invalid_p == 0 */
1639 if (gdbarch_debug >= 2)
1640 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
1641 return gdbarch->short_bit;
1645 set_gdbarch_short_bit (struct gdbarch *gdbarch,
1648 gdbarch->short_bit = short_bit;
1652 gdbarch_int_bit (struct gdbarch *gdbarch)
1654 gdb_assert (gdbarch != NULL);
1655 /* Skip verify of int_bit, invalid_p == 0 */
1656 if (gdbarch_debug >= 2)
1657 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
1658 return gdbarch->int_bit;
1662 set_gdbarch_int_bit (struct gdbarch *gdbarch,
1665 gdbarch->int_bit = int_bit;
1669 gdbarch_long_bit (struct gdbarch *gdbarch)
1671 gdb_assert (gdbarch != NULL);
1672 /* Skip verify of long_bit, invalid_p == 0 */
1673 if (gdbarch_debug >= 2)
1674 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
1675 return gdbarch->long_bit;
1679 set_gdbarch_long_bit (struct gdbarch *gdbarch,
1682 gdbarch->long_bit = long_bit;
1686 gdbarch_long_long_bit (struct gdbarch *gdbarch)
1688 gdb_assert (gdbarch != NULL);
1689 /* Skip verify of long_long_bit, invalid_p == 0 */
1690 if (gdbarch_debug >= 2)
1691 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
1692 return gdbarch->long_long_bit;
1696 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
1699 gdbarch->long_long_bit = long_long_bit;
1703 gdbarch_float_bit (struct gdbarch *gdbarch)
1705 gdb_assert (gdbarch != NULL);
1706 /* Skip verify of float_bit, invalid_p == 0 */
1707 if (gdbarch_debug >= 2)
1708 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
1709 return gdbarch->float_bit;
1713 set_gdbarch_float_bit (struct gdbarch *gdbarch,
1716 gdbarch->float_bit = float_bit;
1719 const struct floatformat **
1720 gdbarch_float_format (struct gdbarch *gdbarch)
1722 gdb_assert (gdbarch != NULL);
1723 if (gdbarch_debug >= 2)
1724 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
1725 return gdbarch->float_format;
1729 set_gdbarch_float_format (struct gdbarch *gdbarch,
1730 const struct floatformat ** float_format)
1732 gdbarch->float_format = float_format;
1736 gdbarch_double_bit (struct gdbarch *gdbarch)
1738 gdb_assert (gdbarch != NULL);
1739 /* Skip verify of double_bit, invalid_p == 0 */
1740 if (gdbarch_debug >= 2)
1741 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
1742 return gdbarch->double_bit;
1746 set_gdbarch_double_bit (struct gdbarch *gdbarch,
1749 gdbarch->double_bit = double_bit;
1752 const struct floatformat **
1753 gdbarch_double_format (struct gdbarch *gdbarch)
1755 gdb_assert (gdbarch != NULL);
1756 if (gdbarch_debug >= 2)
1757 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
1758 return gdbarch->double_format;
1762 set_gdbarch_double_format (struct gdbarch *gdbarch,
1763 const struct floatformat ** double_format)
1765 gdbarch->double_format = double_format;
1769 gdbarch_long_double_bit (struct gdbarch *gdbarch)
1771 gdb_assert (gdbarch != NULL);
1772 /* Skip verify of long_double_bit, invalid_p == 0 */
1773 if (gdbarch_debug >= 2)
1774 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
1775 return gdbarch->long_double_bit;
1779 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
1780 int long_double_bit)
1782 gdbarch->long_double_bit = long_double_bit;
1785 const struct floatformat **
1786 gdbarch_long_double_format (struct gdbarch *gdbarch)
1788 gdb_assert (gdbarch != NULL);
1789 if (gdbarch_debug >= 2)
1790 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
1791 return gdbarch->long_double_format;
1795 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
1796 const struct floatformat ** long_double_format)
1798 gdbarch->long_double_format = long_double_format;
1802 gdbarch_ptr_bit (struct gdbarch *gdbarch)
1804 gdb_assert (gdbarch != NULL);
1805 /* Skip verify of ptr_bit, invalid_p == 0 */
1806 if (gdbarch_debug >= 2)
1807 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
1808 return gdbarch->ptr_bit;
1812 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
1815 gdbarch->ptr_bit = ptr_bit;
1819 gdbarch_addr_bit (struct gdbarch *gdbarch)
1821 gdb_assert (gdbarch != NULL);
1822 /* Check variable changed from pre-default. */
1823 gdb_assert (gdbarch->addr_bit != 0);
1824 if (gdbarch_debug >= 2)
1825 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
1826 return gdbarch->addr_bit;
1830 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
1833 gdbarch->addr_bit = addr_bit;
1837 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
1839 gdb_assert (gdbarch != NULL);
1840 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
1841 if (gdbarch_debug >= 2)
1842 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
1843 return gdbarch->bfd_vma_bit;
1847 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
1850 gdbarch->bfd_vma_bit = bfd_vma_bit;
1854 gdbarch_char_signed (struct gdbarch *gdbarch)
1856 gdb_assert (gdbarch != NULL);
1857 /* Check variable changed from pre-default. */
1858 gdb_assert (gdbarch->char_signed != -1);
1859 if (gdbarch_debug >= 2)
1860 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
1861 return gdbarch->char_signed;
1865 set_gdbarch_char_signed (struct gdbarch *gdbarch,
1868 gdbarch->char_signed = char_signed;
1872 gdbarch_read_pc_p (struct gdbarch *gdbarch)
1874 gdb_assert (gdbarch != NULL);
1875 return gdbarch->read_pc != NULL;
1879 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
1881 gdb_assert (gdbarch != NULL);
1882 gdb_assert (gdbarch->read_pc != NULL);
1883 if (gdbarch_debug >= 2)
1884 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
1885 return gdbarch->read_pc (ptid);
1889 set_gdbarch_read_pc (struct gdbarch *gdbarch,
1890 gdbarch_read_pc_ftype read_pc)
1892 gdbarch->read_pc = read_pc;
1896 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
1898 gdb_assert (gdbarch != NULL);
1899 gdb_assert (gdbarch->write_pc != NULL);
1900 if (gdbarch_debug >= 2)
1901 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
1902 gdbarch->write_pc (val, ptid);
1906 set_gdbarch_write_pc (struct gdbarch *gdbarch,
1907 gdbarch_write_pc_ftype write_pc)
1909 gdbarch->write_pc = write_pc;
1913 gdbarch_read_sp_p (struct gdbarch *gdbarch)
1915 gdb_assert (gdbarch != NULL);
1916 return gdbarch->read_sp != NULL;
1920 gdbarch_read_sp (struct gdbarch *gdbarch)
1922 gdb_assert (gdbarch != NULL);
1923 gdb_assert (gdbarch->read_sp != NULL);
1924 if (gdbarch_debug >= 2)
1925 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
1926 return gdbarch->read_sp ();
1930 set_gdbarch_read_sp (struct gdbarch *gdbarch,
1931 gdbarch_read_sp_ftype read_sp)
1933 gdbarch->read_sp = read_sp;
1937 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
1939 gdb_assert (gdbarch != NULL);
1940 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
1941 if (gdbarch_debug >= 2)
1942 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
1943 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
1947 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
1948 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
1950 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
1954 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
1956 gdb_assert (gdbarch != NULL);
1957 return gdbarch->pseudo_register_read != NULL;
1961 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf)
1963 gdb_assert (gdbarch != NULL);
1964 gdb_assert (gdbarch->pseudo_register_read != NULL);
1965 if (gdbarch_debug >= 2)
1966 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
1967 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
1971 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
1972 gdbarch_pseudo_register_read_ftype pseudo_register_read)
1974 gdbarch->pseudo_register_read = pseudo_register_read;
1978 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
1980 gdb_assert (gdbarch != NULL);
1981 return gdbarch->pseudo_register_write != NULL;
1985 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf)
1987 gdb_assert (gdbarch != NULL);
1988 gdb_assert (gdbarch->pseudo_register_write != NULL);
1989 if (gdbarch_debug >= 2)
1990 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
1991 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
1995 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
1996 gdbarch_pseudo_register_write_ftype pseudo_register_write)
1998 gdbarch->pseudo_register_write = pseudo_register_write;
2002 gdbarch_num_regs (struct gdbarch *gdbarch)
2004 gdb_assert (gdbarch != NULL);
2005 /* Check variable changed from pre-default. */
2006 gdb_assert (gdbarch->num_regs != -1);
2007 if (gdbarch_debug >= 2)
2008 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2009 return gdbarch->num_regs;
2013 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2016 gdbarch->num_regs = num_regs;
2020 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2022 gdb_assert (gdbarch != NULL);
2023 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2024 if (gdbarch_debug >= 2)
2025 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2026 return gdbarch->num_pseudo_regs;
2030 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2031 int num_pseudo_regs)
2033 gdbarch->num_pseudo_regs = num_pseudo_regs;
2037 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2039 gdb_assert (gdbarch != NULL);
2040 /* Skip verify of sp_regnum, invalid_p == 0 */
2041 if (gdbarch_debug >= 2)
2042 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2043 return gdbarch->sp_regnum;
2047 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2050 gdbarch->sp_regnum = sp_regnum;
2054 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2056 gdb_assert (gdbarch != NULL);
2057 /* Skip verify of pc_regnum, invalid_p == 0 */
2058 if (gdbarch_debug >= 2)
2059 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2060 return gdbarch->pc_regnum;
2064 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2067 gdbarch->pc_regnum = pc_regnum;
2071 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2073 gdb_assert (gdbarch != NULL);
2074 /* Skip verify of ps_regnum, invalid_p == 0 */
2075 if (gdbarch_debug >= 2)
2076 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2077 return gdbarch->ps_regnum;
2081 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2084 gdbarch->ps_regnum = ps_regnum;
2088 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2090 gdb_assert (gdbarch != NULL);
2091 /* Skip verify of fp0_regnum, invalid_p == 0 */
2092 if (gdbarch_debug >= 2)
2093 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2094 return gdbarch->fp0_regnum;
2098 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2101 gdbarch->fp0_regnum = fp0_regnum;
2105 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2107 gdb_assert (gdbarch != NULL);
2108 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2109 if (gdbarch_debug >= 2)
2110 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2111 return gdbarch->stab_reg_to_regnum (stab_regnr);
2115 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2116 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2118 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2122 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2124 gdb_assert (gdbarch != NULL);
2125 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2126 if (gdbarch_debug >= 2)
2127 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2128 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2132 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2133 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2135 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2139 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2141 gdb_assert (gdbarch != NULL);
2142 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2143 if (gdbarch_debug >= 2)
2144 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2145 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2149 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2150 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2152 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2156 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2158 gdb_assert (gdbarch != NULL);
2159 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2160 if (gdbarch_debug >= 2)
2161 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2162 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2166 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2167 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2169 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2173 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2175 gdb_assert (gdbarch != NULL);
2176 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2177 if (gdbarch_debug >= 2)
2178 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2179 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2183 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2184 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2186 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2190 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2192 gdb_assert (gdbarch != NULL);
2193 gdb_assert (gdbarch->register_name != NULL);
2194 if (gdbarch_debug >= 2)
2195 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2196 return gdbarch->register_name (regnr);
2200 set_gdbarch_register_name (struct gdbarch *gdbarch,
2201 gdbarch_register_name_ftype register_name)
2203 gdbarch->register_name = register_name;
2207 gdbarch_register_type_p (struct gdbarch *gdbarch)
2209 gdb_assert (gdbarch != NULL);
2210 return gdbarch->register_type != NULL;
2214 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2216 gdb_assert (gdbarch != NULL);
2217 gdb_assert (gdbarch->register_type != NULL);
2218 if (gdbarch_debug >= 2)
2219 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2220 return gdbarch->register_type (gdbarch, reg_nr);
2224 set_gdbarch_register_type (struct gdbarch *gdbarch,
2225 gdbarch_register_type_ftype register_type)
2227 gdbarch->register_type = register_type;
2231 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2233 gdb_assert (gdbarch != NULL);
2234 return gdbarch->unwind_dummy_id != NULL;
2238 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2240 gdb_assert (gdbarch != NULL);
2241 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2242 if (gdbarch_debug >= 2)
2243 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2244 return gdbarch->unwind_dummy_id (gdbarch, info);
2248 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2249 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2251 gdbarch->unwind_dummy_id = unwind_dummy_id;
2255 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2257 gdb_assert (gdbarch != NULL);
2258 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2259 if (gdbarch_debug >= 2)
2260 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2261 return gdbarch->deprecated_fp_regnum;
2265 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2266 int deprecated_fp_regnum)
2268 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2272 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2274 gdb_assert (gdbarch != NULL);
2275 return gdbarch->push_dummy_call != NULL;
2279 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)
2281 gdb_assert (gdbarch != NULL);
2282 gdb_assert (gdbarch->push_dummy_call != NULL);
2283 if (gdbarch_debug >= 2)
2284 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2285 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2289 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2290 gdbarch_push_dummy_call_ftype push_dummy_call)
2292 gdbarch->push_dummy_call = push_dummy_call;
2296 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2298 gdb_assert (gdbarch != NULL);
2299 if (gdbarch_debug >= 2)
2300 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2301 return gdbarch->deprecated_register_size;
2305 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
2306 int deprecated_register_size)
2308 gdbarch->deprecated_register_size = deprecated_register_size;
2312 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2314 gdb_assert (gdbarch != NULL);
2315 /* Skip verify of call_dummy_location, invalid_p == 0 */
2316 if (gdbarch_debug >= 2)
2317 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2318 return gdbarch->call_dummy_location;
2322 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2323 int call_dummy_location)
2325 gdbarch->call_dummy_location = call_dummy_location;
2329 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
2331 gdb_assert (gdbarch != NULL);
2332 return gdbarch->push_dummy_code != NULL;
2336 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
2338 gdb_assert (gdbarch != NULL);
2339 gdb_assert (gdbarch->push_dummy_code != NULL);
2340 if (gdbarch_debug >= 2)
2341 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
2342 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
2346 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
2347 gdbarch_push_dummy_code_ftype push_dummy_code)
2349 gdbarch->push_dummy_code = push_dummy_code;
2353 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
2355 gdb_assert (gdbarch != NULL);
2356 gdb_assert (gdbarch->print_registers_info != NULL);
2357 if (gdbarch_debug >= 2)
2358 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
2359 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
2363 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
2364 gdbarch_print_registers_info_ftype print_registers_info)
2366 gdbarch->print_registers_info = print_registers_info;
2370 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
2372 gdb_assert (gdbarch != NULL);
2373 return gdbarch->print_float_info != NULL;
2377 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2379 gdb_assert (gdbarch != NULL);
2380 gdb_assert (gdbarch->print_float_info != NULL);
2381 if (gdbarch_debug >= 2)
2382 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
2383 gdbarch->print_float_info (gdbarch, file, frame, args);
2387 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
2388 gdbarch_print_float_info_ftype print_float_info)
2390 gdbarch->print_float_info = print_float_info;
2394 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
2396 gdb_assert (gdbarch != NULL);
2397 return gdbarch->print_vector_info != NULL;
2401 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
2403 gdb_assert (gdbarch != NULL);
2404 gdb_assert (gdbarch->print_vector_info != NULL);
2405 if (gdbarch_debug >= 2)
2406 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
2407 gdbarch->print_vector_info (gdbarch, file, frame, args);
2411 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
2412 gdbarch_print_vector_info_ftype print_vector_info)
2414 gdbarch->print_vector_info = print_vector_info;
2418 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2420 gdb_assert (gdbarch != NULL);
2421 gdb_assert (gdbarch->register_sim_regno != NULL);
2422 if (gdbarch_debug >= 2)
2423 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2424 return gdbarch->register_sim_regno (reg_nr);
2428 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2429 gdbarch_register_sim_regno_ftype register_sim_regno)
2431 gdbarch->register_sim_regno = register_sim_regno;
2435 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2437 gdb_assert (gdbarch != NULL);
2438 return gdbarch->register_bytes_ok != NULL;
2442 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2444 gdb_assert (gdbarch != NULL);
2445 gdb_assert (gdbarch->register_bytes_ok != NULL);
2446 if (gdbarch_debug >= 2)
2447 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2448 return gdbarch->register_bytes_ok (nr_bytes);
2452 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2453 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2455 gdbarch->register_bytes_ok = register_bytes_ok;
2459 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2461 gdb_assert (gdbarch != NULL);
2462 gdb_assert (gdbarch->cannot_fetch_register != NULL);
2463 if (gdbarch_debug >= 2)
2464 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2465 return gdbarch->cannot_fetch_register (regnum);
2469 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2470 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2472 gdbarch->cannot_fetch_register = cannot_fetch_register;
2476 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2478 gdb_assert (gdbarch != NULL);
2479 gdb_assert (gdbarch->cannot_store_register != NULL);
2480 if (gdbarch_debug >= 2)
2481 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2482 return gdbarch->cannot_store_register (regnum);
2486 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2487 gdbarch_cannot_store_register_ftype cannot_store_register)
2489 gdbarch->cannot_store_register = cannot_store_register;
2493 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
2495 gdb_assert (gdbarch != NULL);
2496 return gdbarch->get_longjmp_target != NULL;
2500 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
2502 gdb_assert (gdbarch != NULL);
2503 gdb_assert (gdbarch->get_longjmp_target != NULL);
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
2506 return gdbarch->get_longjmp_target (pc);
2510 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
2511 gdbarch_get_longjmp_target_ftype get_longjmp_target)
2513 gdbarch->get_longjmp_target = get_longjmp_target;
2517 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
2519 gdb_assert (gdbarch != NULL);
2520 if (gdbarch_debug >= 2)
2521 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
2522 return gdbarch->believe_pcc_promotion;
2526 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
2527 int believe_pcc_promotion)
2529 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
2533 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
2535 gdb_assert (gdbarch != NULL);
2536 gdb_assert (gdbarch->convert_register_p != NULL);
2537 if (gdbarch_debug >= 2)
2538 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
2539 return gdbarch->convert_register_p (regnum, type);
2543 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
2544 gdbarch_convert_register_p_ftype convert_register_p)
2546 gdbarch->convert_register_p = convert_register_p;
2550 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf)
2552 gdb_assert (gdbarch != NULL);
2553 gdb_assert (gdbarch->register_to_value != NULL);
2554 if (gdbarch_debug >= 2)
2555 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
2556 gdbarch->register_to_value (frame, regnum, type, buf);
2560 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
2561 gdbarch_register_to_value_ftype register_to_value)
2563 gdbarch->register_to_value = register_to_value;
2567 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf)
2569 gdb_assert (gdbarch != NULL);
2570 gdb_assert (gdbarch->value_to_register != NULL);
2571 if (gdbarch_debug >= 2)
2572 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
2573 gdbarch->value_to_register (frame, regnum, type, buf);
2577 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
2578 gdbarch_value_to_register_ftype value_to_register)
2580 gdbarch->value_to_register = value_to_register;
2584 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame)
2586 gdb_assert (gdbarch != NULL);
2587 gdb_assert (gdbarch->value_from_register != NULL);
2588 if (gdbarch_debug >= 2)
2589 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n");
2590 return gdbarch->value_from_register (type, regnum, frame);
2594 set_gdbarch_value_from_register (struct gdbarch *gdbarch,
2595 gdbarch_value_from_register_ftype value_from_register)
2597 gdbarch->value_from_register = value_from_register;
2601 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2603 gdb_assert (gdbarch != NULL);
2604 gdb_assert (gdbarch->pointer_to_address != NULL);
2605 if (gdbarch_debug >= 2)
2606 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
2607 return gdbarch->pointer_to_address (type, buf);
2611 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
2612 gdbarch_pointer_to_address_ftype pointer_to_address)
2614 gdbarch->pointer_to_address = pointer_to_address;
2618 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr)
2620 gdb_assert (gdbarch != NULL);
2621 gdb_assert (gdbarch->address_to_pointer != NULL);
2622 if (gdbarch_debug >= 2)
2623 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
2624 gdbarch->address_to_pointer (type, buf, addr);
2628 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
2629 gdbarch_address_to_pointer_ftype address_to_pointer)
2631 gdbarch->address_to_pointer = address_to_pointer;
2635 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
2637 gdb_assert (gdbarch != NULL);
2638 return gdbarch->integer_to_address != NULL;
2642 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
2644 gdb_assert (gdbarch != NULL);
2645 gdb_assert (gdbarch->integer_to_address != NULL);
2646 if (gdbarch_debug >= 2)
2647 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
2648 return gdbarch->integer_to_address (gdbarch, type, buf);
2652 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
2653 gdbarch_integer_to_address_ftype integer_to_address)
2655 gdbarch->integer_to_address = integer_to_address;
2659 gdbarch_return_value_p (struct gdbarch *gdbarch)
2661 gdb_assert (gdbarch != NULL);
2662 return gdbarch->return_value != legacy_return_value;
2665 enum return_value_convention
2666 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
2668 gdb_assert (gdbarch != NULL);
2669 gdb_assert (gdbarch->return_value != NULL);
2670 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
2671 if (gdbarch_debug >= 2)
2672 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
2673 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
2677 set_gdbarch_return_value (struct gdbarch *gdbarch,
2678 gdbarch_return_value_ftype return_value)
2680 gdbarch->return_value = return_value;
2684 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf)
2686 gdb_assert (gdbarch != NULL);
2687 gdb_assert (gdbarch->extract_return_value != NULL);
2688 if (gdbarch_debug >= 2)
2689 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
2690 gdbarch->extract_return_value (type, regcache, valbuf);
2694 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
2695 gdbarch_extract_return_value_ftype extract_return_value)
2697 gdbarch->extract_return_value = extract_return_value;
2701 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
2703 gdb_assert (gdbarch != NULL);
2704 gdb_assert (gdbarch->store_return_value != NULL);
2705 if (gdbarch_debug >= 2)
2706 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
2707 gdbarch->store_return_value (type, regcache, valbuf);
2711 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
2712 gdbarch_store_return_value_ftype store_return_value)
2714 gdbarch->store_return_value = store_return_value;
2718 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
2720 gdb_assert (gdbarch != NULL);
2721 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
2722 if (gdbarch_debug >= 2)
2723 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
2724 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
2728 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
2729 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
2731 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
2735 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
2737 gdb_assert (gdbarch != NULL);
2738 return gdbarch->deprecated_extract_struct_value_address != NULL;
2742 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
2744 gdb_assert (gdbarch != NULL);
2745 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
2746 if (gdbarch_debug >= 2)
2747 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
2748 return gdbarch->deprecated_extract_struct_value_address (regcache);
2752 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
2753 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
2755 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
2759 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
2761 gdb_assert (gdbarch != NULL);
2762 gdb_assert (gdbarch->skip_prologue != NULL);
2763 if (gdbarch_debug >= 2)
2764 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
2765 return gdbarch->skip_prologue (ip);
2769 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
2770 gdbarch_skip_prologue_ftype skip_prologue)
2772 gdbarch->skip_prologue = skip_prologue;
2776 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
2778 gdb_assert (gdbarch != NULL);
2779 gdb_assert (gdbarch->inner_than != NULL);
2780 if (gdbarch_debug >= 2)
2781 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
2782 return gdbarch->inner_than (lhs, rhs);
2786 set_gdbarch_inner_than (struct gdbarch *gdbarch,
2787 gdbarch_inner_than_ftype inner_than)
2789 gdbarch->inner_than = inner_than;
2793 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
2795 gdb_assert (gdbarch != NULL);
2796 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
2799 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
2803 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
2804 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
2806 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
2810 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
2812 gdb_assert (gdbarch != NULL);
2813 return gdbarch->adjust_breakpoint_address != NULL;
2817 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
2819 gdb_assert (gdbarch != NULL);
2820 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
2821 if (gdbarch_debug >= 2)
2822 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
2823 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
2827 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
2828 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
2830 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
2834 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2836 gdb_assert (gdbarch != NULL);
2837 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
2838 if (gdbarch_debug >= 2)
2839 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
2840 return gdbarch->memory_insert_breakpoint (bp_tgt);
2844 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
2845 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
2847 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
2851 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
2853 gdb_assert (gdbarch != NULL);
2854 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
2855 if (gdbarch_debug >= 2)
2856 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
2857 return gdbarch->memory_remove_breakpoint (bp_tgt);
2861 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
2862 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
2864 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
2868 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
2870 gdb_assert (gdbarch != NULL);
2871 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2872 if (gdbarch_debug >= 2)
2873 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
2874 return gdbarch->decr_pc_after_break;
2878 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
2879 CORE_ADDR decr_pc_after_break)
2881 gdbarch->decr_pc_after_break = decr_pc_after_break;
2885 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
2887 gdb_assert (gdbarch != NULL);
2888 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2889 if (gdbarch_debug >= 2)
2890 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
2891 return gdbarch->deprecated_function_start_offset;
2895 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
2896 CORE_ADDR deprecated_function_start_offset)
2898 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
2902 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno)
2904 gdb_assert (gdbarch != NULL);
2905 gdb_assert (gdbarch->remote_register_number != NULL);
2906 if (gdbarch_debug >= 2)
2907 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n");
2908 return gdbarch->remote_register_number (gdbarch, regno);
2912 set_gdbarch_remote_register_number (struct gdbarch *gdbarch,
2913 gdbarch_remote_register_number_ftype remote_register_number)
2915 gdbarch->remote_register_number = remote_register_number;
2919 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch)
2921 gdb_assert (gdbarch != NULL);
2922 return gdbarch->fetch_tls_load_module_address != NULL;
2926 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile)
2928 gdb_assert (gdbarch != NULL);
2929 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL);
2930 if (gdbarch_debug >= 2)
2931 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n");
2932 return gdbarch->fetch_tls_load_module_address (objfile);
2936 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch,
2937 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address)
2939 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address;
2943 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
2945 gdb_assert (gdbarch != NULL);
2946 /* Skip verify of frame_args_skip, invalid_p == 0 */
2947 if (gdbarch_debug >= 2)
2948 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
2949 return gdbarch->frame_args_skip;
2953 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
2954 CORE_ADDR frame_args_skip)
2956 gdbarch->frame_args_skip = frame_args_skip;
2960 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
2962 gdb_assert (gdbarch != NULL);
2963 return gdbarch->unwind_pc != NULL;
2967 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
2969 gdb_assert (gdbarch != NULL);
2970 gdb_assert (gdbarch->unwind_pc != NULL);
2971 if (gdbarch_debug >= 2)
2972 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
2973 return gdbarch->unwind_pc (gdbarch, next_frame);
2977 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
2978 gdbarch_unwind_pc_ftype unwind_pc)
2980 gdbarch->unwind_pc = unwind_pc;
2984 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
2986 gdb_assert (gdbarch != NULL);
2987 return gdbarch->unwind_sp != NULL;
2991 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
2993 gdb_assert (gdbarch != NULL);
2994 gdb_assert (gdbarch->unwind_sp != NULL);
2995 if (gdbarch_debug >= 2)
2996 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
2997 return gdbarch->unwind_sp (gdbarch, next_frame);
3001 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3002 gdbarch_unwind_sp_ftype unwind_sp)
3004 gdbarch->unwind_sp = unwind_sp;
3008 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
3010 gdb_assert (gdbarch != NULL);
3011 return gdbarch->frame_num_args != NULL;
3015 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3017 gdb_assert (gdbarch != NULL);
3018 gdb_assert (gdbarch->frame_num_args != NULL);
3019 if (gdbarch_debug >= 2)
3020 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3021 return gdbarch->frame_num_args (frame);
3025 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3026 gdbarch_frame_num_args_ftype frame_num_args)
3028 gdbarch->frame_num_args = frame_num_args;
3032 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
3034 gdb_assert (gdbarch != NULL);
3035 return gdbarch->deprecated_stack_align != NULL;
3039 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3041 gdb_assert (gdbarch != NULL);
3042 gdb_assert (gdbarch->deprecated_stack_align != NULL);
3043 if (gdbarch_debug >= 2)
3044 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
3045 return gdbarch->deprecated_stack_align (sp);
3049 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
3050 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
3052 gdbarch->deprecated_stack_align = deprecated_stack_align;
3056 gdbarch_frame_align_p (struct gdbarch *gdbarch)
3058 gdb_assert (gdbarch != NULL);
3059 return gdbarch->frame_align != NULL;
3063 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
3065 gdb_assert (gdbarch != NULL);
3066 gdb_assert (gdbarch->frame_align != NULL);
3067 if (gdbarch_debug >= 2)
3068 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
3069 return gdbarch->frame_align (gdbarch, address);
3073 set_gdbarch_frame_align (struct gdbarch *gdbarch,
3074 gdbarch_frame_align_ftype frame_align)
3076 gdbarch->frame_align = frame_align;
3080 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
3082 gdb_assert (gdbarch != NULL);
3083 return gdbarch->deprecated_reg_struct_has_addr != NULL;
3087 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
3089 gdb_assert (gdbarch != NULL);
3090 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
3091 if (gdbarch_debug >= 2)
3092 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
3093 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
3097 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
3098 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
3100 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
3104 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
3106 gdb_assert (gdbarch != NULL);
3107 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
3108 if (gdbarch_debug >= 2)
3109 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
3110 return gdbarch->stabs_argument_has_addr (gdbarch, type);
3114 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
3115 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
3117 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
3121 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
3123 gdb_assert (gdbarch != NULL);
3124 if (gdbarch_debug >= 2)
3125 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
3126 return gdbarch->frame_red_zone_size;
3130 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
3131 int frame_red_zone_size)
3133 gdbarch->frame_red_zone_size = frame_red_zone_size;
3137 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
3139 gdb_assert (gdbarch != NULL);
3140 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
3141 if (gdbarch_debug >= 2)
3142 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
3143 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
3147 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
3148 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
3150 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
3154 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
3156 gdb_assert (gdbarch != NULL);
3157 gdb_assert (gdbarch->addr_bits_remove != NULL);
3158 if (gdbarch_debug >= 2)
3159 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
3160 return gdbarch->addr_bits_remove (addr);
3164 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
3165 gdbarch_addr_bits_remove_ftype addr_bits_remove)
3167 gdbarch->addr_bits_remove = addr_bits_remove;
3171 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
3173 gdb_assert (gdbarch != NULL);
3174 gdb_assert (gdbarch->smash_text_address != NULL);
3175 if (gdbarch_debug >= 2)
3176 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
3177 return gdbarch->smash_text_address (addr);
3181 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
3182 gdbarch_smash_text_address_ftype smash_text_address)
3184 gdbarch->smash_text_address = smash_text_address;
3188 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
3190 gdb_assert (gdbarch != NULL);
3191 return gdbarch->software_single_step != NULL;
3195 gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
3197 gdb_assert (gdbarch != NULL);
3198 gdb_assert (gdbarch->software_single_step != NULL);
3199 if (gdbarch_debug >= 2)
3200 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
3201 return gdbarch->software_single_step (regcache);
3205 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
3206 gdbarch_software_single_step_ftype software_single_step)
3208 gdbarch->software_single_step = software_single_step;
3212 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch)
3214 gdb_assert (gdbarch != NULL);
3215 return gdbarch->single_step_through_delay != NULL;
3219 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->single_step_through_delay != NULL);
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n");
3225 return gdbarch->single_step_through_delay (gdbarch, frame);
3229 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch,
3230 gdbarch_single_step_through_delay_ftype single_step_through_delay)
3232 gdbarch->single_step_through_delay = single_step_through_delay;
3236 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
3238 gdb_assert (gdbarch != NULL);
3239 gdb_assert (gdbarch->print_insn != NULL);
3240 if (gdbarch_debug >= 2)
3241 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
3242 return gdbarch->print_insn (vma, info);
3246 set_gdbarch_print_insn (struct gdbarch *gdbarch,
3247 gdbarch_print_insn_ftype print_insn)
3249 gdbarch->print_insn = print_insn;
3253 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
3255 gdb_assert (gdbarch != NULL);
3256 gdb_assert (gdbarch->skip_trampoline_code != NULL);
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
3259 return gdbarch->skip_trampoline_code (pc);
3263 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
3264 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
3266 gdbarch->skip_trampoline_code = skip_trampoline_code;
3270 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
3272 gdb_assert (gdbarch != NULL);
3273 gdb_assert (gdbarch->skip_solib_resolver != NULL);
3274 if (gdbarch_debug >= 2)
3275 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
3276 return gdbarch->skip_solib_resolver (gdbarch, pc);
3280 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
3281 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
3283 gdbarch->skip_solib_resolver = skip_solib_resolver;
3287 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
3289 gdb_assert (gdbarch != NULL);
3290 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
3291 if (gdbarch_debug >= 2)
3292 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
3293 return gdbarch->in_solib_return_trampoline (pc, name);
3297 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
3298 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
3300 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
3304 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
3306 gdb_assert (gdbarch != NULL);
3307 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
3308 if (gdbarch_debug >= 2)
3309 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
3310 return gdbarch->in_function_epilogue_p (gdbarch, addr);
3314 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
3315 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
3317 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
3321 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
3323 gdb_assert (gdbarch != NULL);
3324 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
3325 if (gdbarch_debug >= 2)
3326 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
3327 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
3331 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
3332 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
3334 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
3338 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
3340 gdb_assert (gdbarch != NULL);
3341 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
3342 if (gdbarch_debug >= 2)
3343 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
3344 gdbarch->elf_make_msymbol_special (sym, msym);
3348 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
3349 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
3351 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
3355 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
3357 gdb_assert (gdbarch != NULL);
3358 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
3359 if (gdbarch_debug >= 2)
3360 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
3361 gdbarch->coff_make_msymbol_special (val, msym);
3365 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
3366 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
3368 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
3372 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
3374 gdb_assert (gdbarch != NULL);
3375 /* Skip verify of name_of_malloc, invalid_p == 0 */
3376 if (gdbarch_debug >= 2)
3377 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
3378 return gdbarch->name_of_malloc;
3382 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
3383 const char * name_of_malloc)
3385 gdbarch->name_of_malloc = name_of_malloc;
3389 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
3391 gdb_assert (gdbarch != NULL);
3392 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
3393 if (gdbarch_debug >= 2)
3394 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
3395 return gdbarch->cannot_step_breakpoint;
3399 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
3400 int cannot_step_breakpoint)
3402 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
3406 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
3408 gdb_assert (gdbarch != NULL);
3409 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
3410 if (gdbarch_debug >= 2)
3411 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
3412 return gdbarch->have_nonsteppable_watchpoint;
3416 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
3417 int have_nonsteppable_watchpoint)
3419 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
3423 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
3425 gdb_assert (gdbarch != NULL);
3426 return gdbarch->address_class_type_flags != NULL;
3430 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
3432 gdb_assert (gdbarch != NULL);
3433 gdb_assert (gdbarch->address_class_type_flags != NULL);
3434 if (gdbarch_debug >= 2)
3435 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
3436 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
3440 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
3441 gdbarch_address_class_type_flags_ftype address_class_type_flags)
3443 gdbarch->address_class_type_flags = address_class_type_flags;
3447 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
3449 gdb_assert (gdbarch != NULL);
3450 return gdbarch->address_class_type_flags_to_name != NULL;
3454 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
3456 gdb_assert (gdbarch != NULL);
3457 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
3458 if (gdbarch_debug >= 2)
3459 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
3460 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
3464 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
3465 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
3467 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
3471 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
3473 gdb_assert (gdbarch != NULL);
3474 return gdbarch->address_class_name_to_type_flags != NULL;
3478 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
3480 gdb_assert (gdbarch != NULL);
3481 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
3482 if (gdbarch_debug >= 2)
3483 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
3484 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
3488 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
3489 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
3491 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
3495 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
3497 gdb_assert (gdbarch != NULL);
3498 gdb_assert (gdbarch->register_reggroup_p != NULL);
3499 if (gdbarch_debug >= 2)
3500 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
3501 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
3505 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
3506 gdbarch_register_reggroup_p_ftype register_reggroup_p)
3508 gdbarch->register_reggroup_p = register_reggroup_p;
3512 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
3514 gdb_assert (gdbarch != NULL);
3515 return gdbarch->fetch_pointer_argument != NULL;
3519 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
3521 gdb_assert (gdbarch != NULL);
3522 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
3525 return gdbarch->fetch_pointer_argument (frame, argi, type);
3529 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
3530 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
3532 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
3536 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
3538 gdb_assert (gdbarch != NULL);
3539 return gdbarch->regset_from_core_section != NULL;
3542 const struct regset *
3543 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
3545 gdb_assert (gdbarch != NULL);
3546 gdb_assert (gdbarch->regset_from_core_section != NULL);
3547 if (gdbarch_debug >= 2)
3548 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
3549 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
3553 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
3554 gdbarch_regset_from_core_section_ftype regset_from_core_section)
3556 gdbarch->regset_from_core_section = regset_from_core_section;
3560 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
3562 gdb_assert (gdbarch != NULL);
3563 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3564 if (gdbarch_debug >= 2)
3565 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n");
3566 return gdbarch->vtable_function_descriptors;
3570 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
3571 int vtable_function_descriptors)
3573 gdbarch->vtable_function_descriptors = vtable_function_descriptors;
3577 gdbarch_vbit_in_delta (struct gdbarch *gdbarch)
3579 gdb_assert (gdbarch != NULL);
3580 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3581 if (gdbarch_debug >= 2)
3582 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n");
3583 return gdbarch->vbit_in_delta;
3587 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch,
3590 gdbarch->vbit_in_delta = vbit_in_delta;
3594 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch)
3596 gdb_assert (gdbarch != NULL);
3597 return gdbarch->skip_permanent_breakpoint != NULL;
3601 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
3603 gdb_assert (gdbarch != NULL);
3604 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
3605 if (gdbarch_debug >= 2)
3606 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
3607 gdbarch->skip_permanent_breakpoint (regcache);
3611 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
3612 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
3614 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
3618 gdbarch_overlay_update_p (struct gdbarch *gdbarch)
3620 gdb_assert (gdbarch != NULL);
3621 return gdbarch->overlay_update != NULL;
3625 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect)
3627 gdb_assert (gdbarch != NULL);
3628 gdb_assert (gdbarch->overlay_update != NULL);
3629 if (gdbarch_debug >= 2)
3630 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n");
3631 gdbarch->overlay_update (osect);
3635 set_gdbarch_overlay_update (struct gdbarch *gdbarch,
3636 gdbarch_overlay_update_ftype overlay_update)
3638 gdbarch->overlay_update = overlay_update;
3642 /* Keep a registry of per-architecture data-pointers required by GDB
3649 gdbarch_data_pre_init_ftype *pre_init;
3650 gdbarch_data_post_init_ftype *post_init;
3653 struct gdbarch_data_registration
3655 struct gdbarch_data *data;
3656 struct gdbarch_data_registration *next;
3659 struct gdbarch_data_registry
3662 struct gdbarch_data_registration *registrations;
3665 struct gdbarch_data_registry gdbarch_data_registry =
3670 static struct gdbarch_data *
3671 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
3672 gdbarch_data_post_init_ftype *post_init)
3674 struct gdbarch_data_registration **curr;
3675 /* Append the new registraration. */
3676 for (curr = &gdbarch_data_registry.registrations;
3678 curr = &(*curr)->next);
3679 (*curr) = XMALLOC (struct gdbarch_data_registration);
3680 (*curr)->next = NULL;
3681 (*curr)->data = XMALLOC (struct gdbarch_data);
3682 (*curr)->data->index = gdbarch_data_registry.nr++;
3683 (*curr)->data->pre_init = pre_init;
3684 (*curr)->data->post_init = post_init;
3685 (*curr)->data->init_p = 1;
3686 return (*curr)->data;
3689 struct gdbarch_data *
3690 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
3692 return gdbarch_data_register (pre_init, NULL);
3695 struct gdbarch_data *
3696 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
3698 return gdbarch_data_register (NULL, post_init);
3701 /* Create/delete the gdbarch data vector. */
3704 alloc_gdbarch_data (struct gdbarch *gdbarch)
3706 gdb_assert (gdbarch->data == NULL);
3707 gdbarch->nr_data = gdbarch_data_registry.nr;
3708 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
3711 /* Initialize the current value of the specified per-architecture
3715 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
3716 struct gdbarch_data *data,
3719 gdb_assert (data->index < gdbarch->nr_data);
3720 gdb_assert (gdbarch->data[data->index] == NULL);
3721 gdb_assert (data->pre_init == NULL);
3722 gdbarch->data[data->index] = pointer;
3725 /* Return the current value of the specified per-architecture
3729 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
3731 gdb_assert (data->index < gdbarch->nr_data);
3732 if (gdbarch->data[data->index] == NULL)
3734 /* The data-pointer isn't initialized, call init() to get a
3736 if (data->pre_init != NULL)
3737 /* Mid architecture creation: pass just the obstack, and not
3738 the entire architecture, as that way it isn't possible for
3739 pre-init code to refer to undefined architecture
3741 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
3742 else if (gdbarch->initialized_p
3743 && data->post_init != NULL)
3744 /* Post architecture creation: pass the entire architecture
3745 (as all fields are valid), but be careful to also detect
3746 recursive references. */
3748 gdb_assert (data->init_p);
3750 gdbarch->data[data->index] = data->post_init (gdbarch);
3754 /* The architecture initialization hasn't completed - punt -
3755 hope that the caller knows what they are doing. Once
3756 deprecated_set_gdbarch_data has been initialized, this can be
3757 changed to an internal error. */
3759 gdb_assert (gdbarch->data[data->index] != NULL);
3761 return gdbarch->data[data->index];
3766 /* Keep a registry of swapped data required by GDB modules. */
3771 struct gdbarch_swap_registration *source;
3772 struct gdbarch_swap *next;
3775 struct gdbarch_swap_registration
3778 unsigned long sizeof_data;
3779 gdbarch_swap_ftype *init;
3780 struct gdbarch_swap_registration *next;
3783 struct gdbarch_swap_registry
3786 struct gdbarch_swap_registration *registrations;
3789 struct gdbarch_swap_registry gdbarch_swap_registry =
3795 deprecated_register_gdbarch_swap (void *data,
3796 unsigned long sizeof_data,
3797 gdbarch_swap_ftype *init)
3799 struct gdbarch_swap_registration **rego;
3800 for (rego = &gdbarch_swap_registry.registrations;
3802 rego = &(*rego)->next);
3803 (*rego) = XMALLOC (struct gdbarch_swap_registration);
3804 (*rego)->next = NULL;
3805 (*rego)->init = init;
3806 (*rego)->data = data;
3807 (*rego)->sizeof_data = sizeof_data;
3811 current_gdbarch_swap_init_hack (void)
3813 struct gdbarch_swap_registration *rego;
3814 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
3815 for (rego = gdbarch_swap_registry.registrations;
3819 if (rego->data != NULL)
3821 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
3822 struct gdbarch_swap);
3823 (*curr)->source = rego;
3824 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
3826 (*curr)->next = NULL;
3827 curr = &(*curr)->next;
3829 if (rego->init != NULL)
3834 static struct gdbarch *
3835 current_gdbarch_swap_out_hack (void)
3837 struct gdbarch *old_gdbarch = current_gdbarch;
3838 struct gdbarch_swap *curr;
3840 gdb_assert (old_gdbarch != NULL);
3841 for (curr = old_gdbarch->swap;
3845 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
3846 memset (curr->source->data, 0, curr->source->sizeof_data);
3848 current_gdbarch = NULL;
3853 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
3855 struct gdbarch_swap *curr;
3857 gdb_assert (current_gdbarch == NULL);
3858 for (curr = new_gdbarch->swap;
3861 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
3862 current_gdbarch = new_gdbarch;
3866 /* Keep a registry of the architectures known by GDB. */
3868 struct gdbarch_registration
3870 enum bfd_architecture bfd_architecture;
3871 gdbarch_init_ftype *init;
3872 gdbarch_dump_tdep_ftype *dump_tdep;
3873 struct gdbarch_list *arches;
3874 struct gdbarch_registration *next;
3877 static struct gdbarch_registration *gdbarch_registry = NULL;
3880 append_name (const char ***buf, int *nr, const char *name)
3882 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
3888 gdbarch_printable_names (void)
3890 /* Accumulate a list of names based on the registed list of
3892 enum bfd_architecture a;
3894 const char **arches = NULL;
3895 struct gdbarch_registration *rego;
3896 for (rego = gdbarch_registry;
3900 const struct bfd_arch_info *ap;
3901 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
3903 internal_error (__FILE__, __LINE__,
3904 _("gdbarch_architecture_names: multi-arch unknown"));
3907 append_name (&arches, &nr_arches, ap->printable_name);
3912 append_name (&arches, &nr_arches, NULL);
3918 gdbarch_register (enum bfd_architecture bfd_architecture,
3919 gdbarch_init_ftype *init,
3920 gdbarch_dump_tdep_ftype *dump_tdep)
3922 struct gdbarch_registration **curr;
3923 const struct bfd_arch_info *bfd_arch_info;
3924 /* Check that BFD recognizes this architecture */
3925 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
3926 if (bfd_arch_info == NULL)
3928 internal_error (__FILE__, __LINE__,
3929 _("gdbarch: Attempt to register unknown architecture (%d)"),
3932 /* Check that we haven't seen this architecture before */
3933 for (curr = &gdbarch_registry;
3935 curr = &(*curr)->next)
3937 if (bfd_architecture == (*curr)->bfd_architecture)
3938 internal_error (__FILE__, __LINE__,
3939 _("gdbarch: Duplicate registraration of architecture (%s)"),
3940 bfd_arch_info->printable_name);
3944 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
3945 bfd_arch_info->printable_name,
3948 (*curr) = XMALLOC (struct gdbarch_registration);
3949 (*curr)->bfd_architecture = bfd_architecture;
3950 (*curr)->init = init;
3951 (*curr)->dump_tdep = dump_tdep;
3952 (*curr)->arches = NULL;
3953 (*curr)->next = NULL;
3957 register_gdbarch_init (enum bfd_architecture bfd_architecture,
3958 gdbarch_init_ftype *init)
3960 gdbarch_register (bfd_architecture, init, NULL);
3964 /* Look for an architecture using gdbarch_info. */
3966 struct gdbarch_list *
3967 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
3968 const struct gdbarch_info *info)
3970 for (; arches != NULL; arches = arches->next)
3972 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
3974 if (info->byte_order != arches->gdbarch->byte_order)
3976 if (info->osabi != arches->gdbarch->osabi)
3978 if (info->target_desc != arches->gdbarch->target_desc)
3986 /* Find an architecture that matches the specified INFO. Create a new
3987 architecture if needed. Return that new architecture. Assumes
3988 that there is no current architecture. */
3990 static struct gdbarch *
3991 find_arch_by_info (struct gdbarch_info info)
3993 struct gdbarch *new_gdbarch;
3994 struct gdbarch_registration *rego;
3996 /* The existing architecture has been swapped out - all this code
3997 works from a clean slate. */
3998 gdb_assert (current_gdbarch == NULL);
4000 /* Fill in missing parts of the INFO struct using a number of
4001 sources: "set ..."; INFOabfd supplied; and the global
4003 gdbarch_info_fill (&info);
4005 /* Must have found some sort of architecture. */
4006 gdb_assert (info.bfd_arch_info != NULL);
4010 fprintf_unfiltered (gdb_stdlog,
4011 "find_arch_by_info: info.bfd_arch_info %s\n",
4012 (info.bfd_arch_info != NULL
4013 ? info.bfd_arch_info->printable_name
4015 fprintf_unfiltered (gdb_stdlog,
4016 "find_arch_by_info: info.byte_order %d (%s)\n",
4018 (info.byte_order == BFD_ENDIAN_BIG ? "big"
4019 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
4021 fprintf_unfiltered (gdb_stdlog,
4022 "find_arch_by_info: info.osabi %d (%s)\n",
4023 info.osabi, gdbarch_osabi_name (info.osabi));
4024 fprintf_unfiltered (gdb_stdlog,
4025 "find_arch_by_info: info.abfd 0x%lx\n",
4027 fprintf_unfiltered (gdb_stdlog,
4028 "find_arch_by_info: info.tdep_info 0x%lx\n",
4029 (long) info.tdep_info);
4032 /* Find the tdep code that knows about this architecture. */
4033 for (rego = gdbarch_registry;
4036 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4041 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4042 "No matching architecture\n");
4046 /* Ask the tdep code for an architecture that matches "info". */
4047 new_gdbarch = rego->init (info, rego->arches);
4049 /* Did the tdep code like it? No. Reject the change and revert to
4050 the old architecture. */
4051 if (new_gdbarch == NULL)
4054 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4055 "Target rejected architecture\n");
4059 /* Is this a pre-existing architecture (as determined by already
4060 being initialized)? Move it to the front of the architecture
4061 list (keeping the list sorted Most Recently Used). */
4062 if (new_gdbarch->initialized_p)
4064 struct gdbarch_list **list;
4065 struct gdbarch_list *this;
4067 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4068 "Previous architecture 0x%08lx (%s) selected\n",
4070 new_gdbarch->bfd_arch_info->printable_name);
4071 /* Find the existing arch in the list. */
4072 for (list = ®o->arches;
4073 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
4074 list = &(*list)->next);
4075 /* It had better be in the list of architectures. */
4076 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
4079 (*list) = this->next;
4080 /* Insert THIS at the front. */
4081 this->next = rego->arches;
4082 rego->arches = this;
4087 /* It's a new architecture. */
4089 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
4090 "New architecture 0x%08lx (%s) selected\n",
4092 new_gdbarch->bfd_arch_info->printable_name);
4094 /* Insert the new architecture into the front of the architecture
4095 list (keep the list sorted Most Recently Used). */
4097 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
4098 this->next = rego->arches;
4099 this->gdbarch = new_gdbarch;
4100 rego->arches = this;
4103 /* Check that the newly installed architecture is valid. Plug in
4104 any post init values. */
4105 new_gdbarch->dump_tdep = rego->dump_tdep;
4106 verify_gdbarch (new_gdbarch);
4107 new_gdbarch->initialized_p = 1;
4109 /* Initialize any per-architecture swap areas. This phase requires
4110 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4111 swap the entire architecture out. */
4112 current_gdbarch = new_gdbarch;
4113 current_gdbarch_swap_init_hack ();
4114 current_gdbarch_swap_out_hack ();
4117 gdbarch_dump (new_gdbarch, gdb_stdlog);
4123 gdbarch_find_by_info (struct gdbarch_info info)
4125 /* Save the previously selected architecture, setting the global to
4126 NULL. This stops things like gdbarch->init() trying to use the
4127 previous architecture's configuration. The previous architecture
4128 may not even be of the same architecture family. The most recent
4129 architecture of the same family is found at the head of the
4130 rego->arches list. */
4131 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
4133 /* Find the specified architecture. */
4134 struct gdbarch *new_gdbarch = find_arch_by_info (info);
4136 /* Restore the existing architecture. */
4137 gdb_assert (current_gdbarch == NULL);
4138 current_gdbarch_swap_in_hack (old_gdbarch);
4143 /* Make the specified architecture current, swapping the existing one
4147 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
4149 gdb_assert (new_gdbarch != NULL);
4150 gdb_assert (current_gdbarch != NULL);
4151 gdb_assert (new_gdbarch->initialized_p);
4152 current_gdbarch_swap_out_hack ();
4153 current_gdbarch_swap_in_hack (new_gdbarch);
4154 architecture_changed_event ();
4155 reinit_frame_cache ();
4158 extern void _initialize_gdbarch (void);
4161 _initialize_gdbarch (void)
4163 struct cmd_list_element *c;
4165 add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
4166 Set architecture debugging."), _("\
4167 Show architecture debugging."), _("\
4168 When non-zero, architecture debugging is enabled."),
4171 &setdebuglist, &showdebuglist);