1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6 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., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, 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;
66 /* Maintain the struct gdbarch object */
70 /* Has this architecture been fully initialized? */
73 /* An obstack bound to the lifetime of the architecture. */
74 struct obstack *obstack;
76 /* basic architectural information */
77 const struct bfd_arch_info * bfd_arch_info;
81 /* target specific vector. */
82 struct gdbarch_tdep *tdep;
83 gdbarch_dump_tdep_ftype *dump_tdep;
85 /* per-architecture data-pointers */
89 /* per-architecture swap-regions */
90 struct gdbarch_swap *swap;
94 When extending this structure you must:
98 Declare set/get functions and define the corresponding
101 gdbarch_alloc(): If zero/NULL is not a suitable default,
102 initialize the new field.
104 verify_gdbarch(): Confirm that the target updated the field
107 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
110 ``startup_gdbarch()'': Append an initial value to the static
111 variable (base values on the host's c-type system).
113 get_gdbarch(): Implement the set/get functions (probably using
114 the macro's as shortcuts).
129 gdbarch_read_pc_ftype *read_pc;
130 gdbarch_write_pc_ftype *write_pc;
131 gdbarch_read_sp_ftype *read_sp;
132 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
133 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
134 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
141 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
142 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
143 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
144 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
145 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
146 gdbarch_register_name_ftype *register_name;
147 gdbarch_register_type_ftype *register_type;
148 gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
149 int deprecated_register_bytes;
150 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
151 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
152 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
153 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
154 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
155 int deprecated_fp_regnum;
156 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
157 gdbarch_push_dummy_call_ftype *push_dummy_call;
158 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
159 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
160 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
161 int deprecated_register_size;
162 int call_dummy_location;
163 gdbarch_push_dummy_code_ftype *push_dummy_code;
164 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
165 gdbarch_print_registers_info_ftype *print_registers_info;
166 gdbarch_print_float_info_ftype *print_float_info;
167 gdbarch_print_vector_info_ftype *print_vector_info;
168 gdbarch_register_sim_regno_ftype *register_sim_regno;
169 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
170 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
171 gdbarch_cannot_store_register_ftype *cannot_store_register;
172 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
173 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
174 int believe_pcc_promotion;
175 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
176 gdbarch_convert_register_p_ftype *convert_register_p;
177 gdbarch_register_to_value_ftype *register_to_value;
178 gdbarch_value_to_register_ftype *value_to_register;
179 gdbarch_pointer_to_address_ftype *pointer_to_address;
180 gdbarch_address_to_pointer_ftype *address_to_pointer;
181 gdbarch_integer_to_address_ftype *integer_to_address;
182 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
183 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
184 gdbarch_return_value_ftype *return_value;
185 gdbarch_extract_return_value_ftype *extract_return_value;
186 gdbarch_store_return_value_ftype *store_return_value;
187 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
188 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
189 gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
190 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
191 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
192 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
193 gdbarch_skip_prologue_ftype *skip_prologue;
194 gdbarch_inner_than_ftype *inner_than;
195 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
196 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
197 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
198 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
199 CORE_ADDR decr_pc_after_break;
200 CORE_ADDR deprecated_function_start_offset;
201 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
202 CORE_ADDR frame_args_skip;
203 gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
204 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
205 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
206 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
207 gdbarch_unwind_pc_ftype *unwind_pc;
208 gdbarch_unwind_sp_ftype *unwind_sp;
209 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
210 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
211 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
212 gdbarch_frame_num_args_ftype *frame_num_args;
213 gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
214 gdbarch_frame_align_ftype *frame_align;
215 gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr;
216 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr;
217 int frame_red_zone_size;
218 const struct floatformat * float_format;
219 const struct floatformat * double_format;
220 const struct floatformat * long_double_format;
221 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
222 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
223 gdbarch_smash_text_address_ftype *smash_text_address;
224 gdbarch_software_single_step_ftype *software_single_step;
225 gdbarch_print_insn_ftype *print_insn;
226 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
227 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
228 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
229 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
230 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
231 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
232 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
233 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
234 const char * name_of_malloc;
235 int cannot_step_breakpoint;
236 int have_nonsteppable_watchpoint;
237 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
238 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
239 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
240 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
241 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
242 gdbarch_regset_from_core_section_ftype *regset_from_core_section;
246 /* The default architecture uses host values (for want of a better
249 extern const struct bfd_arch_info bfd_default_arch_struct;
251 struct gdbarch startup_gdbarch =
253 1, /* Always initialized. */
254 NULL, /* The obstack. */
255 /* basic architecture information */
256 &bfd_default_arch_struct, /* bfd_arch_info */
257 BFD_ENDIAN_BIG, /* byte_order */
258 GDB_OSABI_UNKNOWN, /* osabi */
259 /* target specific vector and its dump routine */
261 /*per-architecture data-pointers and swap regions */
263 /* Multi-arch values */
264 8 * sizeof (short), /* short_bit */
265 8 * sizeof (int), /* int_bit */
266 8 * sizeof (long), /* long_bit */
267 8 * sizeof (LONGEST), /* long_long_bit */
268 8 * sizeof (float), /* float_bit */
269 8 * sizeof (double), /* double_bit */
270 8 * sizeof (long double), /* long_double_bit */
271 8 * sizeof (void*), /* ptr_bit */
272 8 * sizeof (void*), /* addr_bit */
273 8 * sizeof (void*), /* bfd_vma_bit */
278 0, /* virtual_frame_pointer */
279 0, /* pseudo_register_read */
280 0, /* pseudo_register_write */
282 0, /* num_pseudo_regs */
287 0, /* stab_reg_to_regnum */
288 0, /* ecoff_reg_to_regnum */
289 0, /* dwarf_reg_to_regnum */
290 0, /* sdb_reg_to_regnum */
291 0, /* dwarf2_reg_to_regnum */
292 0, /* register_name */
293 0, /* register_type */
294 0, /* deprecated_register_virtual_type */
295 0, /* deprecated_register_bytes */
296 generic_register_byte, /* deprecated_register_byte */
297 generic_register_size, /* deprecated_register_raw_size */
298 generic_register_size, /* deprecated_register_virtual_size */
299 0, /* unwind_dummy_id */
300 0, /* deprecated_save_dummy_frame_tos */
301 -1, /* deprecated_fp_regnum */
302 0, /* deprecated_target_read_fp */
303 0, /* push_dummy_call */
304 0, /* deprecated_push_arguments */
305 0, /* deprecated_push_return_address */
306 0, /* deprecated_dummy_write_sp */
307 0, /* deprecated_register_size */
308 0, /* call_dummy_location */
309 0, /* push_dummy_code */
310 0, /* deprecated_do_registers_info */
311 default_print_registers_info, /* print_registers_info */
312 0, /* print_float_info */
313 0, /* print_vector_info */
314 0, /* register_sim_regno */
315 0, /* register_bytes_ok */
316 0, /* cannot_fetch_register */
317 0, /* cannot_store_register */
318 0, /* get_longjmp_target */
319 0, /* deprecated_init_frame_pc */
320 0, /* believe_pcc_promotion */
321 0, /* deprecated_get_saved_register */
322 0, /* convert_register_p */
323 0, /* register_to_value */
324 0, /* value_to_register */
325 0, /* pointer_to_address */
326 0, /* address_to_pointer */
327 0, /* integer_to_address */
328 0, /* deprecated_pop_frame */
329 0, /* deprecated_store_struct_return */
330 0, /* return_value */
331 0, /* extract_return_value */
332 0, /* store_return_value */
333 0, /* deprecated_extract_return_value */
334 0, /* deprecated_store_return_value */
335 0, /* deprecated_use_struct_convention */
336 0, /* deprecated_extract_struct_value_address */
337 0, /* deprecated_frame_init_saved_regs */
338 0, /* deprecated_init_extra_frame_info */
339 0, /* skip_prologue */
341 0, /* breakpoint_from_pc */
342 0, /* adjust_breakpoint_address */
343 0, /* memory_insert_breakpoint */
344 0, /* memory_remove_breakpoint */
345 0, /* decr_pc_after_break */
346 0, /* deprecated_function_start_offset */
347 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
348 0, /* frame_args_skip */
349 0, /* deprecated_frameless_function_invocation */
350 0, /* deprecated_frame_chain */
351 0, /* deprecated_frame_chain_valid */
352 0, /* deprecated_frame_saved_pc */
355 get_frame_base, /* deprecated_frame_args_address */
356 get_frame_base, /* deprecated_frame_locals_address */
357 0, /* deprecated_saved_pc_after_call */
358 0, /* frame_num_args */
359 0, /* deprecated_stack_align */
361 0, /* deprecated_reg_struct_has_addr */
362 default_stabs_argument_has_addr, /* stabs_argument_has_addr */
363 0, /* frame_red_zone_size */
364 0, /* float_format */
365 0, /* double_format */
366 0, /* long_double_format */
367 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
368 0, /* addr_bits_remove */
369 0, /* smash_text_address */
370 0, /* software_single_step */
372 0, /* skip_trampoline_code */
373 generic_skip_solib_resolver, /* skip_solib_resolver */
374 0, /* in_solib_call_trampoline */
375 0, /* in_solib_return_trampoline */
376 generic_in_function_epilogue_p, /* in_function_epilogue_p */
377 construct_inferior_arguments, /* construct_inferior_arguments */
378 0, /* elf_make_msymbol_special */
379 0, /* coff_make_msymbol_special */
380 "malloc", /* name_of_malloc */
381 0, /* cannot_step_breakpoint */
382 0, /* have_nonsteppable_watchpoint */
383 0, /* address_class_type_flags */
384 0, /* address_class_type_flags_to_name */
385 0, /* address_class_name_to_type_flags */
386 default_register_reggroup_p, /* register_reggroup_p */
387 0, /* fetch_pointer_argument */
388 0, /* regset_from_core_section */
389 /* startup_gdbarch() */
392 struct gdbarch *current_gdbarch = &startup_gdbarch;
394 /* Create a new ``struct gdbarch'' based on information provided by
395 ``struct gdbarch_info''. */
398 gdbarch_alloc (const struct gdbarch_info *info,
399 struct gdbarch_tdep *tdep)
401 /* NOTE: The new architecture variable is named ``current_gdbarch''
402 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
403 the current local architecture and not the previous global
404 architecture. This ensures that the new architectures initial
405 values are not influenced by the previous architecture. Once
406 everything is parameterised with gdbarch, this will go away. */
407 struct gdbarch *current_gdbarch;
409 /* Create an obstack for allocating all the per-architecture memory,
410 then use that to allocate the architecture vector. */
411 struct obstack *obstack = XMALLOC (struct obstack);
412 obstack_init (obstack);
413 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
414 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
415 current_gdbarch->obstack = obstack;
417 alloc_gdbarch_data (current_gdbarch);
419 current_gdbarch->tdep = tdep;
421 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
422 current_gdbarch->byte_order = info->byte_order;
423 current_gdbarch->osabi = info->osabi;
425 /* Force the explicit initialization of these. */
426 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
427 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
428 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
429 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
430 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
431 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
432 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
433 current_gdbarch->ptr_bit = TARGET_INT_BIT;
434 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
435 current_gdbarch->char_signed = -1;
436 current_gdbarch->write_pc = generic_target_write_pc;
437 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
438 current_gdbarch->num_regs = -1;
439 current_gdbarch->sp_regnum = -1;
440 current_gdbarch->pc_regnum = -1;
441 current_gdbarch->ps_regnum = -1;
442 current_gdbarch->fp0_regnum = -1;
443 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
444 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
445 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
446 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
447 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
448 current_gdbarch->deprecated_register_byte = generic_register_byte;
449 current_gdbarch->deprecated_register_raw_size = generic_register_size;
450 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
451 current_gdbarch->deprecated_fp_regnum = -1;
452 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
453 current_gdbarch->print_registers_info = default_print_registers_info;
454 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
455 current_gdbarch->cannot_fetch_register = cannot_register_not;
456 current_gdbarch->cannot_store_register = cannot_register_not;
457 current_gdbarch->convert_register_p = generic_convert_register_p;
458 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
459 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
460 current_gdbarch->extract_return_value = legacy_extract_return_value;
461 current_gdbarch->store_return_value = legacy_store_return_value;
462 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
463 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
464 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
465 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
466 current_gdbarch->deprecated_frame_args_address = get_frame_base;
467 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
468 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
469 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
470 current_gdbarch->addr_bits_remove = core_addr_identity;
471 current_gdbarch->smash_text_address = core_addr_identity;
472 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
473 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
474 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
475 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
476 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
477 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
478 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
479 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
480 current_gdbarch->name_of_malloc = "malloc";
481 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
482 /* gdbarch_alloc() */
484 return current_gdbarch;
488 /* Allocate extra space using the per-architecture obstack. */
491 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
493 void *data = obstack_alloc (arch->obstack, size);
494 memset (data, 0, size);
499 /* Free a gdbarch struct. This should never happen in normal
500 operation --- once you've created a gdbarch, you keep it around.
501 However, if an architecture's init function encounters an error
502 building the structure, it may need to clean up a partially
503 constructed gdbarch. */
506 gdbarch_free (struct gdbarch *arch)
508 struct obstack *obstack;
509 gdb_assert (arch != NULL);
510 gdb_assert (!arch->initialized_p);
511 obstack = arch->obstack;
512 obstack_free (obstack, 0); /* Includes the ARCH. */
517 /* Ensure that all values in a GDBARCH are reasonable. */
519 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
520 just happens to match the global variable ``current_gdbarch''. That
521 way macros refering to that variable get the local and not the global
522 version - ulgh. Once everything is parameterised with gdbarch, this
526 verify_gdbarch (struct gdbarch *current_gdbarch)
529 struct cleanup *cleanups;
532 log = mem_fileopen ();
533 cleanups = make_cleanup_ui_file_delete (log);
535 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
536 fprintf_unfiltered (log, "\n\tbyte-order");
537 if (current_gdbarch->bfd_arch_info == NULL)
538 fprintf_unfiltered (log, "\n\tbfd_arch_info");
539 /* Check those that need to be defined for the given multi-arch level. */
540 /* Skip verify of short_bit, invalid_p == 0 */
541 /* Skip verify of int_bit, invalid_p == 0 */
542 /* Skip verify of long_bit, invalid_p == 0 */
543 /* Skip verify of long_long_bit, invalid_p == 0 */
544 /* Skip verify of float_bit, invalid_p == 0 */
545 /* Skip verify of double_bit, invalid_p == 0 */
546 /* Skip verify of long_double_bit, invalid_p == 0 */
547 /* Skip verify of ptr_bit, invalid_p == 0 */
548 if (current_gdbarch->addr_bit == 0)
549 current_gdbarch->addr_bit = TARGET_PTR_BIT;
550 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
551 if (current_gdbarch->char_signed == -1)
552 current_gdbarch->char_signed = 1;
553 /* Skip verify of read_pc, has predicate */
554 /* Skip verify of write_pc, invalid_p == 0 */
555 /* Skip verify of read_sp, has predicate */
556 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
557 /* Skip verify of pseudo_register_read, has predicate */
558 /* Skip verify of pseudo_register_write, has predicate */
559 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
560 && (current_gdbarch->num_regs == -1))
561 fprintf_unfiltered (log, "\n\tnum_regs");
562 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
563 /* Skip verify of sp_regnum, invalid_p == 0 */
564 /* Skip verify of pc_regnum, invalid_p == 0 */
565 /* Skip verify of ps_regnum, invalid_p == 0 */
566 /* Skip verify of fp0_regnum, invalid_p == 0 */
567 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
568 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
569 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
570 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
571 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of register_type, has predicate */
573 /* Skip verify of deprecated_register_virtual_type, has predicate */
574 /* Skip verify of deprecated_register_byte, has predicate */
575 /* Skip verify of deprecated_register_raw_size, has predicate */
576 /* Skip verify of deprecated_register_virtual_size, has predicate */
577 /* Skip verify of unwind_dummy_id, has predicate */
578 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
579 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
580 /* Skip verify of deprecated_target_read_fp, has predicate */
581 /* Skip verify of push_dummy_call, has predicate */
582 /* Skip verify of deprecated_push_arguments, has predicate */
583 /* Skip verify of deprecated_push_return_address, has predicate */
584 /* Skip verify of deprecated_dummy_write_sp, has predicate */
585 /* Skip verify of call_dummy_location, invalid_p == 0 */
586 /* Skip verify of push_dummy_code, has predicate */
587 /* Skip verify of deprecated_do_registers_info, has predicate */
588 /* Skip verify of print_registers_info, invalid_p == 0 */
589 /* Skip verify of print_float_info, has predicate */
590 /* Skip verify of print_vector_info, has predicate */
591 /* Skip verify of register_sim_regno, invalid_p == 0 */
592 /* Skip verify of register_bytes_ok, has predicate */
593 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
594 /* Skip verify of cannot_store_register, invalid_p == 0 */
595 /* Skip verify of get_longjmp_target, has predicate */
596 /* Skip verify of deprecated_init_frame_pc, has predicate */
597 /* Skip verify of deprecated_get_saved_register, has predicate */
598 /* Skip verify of convert_register_p, invalid_p == 0 */
599 /* Skip verify of pointer_to_address, invalid_p == 0 */
600 /* Skip verify of address_to_pointer, invalid_p == 0 */
601 /* Skip verify of integer_to_address, has predicate */
602 /* Skip verify of deprecated_pop_frame, has predicate */
603 /* Skip verify of deprecated_store_struct_return, has predicate */
604 /* Skip verify of return_value, has predicate */
605 /* Skip verify of extract_return_value, invalid_p == 0 */
606 /* Skip verify of store_return_value, invalid_p == 0 */
607 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
608 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
609 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
610 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
611 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
612 && (current_gdbarch->skip_prologue == 0))
613 fprintf_unfiltered (log, "\n\tskip_prologue");
614 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
615 && (current_gdbarch->inner_than == 0))
616 fprintf_unfiltered (log, "\n\tinner_than");
617 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
618 && (current_gdbarch->breakpoint_from_pc == 0))
619 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
620 /* Skip verify of adjust_breakpoint_address, has predicate */
621 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
622 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
623 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
624 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
625 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
626 /* Skip verify of frame_args_skip, invalid_p == 0 */
627 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
628 /* Skip verify of deprecated_frame_chain, has predicate */
629 /* Skip verify of deprecated_frame_chain_valid, has predicate */
630 /* Skip verify of deprecated_frame_saved_pc, has predicate */
631 /* Skip verify of unwind_pc, has predicate */
632 /* Skip verify of unwind_sp, has predicate */
633 /* Skip verify of deprecated_frame_args_address, has predicate */
634 /* Skip verify of deprecated_frame_locals_address, has predicate */
635 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
636 /* Skip verify of frame_num_args, has predicate */
637 /* Skip verify of deprecated_stack_align, has predicate */
638 /* Skip verify of frame_align, has predicate */
639 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
640 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
641 if (current_gdbarch->float_format == 0)
642 current_gdbarch->float_format = default_float_format (current_gdbarch);
643 if (current_gdbarch->double_format == 0)
644 current_gdbarch->double_format = default_double_format (current_gdbarch);
645 if (current_gdbarch->long_double_format == 0)
646 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
647 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
648 /* Skip verify of addr_bits_remove, invalid_p == 0 */
649 /* Skip verify of smash_text_address, invalid_p == 0 */
650 /* Skip verify of software_single_step, has predicate */
651 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
652 && (current_gdbarch->print_insn == 0))
653 fprintf_unfiltered (log, "\n\tprint_insn");
654 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
655 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
656 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
657 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
658 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
659 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
660 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
661 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
662 /* Skip verify of name_of_malloc, invalid_p == 0 */
663 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
664 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
665 /* Skip verify of address_class_type_flags, has predicate */
666 /* Skip verify of address_class_type_flags_to_name, has predicate */
667 /* Skip verify of address_class_name_to_type_flags, has predicate */
668 /* Skip verify of register_reggroup_p, invalid_p == 0 */
669 /* Skip verify of fetch_pointer_argument, has predicate */
670 /* Skip verify of regset_from_core_section, has predicate */
671 buf = ui_file_xstrdup (log, &dummy);
672 make_cleanup (xfree, buf);
673 if (strlen (buf) > 0)
674 internal_error (__FILE__, __LINE__,
675 "verify_gdbarch: the following are invalid ...%s",
677 do_cleanups (cleanups);
681 /* Print out the details of the current architecture. */
683 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
684 just happens to match the global variable ``current_gdbarch''. That
685 way macros refering to that variable get the local and not the global
686 version - ulgh. Once everything is parameterised with gdbarch, this
690 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
692 fprintf_unfiltered (file,
693 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
695 fprintf_unfiltered (file,
696 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
697 (long) current_gdbarch->convert_from_func_ptr_addr);
698 fprintf_unfiltered (file,
699 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
700 gdbarch_frame_align_p (current_gdbarch));
701 fprintf_unfiltered (file,
702 "gdbarch_dump: frame_align = 0x%08lx\n",
703 (long) current_gdbarch->frame_align);
704 fprintf_unfiltered (file,
705 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
706 gdbarch_regset_from_core_section_p (current_gdbarch));
707 fprintf_unfiltered (file,
708 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
709 (long) current_gdbarch->regset_from_core_section);
710 fprintf_unfiltered (file,
711 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
712 gdbarch_return_value_p (current_gdbarch));
713 fprintf_unfiltered (file,
714 "gdbarch_dump: return_value = 0x%08lx\n",
715 (long) current_gdbarch->return_value);
716 fprintf_unfiltered (file,
717 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
718 (long) current_gdbarch->in_function_epilogue_p);
719 fprintf_unfiltered (file,
720 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
721 (long) current_gdbarch->register_reggroup_p);
722 fprintf_unfiltered (file,
723 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
724 (long) current_gdbarch->stabs_argument_has_addr);
725 fprintf_unfiltered (file,
726 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
727 gdbarch_pseudo_register_read_p (current_gdbarch));
728 fprintf_unfiltered (file,
729 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
730 (long) current_gdbarch->pseudo_register_read);
731 fprintf_unfiltered (file,
732 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
733 gdbarch_pseudo_register_write_p (current_gdbarch));
734 fprintf_unfiltered (file,
735 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
736 (long) current_gdbarch->pseudo_register_write);
737 fprintf_unfiltered (file,
738 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
739 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
740 fprintf_unfiltered (file,
741 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
742 (long) current_gdbarch->address_class_name_to_type_flags);
743 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
744 fprintf_unfiltered (file,
745 "gdbarch_dump: %s # %s\n",
746 "ADDRESS_CLASS_TYPE_FLAGS_P()",
747 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
748 fprintf_unfiltered (file,
749 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
750 ADDRESS_CLASS_TYPE_FLAGS_P ());
752 #ifdef ADDRESS_CLASS_TYPE_FLAGS
753 fprintf_unfiltered (file,
754 "gdbarch_dump: %s # %s\n",
755 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
756 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
757 fprintf_unfiltered (file,
758 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
759 (long) current_gdbarch->address_class_type_flags
760 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
762 fprintf_unfiltered (file,
763 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
764 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
765 fprintf_unfiltered (file,
766 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
767 (long) current_gdbarch->address_class_type_flags_to_name);
768 #ifdef ADDRESS_TO_POINTER
769 fprintf_unfiltered (file,
770 "gdbarch_dump: %s # %s\n",
771 "ADDRESS_TO_POINTER(type, buf, addr)",
772 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
773 fprintf_unfiltered (file,
774 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
775 (long) current_gdbarch->address_to_pointer
776 /*ADDRESS_TO_POINTER ()*/);
778 #ifdef ADDR_BITS_REMOVE
779 fprintf_unfiltered (file,
780 "gdbarch_dump: %s # %s\n",
781 "ADDR_BITS_REMOVE(addr)",
782 XSTRING (ADDR_BITS_REMOVE (addr)));
783 fprintf_unfiltered (file,
784 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
785 (long) current_gdbarch->addr_bits_remove
786 /*ADDR_BITS_REMOVE ()*/);
788 fprintf_unfiltered (file,
789 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
790 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
791 fprintf_unfiltered (file,
792 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
793 (long) current_gdbarch->adjust_breakpoint_address);
794 #ifdef BELIEVE_PCC_PROMOTION
795 fprintf_unfiltered (file,
796 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
797 XSTRING (BELIEVE_PCC_PROMOTION));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
800 BELIEVE_PCC_PROMOTION);
802 #ifdef BREAKPOINT_FROM_PC
803 fprintf_unfiltered (file,
804 "gdbarch_dump: %s # %s\n",
805 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
806 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
807 fprintf_unfiltered (file,
808 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
809 (long) current_gdbarch->breakpoint_from_pc
810 /*BREAKPOINT_FROM_PC ()*/);
812 #ifdef CALL_DUMMY_LOCATION
813 fprintf_unfiltered (file,
814 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
815 XSTRING (CALL_DUMMY_LOCATION));
816 fprintf_unfiltered (file,
817 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
818 CALL_DUMMY_LOCATION);
820 #ifdef CANNOT_FETCH_REGISTER
821 fprintf_unfiltered (file,
822 "gdbarch_dump: %s # %s\n",
823 "CANNOT_FETCH_REGISTER(regnum)",
824 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
825 fprintf_unfiltered (file,
826 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
827 (long) current_gdbarch->cannot_fetch_register
828 /*CANNOT_FETCH_REGISTER ()*/);
830 #ifdef CANNOT_STEP_BREAKPOINT
831 fprintf_unfiltered (file,
832 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
833 XSTRING (CANNOT_STEP_BREAKPOINT));
834 fprintf_unfiltered (file,
835 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
836 CANNOT_STEP_BREAKPOINT);
838 #ifdef CANNOT_STORE_REGISTER
839 fprintf_unfiltered (file,
840 "gdbarch_dump: %s # %s\n",
841 "CANNOT_STORE_REGISTER(regnum)",
842 XSTRING (CANNOT_STORE_REGISTER (regnum)));
843 fprintf_unfiltered (file,
844 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
845 (long) current_gdbarch->cannot_store_register
846 /*CANNOT_STORE_REGISTER ()*/);
848 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
849 fprintf_unfiltered (file,
850 "gdbarch_dump: %s # %s\n",
851 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
852 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
855 (long) current_gdbarch->coff_make_msymbol_special
856 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
858 fprintf_unfiltered (file,
859 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
860 (long) current_gdbarch->construct_inferior_arguments);
861 #ifdef CONVERT_REGISTER_P
862 fprintf_unfiltered (file,
863 "gdbarch_dump: %s # %s\n",
864 "CONVERT_REGISTER_P(regnum, type)",
865 XSTRING (CONVERT_REGISTER_P (regnum, type)));
866 fprintf_unfiltered (file,
867 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
868 (long) current_gdbarch->convert_register_p
869 /*CONVERT_REGISTER_P ()*/);
871 #ifdef DECR_PC_AFTER_BREAK
872 fprintf_unfiltered (file,
873 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
874 XSTRING (DECR_PC_AFTER_BREAK));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
877 (long) DECR_PC_AFTER_BREAK);
879 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
880 fprintf_unfiltered (file,
881 "gdbarch_dump: %s # %s\n",
882 "DEPRECATED_DO_REGISTERS_INFO_P()",
883 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
886 DEPRECATED_DO_REGISTERS_INFO_P ());
888 #ifdef DEPRECATED_DO_REGISTERS_INFO
889 fprintf_unfiltered (file,
890 "gdbarch_dump: %s # %s\n",
891 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
892 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
893 fprintf_unfiltered (file,
894 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
895 (long) current_gdbarch->deprecated_do_registers_info
896 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
898 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
899 fprintf_unfiltered (file,
900 "gdbarch_dump: %s # %s\n",
901 "DEPRECATED_DUMMY_WRITE_SP_P()",
902 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
903 fprintf_unfiltered (file,
904 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
905 DEPRECATED_DUMMY_WRITE_SP_P ());
907 #ifdef DEPRECATED_DUMMY_WRITE_SP
908 fprintf_unfiltered (file,
909 "gdbarch_dump: %s # %s\n",
910 "DEPRECATED_DUMMY_WRITE_SP(val)",
911 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
912 fprintf_unfiltered (file,
913 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
914 (long) current_gdbarch->deprecated_dummy_write_sp
915 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
917 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
918 fprintf_unfiltered (file,
919 "gdbarch_dump: %s # %s\n",
920 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
921 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
922 fprintf_unfiltered (file,
923 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
924 (long) current_gdbarch->deprecated_extract_return_value
925 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
927 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
930 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
931 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
934 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
936 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
937 fprintf_unfiltered (file,
938 "gdbarch_dump: %s # %s\n",
939 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
940 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
943 (long) current_gdbarch->deprecated_extract_struct_value_address
944 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
946 #ifdef DEPRECATED_FP_REGNUM
947 fprintf_unfiltered (file,
948 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
949 XSTRING (DEPRECATED_FP_REGNUM));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
952 DEPRECATED_FP_REGNUM);
954 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
955 fprintf_unfiltered (file,
956 "gdbarch_dump: %s # %s\n",
957 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
958 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
959 fprintf_unfiltered (file,
960 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
961 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
963 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
964 fprintf_unfiltered (file,
965 "gdbarch_dump: %s # %s\n",
966 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
967 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
968 fprintf_unfiltered (file,
969 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
970 (long) current_gdbarch->deprecated_frameless_function_invocation
971 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
973 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
974 fprintf_unfiltered (file,
975 "gdbarch_dump: %s # %s\n",
976 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
977 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
980 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
982 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
983 fprintf_unfiltered (file,
984 "gdbarch_dump: %s # %s\n",
985 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
986 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
987 fprintf_unfiltered (file,
988 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
989 (long) current_gdbarch->deprecated_frame_args_address
990 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
992 #ifdef DEPRECATED_FRAME_CHAIN_P
993 fprintf_unfiltered (file,
994 "gdbarch_dump: %s # %s\n",
995 "DEPRECATED_FRAME_CHAIN_P()",
996 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
999 DEPRECATED_FRAME_CHAIN_P ());
1001 #ifdef DEPRECATED_FRAME_CHAIN
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: %s # %s\n",
1004 "DEPRECATED_FRAME_CHAIN(frame)",
1005 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1008 (long) current_gdbarch->deprecated_frame_chain
1009 /*DEPRECATED_FRAME_CHAIN ()*/);
1011 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: %s # %s\n",
1014 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1015 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1018 DEPRECATED_FRAME_CHAIN_VALID_P ());
1020 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: %s # %s\n",
1023 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1024 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1027 (long) current_gdbarch->deprecated_frame_chain_valid
1028 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1030 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: %s # %s\n",
1033 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1034 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1037 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1039 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: %s # %s\n",
1042 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1043 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1046 (long) current_gdbarch->deprecated_frame_init_saved_regs
1047 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1049 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: %s # %s\n",
1052 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1053 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1056 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1058 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: %s # %s\n",
1061 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1062 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1063 fprintf_unfiltered (file,
1064 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1065 (long) current_gdbarch->deprecated_frame_locals_address
1066 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1068 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: %s # %s\n",
1071 "DEPRECATED_FRAME_SAVED_PC_P()",
1072 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1073 fprintf_unfiltered (file,
1074 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1075 DEPRECATED_FRAME_SAVED_PC_P ());
1077 #ifdef DEPRECATED_FRAME_SAVED_PC
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: %s # %s\n",
1080 "DEPRECATED_FRAME_SAVED_PC(fi)",
1081 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1084 (long) current_gdbarch->deprecated_frame_saved_pc
1085 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1087 #ifdef DEPRECATED_FUNCTION_START_OFFSET
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
1090 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET = %ld\n",
1093 (long) DEPRECATED_FUNCTION_START_OFFSET);
1095 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: %s # %s\n",
1098 "DEPRECATED_GET_SAVED_REGISTER_P()",
1099 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1102 DEPRECATED_GET_SAVED_REGISTER_P ());
1104 #ifdef DEPRECATED_GET_SAVED_REGISTER
1105 fprintf_unfiltered (file,
1106 "gdbarch_dump: %s # %s\n",
1107 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1108 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1111 (long) current_gdbarch->deprecated_get_saved_register
1112 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1114 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: %s # %s\n",
1117 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1118 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1121 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1123 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: %s # %s\n",
1126 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1127 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1128 fprintf_unfiltered (file,
1129 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1130 (long) current_gdbarch->deprecated_init_extra_frame_info
1131 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1133 #ifdef DEPRECATED_INIT_FRAME_PC_P
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: %s # %s\n",
1136 "DEPRECATED_INIT_FRAME_PC_P()",
1137 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1140 DEPRECATED_INIT_FRAME_PC_P ());
1142 #ifdef DEPRECATED_INIT_FRAME_PC
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1146 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1147 fprintf_unfiltered (file,
1148 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1149 (long) current_gdbarch->deprecated_init_frame_pc
1150 /*DEPRECATED_INIT_FRAME_PC ()*/);
1152 #ifdef DEPRECATED_POP_FRAME_P
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: %s # %s\n",
1155 "DEPRECATED_POP_FRAME_P()",
1156 XSTRING (DEPRECATED_POP_FRAME_P ()));
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1159 DEPRECATED_POP_FRAME_P ());
1161 #ifdef DEPRECATED_POP_FRAME
1162 fprintf_unfiltered (file,
1163 "gdbarch_dump: %s # %s\n",
1164 "DEPRECATED_POP_FRAME(-)",
1165 XSTRING (DEPRECATED_POP_FRAME (-)));
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1168 (long) current_gdbarch->deprecated_pop_frame
1169 /*DEPRECATED_POP_FRAME ()*/);
1171 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: %s # %s\n",
1174 "DEPRECATED_PUSH_ARGUMENTS_P()",
1175 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1178 DEPRECATED_PUSH_ARGUMENTS_P ());
1180 #ifdef DEPRECATED_PUSH_ARGUMENTS
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: %s # %s\n",
1183 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1184 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1185 fprintf_unfiltered (file,
1186 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1187 (long) current_gdbarch->deprecated_push_arguments
1188 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1190 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: %s # %s\n",
1193 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1194 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1197 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1199 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1203 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1206 (long) current_gdbarch->deprecated_push_return_address
1207 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1209 #ifdef DEPRECATED_REGISTER_BYTE_P
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: %s # %s\n",
1212 "DEPRECATED_REGISTER_BYTE_P()",
1213 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1216 DEPRECATED_REGISTER_BYTE_P ());
1218 #ifdef DEPRECATED_REGISTER_BYTE
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: %s # %s\n",
1221 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1222 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1225 (long) current_gdbarch->deprecated_register_byte
1226 /*DEPRECATED_REGISTER_BYTE ()*/);
1228 #ifdef DEPRECATED_REGISTER_BYTES
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1231 XSTRING (DEPRECATED_REGISTER_BYTES));
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1234 DEPRECATED_REGISTER_BYTES);
1236 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1240 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1243 DEPRECATED_REGISTER_RAW_SIZE_P ());
1245 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: %s # %s\n",
1248 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1249 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1252 (long) current_gdbarch->deprecated_register_raw_size
1253 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1255 #ifdef DEPRECATED_REGISTER_SIZE
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1258 XSTRING (DEPRECATED_REGISTER_SIZE));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1261 DEPRECATED_REGISTER_SIZE);
1263 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: %s # %s\n",
1266 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1267 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1270 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1272 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1276 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1279 (long) current_gdbarch->deprecated_register_virtual_size
1280 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1282 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: %s # %s\n",
1285 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1286 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1289 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1291 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: %s # %s\n",
1294 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1295 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1298 (long) current_gdbarch->deprecated_register_virtual_type
1299 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1301 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: %s # %s\n",
1304 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1305 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1308 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1310 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: %s # %s\n",
1313 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1314 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1317 (long) current_gdbarch->deprecated_reg_struct_has_addr
1318 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1320 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: %s # %s\n",
1323 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1324 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1327 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1329 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: %s # %s\n",
1332 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1333 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1336 (long) current_gdbarch->deprecated_saved_pc_after_call
1337 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1339 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: %s # %s\n",
1342 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1343 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1344 fprintf_unfiltered (file,
1345 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1346 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1348 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: %s # %s\n",
1351 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1352 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1353 fprintf_unfiltered (file,
1354 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1355 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1356 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1358 #ifdef DEPRECATED_STACK_ALIGN_P
1359 fprintf_unfiltered (file,
1360 "gdbarch_dump: %s # %s\n",
1361 "DEPRECATED_STACK_ALIGN_P()",
1362 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1365 DEPRECATED_STACK_ALIGN_P ());
1367 #ifdef DEPRECATED_STACK_ALIGN
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: %s # %s\n",
1370 "DEPRECATED_STACK_ALIGN(sp)",
1371 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1374 (long) current_gdbarch->deprecated_stack_align
1375 /*DEPRECATED_STACK_ALIGN ()*/);
1377 #ifdef DEPRECATED_STORE_RETURN_VALUE
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: %s # %s\n",
1380 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1381 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1384 (long) current_gdbarch->deprecated_store_return_value
1385 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1387 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: %s # %s\n",
1390 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1391 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1394 DEPRECATED_STORE_STRUCT_RETURN_P ());
1396 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: %s # %s\n",
1399 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1400 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1403 (long) current_gdbarch->deprecated_store_struct_return
1404 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1406 #ifdef DEPRECATED_TARGET_READ_FP_P
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: %s # %s\n",
1409 "DEPRECATED_TARGET_READ_FP_P()",
1410 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1413 DEPRECATED_TARGET_READ_FP_P ());
1415 #ifdef DEPRECATED_TARGET_READ_FP
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: %s # %s\n",
1418 "DEPRECATED_TARGET_READ_FP()",
1419 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1422 (long) current_gdbarch->deprecated_target_read_fp
1423 /*DEPRECATED_TARGET_READ_FP ()*/);
1425 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: %s # %s\n",
1428 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
1429 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: DEPRECATED_USE_STRUCT_CONVENTION = <0x%08lx>\n",
1432 (long) current_gdbarch->deprecated_use_struct_convention
1433 /*DEPRECATED_USE_STRUCT_CONVENTION ()*/);
1435 #ifdef DWARF2_REG_TO_REGNUM
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: %s # %s\n",
1438 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1439 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1440 fprintf_unfiltered (file,
1441 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1442 (long) current_gdbarch->dwarf2_reg_to_regnum
1443 /*DWARF2_REG_TO_REGNUM ()*/);
1445 #ifdef DWARF_REG_TO_REGNUM
1446 fprintf_unfiltered (file,
1447 "gdbarch_dump: %s # %s\n",
1448 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1449 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1452 (long) current_gdbarch->dwarf_reg_to_regnum
1453 /*DWARF_REG_TO_REGNUM ()*/);
1455 #ifdef ECOFF_REG_TO_REGNUM
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: %s # %s\n",
1458 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1459 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1462 (long) current_gdbarch->ecoff_reg_to_regnum
1463 /*ECOFF_REG_TO_REGNUM ()*/);
1465 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1469 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1472 (long) current_gdbarch->elf_make_msymbol_special
1473 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1475 #ifdef EXTRACT_RETURN_VALUE
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: %s # %s\n",
1478 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1479 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1482 (long) current_gdbarch->extract_return_value
1483 /*EXTRACT_RETURN_VALUE ()*/);
1485 #ifdef FETCH_POINTER_ARGUMENT_P
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: %s # %s\n",
1488 "FETCH_POINTER_ARGUMENT_P()",
1489 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1490 fprintf_unfiltered (file,
1491 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1492 FETCH_POINTER_ARGUMENT_P ());
1494 #ifdef FETCH_POINTER_ARGUMENT
1495 fprintf_unfiltered (file,
1496 "gdbarch_dump: %s # %s\n",
1497 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1498 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1501 (long) current_gdbarch->fetch_pointer_argument
1502 /*FETCH_POINTER_ARGUMENT ()*/);
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: FP0_REGNUM # %s\n",
1507 XSTRING (FP0_REGNUM));
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: FP0_REGNUM = %d\n",
1512 #ifdef FRAME_ARGS_SKIP
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1515 XSTRING (FRAME_ARGS_SKIP));
1516 fprintf_unfiltered (file,
1517 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1518 (long) FRAME_ARGS_SKIP);
1520 #ifdef FRAME_NUM_ARGS_P
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: %s # %s\n",
1523 "FRAME_NUM_ARGS_P()",
1524 XSTRING (FRAME_NUM_ARGS_P ()));
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1527 FRAME_NUM_ARGS_P ());
1529 #ifdef FRAME_NUM_ARGS
1530 fprintf_unfiltered (file,
1531 "gdbarch_dump: %s # %s\n",
1532 "FRAME_NUM_ARGS(frame)",
1533 XSTRING (FRAME_NUM_ARGS (frame)));
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1536 (long) current_gdbarch->frame_num_args
1537 /*FRAME_NUM_ARGS ()*/);
1539 #ifdef FRAME_RED_ZONE_SIZE
1540 fprintf_unfiltered (file,
1541 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1542 XSTRING (FRAME_RED_ZONE_SIZE));
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1545 FRAME_RED_ZONE_SIZE);
1547 #ifdef GET_LONGJMP_TARGET_P
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: %s # %s\n",
1550 "GET_LONGJMP_TARGET_P()",
1551 XSTRING (GET_LONGJMP_TARGET_P ()));
1552 fprintf_unfiltered (file,
1553 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1554 GET_LONGJMP_TARGET_P ());
1556 #ifdef GET_LONGJMP_TARGET
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "GET_LONGJMP_TARGET(pc)",
1560 XSTRING (GET_LONGJMP_TARGET (pc)));
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1563 (long) current_gdbarch->get_longjmp_target
1564 /*GET_LONGJMP_TARGET ()*/);
1566 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1567 fprintf_unfiltered (file,
1568 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1569 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1572 HAVE_NONSTEPPABLE_WATCHPOINT);
1575 fprintf_unfiltered (file,
1576 "gdbarch_dump: %s # %s\n",
1577 "INNER_THAN(lhs, rhs)",
1578 XSTRING (INNER_THAN (lhs, rhs)));
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1581 (long) current_gdbarch->inner_than
1584 #ifdef INTEGER_TO_ADDRESS_P
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: %s # %s\n",
1587 "INTEGER_TO_ADDRESS_P()",
1588 XSTRING (INTEGER_TO_ADDRESS_P ()));
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1591 INTEGER_TO_ADDRESS_P ());
1593 #ifdef INTEGER_TO_ADDRESS
1594 fprintf_unfiltered (file,
1595 "gdbarch_dump: %s # %s\n",
1596 "INTEGER_TO_ADDRESS(type, buf)",
1597 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1600 (long) current_gdbarch->integer_to_address
1601 /*INTEGER_TO_ADDRESS ()*/);
1603 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: %s # %s\n",
1606 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1607 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1608 fprintf_unfiltered (file,
1609 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1610 (long) current_gdbarch->in_solib_call_trampoline
1611 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1613 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: %s # %s\n",
1616 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1617 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1620 (long) current_gdbarch->in_solib_return_trampoline
1621 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1623 #ifdef MEMORY_INSERT_BREAKPOINT
1624 fprintf_unfiltered (file,
1625 "gdbarch_dump: %s # %s\n",
1626 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1627 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1628 fprintf_unfiltered (file,
1629 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1630 (long) current_gdbarch->memory_insert_breakpoint
1631 /*MEMORY_INSERT_BREAKPOINT ()*/);
1633 #ifdef MEMORY_REMOVE_BREAKPOINT
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: %s # %s\n",
1636 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1637 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1640 (long) current_gdbarch->memory_remove_breakpoint
1641 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1643 #ifdef NAME_OF_MALLOC
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1646 XSTRING (NAME_OF_MALLOC));
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1651 #ifdef NUM_PSEUDO_REGS
1652 fprintf_unfiltered (file,
1653 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1654 XSTRING (NUM_PSEUDO_REGS));
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1660 fprintf_unfiltered (file,
1661 "gdbarch_dump: NUM_REGS # %s\n",
1662 XSTRING (NUM_REGS));
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: NUM_REGS = %d\n",
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: PC_REGNUM # %s\n",
1670 XSTRING (PC_REGNUM));
1671 fprintf_unfiltered (file,
1672 "gdbarch_dump: PC_REGNUM = %d\n",
1675 #ifdef POINTER_TO_ADDRESS
1676 fprintf_unfiltered (file,
1677 "gdbarch_dump: %s # %s\n",
1678 "POINTER_TO_ADDRESS(type, buf)",
1679 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1680 fprintf_unfiltered (file,
1681 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1682 (long) current_gdbarch->pointer_to_address
1683 /*POINTER_TO_ADDRESS ()*/);
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1687 gdbarch_print_float_info_p (current_gdbarch));
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: print_float_info = 0x%08lx\n",
1690 (long) current_gdbarch->print_float_info);
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1693 (long) current_gdbarch->print_registers_info);
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1696 gdbarch_print_vector_info_p (current_gdbarch));
1697 fprintf_unfiltered (file,
1698 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1699 (long) current_gdbarch->print_vector_info);
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: PS_REGNUM # %s\n",
1703 XSTRING (PS_REGNUM));
1704 fprintf_unfiltered (file,
1705 "gdbarch_dump: PS_REGNUM = %d\n",
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1710 gdbarch_push_dummy_call_p (current_gdbarch));
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1713 (long) current_gdbarch->push_dummy_call);
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1716 gdbarch_push_dummy_code_p (current_gdbarch));
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1719 (long) current_gdbarch->push_dummy_code);
1720 #ifdef REGISTER_BYTES_OK_P
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: %s # %s\n",
1723 "REGISTER_BYTES_OK_P()",
1724 XSTRING (REGISTER_BYTES_OK_P ()));
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1727 REGISTER_BYTES_OK_P ());
1729 #ifdef REGISTER_BYTES_OK
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: %s # %s\n",
1732 "REGISTER_BYTES_OK(nr_bytes)",
1733 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1736 (long) current_gdbarch->register_bytes_ok
1737 /*REGISTER_BYTES_OK ()*/);
1739 #ifdef REGISTER_NAME
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: %s # %s\n",
1742 "REGISTER_NAME(regnr)",
1743 XSTRING (REGISTER_NAME (regnr)));
1744 fprintf_unfiltered (file,
1745 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1746 (long) current_gdbarch->register_name
1747 /*REGISTER_NAME ()*/);
1749 #ifdef REGISTER_SIM_REGNO
1750 fprintf_unfiltered (file,
1751 "gdbarch_dump: %s # %s\n",
1752 "REGISTER_SIM_REGNO(reg_nr)",
1753 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1756 (long) current_gdbarch->register_sim_regno
1757 /*REGISTER_SIM_REGNO ()*/);
1759 #ifdef REGISTER_TO_VALUE
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: %s # %s\n",
1762 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1763 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1764 fprintf_unfiltered (file,
1765 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1766 (long) current_gdbarch->register_to_value
1767 /*REGISTER_TO_VALUE ()*/);
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1771 gdbarch_register_type_p (current_gdbarch));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: register_type = 0x%08lx\n",
1774 (long) current_gdbarch->register_type);
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1777 (long) current_gdbarch->remote_translate_xfer_address);
1778 #ifdef SDB_REG_TO_REGNUM
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: %s # %s\n",
1781 "SDB_REG_TO_REGNUM(sdb_regnr)",
1782 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1783 fprintf_unfiltered (file,
1784 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1785 (long) current_gdbarch->sdb_reg_to_regnum
1786 /*SDB_REG_TO_REGNUM ()*/);
1788 #ifdef SKIP_PROLOGUE
1789 fprintf_unfiltered (file,
1790 "gdbarch_dump: %s # %s\n",
1791 "SKIP_PROLOGUE(ip)",
1792 XSTRING (SKIP_PROLOGUE (ip)));
1793 fprintf_unfiltered (file,
1794 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1795 (long) current_gdbarch->skip_prologue
1796 /*SKIP_PROLOGUE ()*/);
1798 fprintf_unfiltered (file,
1799 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1800 (long) current_gdbarch->skip_solib_resolver);
1801 #ifdef SKIP_TRAMPOLINE_CODE
1802 fprintf_unfiltered (file,
1803 "gdbarch_dump: %s # %s\n",
1804 "SKIP_TRAMPOLINE_CODE(pc)",
1805 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1806 fprintf_unfiltered (file,
1807 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1808 (long) current_gdbarch->skip_trampoline_code
1809 /*SKIP_TRAMPOLINE_CODE ()*/);
1811 #ifdef SMASH_TEXT_ADDRESS
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: %s # %s\n",
1814 "SMASH_TEXT_ADDRESS(addr)",
1815 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1816 fprintf_unfiltered (file,
1817 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1818 (long) current_gdbarch->smash_text_address
1819 /*SMASH_TEXT_ADDRESS ()*/);
1821 #ifdef SOFTWARE_SINGLE_STEP_P
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: %s # %s\n",
1824 "SOFTWARE_SINGLE_STEP_P()",
1825 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1828 SOFTWARE_SINGLE_STEP_P ());
1830 #ifdef SOFTWARE_SINGLE_STEP
1831 fprintf_unfiltered (file,
1832 "gdbarch_dump: %s # %s\n",
1833 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1834 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1835 fprintf_unfiltered (file,
1836 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1837 (long) current_gdbarch->software_single_step
1838 /*SOFTWARE_SINGLE_STEP ()*/);
1841 fprintf_unfiltered (file,
1842 "gdbarch_dump: SP_REGNUM # %s\n",
1843 XSTRING (SP_REGNUM));
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: SP_REGNUM = %d\n",
1848 #ifdef STAB_REG_TO_REGNUM
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: %s # %s\n",
1851 "STAB_REG_TO_REGNUM(stab_regnr)",
1852 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1855 (long) current_gdbarch->stab_reg_to_regnum
1856 /*STAB_REG_TO_REGNUM ()*/);
1858 #ifdef STORE_RETURN_VALUE
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: %s # %s\n",
1861 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1862 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1865 (long) current_gdbarch->store_return_value
1866 /*STORE_RETURN_VALUE ()*/);
1868 #ifdef TARGET_ADDR_BIT
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1871 XSTRING (TARGET_ADDR_BIT));
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1876 #ifdef TARGET_ARCHITECTURE
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1879 XSTRING (TARGET_ARCHITECTURE));
1880 if (TARGET_ARCHITECTURE != NULL)
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1883 TARGET_ARCHITECTURE->printable_name);
1885 #ifdef TARGET_BFD_VMA_BIT
1886 fprintf_unfiltered (file,
1887 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1888 XSTRING (TARGET_BFD_VMA_BIT));
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1891 TARGET_BFD_VMA_BIT);
1893 #ifdef TARGET_BYTE_ORDER
1894 fprintf_unfiltered (file,
1895 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1896 XSTRING (TARGET_BYTE_ORDER));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1899 (long) TARGET_BYTE_ORDER);
1901 #ifdef TARGET_CHAR_SIGNED
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1904 XSTRING (TARGET_CHAR_SIGNED));
1905 fprintf_unfiltered (file,
1906 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1907 TARGET_CHAR_SIGNED);
1909 #ifdef TARGET_DOUBLE_BIT
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1912 XSTRING (TARGET_DOUBLE_BIT));
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1917 #ifdef TARGET_DOUBLE_FORMAT
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1920 XSTRING (TARGET_DOUBLE_FORMAT));
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
1923 (TARGET_DOUBLE_FORMAT)->name);
1925 #ifdef TARGET_FLOAT_BIT
1926 fprintf_unfiltered (file,
1927 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1928 XSTRING (TARGET_FLOAT_BIT));
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1933 #ifdef TARGET_FLOAT_FORMAT
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1936 XSTRING (TARGET_FLOAT_FORMAT));
1937 fprintf_unfiltered (file,
1938 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
1939 (TARGET_FLOAT_FORMAT)->name);
1941 #ifdef TARGET_INT_BIT
1942 fprintf_unfiltered (file,
1943 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1944 XSTRING (TARGET_INT_BIT));
1945 fprintf_unfiltered (file,
1946 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1949 #ifdef TARGET_LONG_BIT
1950 fprintf_unfiltered (file,
1951 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1952 XSTRING (TARGET_LONG_BIT));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1957 #ifdef TARGET_LONG_DOUBLE_BIT
1958 fprintf_unfiltered (file,
1959 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1960 XSTRING (TARGET_LONG_DOUBLE_BIT));
1961 fprintf_unfiltered (file,
1962 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1963 TARGET_LONG_DOUBLE_BIT);
1965 #ifdef TARGET_LONG_DOUBLE_FORMAT
1966 fprintf_unfiltered (file,
1967 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1968 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
1971 (TARGET_LONG_DOUBLE_FORMAT)->name);
1973 #ifdef TARGET_LONG_LONG_BIT
1974 fprintf_unfiltered (file,
1975 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1976 XSTRING (TARGET_LONG_LONG_BIT));
1977 fprintf_unfiltered (file,
1978 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
1979 TARGET_LONG_LONG_BIT);
1982 fprintf_unfiltered (file,
1983 "gdbarch_dump: TARGET_OSABI # %s\n",
1984 XSTRING (TARGET_OSABI));
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: TARGET_OSABI = %ld\n",
1987 (long) TARGET_OSABI);
1989 #ifdef TARGET_PRINT_INSN
1990 fprintf_unfiltered (file,
1991 "gdbarch_dump: %s # %s\n",
1992 "TARGET_PRINT_INSN(vma, info)",
1993 XSTRING (TARGET_PRINT_INSN (vma, info)));
1994 fprintf_unfiltered (file,
1995 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
1996 (long) current_gdbarch->print_insn
1997 /*TARGET_PRINT_INSN ()*/);
1999 #ifdef TARGET_PTR_BIT
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2002 XSTRING (TARGET_PTR_BIT));
2003 fprintf_unfiltered (file,
2004 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2007 #ifdef TARGET_READ_PC_P
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: %s # %s\n",
2010 "TARGET_READ_PC_P()",
2011 XSTRING (TARGET_READ_PC_P ()));
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2014 TARGET_READ_PC_P ());
2016 #ifdef TARGET_READ_PC
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: %s # %s\n",
2019 "TARGET_READ_PC(ptid)",
2020 XSTRING (TARGET_READ_PC (ptid)));
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2023 (long) current_gdbarch->read_pc
2024 /*TARGET_READ_PC ()*/);
2026 #ifdef TARGET_READ_SP_P
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: %s # %s\n",
2029 "TARGET_READ_SP_P()",
2030 XSTRING (TARGET_READ_SP_P ()));
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2033 TARGET_READ_SP_P ());
2035 #ifdef TARGET_READ_SP
2036 fprintf_unfiltered (file,
2037 "gdbarch_dump: %s # %s\n",
2039 XSTRING (TARGET_READ_SP ()));
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2042 (long) current_gdbarch->read_sp
2043 /*TARGET_READ_SP ()*/);
2045 #ifdef TARGET_SHORT_BIT
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2048 XSTRING (TARGET_SHORT_BIT));
2049 fprintf_unfiltered (file,
2050 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2053 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2054 fprintf_unfiltered (file,
2055 "gdbarch_dump: %s # %s\n",
2056 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2057 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2058 fprintf_unfiltered (file,
2059 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2060 (long) current_gdbarch->virtual_frame_pointer
2061 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2063 #ifdef TARGET_WRITE_PC
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: %s # %s\n",
2066 "TARGET_WRITE_PC(val, ptid)",
2067 XSTRING (TARGET_WRITE_PC (val, ptid)));
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2070 (long) current_gdbarch->write_pc
2071 /*TARGET_WRITE_PC ()*/);
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2075 gdbarch_unwind_dummy_id_p (current_gdbarch));
2076 fprintf_unfiltered (file,
2077 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2078 (long) current_gdbarch->unwind_dummy_id);
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2081 gdbarch_unwind_pc_p (current_gdbarch));
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2084 (long) current_gdbarch->unwind_pc);
2085 fprintf_unfiltered (file,
2086 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2087 gdbarch_unwind_sp_p (current_gdbarch));
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2090 (long) current_gdbarch->unwind_sp);
2091 #ifdef VALUE_TO_REGISTER
2092 fprintf_unfiltered (file,
2093 "gdbarch_dump: %s # %s\n",
2094 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2095 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2096 fprintf_unfiltered (file,
2097 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2098 (long) current_gdbarch->value_to_register
2099 /*VALUE_TO_REGISTER ()*/);
2101 if (current_gdbarch->dump_tdep != NULL)
2102 current_gdbarch->dump_tdep (current_gdbarch, file);
2105 struct gdbarch_tdep *
2106 gdbarch_tdep (struct gdbarch *gdbarch)
2108 if (gdbarch_debug >= 2)
2109 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2110 return gdbarch->tdep;
2114 const struct bfd_arch_info *
2115 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2117 gdb_assert (gdbarch != NULL);
2118 if (gdbarch_debug >= 2)
2119 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2120 return gdbarch->bfd_arch_info;
2124 gdbarch_byte_order (struct gdbarch *gdbarch)
2126 gdb_assert (gdbarch != NULL);
2127 if (gdbarch_debug >= 2)
2128 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2129 return gdbarch->byte_order;
2133 gdbarch_osabi (struct gdbarch *gdbarch)
2135 gdb_assert (gdbarch != NULL);
2136 if (gdbarch_debug >= 2)
2137 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2138 return gdbarch->osabi;
2142 gdbarch_short_bit (struct gdbarch *gdbarch)
2144 gdb_assert (gdbarch != NULL);
2145 /* Skip verify of short_bit, invalid_p == 0 */
2146 if (gdbarch_debug >= 2)
2147 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2148 return gdbarch->short_bit;
2152 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2155 gdbarch->short_bit = short_bit;
2159 gdbarch_int_bit (struct gdbarch *gdbarch)
2161 gdb_assert (gdbarch != NULL);
2162 /* Skip verify of int_bit, invalid_p == 0 */
2163 if (gdbarch_debug >= 2)
2164 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2165 return gdbarch->int_bit;
2169 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2172 gdbarch->int_bit = int_bit;
2176 gdbarch_long_bit (struct gdbarch *gdbarch)
2178 gdb_assert (gdbarch != NULL);
2179 /* Skip verify of long_bit, invalid_p == 0 */
2180 if (gdbarch_debug >= 2)
2181 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2182 return gdbarch->long_bit;
2186 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2189 gdbarch->long_bit = long_bit;
2193 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2195 gdb_assert (gdbarch != NULL);
2196 /* Skip verify of long_long_bit, invalid_p == 0 */
2197 if (gdbarch_debug >= 2)
2198 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2199 return gdbarch->long_long_bit;
2203 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2206 gdbarch->long_long_bit = long_long_bit;
2210 gdbarch_float_bit (struct gdbarch *gdbarch)
2212 gdb_assert (gdbarch != NULL);
2213 /* Skip verify of float_bit, invalid_p == 0 */
2214 if (gdbarch_debug >= 2)
2215 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2216 return gdbarch->float_bit;
2220 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2223 gdbarch->float_bit = float_bit;
2227 gdbarch_double_bit (struct gdbarch *gdbarch)
2229 gdb_assert (gdbarch != NULL);
2230 /* Skip verify of double_bit, invalid_p == 0 */
2231 if (gdbarch_debug >= 2)
2232 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2233 return gdbarch->double_bit;
2237 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2240 gdbarch->double_bit = double_bit;
2244 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2246 gdb_assert (gdbarch != NULL);
2247 /* Skip verify of long_double_bit, invalid_p == 0 */
2248 if (gdbarch_debug >= 2)
2249 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2250 return gdbarch->long_double_bit;
2254 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2255 int long_double_bit)
2257 gdbarch->long_double_bit = long_double_bit;
2261 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2263 gdb_assert (gdbarch != NULL);
2264 /* Skip verify of ptr_bit, invalid_p == 0 */
2265 if (gdbarch_debug >= 2)
2266 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2267 return gdbarch->ptr_bit;
2271 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2274 gdbarch->ptr_bit = ptr_bit;
2278 gdbarch_addr_bit (struct gdbarch *gdbarch)
2280 gdb_assert (gdbarch != NULL);
2281 /* Check variable changed from pre-default. */
2282 gdb_assert (gdbarch->addr_bit != 0);
2283 if (gdbarch_debug >= 2)
2284 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2285 return gdbarch->addr_bit;
2289 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2292 gdbarch->addr_bit = addr_bit;
2296 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2298 gdb_assert (gdbarch != NULL);
2299 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2300 if (gdbarch_debug >= 2)
2301 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2302 return gdbarch->bfd_vma_bit;
2306 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2309 gdbarch->bfd_vma_bit = bfd_vma_bit;
2313 gdbarch_char_signed (struct gdbarch *gdbarch)
2315 gdb_assert (gdbarch != NULL);
2316 /* Check variable changed from pre-default. */
2317 gdb_assert (gdbarch->char_signed != -1);
2318 if (gdbarch_debug >= 2)
2319 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2320 return gdbarch->char_signed;
2324 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2327 gdbarch->char_signed = char_signed;
2331 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2333 gdb_assert (gdbarch != NULL);
2334 return gdbarch->read_pc != NULL;
2338 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2340 gdb_assert (gdbarch != NULL);
2341 gdb_assert (gdbarch->read_pc != NULL);
2342 if (gdbarch_debug >= 2)
2343 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2344 return gdbarch->read_pc (ptid);
2348 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2349 gdbarch_read_pc_ftype read_pc)
2351 gdbarch->read_pc = read_pc;
2355 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2357 gdb_assert (gdbarch != NULL);
2358 gdb_assert (gdbarch->write_pc != NULL);
2359 if (gdbarch_debug >= 2)
2360 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2361 gdbarch->write_pc (val, ptid);
2365 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2366 gdbarch_write_pc_ftype write_pc)
2368 gdbarch->write_pc = write_pc;
2372 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2374 gdb_assert (gdbarch != NULL);
2375 return gdbarch->read_sp != NULL;
2379 gdbarch_read_sp (struct gdbarch *gdbarch)
2381 gdb_assert (gdbarch != NULL);
2382 gdb_assert (gdbarch->read_sp != NULL);
2383 if (gdbarch_debug >= 2)
2384 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2385 return gdbarch->read_sp ();
2389 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2390 gdbarch_read_sp_ftype read_sp)
2392 gdbarch->read_sp = read_sp;
2396 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2398 gdb_assert (gdbarch != NULL);
2399 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2400 if (gdbarch_debug >= 2)
2401 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2402 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2406 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2407 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2409 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2413 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2415 gdb_assert (gdbarch != NULL);
2416 return gdbarch->pseudo_register_read != NULL;
2420 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2422 gdb_assert (gdbarch != NULL);
2423 gdb_assert (gdbarch->pseudo_register_read != NULL);
2424 if (gdbarch_debug >= 2)
2425 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2426 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2430 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2431 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2433 gdbarch->pseudo_register_read = pseudo_register_read;
2437 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2439 gdb_assert (gdbarch != NULL);
2440 return gdbarch->pseudo_register_write != NULL;
2444 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2446 gdb_assert (gdbarch != NULL);
2447 gdb_assert (gdbarch->pseudo_register_write != NULL);
2448 if (gdbarch_debug >= 2)
2449 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2450 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2454 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2455 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2457 gdbarch->pseudo_register_write = pseudo_register_write;
2461 gdbarch_num_regs (struct gdbarch *gdbarch)
2463 gdb_assert (gdbarch != NULL);
2464 /* Check variable changed from pre-default. */
2465 gdb_assert (gdbarch->num_regs != -1);
2466 if (gdbarch_debug >= 2)
2467 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2468 return gdbarch->num_regs;
2472 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2475 gdbarch->num_regs = num_regs;
2479 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2481 gdb_assert (gdbarch != NULL);
2482 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2483 if (gdbarch_debug >= 2)
2484 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2485 return gdbarch->num_pseudo_regs;
2489 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2490 int num_pseudo_regs)
2492 gdbarch->num_pseudo_regs = num_pseudo_regs;
2496 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2498 gdb_assert (gdbarch != NULL);
2499 /* Skip verify of sp_regnum, invalid_p == 0 */
2500 if (gdbarch_debug >= 2)
2501 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2502 return gdbarch->sp_regnum;
2506 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2509 gdbarch->sp_regnum = sp_regnum;
2513 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2515 gdb_assert (gdbarch != NULL);
2516 /* Skip verify of pc_regnum, invalid_p == 0 */
2517 if (gdbarch_debug >= 2)
2518 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2519 return gdbarch->pc_regnum;
2523 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2526 gdbarch->pc_regnum = pc_regnum;
2530 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2532 gdb_assert (gdbarch != NULL);
2533 /* Skip verify of ps_regnum, invalid_p == 0 */
2534 if (gdbarch_debug >= 2)
2535 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2536 return gdbarch->ps_regnum;
2540 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2543 gdbarch->ps_regnum = ps_regnum;
2547 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2549 gdb_assert (gdbarch != NULL);
2550 /* Skip verify of fp0_regnum, invalid_p == 0 */
2551 if (gdbarch_debug >= 2)
2552 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2553 return gdbarch->fp0_regnum;
2557 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2560 gdbarch->fp0_regnum = fp0_regnum;
2564 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2566 gdb_assert (gdbarch != NULL);
2567 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2568 if (gdbarch_debug >= 2)
2569 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2570 return gdbarch->stab_reg_to_regnum (stab_regnr);
2574 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2575 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2577 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2581 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2583 gdb_assert (gdbarch != NULL);
2584 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2585 if (gdbarch_debug >= 2)
2586 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2587 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2591 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2592 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2594 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2598 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2600 gdb_assert (gdbarch != NULL);
2601 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2602 if (gdbarch_debug >= 2)
2603 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2604 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2608 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2609 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2611 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2615 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2617 gdb_assert (gdbarch != NULL);
2618 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2619 if (gdbarch_debug >= 2)
2620 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2621 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2625 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2626 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2628 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2632 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2634 gdb_assert (gdbarch != NULL);
2635 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2636 if (gdbarch_debug >= 2)
2637 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2638 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2642 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2643 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2645 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2649 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2651 gdb_assert (gdbarch != NULL);
2652 gdb_assert (gdbarch->register_name != NULL);
2653 if (gdbarch_debug >= 2)
2654 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2655 return gdbarch->register_name (regnr);
2659 set_gdbarch_register_name (struct gdbarch *gdbarch,
2660 gdbarch_register_name_ftype register_name)
2662 gdbarch->register_name = register_name;
2666 gdbarch_register_type_p (struct gdbarch *gdbarch)
2668 gdb_assert (gdbarch != NULL);
2669 return gdbarch->register_type != NULL;
2673 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2675 gdb_assert (gdbarch != NULL);
2676 gdb_assert (gdbarch->register_type != NULL);
2677 if (gdbarch_debug >= 2)
2678 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2679 return gdbarch->register_type (gdbarch, reg_nr);
2683 set_gdbarch_register_type (struct gdbarch *gdbarch,
2684 gdbarch_register_type_ftype register_type)
2686 gdbarch->register_type = register_type;
2690 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2692 gdb_assert (gdbarch != NULL);
2693 return gdbarch->deprecated_register_virtual_type != NULL;
2697 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2699 gdb_assert (gdbarch != NULL);
2700 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2701 if (gdbarch_debug >= 2)
2702 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2703 return gdbarch->deprecated_register_virtual_type (reg_nr);
2707 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2708 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2710 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2714 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2716 gdb_assert (gdbarch != NULL);
2717 if (gdbarch_debug >= 2)
2718 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2719 return gdbarch->deprecated_register_bytes;
2723 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2724 int deprecated_register_bytes)
2726 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2730 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2732 gdb_assert (gdbarch != NULL);
2733 return gdbarch->deprecated_register_byte != generic_register_byte;
2737 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2739 gdb_assert (gdbarch != NULL);
2740 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2741 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2742 if (gdbarch_debug >= 2)
2743 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2744 return gdbarch->deprecated_register_byte (reg_nr);
2748 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2749 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2751 gdbarch->deprecated_register_byte = deprecated_register_byte;
2755 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2757 gdb_assert (gdbarch != NULL);
2758 return gdbarch->deprecated_register_raw_size != generic_register_size;
2762 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2764 gdb_assert (gdbarch != NULL);
2765 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2766 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2767 if (gdbarch_debug >= 2)
2768 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2769 return gdbarch->deprecated_register_raw_size (reg_nr);
2773 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2774 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2776 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2780 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2782 gdb_assert (gdbarch != NULL);
2783 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2787 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2789 gdb_assert (gdbarch != NULL);
2790 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2791 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2792 if (gdbarch_debug >= 2)
2793 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2794 return gdbarch->deprecated_register_virtual_size (reg_nr);
2798 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2799 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2801 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2805 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2807 gdb_assert (gdbarch != NULL);
2808 return gdbarch->unwind_dummy_id != NULL;
2812 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2814 gdb_assert (gdbarch != NULL);
2815 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2816 if (gdbarch_debug >= 2)
2817 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2818 return gdbarch->unwind_dummy_id (gdbarch, info);
2822 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2823 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2825 gdbarch->unwind_dummy_id = unwind_dummy_id;
2829 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2831 gdb_assert (gdbarch != NULL);
2832 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2836 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2838 gdb_assert (gdbarch != NULL);
2839 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2840 if (gdbarch_debug >= 2)
2841 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2842 gdbarch->deprecated_save_dummy_frame_tos (sp);
2846 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2847 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2849 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2853 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2855 gdb_assert (gdbarch != NULL);
2856 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2857 if (gdbarch_debug >= 2)
2858 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2859 return gdbarch->deprecated_fp_regnum;
2863 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2864 int deprecated_fp_regnum)
2866 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2870 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2872 gdb_assert (gdbarch != NULL);
2873 return gdbarch->deprecated_target_read_fp != NULL;
2877 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2879 gdb_assert (gdbarch != NULL);
2880 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
2881 if (gdbarch_debug >= 2)
2882 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2883 return gdbarch->deprecated_target_read_fp ();
2887 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2888 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2890 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2894 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2896 gdb_assert (gdbarch != NULL);
2897 return gdbarch->push_dummy_call != NULL;
2901 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)
2903 gdb_assert (gdbarch != NULL);
2904 gdb_assert (gdbarch->push_dummy_call != NULL);
2905 if (gdbarch_debug >= 2)
2906 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2907 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2911 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2912 gdbarch_push_dummy_call_ftype push_dummy_call)
2914 gdbarch->push_dummy_call = push_dummy_call;
2918 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
2920 gdb_assert (gdbarch != NULL);
2921 return gdbarch->deprecated_push_arguments != NULL;
2925 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2927 gdb_assert (gdbarch != NULL);
2928 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
2929 if (gdbarch_debug >= 2)
2930 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
2931 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
2935 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
2936 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
2938 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
2942 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
2944 gdb_assert (gdbarch != NULL);
2945 return gdbarch->deprecated_push_return_address != NULL;
2949 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
2951 gdb_assert (gdbarch != NULL);
2952 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
2953 if (gdbarch_debug >= 2)
2954 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
2955 return gdbarch->deprecated_push_return_address (pc, sp);
2959 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
2960 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
2962 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
2966 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2968 gdb_assert (gdbarch != NULL);
2969 return gdbarch->deprecated_dummy_write_sp != NULL;
2973 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2975 gdb_assert (gdbarch != NULL);
2976 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
2977 if (gdbarch_debug >= 2)
2978 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2979 gdbarch->deprecated_dummy_write_sp (val);
2983 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2984 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2986 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2990 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2992 gdb_assert (gdbarch != NULL);
2993 if (gdbarch_debug >= 2)
2994 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2995 return gdbarch->deprecated_register_size;
2999 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3000 int deprecated_register_size)
3002 gdbarch->deprecated_register_size = deprecated_register_size;
3006 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3008 gdb_assert (gdbarch != NULL);
3009 /* Skip verify of call_dummy_location, invalid_p == 0 */
3010 if (gdbarch_debug >= 2)
3011 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3012 return gdbarch->call_dummy_location;
3016 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3017 int call_dummy_location)
3019 gdbarch->call_dummy_location = call_dummy_location;
3023 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3025 gdb_assert (gdbarch != NULL);
3026 return gdbarch->push_dummy_code != NULL;
3030 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)
3032 gdb_assert (gdbarch != NULL);
3033 gdb_assert (gdbarch->push_dummy_code != NULL);
3034 if (gdbarch_debug >= 2)
3035 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3036 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3040 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3041 gdbarch_push_dummy_code_ftype push_dummy_code)
3043 gdbarch->push_dummy_code = push_dummy_code;
3047 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3049 gdb_assert (gdbarch != NULL);
3050 return gdbarch->deprecated_do_registers_info != NULL;
3054 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3056 gdb_assert (gdbarch != NULL);
3057 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3058 if (gdbarch_debug >= 2)
3059 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3060 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3064 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3065 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3067 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3071 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3073 gdb_assert (gdbarch != NULL);
3074 gdb_assert (gdbarch->print_registers_info != NULL);
3075 if (gdbarch_debug >= 2)
3076 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3077 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3081 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3082 gdbarch_print_registers_info_ftype print_registers_info)
3084 gdbarch->print_registers_info = print_registers_info;
3088 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3090 gdb_assert (gdbarch != NULL);
3091 return gdbarch->print_float_info != NULL;
3095 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3097 gdb_assert (gdbarch != NULL);
3098 gdb_assert (gdbarch->print_float_info != NULL);
3099 if (gdbarch_debug >= 2)
3100 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3101 gdbarch->print_float_info (gdbarch, file, frame, args);
3105 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3106 gdbarch_print_float_info_ftype print_float_info)
3108 gdbarch->print_float_info = print_float_info;
3112 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3114 gdb_assert (gdbarch != NULL);
3115 return gdbarch->print_vector_info != NULL;
3119 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3121 gdb_assert (gdbarch != NULL);
3122 gdb_assert (gdbarch->print_vector_info != NULL);
3123 if (gdbarch_debug >= 2)
3124 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3125 gdbarch->print_vector_info (gdbarch, file, frame, args);
3129 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3130 gdbarch_print_vector_info_ftype print_vector_info)
3132 gdbarch->print_vector_info = print_vector_info;
3136 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3138 gdb_assert (gdbarch != NULL);
3139 gdb_assert (gdbarch->register_sim_regno != NULL);
3140 if (gdbarch_debug >= 2)
3141 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3142 return gdbarch->register_sim_regno (reg_nr);
3146 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3147 gdbarch_register_sim_regno_ftype register_sim_regno)
3149 gdbarch->register_sim_regno = register_sim_regno;
3153 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3155 gdb_assert (gdbarch != NULL);
3156 return gdbarch->register_bytes_ok != NULL;
3160 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3162 gdb_assert (gdbarch != NULL);
3163 gdb_assert (gdbarch->register_bytes_ok != NULL);
3164 if (gdbarch_debug >= 2)
3165 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3166 return gdbarch->register_bytes_ok (nr_bytes);
3170 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3171 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3173 gdbarch->register_bytes_ok = register_bytes_ok;
3177 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3179 gdb_assert (gdbarch != NULL);
3180 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3181 if (gdbarch_debug >= 2)
3182 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3183 return gdbarch->cannot_fetch_register (regnum);
3187 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3188 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3190 gdbarch->cannot_fetch_register = cannot_fetch_register;
3194 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3196 gdb_assert (gdbarch != NULL);
3197 gdb_assert (gdbarch->cannot_store_register != NULL);
3198 if (gdbarch_debug >= 2)
3199 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3200 return gdbarch->cannot_store_register (regnum);
3204 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3205 gdbarch_cannot_store_register_ftype cannot_store_register)
3207 gdbarch->cannot_store_register = cannot_store_register;
3211 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3213 gdb_assert (gdbarch != NULL);
3214 return gdbarch->get_longjmp_target != NULL;
3218 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3220 gdb_assert (gdbarch != NULL);
3221 gdb_assert (gdbarch->get_longjmp_target != NULL);
3222 if (gdbarch_debug >= 2)
3223 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3224 return gdbarch->get_longjmp_target (pc);
3228 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3229 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3231 gdbarch->get_longjmp_target = get_longjmp_target;
3235 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3237 gdb_assert (gdbarch != NULL);
3238 return gdbarch->deprecated_init_frame_pc != NULL;
3242 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3244 gdb_assert (gdbarch != NULL);
3245 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3246 if (gdbarch_debug >= 2)
3247 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3248 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3252 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3253 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3255 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3259 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3261 gdb_assert (gdbarch != NULL);
3262 if (gdbarch_debug >= 2)
3263 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3264 return gdbarch->believe_pcc_promotion;
3268 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3269 int believe_pcc_promotion)
3271 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3275 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3277 gdb_assert (gdbarch != NULL);
3278 return gdbarch->deprecated_get_saved_register != NULL;
3282 gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
3284 gdb_assert (gdbarch != NULL);
3285 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3286 if (gdbarch_debug >= 2)
3287 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3288 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3292 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3293 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3295 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3299 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3301 gdb_assert (gdbarch != NULL);
3302 gdb_assert (gdbarch->convert_register_p != NULL);
3303 if (gdbarch_debug >= 2)
3304 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3305 return gdbarch->convert_register_p (regnum, type);
3309 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3310 gdbarch_convert_register_p_ftype convert_register_p)
3312 gdbarch->convert_register_p = convert_register_p;
3316 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3318 gdb_assert (gdbarch != NULL);
3319 gdb_assert (gdbarch->register_to_value != NULL);
3320 if (gdbarch_debug >= 2)
3321 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3322 gdbarch->register_to_value (frame, regnum, type, buf);
3326 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3327 gdbarch_register_to_value_ftype register_to_value)
3329 gdbarch->register_to_value = register_to_value;
3333 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3335 gdb_assert (gdbarch != NULL);
3336 gdb_assert (gdbarch->value_to_register != NULL);
3337 if (gdbarch_debug >= 2)
3338 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3339 gdbarch->value_to_register (frame, regnum, type, buf);
3343 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3344 gdbarch_value_to_register_ftype value_to_register)
3346 gdbarch->value_to_register = value_to_register;
3350 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3352 gdb_assert (gdbarch != NULL);
3353 gdb_assert (gdbarch->pointer_to_address != NULL);
3354 if (gdbarch_debug >= 2)
3355 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3356 return gdbarch->pointer_to_address (type, buf);
3360 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3361 gdbarch_pointer_to_address_ftype pointer_to_address)
3363 gdbarch->pointer_to_address = pointer_to_address;
3367 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3369 gdb_assert (gdbarch != NULL);
3370 gdb_assert (gdbarch->address_to_pointer != NULL);
3371 if (gdbarch_debug >= 2)
3372 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3373 gdbarch->address_to_pointer (type, buf, addr);
3377 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3378 gdbarch_address_to_pointer_ftype address_to_pointer)
3380 gdbarch->address_to_pointer = address_to_pointer;
3384 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3386 gdb_assert (gdbarch != NULL);
3387 return gdbarch->integer_to_address != NULL;
3391 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3393 gdb_assert (gdbarch != NULL);
3394 gdb_assert (gdbarch->integer_to_address != NULL);
3395 if (gdbarch_debug >= 2)
3396 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3397 return gdbarch->integer_to_address (type, buf);
3401 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3402 gdbarch_integer_to_address_ftype integer_to_address)
3404 gdbarch->integer_to_address = integer_to_address;
3408 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3410 gdb_assert (gdbarch != NULL);
3411 return gdbarch->deprecated_pop_frame != NULL;
3415 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3417 gdb_assert (gdbarch != NULL);
3418 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3419 if (gdbarch_debug >= 2)
3420 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3421 gdbarch->deprecated_pop_frame ();
3425 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3426 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3428 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3432 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3434 gdb_assert (gdbarch != NULL);
3435 return gdbarch->deprecated_store_struct_return != NULL;
3439 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3441 gdb_assert (gdbarch != NULL);
3442 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3443 if (gdbarch_debug >= 2)
3444 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3445 gdbarch->deprecated_store_struct_return (addr, sp);
3449 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3450 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3452 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3456 gdbarch_return_value_p (struct gdbarch *gdbarch)
3458 gdb_assert (gdbarch != NULL);
3459 return gdbarch->return_value != NULL;
3462 enum return_value_convention
3463 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3465 gdb_assert (gdbarch != NULL);
3466 gdb_assert (gdbarch->return_value != NULL);
3467 if (gdbarch_debug >= 2)
3468 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3469 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3473 set_gdbarch_return_value (struct gdbarch *gdbarch,
3474 gdbarch_return_value_ftype return_value)
3476 gdbarch->return_value = return_value;
3480 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3482 gdb_assert (gdbarch != NULL);
3483 gdb_assert (gdbarch->extract_return_value != NULL);
3484 if (gdbarch_debug >= 2)
3485 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3486 gdbarch->extract_return_value (type, regcache, valbuf);
3490 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3491 gdbarch_extract_return_value_ftype extract_return_value)
3493 gdbarch->extract_return_value = extract_return_value;
3497 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3499 gdb_assert (gdbarch != NULL);
3500 gdb_assert (gdbarch->store_return_value != NULL);
3501 if (gdbarch_debug >= 2)
3502 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3503 gdbarch->store_return_value (type, regcache, valbuf);
3507 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3508 gdbarch_store_return_value_ftype store_return_value)
3510 gdbarch->store_return_value = store_return_value;
3514 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3516 gdb_assert (gdbarch != NULL);
3517 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3518 if (gdbarch_debug >= 2)
3519 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3520 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3524 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3525 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3527 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3531 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3533 gdb_assert (gdbarch != NULL);
3534 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3535 if (gdbarch_debug >= 2)
3536 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3537 gdbarch->deprecated_store_return_value (type, valbuf);
3541 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3542 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3544 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3548 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3550 gdb_assert (gdbarch != NULL);
3551 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
3552 if (gdbarch_debug >= 2)
3553 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
3554 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
3558 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
3559 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
3561 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
3565 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3567 gdb_assert (gdbarch != NULL);
3568 return gdbarch->deprecated_extract_struct_value_address != NULL;
3572 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3574 gdb_assert (gdbarch != NULL);
3575 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3576 if (gdbarch_debug >= 2)
3577 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3578 return gdbarch->deprecated_extract_struct_value_address (regcache);
3582 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3583 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3585 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3589 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3591 gdb_assert (gdbarch != NULL);
3592 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3596 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3598 gdb_assert (gdbarch != NULL);
3599 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3600 if (gdbarch_debug >= 2)
3601 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3602 gdbarch->deprecated_frame_init_saved_regs (frame);
3606 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3607 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3609 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3613 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3615 gdb_assert (gdbarch != NULL);
3616 return gdbarch->deprecated_init_extra_frame_info != NULL;
3620 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3622 gdb_assert (gdbarch != NULL);
3623 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3624 if (gdbarch_debug >= 2)
3625 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3626 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3630 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3631 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3633 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3637 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3639 gdb_assert (gdbarch != NULL);
3640 gdb_assert (gdbarch->skip_prologue != NULL);
3641 if (gdbarch_debug >= 2)
3642 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3643 return gdbarch->skip_prologue (ip);
3647 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3648 gdbarch_skip_prologue_ftype skip_prologue)
3650 gdbarch->skip_prologue = skip_prologue;
3654 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3656 gdb_assert (gdbarch != NULL);
3657 gdb_assert (gdbarch->inner_than != NULL);
3658 if (gdbarch_debug >= 2)
3659 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3660 return gdbarch->inner_than (lhs, rhs);
3664 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3665 gdbarch_inner_than_ftype inner_than)
3667 gdbarch->inner_than = inner_than;
3670 const unsigned char *
3671 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3673 gdb_assert (gdbarch != NULL);
3674 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3675 if (gdbarch_debug >= 2)
3676 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3677 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3681 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3682 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3684 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3688 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3690 gdb_assert (gdbarch != NULL);
3691 return gdbarch->adjust_breakpoint_address != NULL;
3695 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3697 gdb_assert (gdbarch != NULL);
3698 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3699 if (gdbarch_debug >= 2)
3700 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3701 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3705 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3706 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3708 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3712 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3714 gdb_assert (gdbarch != NULL);
3715 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3716 if (gdbarch_debug >= 2)
3717 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3718 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3722 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3723 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3725 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3729 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3731 gdb_assert (gdbarch != NULL);
3732 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3733 if (gdbarch_debug >= 2)
3734 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3735 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3739 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3740 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3742 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3746 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3748 gdb_assert (gdbarch != NULL);
3749 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3750 if (gdbarch_debug >= 2)
3751 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3752 return gdbarch->decr_pc_after_break;
3756 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3757 CORE_ADDR decr_pc_after_break)
3759 gdbarch->decr_pc_after_break = decr_pc_after_break;
3763 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
3765 gdb_assert (gdbarch != NULL);
3766 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
3767 if (gdbarch_debug >= 2)
3768 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
3769 return gdbarch->deprecated_function_start_offset;
3773 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
3774 CORE_ADDR deprecated_function_start_offset)
3776 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
3780 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3782 gdb_assert (gdbarch != NULL);
3783 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3784 if (gdbarch_debug >= 2)
3785 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3786 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3790 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3791 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3793 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3797 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3799 gdb_assert (gdbarch != NULL);
3800 /* Skip verify of frame_args_skip, invalid_p == 0 */
3801 if (gdbarch_debug >= 2)
3802 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3803 return gdbarch->frame_args_skip;
3807 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3808 CORE_ADDR frame_args_skip)
3810 gdbarch->frame_args_skip = frame_args_skip;
3814 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
3816 gdb_assert (gdbarch != NULL);
3817 return gdbarch->deprecated_frameless_function_invocation != NULL;
3821 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3823 gdb_assert (gdbarch != NULL);
3824 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
3825 if (gdbarch_debug >= 2)
3826 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
3827 return gdbarch->deprecated_frameless_function_invocation (fi);
3831 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
3832 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
3834 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
3838 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
3840 gdb_assert (gdbarch != NULL);
3841 return gdbarch->deprecated_frame_chain != NULL;
3845 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3847 gdb_assert (gdbarch != NULL);
3848 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
3849 if (gdbarch_debug >= 2)
3850 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
3851 return gdbarch->deprecated_frame_chain (frame);
3855 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
3856 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
3858 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
3862 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
3864 gdb_assert (gdbarch != NULL);
3865 return gdbarch->deprecated_frame_chain_valid != NULL;
3869 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3871 gdb_assert (gdbarch != NULL);
3872 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
3873 if (gdbarch_debug >= 2)
3874 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
3875 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
3879 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
3880 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
3882 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
3886 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
3888 gdb_assert (gdbarch != NULL);
3889 return gdbarch->deprecated_frame_saved_pc != NULL;
3893 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3895 gdb_assert (gdbarch != NULL);
3896 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
3897 if (gdbarch_debug >= 2)
3898 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
3899 return gdbarch->deprecated_frame_saved_pc (fi);
3903 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
3904 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
3906 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
3910 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3912 gdb_assert (gdbarch != NULL);
3913 return gdbarch->unwind_pc != NULL;
3917 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3919 gdb_assert (gdbarch != NULL);
3920 gdb_assert (gdbarch->unwind_pc != NULL);
3921 if (gdbarch_debug >= 2)
3922 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3923 return gdbarch->unwind_pc (gdbarch, next_frame);
3927 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3928 gdbarch_unwind_pc_ftype unwind_pc)
3930 gdbarch->unwind_pc = unwind_pc;
3934 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3936 gdb_assert (gdbarch != NULL);
3937 return gdbarch->unwind_sp != NULL;
3941 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3943 gdb_assert (gdbarch != NULL);
3944 gdb_assert (gdbarch->unwind_sp != NULL);
3945 if (gdbarch_debug >= 2)
3946 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3947 return gdbarch->unwind_sp (gdbarch, next_frame);
3951 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3952 gdbarch_unwind_sp_ftype unwind_sp)
3954 gdbarch->unwind_sp = unwind_sp;
3958 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
3960 gdb_assert (gdbarch != NULL);
3961 return gdbarch->deprecated_frame_args_address != get_frame_base;
3965 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3967 gdb_assert (gdbarch != NULL);
3968 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
3969 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
3970 if (gdbarch_debug >= 2)
3971 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
3972 return gdbarch->deprecated_frame_args_address (fi);
3976 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
3977 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
3979 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
3983 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
3985 gdb_assert (gdbarch != NULL);
3986 return gdbarch->deprecated_frame_locals_address != get_frame_base;
3990 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3992 gdb_assert (gdbarch != NULL);
3993 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
3994 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
3995 if (gdbarch_debug >= 2)
3996 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
3997 return gdbarch->deprecated_frame_locals_address (fi);
4001 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4002 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4004 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4008 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4010 gdb_assert (gdbarch != NULL);
4011 return gdbarch->deprecated_saved_pc_after_call != NULL;
4015 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4017 gdb_assert (gdbarch != NULL);
4018 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4019 if (gdbarch_debug >= 2)
4020 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4021 return gdbarch->deprecated_saved_pc_after_call (frame);
4025 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4026 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4028 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4032 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4034 gdb_assert (gdbarch != NULL);
4035 return gdbarch->frame_num_args != NULL;
4039 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4041 gdb_assert (gdbarch != NULL);
4042 gdb_assert (gdbarch->frame_num_args != NULL);
4043 if (gdbarch_debug >= 2)
4044 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4045 return gdbarch->frame_num_args (frame);
4049 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4050 gdbarch_frame_num_args_ftype frame_num_args)
4052 gdbarch->frame_num_args = frame_num_args;
4056 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4058 gdb_assert (gdbarch != NULL);
4059 return gdbarch->deprecated_stack_align != NULL;
4063 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4065 gdb_assert (gdbarch != NULL);
4066 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4067 if (gdbarch_debug >= 2)
4068 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4069 return gdbarch->deprecated_stack_align (sp);
4073 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4074 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4076 gdbarch->deprecated_stack_align = deprecated_stack_align;
4080 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4082 gdb_assert (gdbarch != NULL);
4083 return gdbarch->frame_align != NULL;
4087 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4089 gdb_assert (gdbarch != NULL);
4090 gdb_assert (gdbarch->frame_align != NULL);
4091 if (gdbarch_debug >= 2)
4092 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4093 return gdbarch->frame_align (gdbarch, address);
4097 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4098 gdbarch_frame_align_ftype frame_align)
4100 gdbarch->frame_align = frame_align;
4104 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4106 gdb_assert (gdbarch != NULL);
4107 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4111 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4113 gdb_assert (gdbarch != NULL);
4114 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4115 if (gdbarch_debug >= 2)
4116 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4117 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4121 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4122 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4124 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4128 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4130 gdb_assert (gdbarch != NULL);
4131 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4132 if (gdbarch_debug >= 2)
4133 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4134 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4138 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4139 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4141 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4145 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4147 gdb_assert (gdbarch != NULL);
4148 if (gdbarch_debug >= 2)
4149 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4150 return gdbarch->frame_red_zone_size;
4154 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4155 int frame_red_zone_size)
4157 gdbarch->frame_red_zone_size = frame_red_zone_size;
4160 const struct floatformat *
4161 gdbarch_float_format (struct gdbarch *gdbarch)
4163 gdb_assert (gdbarch != NULL);
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4166 return gdbarch->float_format;
4170 set_gdbarch_float_format (struct gdbarch *gdbarch,
4171 const struct floatformat * float_format)
4173 gdbarch->float_format = float_format;
4176 const struct floatformat *
4177 gdbarch_double_format (struct gdbarch *gdbarch)
4179 gdb_assert (gdbarch != NULL);
4180 if (gdbarch_debug >= 2)
4181 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4182 return gdbarch->double_format;
4186 set_gdbarch_double_format (struct gdbarch *gdbarch,
4187 const struct floatformat * double_format)
4189 gdbarch->double_format = double_format;
4192 const struct floatformat *
4193 gdbarch_long_double_format (struct gdbarch *gdbarch)
4195 gdb_assert (gdbarch != NULL);
4196 if (gdbarch_debug >= 2)
4197 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4198 return gdbarch->long_double_format;
4202 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4203 const struct floatformat * long_double_format)
4205 gdbarch->long_double_format = long_double_format;
4209 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4211 gdb_assert (gdbarch != NULL);
4212 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4213 if (gdbarch_debug >= 2)
4214 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4215 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4219 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4220 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4222 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4226 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4228 gdb_assert (gdbarch != NULL);
4229 gdb_assert (gdbarch->addr_bits_remove != NULL);
4230 if (gdbarch_debug >= 2)
4231 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4232 return gdbarch->addr_bits_remove (addr);
4236 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4237 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4239 gdbarch->addr_bits_remove = addr_bits_remove;
4243 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4245 gdb_assert (gdbarch != NULL);
4246 gdb_assert (gdbarch->smash_text_address != NULL);
4247 if (gdbarch_debug >= 2)
4248 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4249 return gdbarch->smash_text_address (addr);
4253 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4254 gdbarch_smash_text_address_ftype smash_text_address)
4256 gdbarch->smash_text_address = smash_text_address;
4260 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4262 gdb_assert (gdbarch != NULL);
4263 return gdbarch->software_single_step != NULL;
4267 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4269 gdb_assert (gdbarch != NULL);
4270 gdb_assert (gdbarch->software_single_step != NULL);
4271 if (gdbarch_debug >= 2)
4272 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4273 gdbarch->software_single_step (sig, insert_breakpoints_p);
4277 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4278 gdbarch_software_single_step_ftype software_single_step)
4280 gdbarch->software_single_step = software_single_step;
4284 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4286 gdb_assert (gdbarch != NULL);
4287 gdb_assert (gdbarch->print_insn != NULL);
4288 if (gdbarch_debug >= 2)
4289 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4290 return gdbarch->print_insn (vma, info);
4294 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4295 gdbarch_print_insn_ftype print_insn)
4297 gdbarch->print_insn = print_insn;
4301 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4303 gdb_assert (gdbarch != NULL);
4304 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4305 if (gdbarch_debug >= 2)
4306 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4307 return gdbarch->skip_trampoline_code (pc);
4311 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4312 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4314 gdbarch->skip_trampoline_code = skip_trampoline_code;
4318 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4320 gdb_assert (gdbarch != NULL);
4321 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4322 if (gdbarch_debug >= 2)
4323 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4324 return gdbarch->skip_solib_resolver (gdbarch, pc);
4328 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4329 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4331 gdbarch->skip_solib_resolver = skip_solib_resolver;
4335 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4337 gdb_assert (gdbarch != NULL);
4338 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4339 if (gdbarch_debug >= 2)
4340 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4341 return gdbarch->in_solib_call_trampoline (pc, name);
4345 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4346 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4348 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4352 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4354 gdb_assert (gdbarch != NULL);
4355 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4356 if (gdbarch_debug >= 2)
4357 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4358 return gdbarch->in_solib_return_trampoline (pc, name);
4362 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4363 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4365 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4369 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4371 gdb_assert (gdbarch != NULL);
4372 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4373 if (gdbarch_debug >= 2)
4374 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4375 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4379 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4380 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4382 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4386 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4388 gdb_assert (gdbarch != NULL);
4389 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4390 if (gdbarch_debug >= 2)
4391 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4392 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4396 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4397 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4399 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4403 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4405 gdb_assert (gdbarch != NULL);
4406 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4407 if (gdbarch_debug >= 2)
4408 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4409 gdbarch->elf_make_msymbol_special (sym, msym);
4413 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4414 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4416 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4420 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4422 gdb_assert (gdbarch != NULL);
4423 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4424 if (gdbarch_debug >= 2)
4425 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4426 gdbarch->coff_make_msymbol_special (val, msym);
4430 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4431 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4433 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4437 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4439 gdb_assert (gdbarch != NULL);
4440 /* Skip verify of name_of_malloc, invalid_p == 0 */
4441 if (gdbarch_debug >= 2)
4442 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4443 return gdbarch->name_of_malloc;
4447 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4448 const char * name_of_malloc)
4450 gdbarch->name_of_malloc = name_of_malloc;
4454 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4456 gdb_assert (gdbarch != NULL);
4457 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4458 if (gdbarch_debug >= 2)
4459 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4460 return gdbarch->cannot_step_breakpoint;
4464 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4465 int cannot_step_breakpoint)
4467 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4471 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4473 gdb_assert (gdbarch != NULL);
4474 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4475 if (gdbarch_debug >= 2)
4476 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4477 return gdbarch->have_nonsteppable_watchpoint;
4481 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4482 int have_nonsteppable_watchpoint)
4484 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4488 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4490 gdb_assert (gdbarch != NULL);
4491 return gdbarch->address_class_type_flags != NULL;
4495 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4497 gdb_assert (gdbarch != NULL);
4498 gdb_assert (gdbarch->address_class_type_flags != NULL);
4499 if (gdbarch_debug >= 2)
4500 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4501 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4505 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4506 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4508 gdbarch->address_class_type_flags = address_class_type_flags;
4512 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4514 gdb_assert (gdbarch != NULL);
4515 return gdbarch->address_class_type_flags_to_name != NULL;
4519 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4521 gdb_assert (gdbarch != NULL);
4522 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4523 if (gdbarch_debug >= 2)
4524 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4525 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4529 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4530 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4532 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4536 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4538 gdb_assert (gdbarch != NULL);
4539 return gdbarch->address_class_name_to_type_flags != NULL;
4543 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4545 gdb_assert (gdbarch != NULL);
4546 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4547 if (gdbarch_debug >= 2)
4548 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4549 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4553 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4554 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4556 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4560 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4562 gdb_assert (gdbarch != NULL);
4563 gdb_assert (gdbarch->register_reggroup_p != NULL);
4564 if (gdbarch_debug >= 2)
4565 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4566 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4570 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4571 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4573 gdbarch->register_reggroup_p = register_reggroup_p;
4577 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4579 gdb_assert (gdbarch != NULL);
4580 return gdbarch->fetch_pointer_argument != NULL;
4584 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4586 gdb_assert (gdbarch != NULL);
4587 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4588 if (gdbarch_debug >= 2)
4589 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4590 return gdbarch->fetch_pointer_argument (frame, argi, type);
4594 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4595 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4597 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4601 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4603 gdb_assert (gdbarch != NULL);
4604 return gdbarch->regset_from_core_section != NULL;
4607 const struct regset *
4608 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4610 gdb_assert (gdbarch != NULL);
4611 gdb_assert (gdbarch->regset_from_core_section != NULL);
4612 if (gdbarch_debug >= 2)
4613 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4614 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4618 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4619 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4621 gdbarch->regset_from_core_section = regset_from_core_section;
4625 /* Keep a registry of per-architecture data-pointers required by GDB
4632 gdbarch_data_pre_init_ftype *pre_init;
4633 gdbarch_data_post_init_ftype *post_init;
4636 struct gdbarch_data_registration
4638 struct gdbarch_data *data;
4639 struct gdbarch_data_registration *next;
4642 struct gdbarch_data_registry
4645 struct gdbarch_data_registration *registrations;
4648 struct gdbarch_data_registry gdbarch_data_registry =
4653 static struct gdbarch_data *
4654 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4655 gdbarch_data_post_init_ftype *post_init)
4657 struct gdbarch_data_registration **curr;
4658 /* Append the new registraration. */
4659 for (curr = &gdbarch_data_registry.registrations;
4661 curr = &(*curr)->next);
4662 (*curr) = XMALLOC (struct gdbarch_data_registration);
4663 (*curr)->next = NULL;
4664 (*curr)->data = XMALLOC (struct gdbarch_data);
4665 (*curr)->data->index = gdbarch_data_registry.nr++;
4666 (*curr)->data->pre_init = pre_init;
4667 (*curr)->data->post_init = post_init;
4668 (*curr)->data->init_p = 1;
4669 return (*curr)->data;
4672 struct gdbarch_data *
4673 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4675 return gdbarch_data_register (pre_init, NULL);
4678 struct gdbarch_data *
4679 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4681 return gdbarch_data_register (NULL, post_init);
4684 /* Create/delete the gdbarch data vector. */
4687 alloc_gdbarch_data (struct gdbarch *gdbarch)
4689 gdb_assert (gdbarch->data == NULL);
4690 gdbarch->nr_data = gdbarch_data_registry.nr;
4691 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4694 /* Initialize the current value of the specified per-architecture
4698 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4699 struct gdbarch_data *data,
4702 gdb_assert (data->index < gdbarch->nr_data);
4703 gdb_assert (gdbarch->data[data->index] == NULL);
4704 gdb_assert (data->pre_init == NULL);
4705 gdbarch->data[data->index] = pointer;
4708 /* Return the current value of the specified per-architecture
4712 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4714 gdb_assert (data->index < gdbarch->nr_data);
4715 if (gdbarch->data[data->index] == NULL)
4717 /* The data-pointer isn't initialized, call init() to get a
4719 if (data->pre_init != NULL)
4720 /* Mid architecture creation: pass just the obstack, and not
4721 the entire architecture, as that way it isn't possible for
4722 pre-init code to refer to undefined architecture
4724 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4725 else if (gdbarch->initialized_p
4726 && data->post_init != NULL)
4727 /* Post architecture creation: pass the entire architecture
4728 (as all fields are valid), but be careful to also detect
4729 recursive references. */
4731 gdb_assert (data->init_p);
4733 gdbarch->data[data->index] = data->post_init (gdbarch);
4737 /* The architecture initialization hasn't completed - punt -
4738 hope that the caller knows what they are doing. Once
4739 deprecated_set_gdbarch_data has been initialized, this can be
4740 changed to an internal error. */
4742 gdb_assert (gdbarch->data[data->index] != NULL);
4744 return gdbarch->data[data->index];
4749 /* Keep a registry of swapped data required by GDB modules. */
4754 struct gdbarch_swap_registration *source;
4755 struct gdbarch_swap *next;
4758 struct gdbarch_swap_registration
4761 unsigned long sizeof_data;
4762 gdbarch_swap_ftype *init;
4763 struct gdbarch_swap_registration *next;
4766 struct gdbarch_swap_registry
4769 struct gdbarch_swap_registration *registrations;
4772 struct gdbarch_swap_registry gdbarch_swap_registry =
4778 deprecated_register_gdbarch_swap (void *data,
4779 unsigned long sizeof_data,
4780 gdbarch_swap_ftype *init)
4782 struct gdbarch_swap_registration **rego;
4783 for (rego = &gdbarch_swap_registry.registrations;
4785 rego = &(*rego)->next);
4786 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4787 (*rego)->next = NULL;
4788 (*rego)->init = init;
4789 (*rego)->data = data;
4790 (*rego)->sizeof_data = sizeof_data;
4794 current_gdbarch_swap_init_hack (void)
4796 struct gdbarch_swap_registration *rego;
4797 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4798 for (rego = gdbarch_swap_registry.registrations;
4802 if (rego->data != NULL)
4804 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4805 struct gdbarch_swap);
4806 (*curr)->source = rego;
4807 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4809 (*curr)->next = NULL;
4810 curr = &(*curr)->next;
4812 if (rego->init != NULL)
4817 static struct gdbarch *
4818 current_gdbarch_swap_out_hack (void)
4820 struct gdbarch *old_gdbarch = current_gdbarch;
4821 struct gdbarch_swap *curr;
4823 gdb_assert (old_gdbarch != NULL);
4824 for (curr = old_gdbarch->swap;
4828 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4829 memset (curr->source->data, 0, curr->source->sizeof_data);
4831 current_gdbarch = NULL;
4836 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
4838 struct gdbarch_swap *curr;
4840 gdb_assert (current_gdbarch == NULL);
4841 for (curr = new_gdbarch->swap;
4844 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4845 current_gdbarch = new_gdbarch;
4849 /* Keep a registry of the architectures known by GDB. */
4851 struct gdbarch_registration
4853 enum bfd_architecture bfd_architecture;
4854 gdbarch_init_ftype *init;
4855 gdbarch_dump_tdep_ftype *dump_tdep;
4856 struct gdbarch_list *arches;
4857 struct gdbarch_registration *next;
4860 static struct gdbarch_registration *gdbarch_registry = NULL;
4863 append_name (const char ***buf, int *nr, const char *name)
4865 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4871 gdbarch_printable_names (void)
4873 /* Accumulate a list of names based on the registed list of
4875 enum bfd_architecture a;
4877 const char **arches = NULL;
4878 struct gdbarch_registration *rego;
4879 for (rego = gdbarch_registry;
4883 const struct bfd_arch_info *ap;
4884 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4886 internal_error (__FILE__, __LINE__,
4887 "gdbarch_architecture_names: multi-arch unknown");
4890 append_name (&arches, &nr_arches, ap->printable_name);
4895 append_name (&arches, &nr_arches, NULL);
4901 gdbarch_register (enum bfd_architecture bfd_architecture,
4902 gdbarch_init_ftype *init,
4903 gdbarch_dump_tdep_ftype *dump_tdep)
4905 struct gdbarch_registration **curr;
4906 const struct bfd_arch_info *bfd_arch_info;
4907 /* Check that BFD recognizes this architecture */
4908 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4909 if (bfd_arch_info == NULL)
4911 internal_error (__FILE__, __LINE__,
4912 "gdbarch: Attempt to register unknown architecture (%d)",
4915 /* Check that we haven't seen this architecture before */
4916 for (curr = &gdbarch_registry;
4918 curr = &(*curr)->next)
4920 if (bfd_architecture == (*curr)->bfd_architecture)
4921 internal_error (__FILE__, __LINE__,
4922 "gdbarch: Duplicate registraration of architecture (%s)",
4923 bfd_arch_info->printable_name);
4927 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4928 bfd_arch_info->printable_name,
4931 (*curr) = XMALLOC (struct gdbarch_registration);
4932 (*curr)->bfd_architecture = bfd_architecture;
4933 (*curr)->init = init;
4934 (*curr)->dump_tdep = dump_tdep;
4935 (*curr)->arches = NULL;
4936 (*curr)->next = NULL;
4940 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4941 gdbarch_init_ftype *init)
4943 gdbarch_register (bfd_architecture, init, NULL);
4947 /* Look for an architecture using gdbarch_info. Base search on only
4948 BFD_ARCH_INFO and BYTE_ORDER. */
4950 struct gdbarch_list *
4951 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4952 const struct gdbarch_info *info)
4954 for (; arches != NULL; arches = arches->next)
4956 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4958 if (info->byte_order != arches->gdbarch->byte_order)
4960 if (info->osabi != arches->gdbarch->osabi)
4968 /* Find an architecture that matches the specified INFO. Create a new
4969 architecture if needed. Return that new architecture. Assumes
4970 that there is no current architecture. */
4972 static struct gdbarch *
4973 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
4975 struct gdbarch *new_gdbarch;
4976 struct gdbarch_registration *rego;
4978 /* The existing architecture has been swapped out - all this code
4979 works from a clean slate. */
4980 gdb_assert (current_gdbarch == NULL);
4982 /* Fill in missing parts of the INFO struct using a number of
4983 sources: "set ..."; INFOabfd supplied; and the existing
4985 gdbarch_info_fill (old_gdbarch, &info);
4987 /* Must have found some sort of architecture. */
4988 gdb_assert (info.bfd_arch_info != NULL);
4992 fprintf_unfiltered (gdb_stdlog,
4993 "find_arch_by_info: info.bfd_arch_info %s\n",
4994 (info.bfd_arch_info != NULL
4995 ? info.bfd_arch_info->printable_name
4997 fprintf_unfiltered (gdb_stdlog,
4998 "find_arch_by_info: info.byte_order %d (%s)\n",
5000 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5001 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5003 fprintf_unfiltered (gdb_stdlog,
5004 "find_arch_by_info: info.osabi %d (%s)\n",
5005 info.osabi, gdbarch_osabi_name (info.osabi));
5006 fprintf_unfiltered (gdb_stdlog,
5007 "find_arch_by_info: info.abfd 0x%lx\n",
5009 fprintf_unfiltered (gdb_stdlog,
5010 "find_arch_by_info: info.tdep_info 0x%lx\n",
5011 (long) info.tdep_info);
5014 /* Find the tdep code that knows about this architecture. */
5015 for (rego = gdbarch_registry;
5018 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5023 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5024 "No matching architecture\n");
5028 /* Ask the tdep code for an architecture that matches "info". */
5029 new_gdbarch = rego->init (info, rego->arches);
5031 /* Did the tdep code like it? No. Reject the change and revert to
5032 the old architecture. */
5033 if (new_gdbarch == NULL)
5036 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5037 "Target rejected architecture\n");
5041 /* Is this a pre-existing architecture (as determined by already
5042 being initialized)? Move it to the front of the architecture
5043 list (keeping the list sorted Most Recently Used). */
5044 if (new_gdbarch->initialized_p)
5046 struct gdbarch_list **list;
5047 struct gdbarch_list *this;
5049 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5050 "Previous architecture 0x%08lx (%s) selected\n",
5052 new_gdbarch->bfd_arch_info->printable_name);
5053 /* Find the existing arch in the list. */
5054 for (list = ®o->arches;
5055 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5056 list = &(*list)->next);
5057 /* It had better be in the list of architectures. */
5058 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5061 (*list) = this->next;
5062 /* Insert THIS at the front. */
5063 this->next = rego->arches;
5064 rego->arches = this;
5069 /* It's a new architecture. */
5071 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5072 "New architecture 0x%08lx (%s) selected\n",
5074 new_gdbarch->bfd_arch_info->printable_name);
5076 /* Insert the new architecture into the front of the architecture
5077 list (keep the list sorted Most Recently Used). */
5079 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5080 this->next = rego->arches;
5081 this->gdbarch = new_gdbarch;
5082 rego->arches = this;
5085 /* Check that the newly installed architecture is valid. Plug in
5086 any post init values. */
5087 new_gdbarch->dump_tdep = rego->dump_tdep;
5088 verify_gdbarch (new_gdbarch);
5089 new_gdbarch->initialized_p = 1;
5091 /* Initialize any per-architecture swap areas. This phase requires
5092 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5093 swap the entire architecture out. */
5094 current_gdbarch = new_gdbarch;
5095 current_gdbarch_swap_init_hack ();
5096 current_gdbarch_swap_out_hack ();
5099 gdbarch_dump (new_gdbarch, gdb_stdlog);
5105 gdbarch_find_by_info (struct gdbarch_info info)
5107 /* Save the previously selected architecture, setting the global to
5108 NULL. This stops things like gdbarch->init() trying to use the
5109 previous architecture's configuration. The previous architecture
5110 may not even be of the same architecture family. The most recent
5111 architecture of the same family is found at the head of the
5112 rego->arches list. */
5113 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5115 /* Find the specified architecture. */
5116 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5118 /* Restore the existing architecture. */
5119 gdb_assert (current_gdbarch == NULL);
5120 current_gdbarch_swap_in_hack (old_gdbarch);
5125 /* Make the specified architecture current, swapping the existing one
5129 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5131 gdb_assert (new_gdbarch != NULL);
5132 gdb_assert (current_gdbarch != NULL);
5133 gdb_assert (new_gdbarch->initialized_p);
5134 current_gdbarch_swap_out_hack ();
5135 current_gdbarch_swap_in_hack (new_gdbarch);
5136 architecture_changed_event ();
5139 extern void _initialize_gdbarch (void);
5142 _initialize_gdbarch (void)
5144 struct cmd_list_element *c;
5146 add_show_from_set (add_set_cmd ("arch",
5149 (char *)&gdbarch_debug,
5150 "Set architecture debugging.\n\
5151 When non-zero, architecture debugging is enabled.", &setdebuglist),
5153 c = add_set_cmd ("archdebug",
5156 (char *)&gdbarch_debug,
5157 "Set architecture debugging.\n\
5158 When non-zero, architecture debugging is enabled.", &setlist);
5160 deprecate_cmd (c, "set debug arch");
5161 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");