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->return_value = legacy_return_value;
461 current_gdbarch->extract_return_value = legacy_extract_return_value;
462 current_gdbarch->store_return_value = legacy_store_return_value;
463 current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
464 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
465 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
466 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
467 current_gdbarch->deprecated_frame_args_address = get_frame_base;
468 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
469 current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr;
470 current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity;
471 current_gdbarch->addr_bits_remove = core_addr_identity;
472 current_gdbarch->smash_text_address = core_addr_identity;
473 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
474 current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
475 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
476 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
477 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
478 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
479 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
480 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
481 current_gdbarch->name_of_malloc = "malloc";
482 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
483 /* gdbarch_alloc() */
485 return current_gdbarch;
489 /* Allocate extra space using the per-architecture obstack. */
492 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
494 void *data = obstack_alloc (arch->obstack, size);
495 memset (data, 0, size);
500 /* Free a gdbarch struct. This should never happen in normal
501 operation --- once you've created a gdbarch, you keep it around.
502 However, if an architecture's init function encounters an error
503 building the structure, it may need to clean up a partially
504 constructed gdbarch. */
507 gdbarch_free (struct gdbarch *arch)
509 struct obstack *obstack;
510 gdb_assert (arch != NULL);
511 gdb_assert (!arch->initialized_p);
512 obstack = arch->obstack;
513 obstack_free (obstack, 0); /* Includes the ARCH. */
518 /* Ensure that all values in a GDBARCH are reasonable. */
520 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
521 just happens to match the global variable ``current_gdbarch''. That
522 way macros refering to that variable get the local and not the global
523 version - ulgh. Once everything is parameterised with gdbarch, this
527 verify_gdbarch (struct gdbarch *current_gdbarch)
530 struct cleanup *cleanups;
533 log = mem_fileopen ();
534 cleanups = make_cleanup_ui_file_delete (log);
536 if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
537 fprintf_unfiltered (log, "\n\tbyte-order");
538 if (current_gdbarch->bfd_arch_info == NULL)
539 fprintf_unfiltered (log, "\n\tbfd_arch_info");
540 /* Check those that need to be defined for the given multi-arch level. */
541 /* Skip verify of short_bit, invalid_p == 0 */
542 /* Skip verify of int_bit, invalid_p == 0 */
543 /* Skip verify of long_bit, invalid_p == 0 */
544 /* Skip verify of long_long_bit, invalid_p == 0 */
545 /* Skip verify of float_bit, invalid_p == 0 */
546 /* Skip verify of double_bit, invalid_p == 0 */
547 /* Skip verify of long_double_bit, invalid_p == 0 */
548 /* Skip verify of ptr_bit, invalid_p == 0 */
549 if (current_gdbarch->addr_bit == 0)
550 current_gdbarch->addr_bit = TARGET_PTR_BIT;
551 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
552 if (current_gdbarch->char_signed == -1)
553 current_gdbarch->char_signed = 1;
554 /* Skip verify of read_pc, has predicate */
555 /* Skip verify of write_pc, invalid_p == 0 */
556 /* Skip verify of read_sp, has predicate */
557 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
558 /* Skip verify of pseudo_register_read, has predicate */
559 /* Skip verify of pseudo_register_write, has predicate */
560 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
561 && (current_gdbarch->num_regs == -1))
562 fprintf_unfiltered (log, "\n\tnum_regs");
563 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
564 /* Skip verify of sp_regnum, invalid_p == 0 */
565 /* Skip verify of pc_regnum, invalid_p == 0 */
566 /* Skip verify of ps_regnum, invalid_p == 0 */
567 /* Skip verify of fp0_regnum, invalid_p == 0 */
568 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
569 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
570 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
571 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
573 /* Skip verify of register_type, has predicate */
574 /* Skip verify of deprecated_register_virtual_type, has predicate */
575 /* Skip verify of deprecated_register_byte, has predicate */
576 /* Skip verify of deprecated_register_raw_size, has predicate */
577 /* Skip verify of deprecated_register_virtual_size, has predicate */
578 /* Skip verify of unwind_dummy_id, has predicate */
579 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
580 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
581 /* Skip verify of deprecated_target_read_fp, has predicate */
582 /* Skip verify of push_dummy_call, has predicate */
583 /* Skip verify of deprecated_push_arguments, has predicate */
584 /* Skip verify of deprecated_push_return_address, has predicate */
585 /* Skip verify of deprecated_dummy_write_sp, has predicate */
586 /* Skip verify of call_dummy_location, invalid_p == 0 */
587 /* Skip verify of push_dummy_code, has predicate */
588 /* Skip verify of deprecated_do_registers_info, has predicate */
589 /* Skip verify of print_registers_info, invalid_p == 0 */
590 /* Skip verify of print_float_info, has predicate */
591 /* Skip verify of print_vector_info, has predicate */
592 /* Skip verify of register_sim_regno, invalid_p == 0 */
593 /* Skip verify of register_bytes_ok, has predicate */
594 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
595 /* Skip verify of cannot_store_register, invalid_p == 0 */
596 /* Skip verify of get_longjmp_target, has predicate */
597 /* Skip verify of deprecated_init_frame_pc, has predicate */
598 /* Skip verify of deprecated_get_saved_register, has predicate */
599 /* Skip verify of convert_register_p, invalid_p == 0 */
600 /* Skip verify of pointer_to_address, invalid_p == 0 */
601 /* Skip verify of address_to_pointer, invalid_p == 0 */
602 /* Skip verify of integer_to_address, has predicate */
603 /* Skip verify of deprecated_pop_frame, has predicate */
604 /* Skip verify of deprecated_store_struct_return, has predicate */
605 /* Skip verify of return_value, has predicate */
606 /* Skip verify of extract_return_value, invalid_p == 0 */
607 /* Skip verify of store_return_value, invalid_p == 0 */
608 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
609 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
610 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
611 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
612 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
613 && (current_gdbarch->skip_prologue == 0))
614 fprintf_unfiltered (log, "\n\tskip_prologue");
615 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
616 && (current_gdbarch->inner_than == 0))
617 fprintf_unfiltered (log, "\n\tinner_than");
618 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
619 && (current_gdbarch->breakpoint_from_pc == 0))
620 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
621 /* Skip verify of adjust_breakpoint_address, has predicate */
622 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
623 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
624 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
625 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
626 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
627 /* Skip verify of frame_args_skip, invalid_p == 0 */
628 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
629 /* Skip verify of deprecated_frame_chain, has predicate */
630 /* Skip verify of deprecated_frame_chain_valid, has predicate */
631 /* Skip verify of deprecated_frame_saved_pc, has predicate */
632 /* Skip verify of unwind_pc, has predicate */
633 /* Skip verify of unwind_sp, has predicate */
634 /* Skip verify of deprecated_frame_args_address, has predicate */
635 /* Skip verify of deprecated_frame_locals_address, has predicate */
636 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
637 /* Skip verify of frame_num_args, has predicate */
638 /* Skip verify of deprecated_stack_align, has predicate */
639 /* Skip verify of frame_align, has predicate */
640 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
641 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
642 if (current_gdbarch->float_format == 0)
643 current_gdbarch->float_format = default_float_format (current_gdbarch);
644 if (current_gdbarch->double_format == 0)
645 current_gdbarch->double_format = default_double_format (current_gdbarch);
646 if (current_gdbarch->long_double_format == 0)
647 current_gdbarch->long_double_format = default_double_format (current_gdbarch);
648 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
649 /* Skip verify of addr_bits_remove, invalid_p == 0 */
650 /* Skip verify of smash_text_address, invalid_p == 0 */
651 /* Skip verify of software_single_step, has predicate */
652 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
653 && (current_gdbarch->print_insn == 0))
654 fprintf_unfiltered (log, "\n\tprint_insn");
655 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
656 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
657 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
658 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
659 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
660 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
661 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
662 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
663 /* Skip verify of name_of_malloc, invalid_p == 0 */
664 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
665 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
666 /* Skip verify of address_class_type_flags, has predicate */
667 /* Skip verify of address_class_type_flags_to_name, has predicate */
668 /* Skip verify of address_class_name_to_type_flags, has predicate */
669 /* Skip verify of register_reggroup_p, invalid_p == 0 */
670 /* Skip verify of fetch_pointer_argument, has predicate */
671 /* Skip verify of regset_from_core_section, has predicate */
672 buf = ui_file_xstrdup (log, &dummy);
673 make_cleanup (xfree, buf);
674 if (strlen (buf) > 0)
675 internal_error (__FILE__, __LINE__,
676 "verify_gdbarch: the following are invalid ...%s",
678 do_cleanups (cleanups);
682 /* Print out the details of the current architecture. */
684 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
685 just happens to match the global variable ``current_gdbarch''. That
686 way macros refering to that variable get the local and not the global
687 version - ulgh. Once everything is parameterised with gdbarch, this
691 gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
693 fprintf_unfiltered (file,
694 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
696 fprintf_unfiltered (file,
697 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
698 (long) current_gdbarch->convert_from_func_ptr_addr);
699 fprintf_unfiltered (file,
700 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
701 gdbarch_frame_align_p (current_gdbarch));
702 fprintf_unfiltered (file,
703 "gdbarch_dump: frame_align = 0x%08lx\n",
704 (long) current_gdbarch->frame_align);
705 fprintf_unfiltered (file,
706 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
707 gdbarch_regset_from_core_section_p (current_gdbarch));
708 fprintf_unfiltered (file,
709 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
710 (long) current_gdbarch->regset_from_core_section);
711 fprintf_unfiltered (file,
712 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
713 gdbarch_return_value_p (current_gdbarch));
714 fprintf_unfiltered (file,
715 "gdbarch_dump: return_value = 0x%08lx\n",
716 (long) current_gdbarch->return_value);
717 fprintf_unfiltered (file,
718 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
719 (long) current_gdbarch->in_function_epilogue_p);
720 fprintf_unfiltered (file,
721 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
722 (long) current_gdbarch->register_reggroup_p);
723 fprintf_unfiltered (file,
724 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
725 (long) current_gdbarch->stabs_argument_has_addr);
726 fprintf_unfiltered (file,
727 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
728 gdbarch_pseudo_register_read_p (current_gdbarch));
729 fprintf_unfiltered (file,
730 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
731 (long) current_gdbarch->pseudo_register_read);
732 fprintf_unfiltered (file,
733 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
734 gdbarch_pseudo_register_write_p (current_gdbarch));
735 fprintf_unfiltered (file,
736 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
737 (long) current_gdbarch->pseudo_register_write);
738 fprintf_unfiltered (file,
739 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
740 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
741 fprintf_unfiltered (file,
742 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
743 (long) current_gdbarch->address_class_name_to_type_flags);
744 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
745 fprintf_unfiltered (file,
746 "gdbarch_dump: %s # %s\n",
747 "ADDRESS_CLASS_TYPE_FLAGS_P()",
748 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
749 fprintf_unfiltered (file,
750 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
751 ADDRESS_CLASS_TYPE_FLAGS_P ());
753 #ifdef ADDRESS_CLASS_TYPE_FLAGS
754 fprintf_unfiltered (file,
755 "gdbarch_dump: %s # %s\n",
756 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
757 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
758 fprintf_unfiltered (file,
759 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
760 (long) current_gdbarch->address_class_type_flags
761 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
763 fprintf_unfiltered (file,
764 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
765 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
766 fprintf_unfiltered (file,
767 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
768 (long) current_gdbarch->address_class_type_flags_to_name);
769 #ifdef ADDRESS_TO_POINTER
770 fprintf_unfiltered (file,
771 "gdbarch_dump: %s # %s\n",
772 "ADDRESS_TO_POINTER(type, buf, addr)",
773 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
774 fprintf_unfiltered (file,
775 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
776 (long) current_gdbarch->address_to_pointer
777 /*ADDRESS_TO_POINTER ()*/);
779 #ifdef ADDR_BITS_REMOVE
780 fprintf_unfiltered (file,
781 "gdbarch_dump: %s # %s\n",
782 "ADDR_BITS_REMOVE(addr)",
783 XSTRING (ADDR_BITS_REMOVE (addr)));
784 fprintf_unfiltered (file,
785 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
786 (long) current_gdbarch->addr_bits_remove
787 /*ADDR_BITS_REMOVE ()*/);
789 fprintf_unfiltered (file,
790 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
791 gdbarch_adjust_breakpoint_address_p (current_gdbarch));
792 fprintf_unfiltered (file,
793 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
794 (long) current_gdbarch->adjust_breakpoint_address);
795 #ifdef BELIEVE_PCC_PROMOTION
796 fprintf_unfiltered (file,
797 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
798 XSTRING (BELIEVE_PCC_PROMOTION));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
801 BELIEVE_PCC_PROMOTION);
803 #ifdef BREAKPOINT_FROM_PC
804 fprintf_unfiltered (file,
805 "gdbarch_dump: %s # %s\n",
806 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
807 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
810 (long) current_gdbarch->breakpoint_from_pc
811 /*BREAKPOINT_FROM_PC ()*/);
813 #ifdef CALL_DUMMY_LOCATION
814 fprintf_unfiltered (file,
815 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
816 XSTRING (CALL_DUMMY_LOCATION));
817 fprintf_unfiltered (file,
818 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
819 CALL_DUMMY_LOCATION);
821 #ifdef CANNOT_FETCH_REGISTER
822 fprintf_unfiltered (file,
823 "gdbarch_dump: %s # %s\n",
824 "CANNOT_FETCH_REGISTER(regnum)",
825 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
826 fprintf_unfiltered (file,
827 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
828 (long) current_gdbarch->cannot_fetch_register
829 /*CANNOT_FETCH_REGISTER ()*/);
831 #ifdef CANNOT_STEP_BREAKPOINT
832 fprintf_unfiltered (file,
833 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
834 XSTRING (CANNOT_STEP_BREAKPOINT));
835 fprintf_unfiltered (file,
836 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
837 CANNOT_STEP_BREAKPOINT);
839 #ifdef CANNOT_STORE_REGISTER
840 fprintf_unfiltered (file,
841 "gdbarch_dump: %s # %s\n",
842 "CANNOT_STORE_REGISTER(regnum)",
843 XSTRING (CANNOT_STORE_REGISTER (regnum)));
844 fprintf_unfiltered (file,
845 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
846 (long) current_gdbarch->cannot_store_register
847 /*CANNOT_STORE_REGISTER ()*/);
849 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
850 fprintf_unfiltered (file,
851 "gdbarch_dump: %s # %s\n",
852 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
853 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
854 fprintf_unfiltered (file,
855 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
856 (long) current_gdbarch->coff_make_msymbol_special
857 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
859 fprintf_unfiltered (file,
860 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
861 (long) current_gdbarch->construct_inferior_arguments);
862 #ifdef CONVERT_REGISTER_P
863 fprintf_unfiltered (file,
864 "gdbarch_dump: %s # %s\n",
865 "CONVERT_REGISTER_P(regnum, type)",
866 XSTRING (CONVERT_REGISTER_P (regnum, type)));
867 fprintf_unfiltered (file,
868 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
869 (long) current_gdbarch->convert_register_p
870 /*CONVERT_REGISTER_P ()*/);
872 #ifdef DECR_PC_AFTER_BREAK
873 fprintf_unfiltered (file,
874 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
875 XSTRING (DECR_PC_AFTER_BREAK));
876 fprintf_unfiltered (file,
877 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
878 (long) DECR_PC_AFTER_BREAK);
880 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
881 fprintf_unfiltered (file,
882 "gdbarch_dump: %s # %s\n",
883 "DEPRECATED_DO_REGISTERS_INFO_P()",
884 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
885 fprintf_unfiltered (file,
886 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
887 DEPRECATED_DO_REGISTERS_INFO_P ());
889 #ifdef DEPRECATED_DO_REGISTERS_INFO
890 fprintf_unfiltered (file,
891 "gdbarch_dump: %s # %s\n",
892 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
893 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
894 fprintf_unfiltered (file,
895 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
896 (long) current_gdbarch->deprecated_do_registers_info
897 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
899 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
900 fprintf_unfiltered (file,
901 "gdbarch_dump: %s # %s\n",
902 "DEPRECATED_DUMMY_WRITE_SP_P()",
903 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
904 fprintf_unfiltered (file,
905 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
906 DEPRECATED_DUMMY_WRITE_SP_P ());
908 #ifdef DEPRECATED_DUMMY_WRITE_SP
909 fprintf_unfiltered (file,
910 "gdbarch_dump: %s # %s\n",
911 "DEPRECATED_DUMMY_WRITE_SP(val)",
912 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
915 (long) current_gdbarch->deprecated_dummy_write_sp
916 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
918 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
919 fprintf_unfiltered (file,
920 "gdbarch_dump: %s # %s\n",
921 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
922 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
925 (long) current_gdbarch->deprecated_extract_return_value
926 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
928 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
929 fprintf_unfiltered (file,
930 "gdbarch_dump: %s # %s\n",
931 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
932 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
935 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
937 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
938 fprintf_unfiltered (file,
939 "gdbarch_dump: %s # %s\n",
940 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
941 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
944 (long) current_gdbarch->deprecated_extract_struct_value_address
945 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
947 #ifdef DEPRECATED_FP_REGNUM
948 fprintf_unfiltered (file,
949 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
950 XSTRING (DEPRECATED_FP_REGNUM));
951 fprintf_unfiltered (file,
952 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
953 DEPRECATED_FP_REGNUM);
955 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
956 fprintf_unfiltered (file,
957 "gdbarch_dump: %s # %s\n",
958 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
959 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
960 fprintf_unfiltered (file,
961 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
962 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
964 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
965 fprintf_unfiltered (file,
966 "gdbarch_dump: %s # %s\n",
967 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
968 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
969 fprintf_unfiltered (file,
970 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
971 (long) current_gdbarch->deprecated_frameless_function_invocation
972 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
974 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
975 fprintf_unfiltered (file,
976 "gdbarch_dump: %s # %s\n",
977 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
978 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
979 fprintf_unfiltered (file,
980 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
981 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
983 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
984 fprintf_unfiltered (file,
985 "gdbarch_dump: %s # %s\n",
986 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
987 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
990 (long) current_gdbarch->deprecated_frame_args_address
991 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
993 #ifdef DEPRECATED_FRAME_CHAIN_P
994 fprintf_unfiltered (file,
995 "gdbarch_dump: %s # %s\n",
996 "DEPRECATED_FRAME_CHAIN_P()",
997 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
998 fprintf_unfiltered (file,
999 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1000 DEPRECATED_FRAME_CHAIN_P ());
1002 #ifdef DEPRECATED_FRAME_CHAIN
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: %s # %s\n",
1005 "DEPRECATED_FRAME_CHAIN(frame)",
1006 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1009 (long) current_gdbarch->deprecated_frame_chain
1010 /*DEPRECATED_FRAME_CHAIN ()*/);
1012 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: %s # %s\n",
1015 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1016 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1019 DEPRECATED_FRAME_CHAIN_VALID_P ());
1021 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: %s # %s\n",
1024 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1025 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1028 (long) current_gdbarch->deprecated_frame_chain_valid
1029 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1031 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1032 fprintf_unfiltered (file,
1033 "gdbarch_dump: %s # %s\n",
1034 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1035 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1038 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1040 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: %s # %s\n",
1043 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1044 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1047 (long) current_gdbarch->deprecated_frame_init_saved_regs
1048 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1050 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: %s # %s\n",
1053 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1054 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1057 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1059 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: %s # %s\n",
1062 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1063 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1066 (long) current_gdbarch->deprecated_frame_locals_address
1067 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1069 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: %s # %s\n",
1072 "DEPRECATED_FRAME_SAVED_PC_P()",
1073 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1076 DEPRECATED_FRAME_SAVED_PC_P ());
1078 #ifdef DEPRECATED_FRAME_SAVED_PC
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: %s # %s\n",
1081 "DEPRECATED_FRAME_SAVED_PC(fi)",
1082 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1085 (long) current_gdbarch->deprecated_frame_saved_pc
1086 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1088 #ifdef DEPRECATED_FUNCTION_START_OFFSET
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
1091 XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET = %ld\n",
1094 (long) DEPRECATED_FUNCTION_START_OFFSET);
1096 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: %s # %s\n",
1099 "DEPRECATED_GET_SAVED_REGISTER_P()",
1100 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1101 fprintf_unfiltered (file,
1102 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1103 DEPRECATED_GET_SAVED_REGISTER_P ());
1105 #ifdef DEPRECATED_GET_SAVED_REGISTER
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1109 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1112 (long) current_gdbarch->deprecated_get_saved_register
1113 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1115 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1116 fprintf_unfiltered (file,
1117 "gdbarch_dump: %s # %s\n",
1118 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1119 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1122 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1124 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: %s # %s\n",
1127 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1128 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1131 (long) current_gdbarch->deprecated_init_extra_frame_info
1132 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1134 #ifdef DEPRECATED_INIT_FRAME_PC_P
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: %s # %s\n",
1137 "DEPRECATED_INIT_FRAME_PC_P()",
1138 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1141 DEPRECATED_INIT_FRAME_PC_P ());
1143 #ifdef DEPRECATED_INIT_FRAME_PC
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: %s # %s\n",
1146 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1147 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1150 (long) current_gdbarch->deprecated_init_frame_pc
1151 /*DEPRECATED_INIT_FRAME_PC ()*/);
1153 #ifdef DEPRECATED_POP_FRAME_P
1154 fprintf_unfiltered (file,
1155 "gdbarch_dump: %s # %s\n",
1156 "DEPRECATED_POP_FRAME_P()",
1157 XSTRING (DEPRECATED_POP_FRAME_P ()));
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1160 DEPRECATED_POP_FRAME_P ());
1162 #ifdef DEPRECATED_POP_FRAME
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: %s # %s\n",
1165 "DEPRECATED_POP_FRAME(-)",
1166 XSTRING (DEPRECATED_POP_FRAME (-)));
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1169 (long) current_gdbarch->deprecated_pop_frame
1170 /*DEPRECATED_POP_FRAME ()*/);
1172 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: %s # %s\n",
1175 "DEPRECATED_PUSH_ARGUMENTS_P()",
1176 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1179 DEPRECATED_PUSH_ARGUMENTS_P ());
1181 #ifdef DEPRECATED_PUSH_ARGUMENTS
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: %s # %s\n",
1184 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1185 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1188 (long) current_gdbarch->deprecated_push_arguments
1189 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1191 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: %s # %s\n",
1194 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1195 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1198 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1200 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: %s # %s\n",
1203 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1204 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1207 (long) current_gdbarch->deprecated_push_return_address
1208 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1210 #ifdef DEPRECATED_REGISTER_BYTE_P
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: %s # %s\n",
1213 "DEPRECATED_REGISTER_BYTE_P()",
1214 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1215 fprintf_unfiltered (file,
1216 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1217 DEPRECATED_REGISTER_BYTE_P ());
1219 #ifdef DEPRECATED_REGISTER_BYTE
1220 fprintf_unfiltered (file,
1221 "gdbarch_dump: %s # %s\n",
1222 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1223 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr)));
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1226 (long) current_gdbarch->deprecated_register_byte
1227 /*DEPRECATED_REGISTER_BYTE ()*/);
1229 #ifdef DEPRECATED_REGISTER_BYTES
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1232 XSTRING (DEPRECATED_REGISTER_BYTES));
1233 fprintf_unfiltered (file,
1234 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1235 DEPRECATED_REGISTER_BYTES);
1237 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: %s # %s\n",
1240 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1241 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1244 DEPRECATED_REGISTER_RAW_SIZE_P ());
1246 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: %s # %s\n",
1249 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1250 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1253 (long) current_gdbarch->deprecated_register_raw_size
1254 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1256 #ifdef DEPRECATED_REGISTER_SIZE
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1259 XSTRING (DEPRECATED_REGISTER_SIZE));
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1262 DEPRECATED_REGISTER_SIZE);
1264 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: %s # %s\n",
1267 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1268 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1271 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1273 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1274 fprintf_unfiltered (file,
1275 "gdbarch_dump: %s # %s\n",
1276 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1277 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1280 (long) current_gdbarch->deprecated_register_virtual_size
1281 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1283 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: %s # %s\n",
1286 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1287 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1288 fprintf_unfiltered (file,
1289 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1290 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1292 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: %s # %s\n",
1295 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1296 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr)));
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1299 (long) current_gdbarch->deprecated_register_virtual_type
1300 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1302 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1306 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1309 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1311 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: %s # %s\n",
1314 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1315 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1318 (long) current_gdbarch->deprecated_reg_struct_has_addr
1319 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1321 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: %s # %s\n",
1324 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1325 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1326 fprintf_unfiltered (file,
1327 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1328 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1330 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: %s # %s\n",
1333 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1334 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1337 (long) current_gdbarch->deprecated_saved_pc_after_call
1338 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1340 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: %s # %s\n",
1343 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1344 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1347 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1349 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: %s # %s\n",
1352 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1353 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1356 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1357 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1359 #ifdef DEPRECATED_STACK_ALIGN_P
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: %s # %s\n",
1362 "DEPRECATED_STACK_ALIGN_P()",
1363 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1366 DEPRECATED_STACK_ALIGN_P ());
1368 #ifdef DEPRECATED_STACK_ALIGN
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: %s # %s\n",
1371 "DEPRECATED_STACK_ALIGN(sp)",
1372 XSTRING (DEPRECATED_STACK_ALIGN (sp)));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1375 (long) current_gdbarch->deprecated_stack_align
1376 /*DEPRECATED_STACK_ALIGN ()*/);
1378 #ifdef DEPRECATED_STORE_RETURN_VALUE
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1382 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1385 (long) current_gdbarch->deprecated_store_return_value
1386 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1388 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: %s # %s\n",
1391 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1392 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1395 DEPRECATED_STORE_STRUCT_RETURN_P ());
1397 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1398 fprintf_unfiltered (file,
1399 "gdbarch_dump: %s # %s\n",
1400 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1401 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1404 (long) current_gdbarch->deprecated_store_struct_return
1405 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1407 #ifdef DEPRECATED_TARGET_READ_FP_P
1408 fprintf_unfiltered (file,
1409 "gdbarch_dump: %s # %s\n",
1410 "DEPRECATED_TARGET_READ_FP_P()",
1411 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1414 DEPRECATED_TARGET_READ_FP_P ());
1416 #ifdef DEPRECATED_TARGET_READ_FP
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: %s # %s\n",
1419 "DEPRECATED_TARGET_READ_FP()",
1420 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1421 fprintf_unfiltered (file,
1422 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1423 (long) current_gdbarch->deprecated_target_read_fp
1424 /*DEPRECATED_TARGET_READ_FP ()*/);
1426 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: %s # %s\n",
1429 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
1430 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
1431 fprintf_unfiltered (file,
1432 "gdbarch_dump: DEPRECATED_USE_STRUCT_CONVENTION = <0x%08lx>\n",
1433 (long) current_gdbarch->deprecated_use_struct_convention
1434 /*DEPRECATED_USE_STRUCT_CONVENTION ()*/);
1436 #ifdef DWARF2_REG_TO_REGNUM
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: %s # %s\n",
1439 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1440 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1443 (long) current_gdbarch->dwarf2_reg_to_regnum
1444 /*DWARF2_REG_TO_REGNUM ()*/);
1446 #ifdef DWARF_REG_TO_REGNUM
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: %s # %s\n",
1449 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1450 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1453 (long) current_gdbarch->dwarf_reg_to_regnum
1454 /*DWARF_REG_TO_REGNUM ()*/);
1456 #ifdef ECOFF_REG_TO_REGNUM
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: %s # %s\n",
1459 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1460 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1463 (long) current_gdbarch->ecoff_reg_to_regnum
1464 /*ECOFF_REG_TO_REGNUM ()*/);
1466 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: %s # %s\n",
1469 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1470 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1473 (long) current_gdbarch->elf_make_msymbol_special
1474 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1476 #ifdef EXTRACT_RETURN_VALUE
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: %s # %s\n",
1479 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1480 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1481 fprintf_unfiltered (file,
1482 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1483 (long) current_gdbarch->extract_return_value
1484 /*EXTRACT_RETURN_VALUE ()*/);
1486 #ifdef FETCH_POINTER_ARGUMENT_P
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: %s # %s\n",
1489 "FETCH_POINTER_ARGUMENT_P()",
1490 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1493 FETCH_POINTER_ARGUMENT_P ());
1495 #ifdef FETCH_POINTER_ARGUMENT
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: %s # %s\n",
1498 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1499 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1500 fprintf_unfiltered (file,
1501 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1502 (long) current_gdbarch->fetch_pointer_argument
1503 /*FETCH_POINTER_ARGUMENT ()*/);
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: FP0_REGNUM # %s\n",
1508 XSTRING (FP0_REGNUM));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: FP0_REGNUM = %d\n",
1513 #ifdef FRAME_ARGS_SKIP
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1516 XSTRING (FRAME_ARGS_SKIP));
1517 fprintf_unfiltered (file,
1518 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1519 (long) FRAME_ARGS_SKIP);
1521 #ifdef FRAME_NUM_ARGS_P
1522 fprintf_unfiltered (file,
1523 "gdbarch_dump: %s # %s\n",
1524 "FRAME_NUM_ARGS_P()",
1525 XSTRING (FRAME_NUM_ARGS_P ()));
1526 fprintf_unfiltered (file,
1527 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1528 FRAME_NUM_ARGS_P ());
1530 #ifdef FRAME_NUM_ARGS
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: %s # %s\n",
1533 "FRAME_NUM_ARGS(frame)",
1534 XSTRING (FRAME_NUM_ARGS (frame)));
1535 fprintf_unfiltered (file,
1536 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1537 (long) current_gdbarch->frame_num_args
1538 /*FRAME_NUM_ARGS ()*/);
1540 #ifdef FRAME_RED_ZONE_SIZE
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1543 XSTRING (FRAME_RED_ZONE_SIZE));
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1546 FRAME_RED_ZONE_SIZE);
1548 #ifdef GET_LONGJMP_TARGET_P
1549 fprintf_unfiltered (file,
1550 "gdbarch_dump: %s # %s\n",
1551 "GET_LONGJMP_TARGET_P()",
1552 XSTRING (GET_LONGJMP_TARGET_P ()));
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1555 GET_LONGJMP_TARGET_P ());
1557 #ifdef GET_LONGJMP_TARGET
1558 fprintf_unfiltered (file,
1559 "gdbarch_dump: %s # %s\n",
1560 "GET_LONGJMP_TARGET(pc)",
1561 XSTRING (GET_LONGJMP_TARGET (pc)));
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1564 (long) current_gdbarch->get_longjmp_target
1565 /*GET_LONGJMP_TARGET ()*/);
1567 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1570 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1573 HAVE_NONSTEPPABLE_WATCHPOINT);
1576 fprintf_unfiltered (file,
1577 "gdbarch_dump: %s # %s\n",
1578 "INNER_THAN(lhs, rhs)",
1579 XSTRING (INNER_THAN (lhs, rhs)));
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1582 (long) current_gdbarch->inner_than
1585 #ifdef INTEGER_TO_ADDRESS_P
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: %s # %s\n",
1588 "INTEGER_TO_ADDRESS_P()",
1589 XSTRING (INTEGER_TO_ADDRESS_P ()));
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1592 INTEGER_TO_ADDRESS_P ());
1594 #ifdef INTEGER_TO_ADDRESS
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: %s # %s\n",
1597 "INTEGER_TO_ADDRESS(type, buf)",
1598 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1599 fprintf_unfiltered (file,
1600 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1601 (long) current_gdbarch->integer_to_address
1602 /*INTEGER_TO_ADDRESS ()*/);
1604 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1605 fprintf_unfiltered (file,
1606 "gdbarch_dump: %s # %s\n",
1607 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1608 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1611 (long) current_gdbarch->in_solib_call_trampoline
1612 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1614 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: %s # %s\n",
1617 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1618 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1621 (long) current_gdbarch->in_solib_return_trampoline
1622 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1624 #ifdef MEMORY_INSERT_BREAKPOINT
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: %s # %s\n",
1627 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1628 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1631 (long) current_gdbarch->memory_insert_breakpoint
1632 /*MEMORY_INSERT_BREAKPOINT ()*/);
1634 #ifdef MEMORY_REMOVE_BREAKPOINT
1635 fprintf_unfiltered (file,
1636 "gdbarch_dump: %s # %s\n",
1637 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1638 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1641 (long) current_gdbarch->memory_remove_breakpoint
1642 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1644 #ifdef NAME_OF_MALLOC
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1647 XSTRING (NAME_OF_MALLOC));
1648 fprintf_unfiltered (file,
1649 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1652 #ifdef NUM_PSEUDO_REGS
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1655 XSTRING (NUM_PSEUDO_REGS));
1656 fprintf_unfiltered (file,
1657 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: NUM_REGS # %s\n",
1663 XSTRING (NUM_REGS));
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: NUM_REGS = %d\n",
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: PC_REGNUM # %s\n",
1671 XSTRING (PC_REGNUM));
1672 fprintf_unfiltered (file,
1673 "gdbarch_dump: PC_REGNUM = %d\n",
1676 #ifdef POINTER_TO_ADDRESS
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: %s # %s\n",
1679 "POINTER_TO_ADDRESS(type, buf)",
1680 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1683 (long) current_gdbarch->pointer_to_address
1684 /*POINTER_TO_ADDRESS ()*/);
1686 fprintf_unfiltered (file,
1687 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1688 gdbarch_print_float_info_p (current_gdbarch));
1689 fprintf_unfiltered (file,
1690 "gdbarch_dump: print_float_info = 0x%08lx\n",
1691 (long) current_gdbarch->print_float_info);
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1694 (long) current_gdbarch->print_registers_info);
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1697 gdbarch_print_vector_info_p (current_gdbarch));
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1700 (long) current_gdbarch->print_vector_info);
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: PS_REGNUM # %s\n",
1704 XSTRING (PS_REGNUM));
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: PS_REGNUM = %d\n",
1709 fprintf_unfiltered (file,
1710 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1711 gdbarch_push_dummy_call_p (current_gdbarch));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1714 (long) current_gdbarch->push_dummy_call);
1715 fprintf_unfiltered (file,
1716 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1717 gdbarch_push_dummy_code_p (current_gdbarch));
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1720 (long) current_gdbarch->push_dummy_code);
1721 #ifdef REGISTER_BYTES_OK_P
1722 fprintf_unfiltered (file,
1723 "gdbarch_dump: %s # %s\n",
1724 "REGISTER_BYTES_OK_P()",
1725 XSTRING (REGISTER_BYTES_OK_P ()));
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1728 REGISTER_BYTES_OK_P ());
1730 #ifdef REGISTER_BYTES_OK
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: %s # %s\n",
1733 "REGISTER_BYTES_OK(nr_bytes)",
1734 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1735 fprintf_unfiltered (file,
1736 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1737 (long) current_gdbarch->register_bytes_ok
1738 /*REGISTER_BYTES_OK ()*/);
1740 #ifdef REGISTER_NAME
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: %s # %s\n",
1743 "REGISTER_NAME(regnr)",
1744 XSTRING (REGISTER_NAME (regnr)));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1747 (long) current_gdbarch->register_name
1748 /*REGISTER_NAME ()*/);
1750 #ifdef REGISTER_SIM_REGNO
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: %s # %s\n",
1753 "REGISTER_SIM_REGNO(reg_nr)",
1754 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1757 (long) current_gdbarch->register_sim_regno
1758 /*REGISTER_SIM_REGNO ()*/);
1760 #ifdef REGISTER_TO_VALUE
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: %s # %s\n",
1763 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1764 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1767 (long) current_gdbarch->register_to_value
1768 /*REGISTER_TO_VALUE ()*/);
1770 fprintf_unfiltered (file,
1771 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1772 gdbarch_register_type_p (current_gdbarch));
1773 fprintf_unfiltered (file,
1774 "gdbarch_dump: register_type = 0x%08lx\n",
1775 (long) current_gdbarch->register_type);
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1778 (long) current_gdbarch->remote_translate_xfer_address);
1779 #ifdef SDB_REG_TO_REGNUM
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: %s # %s\n",
1782 "SDB_REG_TO_REGNUM(sdb_regnr)",
1783 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1786 (long) current_gdbarch->sdb_reg_to_regnum
1787 /*SDB_REG_TO_REGNUM ()*/);
1789 #ifdef SKIP_PROLOGUE
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: %s # %s\n",
1792 "SKIP_PROLOGUE(ip)",
1793 XSTRING (SKIP_PROLOGUE (ip)));
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1796 (long) current_gdbarch->skip_prologue
1797 /*SKIP_PROLOGUE ()*/);
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1801 (long) current_gdbarch->skip_solib_resolver);
1802 #ifdef SKIP_TRAMPOLINE_CODE
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: %s # %s\n",
1805 "SKIP_TRAMPOLINE_CODE(pc)",
1806 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1809 (long) current_gdbarch->skip_trampoline_code
1810 /*SKIP_TRAMPOLINE_CODE ()*/);
1812 #ifdef SMASH_TEXT_ADDRESS
1813 fprintf_unfiltered (file,
1814 "gdbarch_dump: %s # %s\n",
1815 "SMASH_TEXT_ADDRESS(addr)",
1816 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1819 (long) current_gdbarch->smash_text_address
1820 /*SMASH_TEXT_ADDRESS ()*/);
1822 #ifdef SOFTWARE_SINGLE_STEP_P
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: %s # %s\n",
1825 "SOFTWARE_SINGLE_STEP_P()",
1826 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1829 SOFTWARE_SINGLE_STEP_P ());
1831 #ifdef SOFTWARE_SINGLE_STEP
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: %s # %s\n",
1834 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1835 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1838 (long) current_gdbarch->software_single_step
1839 /*SOFTWARE_SINGLE_STEP ()*/);
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: SP_REGNUM # %s\n",
1844 XSTRING (SP_REGNUM));
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: SP_REGNUM = %d\n",
1849 #ifdef STAB_REG_TO_REGNUM
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: %s # %s\n",
1852 "STAB_REG_TO_REGNUM(stab_regnr)",
1853 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1854 fprintf_unfiltered (file,
1855 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1856 (long) current_gdbarch->stab_reg_to_regnum
1857 /*STAB_REG_TO_REGNUM ()*/);
1859 #ifdef STORE_RETURN_VALUE
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: %s # %s\n",
1862 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1863 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1866 (long) current_gdbarch->store_return_value
1867 /*STORE_RETURN_VALUE ()*/);
1869 #ifdef TARGET_ADDR_BIT
1870 fprintf_unfiltered (file,
1871 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1872 XSTRING (TARGET_ADDR_BIT));
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1877 #ifdef TARGET_ARCHITECTURE
1878 fprintf_unfiltered (file,
1879 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1880 XSTRING (TARGET_ARCHITECTURE));
1881 if (TARGET_ARCHITECTURE != NULL)
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1884 TARGET_ARCHITECTURE->printable_name);
1886 #ifdef TARGET_BFD_VMA_BIT
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1889 XSTRING (TARGET_BFD_VMA_BIT));
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1892 TARGET_BFD_VMA_BIT);
1894 #ifdef TARGET_BYTE_ORDER
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1897 XSTRING (TARGET_BYTE_ORDER));
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1900 (long) TARGET_BYTE_ORDER);
1902 #ifdef TARGET_CHAR_SIGNED
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1905 XSTRING (TARGET_CHAR_SIGNED));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1908 TARGET_CHAR_SIGNED);
1910 #ifdef TARGET_DOUBLE_BIT
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1913 XSTRING (TARGET_DOUBLE_BIT));
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1918 #ifdef TARGET_DOUBLE_FORMAT
1919 fprintf_unfiltered (file,
1920 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1921 XSTRING (TARGET_DOUBLE_FORMAT));
1922 fprintf_unfiltered (file,
1923 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
1924 (TARGET_DOUBLE_FORMAT)->name);
1926 #ifdef TARGET_FLOAT_BIT
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1929 XSTRING (TARGET_FLOAT_BIT));
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1934 #ifdef TARGET_FLOAT_FORMAT
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1937 XSTRING (TARGET_FLOAT_FORMAT));
1938 fprintf_unfiltered (file,
1939 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
1940 (TARGET_FLOAT_FORMAT)->name);
1942 #ifdef TARGET_INT_BIT
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1945 XSTRING (TARGET_INT_BIT));
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: TARGET_INT_BIT = %d\n",
1950 #ifdef TARGET_LONG_BIT
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1953 XSTRING (TARGET_LONG_BIT));
1954 fprintf_unfiltered (file,
1955 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
1958 #ifdef TARGET_LONG_DOUBLE_BIT
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1961 XSTRING (TARGET_LONG_DOUBLE_BIT));
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
1964 TARGET_LONG_DOUBLE_BIT);
1966 #ifdef TARGET_LONG_DOUBLE_FORMAT
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1969 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1970 fprintf_unfiltered (file,
1971 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
1972 (TARGET_LONG_DOUBLE_FORMAT)->name);
1974 #ifdef TARGET_LONG_LONG_BIT
1975 fprintf_unfiltered (file,
1976 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1977 XSTRING (TARGET_LONG_LONG_BIT));
1978 fprintf_unfiltered (file,
1979 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
1980 TARGET_LONG_LONG_BIT);
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: TARGET_OSABI # %s\n",
1985 XSTRING (TARGET_OSABI));
1986 fprintf_unfiltered (file,
1987 "gdbarch_dump: TARGET_OSABI = %ld\n",
1988 (long) TARGET_OSABI);
1990 #ifdef TARGET_PRINT_INSN
1991 fprintf_unfiltered (file,
1992 "gdbarch_dump: %s # %s\n",
1993 "TARGET_PRINT_INSN(vma, info)",
1994 XSTRING (TARGET_PRINT_INSN (vma, info)));
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
1997 (long) current_gdbarch->print_insn
1998 /*TARGET_PRINT_INSN ()*/);
2000 #ifdef TARGET_PTR_BIT
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2003 XSTRING (TARGET_PTR_BIT));
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2008 #ifdef TARGET_READ_PC_P
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: %s # %s\n",
2011 "TARGET_READ_PC_P()",
2012 XSTRING (TARGET_READ_PC_P ()));
2013 fprintf_unfiltered (file,
2014 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2015 TARGET_READ_PC_P ());
2017 #ifdef TARGET_READ_PC
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: %s # %s\n",
2020 "TARGET_READ_PC(ptid)",
2021 XSTRING (TARGET_READ_PC (ptid)));
2022 fprintf_unfiltered (file,
2023 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2024 (long) current_gdbarch->read_pc
2025 /*TARGET_READ_PC ()*/);
2027 #ifdef TARGET_READ_SP_P
2028 fprintf_unfiltered (file,
2029 "gdbarch_dump: %s # %s\n",
2030 "TARGET_READ_SP_P()",
2031 XSTRING (TARGET_READ_SP_P ()));
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2034 TARGET_READ_SP_P ());
2036 #ifdef TARGET_READ_SP
2037 fprintf_unfiltered (file,
2038 "gdbarch_dump: %s # %s\n",
2040 XSTRING (TARGET_READ_SP ()));
2041 fprintf_unfiltered (file,
2042 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2043 (long) current_gdbarch->read_sp
2044 /*TARGET_READ_SP ()*/);
2046 #ifdef TARGET_SHORT_BIT
2047 fprintf_unfiltered (file,
2048 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2049 XSTRING (TARGET_SHORT_BIT));
2050 fprintf_unfiltered (file,
2051 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2054 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: %s # %s\n",
2057 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2058 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2061 (long) current_gdbarch->virtual_frame_pointer
2062 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2064 #ifdef TARGET_WRITE_PC
2065 fprintf_unfiltered (file,
2066 "gdbarch_dump: %s # %s\n",
2067 "TARGET_WRITE_PC(val, ptid)",
2068 XSTRING (TARGET_WRITE_PC (val, ptid)));
2069 fprintf_unfiltered (file,
2070 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2071 (long) current_gdbarch->write_pc
2072 /*TARGET_WRITE_PC ()*/);
2074 fprintf_unfiltered (file,
2075 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2076 gdbarch_unwind_dummy_id_p (current_gdbarch));
2077 fprintf_unfiltered (file,
2078 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2079 (long) current_gdbarch->unwind_dummy_id);
2080 fprintf_unfiltered (file,
2081 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2082 gdbarch_unwind_pc_p (current_gdbarch));
2083 fprintf_unfiltered (file,
2084 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2085 (long) current_gdbarch->unwind_pc);
2086 fprintf_unfiltered (file,
2087 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2088 gdbarch_unwind_sp_p (current_gdbarch));
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2091 (long) current_gdbarch->unwind_sp);
2092 #ifdef VALUE_TO_REGISTER
2093 fprintf_unfiltered (file,
2094 "gdbarch_dump: %s # %s\n",
2095 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2096 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2097 fprintf_unfiltered (file,
2098 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2099 (long) current_gdbarch->value_to_register
2100 /*VALUE_TO_REGISTER ()*/);
2102 if (current_gdbarch->dump_tdep != NULL)
2103 current_gdbarch->dump_tdep (current_gdbarch, file);
2106 struct gdbarch_tdep *
2107 gdbarch_tdep (struct gdbarch *gdbarch)
2109 if (gdbarch_debug >= 2)
2110 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2111 return gdbarch->tdep;
2115 const struct bfd_arch_info *
2116 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2118 gdb_assert (gdbarch != NULL);
2119 if (gdbarch_debug >= 2)
2120 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2121 return gdbarch->bfd_arch_info;
2125 gdbarch_byte_order (struct gdbarch *gdbarch)
2127 gdb_assert (gdbarch != NULL);
2128 if (gdbarch_debug >= 2)
2129 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2130 return gdbarch->byte_order;
2134 gdbarch_osabi (struct gdbarch *gdbarch)
2136 gdb_assert (gdbarch != NULL);
2137 if (gdbarch_debug >= 2)
2138 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2139 return gdbarch->osabi;
2143 gdbarch_short_bit (struct gdbarch *gdbarch)
2145 gdb_assert (gdbarch != NULL);
2146 /* Skip verify of short_bit, invalid_p == 0 */
2147 if (gdbarch_debug >= 2)
2148 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2149 return gdbarch->short_bit;
2153 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2156 gdbarch->short_bit = short_bit;
2160 gdbarch_int_bit (struct gdbarch *gdbarch)
2162 gdb_assert (gdbarch != NULL);
2163 /* Skip verify of int_bit, invalid_p == 0 */
2164 if (gdbarch_debug >= 2)
2165 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2166 return gdbarch->int_bit;
2170 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2173 gdbarch->int_bit = int_bit;
2177 gdbarch_long_bit (struct gdbarch *gdbarch)
2179 gdb_assert (gdbarch != NULL);
2180 /* Skip verify of long_bit, invalid_p == 0 */
2181 if (gdbarch_debug >= 2)
2182 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2183 return gdbarch->long_bit;
2187 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2190 gdbarch->long_bit = long_bit;
2194 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2196 gdb_assert (gdbarch != NULL);
2197 /* Skip verify of long_long_bit, invalid_p == 0 */
2198 if (gdbarch_debug >= 2)
2199 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2200 return gdbarch->long_long_bit;
2204 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2207 gdbarch->long_long_bit = long_long_bit;
2211 gdbarch_float_bit (struct gdbarch *gdbarch)
2213 gdb_assert (gdbarch != NULL);
2214 /* Skip verify of float_bit, invalid_p == 0 */
2215 if (gdbarch_debug >= 2)
2216 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2217 return gdbarch->float_bit;
2221 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2224 gdbarch->float_bit = float_bit;
2228 gdbarch_double_bit (struct gdbarch *gdbarch)
2230 gdb_assert (gdbarch != NULL);
2231 /* Skip verify of double_bit, invalid_p == 0 */
2232 if (gdbarch_debug >= 2)
2233 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2234 return gdbarch->double_bit;
2238 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2241 gdbarch->double_bit = double_bit;
2245 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2247 gdb_assert (gdbarch != NULL);
2248 /* Skip verify of long_double_bit, invalid_p == 0 */
2249 if (gdbarch_debug >= 2)
2250 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2251 return gdbarch->long_double_bit;
2255 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2256 int long_double_bit)
2258 gdbarch->long_double_bit = long_double_bit;
2262 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2264 gdb_assert (gdbarch != NULL);
2265 /* Skip verify of ptr_bit, invalid_p == 0 */
2266 if (gdbarch_debug >= 2)
2267 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2268 return gdbarch->ptr_bit;
2272 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2275 gdbarch->ptr_bit = ptr_bit;
2279 gdbarch_addr_bit (struct gdbarch *gdbarch)
2281 gdb_assert (gdbarch != NULL);
2282 /* Check variable changed from pre-default. */
2283 gdb_assert (gdbarch->addr_bit != 0);
2284 if (gdbarch_debug >= 2)
2285 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2286 return gdbarch->addr_bit;
2290 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2293 gdbarch->addr_bit = addr_bit;
2297 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2299 gdb_assert (gdbarch != NULL);
2300 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2301 if (gdbarch_debug >= 2)
2302 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2303 return gdbarch->bfd_vma_bit;
2307 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2310 gdbarch->bfd_vma_bit = bfd_vma_bit;
2314 gdbarch_char_signed (struct gdbarch *gdbarch)
2316 gdb_assert (gdbarch != NULL);
2317 /* Check variable changed from pre-default. */
2318 gdb_assert (gdbarch->char_signed != -1);
2319 if (gdbarch_debug >= 2)
2320 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2321 return gdbarch->char_signed;
2325 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2328 gdbarch->char_signed = char_signed;
2332 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2334 gdb_assert (gdbarch != NULL);
2335 return gdbarch->read_pc != NULL;
2339 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2341 gdb_assert (gdbarch != NULL);
2342 gdb_assert (gdbarch->read_pc != NULL);
2343 if (gdbarch_debug >= 2)
2344 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2345 return gdbarch->read_pc (ptid);
2349 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2350 gdbarch_read_pc_ftype read_pc)
2352 gdbarch->read_pc = read_pc;
2356 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2358 gdb_assert (gdbarch != NULL);
2359 gdb_assert (gdbarch->write_pc != NULL);
2360 if (gdbarch_debug >= 2)
2361 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2362 gdbarch->write_pc (val, ptid);
2366 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2367 gdbarch_write_pc_ftype write_pc)
2369 gdbarch->write_pc = write_pc;
2373 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2375 gdb_assert (gdbarch != NULL);
2376 return gdbarch->read_sp != NULL;
2380 gdbarch_read_sp (struct gdbarch *gdbarch)
2382 gdb_assert (gdbarch != NULL);
2383 gdb_assert (gdbarch->read_sp != NULL);
2384 if (gdbarch_debug >= 2)
2385 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2386 return gdbarch->read_sp ();
2390 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2391 gdbarch_read_sp_ftype read_sp)
2393 gdbarch->read_sp = read_sp;
2397 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2399 gdb_assert (gdbarch != NULL);
2400 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
2401 if (gdbarch_debug >= 2)
2402 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2403 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2407 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2408 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2410 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2414 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2416 gdb_assert (gdbarch != NULL);
2417 return gdbarch->pseudo_register_read != NULL;
2421 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2423 gdb_assert (gdbarch != NULL);
2424 gdb_assert (gdbarch->pseudo_register_read != NULL);
2425 if (gdbarch_debug >= 2)
2426 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2427 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2431 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2432 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2434 gdbarch->pseudo_register_read = pseudo_register_read;
2438 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2440 gdb_assert (gdbarch != NULL);
2441 return gdbarch->pseudo_register_write != NULL;
2445 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2447 gdb_assert (gdbarch != NULL);
2448 gdb_assert (gdbarch->pseudo_register_write != NULL);
2449 if (gdbarch_debug >= 2)
2450 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2451 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2455 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2456 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2458 gdbarch->pseudo_register_write = pseudo_register_write;
2462 gdbarch_num_regs (struct gdbarch *gdbarch)
2464 gdb_assert (gdbarch != NULL);
2465 /* Check variable changed from pre-default. */
2466 gdb_assert (gdbarch->num_regs != -1);
2467 if (gdbarch_debug >= 2)
2468 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2469 return gdbarch->num_regs;
2473 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2476 gdbarch->num_regs = num_regs;
2480 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2482 gdb_assert (gdbarch != NULL);
2483 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2484 if (gdbarch_debug >= 2)
2485 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2486 return gdbarch->num_pseudo_regs;
2490 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2491 int num_pseudo_regs)
2493 gdbarch->num_pseudo_regs = num_pseudo_regs;
2497 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2499 gdb_assert (gdbarch != NULL);
2500 /* Skip verify of sp_regnum, invalid_p == 0 */
2501 if (gdbarch_debug >= 2)
2502 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2503 return gdbarch->sp_regnum;
2507 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2510 gdbarch->sp_regnum = sp_regnum;
2514 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2516 gdb_assert (gdbarch != NULL);
2517 /* Skip verify of pc_regnum, invalid_p == 0 */
2518 if (gdbarch_debug >= 2)
2519 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2520 return gdbarch->pc_regnum;
2524 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2527 gdbarch->pc_regnum = pc_regnum;
2531 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2533 gdb_assert (gdbarch != NULL);
2534 /* Skip verify of ps_regnum, invalid_p == 0 */
2535 if (gdbarch_debug >= 2)
2536 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2537 return gdbarch->ps_regnum;
2541 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2544 gdbarch->ps_regnum = ps_regnum;
2548 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2550 gdb_assert (gdbarch != NULL);
2551 /* Skip verify of fp0_regnum, invalid_p == 0 */
2552 if (gdbarch_debug >= 2)
2553 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2554 return gdbarch->fp0_regnum;
2558 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2561 gdbarch->fp0_regnum = fp0_regnum;
2565 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2567 gdb_assert (gdbarch != NULL);
2568 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
2569 if (gdbarch_debug >= 2)
2570 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2571 return gdbarch->stab_reg_to_regnum (stab_regnr);
2575 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2576 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2578 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2582 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2584 gdb_assert (gdbarch != NULL);
2585 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
2586 if (gdbarch_debug >= 2)
2587 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2588 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2592 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2593 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2595 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2599 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2601 gdb_assert (gdbarch != NULL);
2602 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
2603 if (gdbarch_debug >= 2)
2604 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2605 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2609 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2610 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2612 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2616 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2618 gdb_assert (gdbarch != NULL);
2619 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
2620 if (gdbarch_debug >= 2)
2621 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2622 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2626 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2627 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2629 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2633 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2635 gdb_assert (gdbarch != NULL);
2636 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
2637 if (gdbarch_debug >= 2)
2638 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2639 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2643 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2644 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2646 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2650 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2652 gdb_assert (gdbarch != NULL);
2653 gdb_assert (gdbarch->register_name != NULL);
2654 if (gdbarch_debug >= 2)
2655 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2656 return gdbarch->register_name (regnr);
2660 set_gdbarch_register_name (struct gdbarch *gdbarch,
2661 gdbarch_register_name_ftype register_name)
2663 gdbarch->register_name = register_name;
2667 gdbarch_register_type_p (struct gdbarch *gdbarch)
2669 gdb_assert (gdbarch != NULL);
2670 return gdbarch->register_type != NULL;
2674 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
2676 gdb_assert (gdbarch != NULL);
2677 gdb_assert (gdbarch->register_type != NULL);
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
2680 return gdbarch->register_type (gdbarch, reg_nr);
2684 set_gdbarch_register_type (struct gdbarch *gdbarch,
2685 gdbarch_register_type_ftype register_type)
2687 gdbarch->register_type = register_type;
2691 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
2693 gdb_assert (gdbarch != NULL);
2694 return gdbarch->deprecated_register_virtual_type != NULL;
2698 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2700 gdb_assert (gdbarch != NULL);
2701 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
2702 if (gdbarch_debug >= 2)
2703 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
2704 return gdbarch->deprecated_register_virtual_type (reg_nr);
2708 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
2709 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
2711 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
2715 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
2717 gdb_assert (gdbarch != NULL);
2718 if (gdbarch_debug >= 2)
2719 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
2720 return gdbarch->deprecated_register_bytes;
2724 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
2725 int deprecated_register_bytes)
2727 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
2731 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
2733 gdb_assert (gdbarch != NULL);
2734 return gdbarch->deprecated_register_byte != generic_register_byte;
2738 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
2740 gdb_assert (gdbarch != NULL);
2741 gdb_assert (gdbarch->deprecated_register_byte != NULL);
2742 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2743 if (gdbarch_debug >= 2)
2744 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
2745 return gdbarch->deprecated_register_byte (reg_nr);
2749 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
2750 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
2752 gdbarch->deprecated_register_byte = deprecated_register_byte;
2756 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
2758 gdb_assert (gdbarch != NULL);
2759 return gdbarch->deprecated_register_raw_size != generic_register_size;
2763 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2765 gdb_assert (gdbarch != NULL);
2766 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
2767 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2768 if (gdbarch_debug >= 2)
2769 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
2770 return gdbarch->deprecated_register_raw_size (reg_nr);
2774 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
2775 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
2777 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
2781 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
2783 gdb_assert (gdbarch != NULL);
2784 return gdbarch->deprecated_register_virtual_size != generic_register_size;
2788 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2790 gdb_assert (gdbarch != NULL);
2791 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
2792 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2793 if (gdbarch_debug >= 2)
2794 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
2795 return gdbarch->deprecated_register_virtual_size (reg_nr);
2799 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
2800 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
2802 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
2806 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
2808 gdb_assert (gdbarch != NULL);
2809 return gdbarch->unwind_dummy_id != NULL;
2813 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
2815 gdb_assert (gdbarch != NULL);
2816 gdb_assert (gdbarch->unwind_dummy_id != NULL);
2817 if (gdbarch_debug >= 2)
2818 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
2819 return gdbarch->unwind_dummy_id (gdbarch, info);
2823 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
2824 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
2826 gdbarch->unwind_dummy_id = unwind_dummy_id;
2830 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
2832 gdb_assert (gdbarch != NULL);
2833 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
2837 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
2839 gdb_assert (gdbarch != NULL);
2840 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
2841 if (gdbarch_debug >= 2)
2842 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
2843 gdbarch->deprecated_save_dummy_frame_tos (sp);
2847 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
2848 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
2850 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
2854 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
2856 gdb_assert (gdbarch != NULL);
2857 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2858 if (gdbarch_debug >= 2)
2859 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
2860 return gdbarch->deprecated_fp_regnum;
2864 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
2865 int deprecated_fp_regnum)
2867 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
2871 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2873 gdb_assert (gdbarch != NULL);
2874 return gdbarch->deprecated_target_read_fp != NULL;
2878 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2880 gdb_assert (gdbarch != NULL);
2881 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
2882 if (gdbarch_debug >= 2)
2883 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2884 return gdbarch->deprecated_target_read_fp ();
2888 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2889 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2891 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2895 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
2897 gdb_assert (gdbarch != NULL);
2898 return gdbarch->push_dummy_call != NULL;
2902 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)
2904 gdb_assert (gdbarch != NULL);
2905 gdb_assert (gdbarch->push_dummy_call != NULL);
2906 if (gdbarch_debug >= 2)
2907 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
2908 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
2912 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
2913 gdbarch_push_dummy_call_ftype push_dummy_call)
2915 gdbarch->push_dummy_call = push_dummy_call;
2919 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
2921 gdb_assert (gdbarch != NULL);
2922 return gdbarch->deprecated_push_arguments != NULL;
2926 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
2928 gdb_assert (gdbarch != NULL);
2929 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
2930 if (gdbarch_debug >= 2)
2931 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
2932 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
2936 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
2937 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
2939 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
2943 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
2945 gdb_assert (gdbarch != NULL);
2946 return gdbarch->deprecated_push_return_address != NULL;
2950 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
2952 gdb_assert (gdbarch != NULL);
2953 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
2954 if (gdbarch_debug >= 2)
2955 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
2956 return gdbarch->deprecated_push_return_address (pc, sp);
2960 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
2961 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
2963 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
2967 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2969 gdb_assert (gdbarch != NULL);
2970 return gdbarch->deprecated_dummy_write_sp != NULL;
2974 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2976 gdb_assert (gdbarch != NULL);
2977 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
2978 if (gdbarch_debug >= 2)
2979 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2980 gdbarch->deprecated_dummy_write_sp (val);
2984 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2985 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2987 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2991 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
2993 gdb_assert (gdbarch != NULL);
2994 if (gdbarch_debug >= 2)
2995 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
2996 return gdbarch->deprecated_register_size;
3000 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3001 int deprecated_register_size)
3003 gdbarch->deprecated_register_size = deprecated_register_size;
3007 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3009 gdb_assert (gdbarch != NULL);
3010 /* Skip verify of call_dummy_location, invalid_p == 0 */
3011 if (gdbarch_debug >= 2)
3012 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3013 return gdbarch->call_dummy_location;
3017 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3018 int call_dummy_location)
3020 gdbarch->call_dummy_location = call_dummy_location;
3024 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3026 gdb_assert (gdbarch != NULL);
3027 return gdbarch->push_dummy_code != NULL;
3031 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)
3033 gdb_assert (gdbarch != NULL);
3034 gdb_assert (gdbarch->push_dummy_code != NULL);
3035 if (gdbarch_debug >= 2)
3036 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3037 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3041 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3042 gdbarch_push_dummy_code_ftype push_dummy_code)
3044 gdbarch->push_dummy_code = push_dummy_code;
3048 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3050 gdb_assert (gdbarch != NULL);
3051 return gdbarch->deprecated_do_registers_info != NULL;
3055 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3057 gdb_assert (gdbarch != NULL);
3058 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3059 if (gdbarch_debug >= 2)
3060 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3061 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3065 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3066 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3068 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3072 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3074 gdb_assert (gdbarch != NULL);
3075 gdb_assert (gdbarch->print_registers_info != NULL);
3076 if (gdbarch_debug >= 2)
3077 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3078 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3082 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3083 gdbarch_print_registers_info_ftype print_registers_info)
3085 gdbarch->print_registers_info = print_registers_info;
3089 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3091 gdb_assert (gdbarch != NULL);
3092 return gdbarch->print_float_info != NULL;
3096 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3098 gdb_assert (gdbarch != NULL);
3099 gdb_assert (gdbarch->print_float_info != NULL);
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3102 gdbarch->print_float_info (gdbarch, file, frame, args);
3106 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3107 gdbarch_print_float_info_ftype print_float_info)
3109 gdbarch->print_float_info = print_float_info;
3113 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3115 gdb_assert (gdbarch != NULL);
3116 return gdbarch->print_vector_info != NULL;
3120 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3122 gdb_assert (gdbarch != NULL);
3123 gdb_assert (gdbarch->print_vector_info != NULL);
3124 if (gdbarch_debug >= 2)
3125 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3126 gdbarch->print_vector_info (gdbarch, file, frame, args);
3130 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3131 gdbarch_print_vector_info_ftype print_vector_info)
3133 gdbarch->print_vector_info = print_vector_info;
3137 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3139 gdb_assert (gdbarch != NULL);
3140 gdb_assert (gdbarch->register_sim_regno != NULL);
3141 if (gdbarch_debug >= 2)
3142 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3143 return gdbarch->register_sim_regno (reg_nr);
3147 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3148 gdbarch_register_sim_regno_ftype register_sim_regno)
3150 gdbarch->register_sim_regno = register_sim_regno;
3154 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3156 gdb_assert (gdbarch != NULL);
3157 return gdbarch->register_bytes_ok != NULL;
3161 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3163 gdb_assert (gdbarch != NULL);
3164 gdb_assert (gdbarch->register_bytes_ok != NULL);
3165 if (gdbarch_debug >= 2)
3166 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3167 return gdbarch->register_bytes_ok (nr_bytes);
3171 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3172 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3174 gdbarch->register_bytes_ok = register_bytes_ok;
3178 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3180 gdb_assert (gdbarch != NULL);
3181 gdb_assert (gdbarch->cannot_fetch_register != NULL);
3182 if (gdbarch_debug >= 2)
3183 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3184 return gdbarch->cannot_fetch_register (regnum);
3188 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3189 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3191 gdbarch->cannot_fetch_register = cannot_fetch_register;
3195 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3197 gdb_assert (gdbarch != NULL);
3198 gdb_assert (gdbarch->cannot_store_register != NULL);
3199 if (gdbarch_debug >= 2)
3200 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3201 return gdbarch->cannot_store_register (regnum);
3205 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3206 gdbarch_cannot_store_register_ftype cannot_store_register)
3208 gdbarch->cannot_store_register = cannot_store_register;
3212 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3214 gdb_assert (gdbarch != NULL);
3215 return gdbarch->get_longjmp_target != NULL;
3219 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3221 gdb_assert (gdbarch != NULL);
3222 gdb_assert (gdbarch->get_longjmp_target != NULL);
3223 if (gdbarch_debug >= 2)
3224 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3225 return gdbarch->get_longjmp_target (pc);
3229 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3230 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3232 gdbarch->get_longjmp_target = get_longjmp_target;
3236 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3238 gdb_assert (gdbarch != NULL);
3239 return gdbarch->deprecated_init_frame_pc != NULL;
3243 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3245 gdb_assert (gdbarch != NULL);
3246 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
3247 if (gdbarch_debug >= 2)
3248 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3249 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3253 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3254 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3256 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3260 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3262 gdb_assert (gdbarch != NULL);
3263 if (gdbarch_debug >= 2)
3264 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3265 return gdbarch->believe_pcc_promotion;
3269 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3270 int believe_pcc_promotion)
3272 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3276 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3278 gdb_assert (gdbarch != NULL);
3279 return gdbarch->deprecated_get_saved_register != NULL;
3283 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)
3285 gdb_assert (gdbarch != NULL);
3286 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
3287 if (gdbarch_debug >= 2)
3288 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3289 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3293 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3294 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3296 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3300 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
3302 gdb_assert (gdbarch != NULL);
3303 gdb_assert (gdbarch->convert_register_p != NULL);
3304 if (gdbarch_debug >= 2)
3305 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3306 return gdbarch->convert_register_p (regnum, type);
3310 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3311 gdbarch_convert_register_p_ftype convert_register_p)
3313 gdbarch->convert_register_p = convert_register_p;
3317 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
3319 gdb_assert (gdbarch != NULL);
3320 gdb_assert (gdbarch->register_to_value != NULL);
3321 if (gdbarch_debug >= 2)
3322 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3323 gdbarch->register_to_value (frame, regnum, type, buf);
3327 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3328 gdbarch_register_to_value_ftype register_to_value)
3330 gdbarch->register_to_value = register_to_value;
3334 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
3336 gdb_assert (gdbarch != NULL);
3337 gdb_assert (gdbarch->value_to_register != NULL);
3338 if (gdbarch_debug >= 2)
3339 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3340 gdbarch->value_to_register (frame, regnum, type, buf);
3344 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3345 gdbarch_value_to_register_ftype value_to_register)
3347 gdbarch->value_to_register = value_to_register;
3351 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
3353 gdb_assert (gdbarch != NULL);
3354 gdb_assert (gdbarch->pointer_to_address != NULL);
3355 if (gdbarch_debug >= 2)
3356 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3357 return gdbarch->pointer_to_address (type, buf);
3361 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3362 gdbarch_pointer_to_address_ftype pointer_to_address)
3364 gdbarch->pointer_to_address = pointer_to_address;
3368 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3370 gdb_assert (gdbarch != NULL);
3371 gdb_assert (gdbarch->address_to_pointer != NULL);
3372 if (gdbarch_debug >= 2)
3373 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3374 gdbarch->address_to_pointer (type, buf, addr);
3378 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3379 gdbarch_address_to_pointer_ftype address_to_pointer)
3381 gdbarch->address_to_pointer = address_to_pointer;
3385 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3387 gdb_assert (gdbarch != NULL);
3388 return gdbarch->integer_to_address != NULL;
3392 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3394 gdb_assert (gdbarch != NULL);
3395 gdb_assert (gdbarch->integer_to_address != NULL);
3396 if (gdbarch_debug >= 2)
3397 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3398 return gdbarch->integer_to_address (type, buf);
3402 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3403 gdbarch_integer_to_address_ftype integer_to_address)
3405 gdbarch->integer_to_address = integer_to_address;
3409 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
3411 gdb_assert (gdbarch != NULL);
3412 return gdbarch->deprecated_pop_frame != NULL;
3416 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
3418 gdb_assert (gdbarch != NULL);
3419 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
3420 if (gdbarch_debug >= 2)
3421 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
3422 gdbarch->deprecated_pop_frame ();
3426 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
3427 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
3429 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
3433 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
3435 gdb_assert (gdbarch != NULL);
3436 return gdbarch->deprecated_store_struct_return != NULL;
3440 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3442 gdb_assert (gdbarch != NULL);
3443 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
3444 if (gdbarch_debug >= 2)
3445 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
3446 gdbarch->deprecated_store_struct_return (addr, sp);
3450 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
3451 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
3453 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
3457 gdbarch_return_value_p (struct gdbarch *gdbarch)
3459 gdb_assert (gdbarch != NULL);
3460 return gdbarch->return_value != legacy_return_value;
3463 enum return_value_convention
3464 gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
3466 gdb_assert (gdbarch != NULL);
3467 gdb_assert (gdbarch->return_value != NULL);
3468 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
3469 if (gdbarch_debug >= 2)
3470 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
3471 return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
3475 set_gdbarch_return_value (struct gdbarch *gdbarch,
3476 gdbarch_return_value_ftype return_value)
3478 gdbarch->return_value = return_value;
3482 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3484 gdb_assert (gdbarch != NULL);
3485 gdb_assert (gdbarch->extract_return_value != NULL);
3486 if (gdbarch_debug >= 2)
3487 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3488 gdbarch->extract_return_value (type, regcache, valbuf);
3492 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3493 gdbarch_extract_return_value_ftype extract_return_value)
3495 gdbarch->extract_return_value = extract_return_value;
3499 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3501 gdb_assert (gdbarch != NULL);
3502 gdb_assert (gdbarch->store_return_value != NULL);
3503 if (gdbarch_debug >= 2)
3504 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3505 gdbarch->store_return_value (type, regcache, valbuf);
3509 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3510 gdbarch_store_return_value_ftype store_return_value)
3512 gdbarch->store_return_value = store_return_value;
3516 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3518 gdb_assert (gdbarch != NULL);
3519 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
3520 if (gdbarch_debug >= 2)
3521 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3522 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3526 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3527 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3529 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3533 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3535 gdb_assert (gdbarch != NULL);
3536 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
3537 if (gdbarch_debug >= 2)
3538 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
3539 gdbarch->deprecated_store_return_value (type, valbuf);
3543 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
3544 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
3546 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
3550 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3552 gdb_assert (gdbarch != NULL);
3553 gdb_assert (gdbarch->deprecated_use_struct_convention != NULL);
3554 if (gdbarch_debug >= 2)
3555 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_struct_convention called\n");
3556 return gdbarch->deprecated_use_struct_convention (gcc_p, value_type);
3560 set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch,
3561 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention)
3563 gdbarch->deprecated_use_struct_convention = deprecated_use_struct_convention;
3567 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3569 gdb_assert (gdbarch != NULL);
3570 return gdbarch->deprecated_extract_struct_value_address != NULL;
3574 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
3576 gdb_assert (gdbarch != NULL);
3577 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
3578 if (gdbarch_debug >= 2)
3579 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3580 return gdbarch->deprecated_extract_struct_value_address (regcache);
3584 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3585 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3587 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3591 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
3593 gdb_assert (gdbarch != NULL);
3594 return gdbarch->deprecated_frame_init_saved_regs != NULL;
3598 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3600 gdb_assert (gdbarch != NULL);
3601 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
3602 if (gdbarch_debug >= 2)
3603 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
3604 gdbarch->deprecated_frame_init_saved_regs (frame);
3608 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
3609 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
3611 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
3615 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
3617 gdb_assert (gdbarch != NULL);
3618 return gdbarch->deprecated_init_extra_frame_info != NULL;
3622 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3624 gdb_assert (gdbarch != NULL);
3625 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
3626 if (gdbarch_debug >= 2)
3627 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
3628 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
3632 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
3633 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
3635 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
3639 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3641 gdb_assert (gdbarch != NULL);
3642 gdb_assert (gdbarch->skip_prologue != NULL);
3643 if (gdbarch_debug >= 2)
3644 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3645 return gdbarch->skip_prologue (ip);
3649 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3650 gdbarch_skip_prologue_ftype skip_prologue)
3652 gdbarch->skip_prologue = skip_prologue;
3656 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3658 gdb_assert (gdbarch != NULL);
3659 gdb_assert (gdbarch->inner_than != NULL);
3660 if (gdbarch_debug >= 2)
3661 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3662 return gdbarch->inner_than (lhs, rhs);
3666 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3667 gdbarch_inner_than_ftype inner_than)
3669 gdbarch->inner_than = inner_than;
3672 const unsigned char *
3673 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3675 gdb_assert (gdbarch != NULL);
3676 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
3677 if (gdbarch_debug >= 2)
3678 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3679 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3683 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3684 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3686 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3690 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
3692 gdb_assert (gdbarch != NULL);
3693 return gdbarch->adjust_breakpoint_address != NULL;
3697 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
3699 gdb_assert (gdbarch != NULL);
3700 gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
3701 if (gdbarch_debug >= 2)
3702 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
3703 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
3707 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
3708 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
3710 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
3714 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3716 gdb_assert (gdbarch != NULL);
3717 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
3718 if (gdbarch_debug >= 2)
3719 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3720 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3724 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3725 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3727 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3731 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3733 gdb_assert (gdbarch != NULL);
3734 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
3735 if (gdbarch_debug >= 2)
3736 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3737 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3741 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3742 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3744 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3748 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3750 gdb_assert (gdbarch != NULL);
3751 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3752 if (gdbarch_debug >= 2)
3753 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3754 return gdbarch->decr_pc_after_break;
3758 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3759 CORE_ADDR decr_pc_after_break)
3761 gdbarch->decr_pc_after_break = decr_pc_after_break;
3765 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch)
3767 gdb_assert (gdbarch != NULL);
3768 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
3769 if (gdbarch_debug >= 2)
3770 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n");
3771 return gdbarch->deprecated_function_start_offset;
3775 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch,
3776 CORE_ADDR deprecated_function_start_offset)
3778 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset;
3782 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)
3784 gdb_assert (gdbarch != NULL);
3785 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
3786 if (gdbarch_debug >= 2)
3787 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3788 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
3792 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3793 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3795 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3799 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3801 gdb_assert (gdbarch != NULL);
3802 /* Skip verify of frame_args_skip, invalid_p == 0 */
3803 if (gdbarch_debug >= 2)
3804 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3805 return gdbarch->frame_args_skip;
3809 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3810 CORE_ADDR frame_args_skip)
3812 gdbarch->frame_args_skip = frame_args_skip;
3816 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
3818 gdb_assert (gdbarch != NULL);
3819 return gdbarch->deprecated_frameless_function_invocation != NULL;
3823 gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3825 gdb_assert (gdbarch != NULL);
3826 gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
3827 if (gdbarch_debug >= 2)
3828 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
3829 return gdbarch->deprecated_frameless_function_invocation (fi);
3833 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
3834 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
3836 gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
3840 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
3842 gdb_assert (gdbarch != NULL);
3843 return gdbarch->deprecated_frame_chain != NULL;
3847 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3849 gdb_assert (gdbarch != NULL);
3850 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
3851 if (gdbarch_debug >= 2)
3852 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
3853 return gdbarch->deprecated_frame_chain (frame);
3857 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
3858 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
3860 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
3864 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
3866 gdb_assert (gdbarch != NULL);
3867 return gdbarch->deprecated_frame_chain_valid != NULL;
3871 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3873 gdb_assert (gdbarch != NULL);
3874 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
3875 if (gdbarch_debug >= 2)
3876 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
3877 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
3881 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
3882 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
3884 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
3888 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
3890 gdb_assert (gdbarch != NULL);
3891 return gdbarch->deprecated_frame_saved_pc != NULL;
3895 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3897 gdb_assert (gdbarch != NULL);
3898 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
3899 if (gdbarch_debug >= 2)
3900 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
3901 return gdbarch->deprecated_frame_saved_pc (fi);
3905 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
3906 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
3908 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
3912 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
3914 gdb_assert (gdbarch != NULL);
3915 return gdbarch->unwind_pc != NULL;
3919 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
3921 gdb_assert (gdbarch != NULL);
3922 gdb_assert (gdbarch->unwind_pc != NULL);
3923 if (gdbarch_debug >= 2)
3924 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
3925 return gdbarch->unwind_pc (gdbarch, next_frame);
3929 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
3930 gdbarch_unwind_pc_ftype unwind_pc)
3932 gdbarch->unwind_pc = unwind_pc;
3936 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
3938 gdb_assert (gdbarch != NULL);
3939 return gdbarch->unwind_sp != NULL;
3943 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
3945 gdb_assert (gdbarch != NULL);
3946 gdb_assert (gdbarch->unwind_sp != NULL);
3947 if (gdbarch_debug >= 2)
3948 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
3949 return gdbarch->unwind_sp (gdbarch, next_frame);
3953 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
3954 gdbarch_unwind_sp_ftype unwind_sp)
3956 gdbarch->unwind_sp = unwind_sp;
3960 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
3962 gdb_assert (gdbarch != NULL);
3963 return gdbarch->deprecated_frame_args_address != get_frame_base;
3967 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3969 gdb_assert (gdbarch != NULL);
3970 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
3971 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
3972 if (gdbarch_debug >= 2)
3973 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
3974 return gdbarch->deprecated_frame_args_address (fi);
3978 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
3979 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
3981 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
3985 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
3987 gdb_assert (gdbarch != NULL);
3988 return gdbarch->deprecated_frame_locals_address != get_frame_base;
3992 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3994 gdb_assert (gdbarch != NULL);
3995 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
3996 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
3997 if (gdbarch_debug >= 2)
3998 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
3999 return gdbarch->deprecated_frame_locals_address (fi);
4003 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4004 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4006 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4010 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4012 gdb_assert (gdbarch != NULL);
4013 return gdbarch->deprecated_saved_pc_after_call != NULL;
4017 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4019 gdb_assert (gdbarch != NULL);
4020 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
4021 if (gdbarch_debug >= 2)
4022 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4023 return gdbarch->deprecated_saved_pc_after_call (frame);
4027 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4028 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4030 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4034 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
4036 gdb_assert (gdbarch != NULL);
4037 return gdbarch->frame_num_args != NULL;
4041 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4043 gdb_assert (gdbarch != NULL);
4044 gdb_assert (gdbarch->frame_num_args != NULL);
4045 if (gdbarch_debug >= 2)
4046 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4047 return gdbarch->frame_num_args (frame);
4051 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4052 gdbarch_frame_num_args_ftype frame_num_args)
4054 gdbarch->frame_num_args = frame_num_args;
4058 gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch)
4060 gdb_assert (gdbarch != NULL);
4061 return gdbarch->deprecated_stack_align != NULL;
4065 gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4067 gdb_assert (gdbarch != NULL);
4068 gdb_assert (gdbarch->deprecated_stack_align != NULL);
4069 if (gdbarch_debug >= 2)
4070 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n");
4071 return gdbarch->deprecated_stack_align (sp);
4075 set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch,
4076 gdbarch_deprecated_stack_align_ftype deprecated_stack_align)
4078 gdbarch->deprecated_stack_align = deprecated_stack_align;
4082 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4084 gdb_assert (gdbarch != NULL);
4085 return gdbarch->frame_align != NULL;
4089 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4091 gdb_assert (gdbarch != NULL);
4092 gdb_assert (gdbarch->frame_align != NULL);
4093 if (gdbarch_debug >= 2)
4094 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4095 return gdbarch->frame_align (gdbarch, address);
4099 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4100 gdbarch_frame_align_ftype frame_align)
4102 gdbarch->frame_align = frame_align;
4106 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4108 gdb_assert (gdbarch != NULL);
4109 return gdbarch->deprecated_reg_struct_has_addr != NULL;
4113 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4115 gdb_assert (gdbarch != NULL);
4116 gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL);
4117 if (gdbarch_debug >= 2)
4118 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n");
4119 return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type);
4123 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
4124 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr)
4126 gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr;
4130 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
4132 gdb_assert (gdbarch != NULL);
4133 gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
4134 if (gdbarch_debug >= 2)
4135 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
4136 return gdbarch->stabs_argument_has_addr (gdbarch, type);
4140 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
4141 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
4143 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
4147 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
4149 gdb_assert (gdbarch != NULL);
4150 if (gdbarch_debug >= 2)
4151 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
4152 return gdbarch->frame_red_zone_size;
4156 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
4157 int frame_red_zone_size)
4159 gdbarch->frame_red_zone_size = frame_red_zone_size;
4162 const struct floatformat *
4163 gdbarch_float_format (struct gdbarch *gdbarch)
4165 gdb_assert (gdbarch != NULL);
4166 if (gdbarch_debug >= 2)
4167 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4168 return gdbarch->float_format;
4172 set_gdbarch_float_format (struct gdbarch *gdbarch,
4173 const struct floatformat * float_format)
4175 gdbarch->float_format = float_format;
4178 const struct floatformat *
4179 gdbarch_double_format (struct gdbarch *gdbarch)
4181 gdb_assert (gdbarch != NULL);
4182 if (gdbarch_debug >= 2)
4183 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4184 return gdbarch->double_format;
4188 set_gdbarch_double_format (struct gdbarch *gdbarch,
4189 const struct floatformat * double_format)
4191 gdbarch->double_format = double_format;
4194 const struct floatformat *
4195 gdbarch_long_double_format (struct gdbarch *gdbarch)
4197 gdb_assert (gdbarch != NULL);
4198 if (gdbarch_debug >= 2)
4199 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4200 return gdbarch->long_double_format;
4204 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4205 const struct floatformat * long_double_format)
4207 gdbarch->long_double_format = long_double_format;
4211 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
4213 gdb_assert (gdbarch != NULL);
4214 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
4215 if (gdbarch_debug >= 2)
4216 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4217 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
4221 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4222 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4224 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4228 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4230 gdb_assert (gdbarch != NULL);
4231 gdb_assert (gdbarch->addr_bits_remove != NULL);
4232 if (gdbarch_debug >= 2)
4233 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4234 return gdbarch->addr_bits_remove (addr);
4238 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4239 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4241 gdbarch->addr_bits_remove = addr_bits_remove;
4245 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4247 gdb_assert (gdbarch != NULL);
4248 gdb_assert (gdbarch->smash_text_address != NULL);
4249 if (gdbarch_debug >= 2)
4250 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4251 return gdbarch->smash_text_address (addr);
4255 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4256 gdbarch_smash_text_address_ftype smash_text_address)
4258 gdbarch->smash_text_address = smash_text_address;
4262 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4264 gdb_assert (gdbarch != NULL);
4265 return gdbarch->software_single_step != NULL;
4269 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4271 gdb_assert (gdbarch != NULL);
4272 gdb_assert (gdbarch->software_single_step != NULL);
4273 if (gdbarch_debug >= 2)
4274 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4275 gdbarch->software_single_step (sig, insert_breakpoints_p);
4279 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4280 gdbarch_software_single_step_ftype software_single_step)
4282 gdbarch->software_single_step = software_single_step;
4286 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info)
4288 gdb_assert (gdbarch != NULL);
4289 gdb_assert (gdbarch->print_insn != NULL);
4290 if (gdbarch_debug >= 2)
4291 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4292 return gdbarch->print_insn (vma, info);
4296 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4297 gdbarch_print_insn_ftype print_insn)
4299 gdbarch->print_insn = print_insn;
4303 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4305 gdb_assert (gdbarch != NULL);
4306 gdb_assert (gdbarch->skip_trampoline_code != NULL);
4307 if (gdbarch_debug >= 2)
4308 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4309 return gdbarch->skip_trampoline_code (pc);
4313 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4314 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4316 gdbarch->skip_trampoline_code = skip_trampoline_code;
4320 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
4322 gdb_assert (gdbarch != NULL);
4323 gdb_assert (gdbarch->skip_solib_resolver != NULL);
4324 if (gdbarch_debug >= 2)
4325 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
4326 return gdbarch->skip_solib_resolver (gdbarch, pc);
4330 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
4331 gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
4333 gdbarch->skip_solib_resolver = skip_solib_resolver;
4337 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4339 gdb_assert (gdbarch != NULL);
4340 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
4341 if (gdbarch_debug >= 2)
4342 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4343 return gdbarch->in_solib_call_trampoline (pc, name);
4347 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4348 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4350 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4354 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4356 gdb_assert (gdbarch != NULL);
4357 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
4358 if (gdbarch_debug >= 2)
4359 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4360 return gdbarch->in_solib_return_trampoline (pc, name);
4364 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4365 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4367 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4371 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4373 gdb_assert (gdbarch != NULL);
4374 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
4375 if (gdbarch_debug >= 2)
4376 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4377 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4381 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4382 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4384 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4388 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4390 gdb_assert (gdbarch != NULL);
4391 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
4392 if (gdbarch_debug >= 2)
4393 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4394 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4398 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4399 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4401 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4405 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4407 gdb_assert (gdbarch != NULL);
4408 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
4409 if (gdbarch_debug >= 2)
4410 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4411 gdbarch->elf_make_msymbol_special (sym, msym);
4415 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4416 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4418 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4422 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4424 gdb_assert (gdbarch != NULL);
4425 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
4426 if (gdbarch_debug >= 2)
4427 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4428 gdbarch->coff_make_msymbol_special (val, msym);
4432 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4433 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4435 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4439 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
4441 gdb_assert (gdbarch != NULL);
4442 /* Skip verify of name_of_malloc, invalid_p == 0 */
4443 if (gdbarch_debug >= 2)
4444 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
4445 return gdbarch->name_of_malloc;
4449 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
4450 const char * name_of_malloc)
4452 gdbarch->name_of_malloc = name_of_malloc;
4456 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
4458 gdb_assert (gdbarch != NULL);
4459 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4460 if (gdbarch_debug >= 2)
4461 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
4462 return gdbarch->cannot_step_breakpoint;
4466 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
4467 int cannot_step_breakpoint)
4469 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
4473 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
4475 gdb_assert (gdbarch != NULL);
4476 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4477 if (gdbarch_debug >= 2)
4478 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
4479 return gdbarch->have_nonsteppable_watchpoint;
4483 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
4484 int have_nonsteppable_watchpoint)
4486 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
4490 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
4492 gdb_assert (gdbarch != NULL);
4493 return gdbarch->address_class_type_flags != NULL;
4497 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
4499 gdb_assert (gdbarch != NULL);
4500 gdb_assert (gdbarch->address_class_type_flags != NULL);
4501 if (gdbarch_debug >= 2)
4502 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
4503 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
4507 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
4508 gdbarch_address_class_type_flags_ftype address_class_type_flags)
4510 gdbarch->address_class_type_flags = address_class_type_flags;
4514 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
4516 gdb_assert (gdbarch != NULL);
4517 return gdbarch->address_class_type_flags_to_name != NULL;
4521 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
4523 gdb_assert (gdbarch != NULL);
4524 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
4525 if (gdbarch_debug >= 2)
4526 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
4527 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
4531 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
4532 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
4534 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
4538 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
4540 gdb_assert (gdbarch != NULL);
4541 return gdbarch->address_class_name_to_type_flags != NULL;
4545 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
4547 gdb_assert (gdbarch != NULL);
4548 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
4549 if (gdbarch_debug >= 2)
4550 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
4551 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
4555 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
4556 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
4558 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
4562 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
4564 gdb_assert (gdbarch != NULL);
4565 gdb_assert (gdbarch->register_reggroup_p != NULL);
4566 if (gdbarch_debug >= 2)
4567 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
4568 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
4572 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
4573 gdbarch_register_reggroup_p_ftype register_reggroup_p)
4575 gdbarch->register_reggroup_p = register_reggroup_p;
4579 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
4581 gdb_assert (gdbarch != NULL);
4582 return gdbarch->fetch_pointer_argument != NULL;
4586 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
4588 gdb_assert (gdbarch != NULL);
4589 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
4590 if (gdbarch_debug >= 2)
4591 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
4592 return gdbarch->fetch_pointer_argument (frame, argi, type);
4596 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
4597 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
4599 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
4603 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
4605 gdb_assert (gdbarch != NULL);
4606 return gdbarch->regset_from_core_section != NULL;
4609 const struct regset *
4610 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
4612 gdb_assert (gdbarch != NULL);
4613 gdb_assert (gdbarch->regset_from_core_section != NULL);
4614 if (gdbarch_debug >= 2)
4615 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
4616 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
4620 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
4621 gdbarch_regset_from_core_section_ftype regset_from_core_section)
4623 gdbarch->regset_from_core_section = regset_from_core_section;
4627 /* Keep a registry of per-architecture data-pointers required by GDB
4634 gdbarch_data_pre_init_ftype *pre_init;
4635 gdbarch_data_post_init_ftype *post_init;
4638 struct gdbarch_data_registration
4640 struct gdbarch_data *data;
4641 struct gdbarch_data_registration *next;
4644 struct gdbarch_data_registry
4647 struct gdbarch_data_registration *registrations;
4650 struct gdbarch_data_registry gdbarch_data_registry =
4655 static struct gdbarch_data *
4656 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init,
4657 gdbarch_data_post_init_ftype *post_init)
4659 struct gdbarch_data_registration **curr;
4660 /* Append the new registraration. */
4661 for (curr = &gdbarch_data_registry.registrations;
4663 curr = &(*curr)->next);
4664 (*curr) = XMALLOC (struct gdbarch_data_registration);
4665 (*curr)->next = NULL;
4666 (*curr)->data = XMALLOC (struct gdbarch_data);
4667 (*curr)->data->index = gdbarch_data_registry.nr++;
4668 (*curr)->data->pre_init = pre_init;
4669 (*curr)->data->post_init = post_init;
4670 (*curr)->data->init_p = 1;
4671 return (*curr)->data;
4674 struct gdbarch_data *
4675 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init)
4677 return gdbarch_data_register (pre_init, NULL);
4680 struct gdbarch_data *
4681 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init)
4683 return gdbarch_data_register (NULL, post_init);
4686 /* Create/delete the gdbarch data vector. */
4689 alloc_gdbarch_data (struct gdbarch *gdbarch)
4691 gdb_assert (gdbarch->data == NULL);
4692 gdbarch->nr_data = gdbarch_data_registry.nr;
4693 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
4696 /* Initialize the current value of the specified per-architecture
4700 deprecated_set_gdbarch_data (struct gdbarch *gdbarch,
4701 struct gdbarch_data *data,
4704 gdb_assert (data->index < gdbarch->nr_data);
4705 gdb_assert (gdbarch->data[data->index] == NULL);
4706 gdb_assert (data->pre_init == NULL);
4707 gdbarch->data[data->index] = pointer;
4710 /* Return the current value of the specified per-architecture
4714 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4716 gdb_assert (data->index < gdbarch->nr_data);
4717 if (gdbarch->data[data->index] == NULL)
4719 /* The data-pointer isn't initialized, call init() to get a
4721 if (data->pre_init != NULL)
4722 /* Mid architecture creation: pass just the obstack, and not
4723 the entire architecture, as that way it isn't possible for
4724 pre-init code to refer to undefined architecture
4726 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack);
4727 else if (gdbarch->initialized_p
4728 && data->post_init != NULL)
4729 /* Post architecture creation: pass the entire architecture
4730 (as all fields are valid), but be careful to also detect
4731 recursive references. */
4733 gdb_assert (data->init_p);
4735 gdbarch->data[data->index] = data->post_init (gdbarch);
4739 /* The architecture initialization hasn't completed - punt -
4740 hope that the caller knows what they are doing. Once
4741 deprecated_set_gdbarch_data has been initialized, this can be
4742 changed to an internal error. */
4744 gdb_assert (gdbarch->data[data->index] != NULL);
4746 return gdbarch->data[data->index];
4751 /* Keep a registry of swapped data required by GDB modules. */
4756 struct gdbarch_swap_registration *source;
4757 struct gdbarch_swap *next;
4760 struct gdbarch_swap_registration
4763 unsigned long sizeof_data;
4764 gdbarch_swap_ftype *init;
4765 struct gdbarch_swap_registration *next;
4768 struct gdbarch_swap_registry
4771 struct gdbarch_swap_registration *registrations;
4774 struct gdbarch_swap_registry gdbarch_swap_registry =
4780 deprecated_register_gdbarch_swap (void *data,
4781 unsigned long sizeof_data,
4782 gdbarch_swap_ftype *init)
4784 struct gdbarch_swap_registration **rego;
4785 for (rego = &gdbarch_swap_registry.registrations;
4787 rego = &(*rego)->next);
4788 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4789 (*rego)->next = NULL;
4790 (*rego)->init = init;
4791 (*rego)->data = data;
4792 (*rego)->sizeof_data = sizeof_data;
4796 current_gdbarch_swap_init_hack (void)
4798 struct gdbarch_swap_registration *rego;
4799 struct gdbarch_swap **curr = ¤t_gdbarch->swap;
4800 for (rego = gdbarch_swap_registry.registrations;
4804 if (rego->data != NULL)
4806 (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
4807 struct gdbarch_swap);
4808 (*curr)->source = rego;
4809 (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
4811 (*curr)->next = NULL;
4812 curr = &(*curr)->next;
4814 if (rego->init != NULL)
4819 static struct gdbarch *
4820 current_gdbarch_swap_out_hack (void)
4822 struct gdbarch *old_gdbarch = current_gdbarch;
4823 struct gdbarch_swap *curr;
4825 gdb_assert (old_gdbarch != NULL);
4826 for (curr = old_gdbarch->swap;
4830 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4831 memset (curr->source->data, 0, curr->source->sizeof_data);
4833 current_gdbarch = NULL;
4838 current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
4840 struct gdbarch_swap *curr;
4842 gdb_assert (current_gdbarch == NULL);
4843 for (curr = new_gdbarch->swap;
4846 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4847 current_gdbarch = new_gdbarch;
4851 /* Keep a registry of the architectures known by GDB. */
4853 struct gdbarch_registration
4855 enum bfd_architecture bfd_architecture;
4856 gdbarch_init_ftype *init;
4857 gdbarch_dump_tdep_ftype *dump_tdep;
4858 struct gdbarch_list *arches;
4859 struct gdbarch_registration *next;
4862 static struct gdbarch_registration *gdbarch_registry = NULL;
4865 append_name (const char ***buf, int *nr, const char *name)
4867 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4873 gdbarch_printable_names (void)
4875 /* Accumulate a list of names based on the registed list of
4877 enum bfd_architecture a;
4879 const char **arches = NULL;
4880 struct gdbarch_registration *rego;
4881 for (rego = gdbarch_registry;
4885 const struct bfd_arch_info *ap;
4886 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4888 internal_error (__FILE__, __LINE__,
4889 "gdbarch_architecture_names: multi-arch unknown");
4892 append_name (&arches, &nr_arches, ap->printable_name);
4897 append_name (&arches, &nr_arches, NULL);
4903 gdbarch_register (enum bfd_architecture bfd_architecture,
4904 gdbarch_init_ftype *init,
4905 gdbarch_dump_tdep_ftype *dump_tdep)
4907 struct gdbarch_registration **curr;
4908 const struct bfd_arch_info *bfd_arch_info;
4909 /* Check that BFD recognizes this architecture */
4910 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4911 if (bfd_arch_info == NULL)
4913 internal_error (__FILE__, __LINE__,
4914 "gdbarch: Attempt to register unknown architecture (%d)",
4917 /* Check that we haven't seen this architecture before */
4918 for (curr = &gdbarch_registry;
4920 curr = &(*curr)->next)
4922 if (bfd_architecture == (*curr)->bfd_architecture)
4923 internal_error (__FILE__, __LINE__,
4924 "gdbarch: Duplicate registraration of architecture (%s)",
4925 bfd_arch_info->printable_name);
4929 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4930 bfd_arch_info->printable_name,
4933 (*curr) = XMALLOC (struct gdbarch_registration);
4934 (*curr)->bfd_architecture = bfd_architecture;
4935 (*curr)->init = init;
4936 (*curr)->dump_tdep = dump_tdep;
4937 (*curr)->arches = NULL;
4938 (*curr)->next = NULL;
4942 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4943 gdbarch_init_ftype *init)
4945 gdbarch_register (bfd_architecture, init, NULL);
4949 /* Look for an architecture using gdbarch_info. Base search on only
4950 BFD_ARCH_INFO and BYTE_ORDER. */
4952 struct gdbarch_list *
4953 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4954 const struct gdbarch_info *info)
4956 for (; arches != NULL; arches = arches->next)
4958 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4960 if (info->byte_order != arches->gdbarch->byte_order)
4962 if (info->osabi != arches->gdbarch->osabi)
4970 /* Find an architecture that matches the specified INFO. Create a new
4971 architecture if needed. Return that new architecture. Assumes
4972 that there is no current architecture. */
4974 static struct gdbarch *
4975 find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
4977 struct gdbarch *new_gdbarch;
4978 struct gdbarch_registration *rego;
4980 /* The existing architecture has been swapped out - all this code
4981 works from a clean slate. */
4982 gdb_assert (current_gdbarch == NULL);
4984 /* Fill in missing parts of the INFO struct using a number of
4985 sources: "set ..."; INFOabfd supplied; and the existing
4987 gdbarch_info_fill (old_gdbarch, &info);
4989 /* Must have found some sort of architecture. */
4990 gdb_assert (info.bfd_arch_info != NULL);
4994 fprintf_unfiltered (gdb_stdlog,
4995 "find_arch_by_info: info.bfd_arch_info %s\n",
4996 (info.bfd_arch_info != NULL
4997 ? info.bfd_arch_info->printable_name
4999 fprintf_unfiltered (gdb_stdlog,
5000 "find_arch_by_info: info.byte_order %d (%s)\n",
5002 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5003 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5005 fprintf_unfiltered (gdb_stdlog,
5006 "find_arch_by_info: info.osabi %d (%s)\n",
5007 info.osabi, gdbarch_osabi_name (info.osabi));
5008 fprintf_unfiltered (gdb_stdlog,
5009 "find_arch_by_info: info.abfd 0x%lx\n",
5011 fprintf_unfiltered (gdb_stdlog,
5012 "find_arch_by_info: info.tdep_info 0x%lx\n",
5013 (long) info.tdep_info);
5016 /* Find the tdep code that knows about this architecture. */
5017 for (rego = gdbarch_registry;
5020 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5025 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5026 "No matching architecture\n");
5030 /* Ask the tdep code for an architecture that matches "info". */
5031 new_gdbarch = rego->init (info, rego->arches);
5033 /* Did the tdep code like it? No. Reject the change and revert to
5034 the old architecture. */
5035 if (new_gdbarch == NULL)
5038 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5039 "Target rejected architecture\n");
5043 /* Is this a pre-existing architecture (as determined by already
5044 being initialized)? Move it to the front of the architecture
5045 list (keeping the list sorted Most Recently Used). */
5046 if (new_gdbarch->initialized_p)
5048 struct gdbarch_list **list;
5049 struct gdbarch_list *this;
5051 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5052 "Previous architecture 0x%08lx (%s) selected\n",
5054 new_gdbarch->bfd_arch_info->printable_name);
5055 /* Find the existing arch in the list. */
5056 for (list = ®o->arches;
5057 (*list) != NULL && (*list)->gdbarch != new_gdbarch;
5058 list = &(*list)->next);
5059 /* It had better be in the list of architectures. */
5060 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
5063 (*list) = this->next;
5064 /* Insert THIS at the front. */
5065 this->next = rego->arches;
5066 rego->arches = this;
5071 /* It's a new architecture. */
5073 fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
5074 "New architecture 0x%08lx (%s) selected\n",
5076 new_gdbarch->bfd_arch_info->printable_name);
5078 /* Insert the new architecture into the front of the architecture
5079 list (keep the list sorted Most Recently Used). */
5081 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5082 this->next = rego->arches;
5083 this->gdbarch = new_gdbarch;
5084 rego->arches = this;
5087 /* Check that the newly installed architecture is valid. Plug in
5088 any post init values. */
5089 new_gdbarch->dump_tdep = rego->dump_tdep;
5090 verify_gdbarch (new_gdbarch);
5091 new_gdbarch->initialized_p = 1;
5093 /* Initialize any per-architecture swap areas. This phase requires
5094 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5095 swap the entire architecture out. */
5096 current_gdbarch = new_gdbarch;
5097 current_gdbarch_swap_init_hack ();
5098 current_gdbarch_swap_out_hack ();
5101 gdbarch_dump (new_gdbarch, gdb_stdlog);
5107 gdbarch_find_by_info (struct gdbarch_info info)
5109 /* Save the previously selected architecture, setting the global to
5110 NULL. This stops things like gdbarch->init() trying to use the
5111 previous architecture's configuration. The previous architecture
5112 may not even be of the same architecture family. The most recent
5113 architecture of the same family is found at the head of the
5114 rego->arches list. */
5115 struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
5117 /* Find the specified architecture. */
5118 struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
5120 /* Restore the existing architecture. */
5121 gdb_assert (current_gdbarch == NULL);
5122 current_gdbarch_swap_in_hack (old_gdbarch);
5127 /* Make the specified architecture current, swapping the existing one
5131 deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
5133 gdb_assert (new_gdbarch != NULL);
5134 gdb_assert (current_gdbarch != NULL);
5135 gdb_assert (new_gdbarch->initialized_p);
5136 current_gdbarch_swap_out_hack ();
5137 current_gdbarch_swap_in_hack (new_gdbarch);
5138 architecture_changed_event ();
5141 extern void _initialize_gdbarch (void);
5144 _initialize_gdbarch (void)
5146 struct cmd_list_element *c;
5148 add_show_from_set (add_set_cmd ("arch",
5151 (char *)&gdbarch_debug,
5152 "Set architecture debugging.\n\
5153 When non-zero, architecture debugging is enabled.", &setdebuglist),
5155 c = add_set_cmd ("archdebug",
5158 (char *)&gdbarch_debug,
5159 "Set architecture debugging.\n\
5160 When non-zero, architecture debugging is enabled.", &setlist);
5162 deprecate_cmd (c, "set debug arch");
5163 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");