1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
69 #include "symfile.h" /* For entry_point_address. */
70 #include "gdb_obstack.h"
72 /* Static function declarations */
74 static void verify_gdbarch (struct gdbarch *gdbarch);
75 static void alloc_gdbarch_data (struct gdbarch *);
76 static void init_gdbarch_swap (struct gdbarch *);
77 static void clear_gdbarch_swap (struct gdbarch *);
78 static void swapout_gdbarch_swap (struct gdbarch *);
79 static void swapin_gdbarch_swap (struct gdbarch *);
81 /* Non-zero if we want to trace architecture code. */
84 #define GDBARCH_DEBUG 0
86 int gdbarch_debug = GDBARCH_DEBUG;
89 /* Maintain the struct gdbarch object */
93 /* Has this architecture been fully initialized? */
96 /* An obstack bound to the lifetime of the architecture. */
97 struct obstack *obstack;
99 /* basic architectural information */
100 const struct bfd_arch_info * bfd_arch_info;
102 enum gdb_osabi osabi;
104 /* target specific vector. */
105 struct gdbarch_tdep *tdep;
106 gdbarch_dump_tdep_ftype *dump_tdep;
108 /* per-architecture data-pointers */
112 /* per-architecture swap-regions */
113 struct gdbarch_swap *swap;
115 /* Multi-arch values.
117 When extending this structure you must:
121 Declare set/get functions and define the corresponding
124 gdbarch_alloc(): If zero/NULL is not a suitable default,
125 initialize the new field.
127 verify_gdbarch(): Confirm that the target updated the field
130 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
133 ``startup_gdbarch()'': Append an initial value to the static
134 variable (base values on the host's c-type system).
136 get_gdbarch(): Implement the set/get functions (probably using
137 the macro's as shortcuts).
152 gdbarch_read_pc_ftype *read_pc;
153 gdbarch_write_pc_ftype *write_pc;
154 gdbarch_read_sp_ftype *read_sp;
155 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
156 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
157 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
165 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
166 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
167 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
168 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
169 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
170 gdbarch_register_name_ftype *register_name;
171 gdbarch_register_type_ftype *register_type;
172 gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
173 int deprecated_register_bytes;
174 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
175 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
176 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
177 int deprecated_max_register_raw_size;
178 int deprecated_max_register_virtual_size;
179 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
180 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
181 int deprecated_fp_regnum;
182 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
183 gdbarch_push_dummy_call_ftype *push_dummy_call;
184 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
185 int deprecated_use_generic_dummy_frames;
186 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
187 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
188 int deprecated_register_size;
189 int call_dummy_location;
190 gdbarch_call_dummy_address_ftype *call_dummy_address;
191 CORE_ADDR deprecated_call_dummy_start_offset;
192 CORE_ADDR deprecated_call_dummy_breakpoint_offset;
193 int deprecated_call_dummy_length;
194 LONGEST * deprecated_call_dummy_words;
195 int deprecated_sizeof_call_dummy_words;
196 int deprecated_call_dummy_stack_adjust;
197 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
198 gdbarch_push_dummy_code_ftype *push_dummy_code;
199 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
200 int deprecated_extra_stack_alignment_needed;
201 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
202 gdbarch_print_registers_info_ftype *print_registers_info;
203 gdbarch_print_float_info_ftype *print_float_info;
204 gdbarch_print_vector_info_ftype *print_vector_info;
205 gdbarch_register_sim_regno_ftype *register_sim_regno;
206 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
207 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
208 gdbarch_cannot_store_register_ftype *cannot_store_register;
209 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
210 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
211 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
212 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
213 int believe_pcc_promotion;
214 int believe_pcc_promotion_type;
215 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
216 gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
217 gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
218 gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
219 gdbarch_convert_register_p_ftype *convert_register_p;
220 gdbarch_register_to_value_ftype *register_to_value;
221 gdbarch_value_to_register_ftype *value_to_register;
222 gdbarch_pointer_to_address_ftype *pointer_to_address;
223 gdbarch_address_to_pointer_ftype *address_to_pointer;
224 gdbarch_integer_to_address_ftype *integer_to_address;
225 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
226 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
227 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
228 gdbarch_extract_return_value_ftype *extract_return_value;
229 gdbarch_store_return_value_ftype *store_return_value;
230 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
231 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
232 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
233 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
234 gdbarch_use_struct_convention_ftype *use_struct_convention;
235 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
236 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
237 gdbarch_skip_prologue_ftype *skip_prologue;
238 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
239 gdbarch_inner_than_ftype *inner_than;
240 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
241 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
242 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
243 CORE_ADDR decr_pc_after_break;
244 CORE_ADDR function_start_offset;
245 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
246 CORE_ADDR frame_args_skip;
247 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
248 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
249 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
250 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
251 gdbarch_unwind_pc_ftype *unwind_pc;
252 gdbarch_unwind_sp_ftype *unwind_sp;
253 gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
254 gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
255 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
256 gdbarch_frame_num_args_ftype *frame_num_args;
257 gdbarch_stack_align_ftype *stack_align;
258 gdbarch_frame_align_ftype *frame_align;
259 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
261 const struct floatformat * float_format;
262 const struct floatformat * double_format;
263 const struct floatformat * long_double_format;
264 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
265 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
266 gdbarch_smash_text_address_ftype *smash_text_address;
267 gdbarch_software_single_step_ftype *software_single_step;
268 gdbarch_print_insn_ftype *print_insn;
269 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
270 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
271 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
272 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
273 gdbarch_sigtramp_start_ftype *sigtramp_start;
274 gdbarch_sigtramp_end_ftype *sigtramp_end;
275 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
276 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
277 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
278 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
279 const char * name_of_malloc;
280 int cannot_step_breakpoint;
281 int have_nonsteppable_watchpoint;
282 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
283 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
284 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
285 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
286 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
290 /* The default architecture uses host values (for want of a better
293 extern const struct bfd_arch_info bfd_default_arch_struct;
295 struct gdbarch startup_gdbarch =
297 1, /* Always initialized. */
298 NULL, /* The obstack. */
299 /* basic architecture information */
300 &bfd_default_arch_struct, /* bfd_arch_info */
301 BFD_ENDIAN_BIG, /* byte_order */
302 GDB_OSABI_UNKNOWN, /* osabi */
303 /* target specific vector and its dump routine */
305 /*per-architecture data-pointers and swap regions */
307 /* Multi-arch values */
308 8 * sizeof (short), /* short_bit */
309 8 * sizeof (int), /* int_bit */
310 8 * sizeof (long), /* long_bit */
311 8 * sizeof (LONGEST), /* long_long_bit */
312 8 * sizeof (float), /* float_bit */
313 8 * sizeof (double), /* double_bit */
314 8 * sizeof (long double), /* long_double_bit */
315 8 * sizeof (void*), /* ptr_bit */
316 8 * sizeof (void*), /* addr_bit */
317 8 * sizeof (void*), /* bfd_vma_bit */
322 0, /* virtual_frame_pointer */
323 0, /* pseudo_register_read */
324 0, /* pseudo_register_write */
326 0, /* num_pseudo_regs */
332 0, /* stab_reg_to_regnum */
333 0, /* ecoff_reg_to_regnum */
334 0, /* dwarf_reg_to_regnum */
335 0, /* sdb_reg_to_regnum */
336 0, /* dwarf2_reg_to_regnum */
337 0, /* register_name */
338 0, /* register_type */
339 0, /* deprecated_register_virtual_type */
340 0, /* deprecated_register_bytes */
341 generic_register_byte, /* deprecated_register_byte */
342 generic_register_size, /* deprecated_register_raw_size */
343 generic_register_size, /* deprecated_register_virtual_size */
344 0, /* deprecated_max_register_raw_size */
345 0, /* deprecated_max_register_virtual_size */
346 0, /* unwind_dummy_id */
347 0, /* deprecated_save_dummy_frame_tos */
348 -1, /* deprecated_fp_regnum */
349 0, /* deprecated_target_read_fp */
350 0, /* push_dummy_call */
351 0, /* deprecated_push_arguments */
352 0, /* deprecated_use_generic_dummy_frames */
353 0, /* deprecated_push_return_address */
354 0, /* deprecated_dummy_write_sp */
355 0, /* deprecated_register_size */
356 0, /* call_dummy_location */
357 0, /* call_dummy_address */
358 0, /* deprecated_call_dummy_start_offset */
359 0, /* deprecated_call_dummy_breakpoint_offset */
360 0, /* deprecated_call_dummy_length */
361 0, /* deprecated_call_dummy_words */
362 0, /* deprecated_sizeof_call_dummy_words */
363 0, /* deprecated_call_dummy_stack_adjust */
364 0, /* deprecated_fix_call_dummy */
365 0, /* push_dummy_code */
366 0, /* deprecated_push_dummy_frame */
367 0, /* deprecated_extra_stack_alignment_needed */
368 0, /* deprecated_do_registers_info */
369 default_print_registers_info, /* print_registers_info */
370 0, /* print_float_info */
371 0, /* print_vector_info */
372 0, /* register_sim_regno */
373 0, /* register_bytes_ok */
374 0, /* cannot_fetch_register */
375 0, /* cannot_store_register */
376 0, /* get_longjmp_target */
377 generic_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
378 0, /* deprecated_init_frame_pc_first */
379 0, /* deprecated_init_frame_pc */
380 0, /* believe_pcc_promotion */
381 0, /* believe_pcc_promotion_type */
382 0, /* deprecated_get_saved_register */
383 0, /* deprecated_register_convertible */
384 0, /* deprecated_register_convert_to_virtual */
385 0, /* deprecated_register_convert_to_raw */
386 0, /* convert_register_p */
387 0, /* register_to_value */
388 0, /* value_to_register */
389 0, /* pointer_to_address */
390 0, /* address_to_pointer */
391 0, /* integer_to_address */
392 0, /* return_value_on_stack */
393 0, /* deprecated_pop_frame */
394 0, /* deprecated_store_struct_return */
395 0, /* extract_return_value */
396 0, /* store_return_value */
397 0, /* deprecated_extract_return_value */
398 0, /* deprecated_store_return_value */
399 0, /* extract_struct_value_address */
400 0, /* deprecated_extract_struct_value_address */
401 0, /* use_struct_convention */
402 0, /* deprecated_frame_init_saved_regs */
403 0, /* deprecated_init_extra_frame_info */
404 0, /* skip_prologue */
405 0, /* prologue_frameless_p */
407 0, /* breakpoint_from_pc */
408 0, /* memory_insert_breakpoint */
409 0, /* memory_remove_breakpoint */
410 0, /* decr_pc_after_break */
411 0, /* function_start_offset */
412 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
413 0, /* frame_args_skip */
414 0, /* frameless_function_invocation */
415 0, /* deprecated_frame_chain */
416 0, /* deprecated_frame_chain_valid */
417 0, /* deprecated_frame_saved_pc */
420 get_frame_base, /* deprecated_frame_args_address */
421 get_frame_base, /* deprecated_frame_locals_address */
422 0, /* deprecated_saved_pc_after_call */
423 0, /* frame_num_args */
426 0, /* reg_struct_has_addr */
427 0, /* parm_boundary */
428 0, /* float_format */
429 0, /* double_format */
430 0, /* long_double_format */
431 0, /* convert_from_func_ptr_addr */
432 0, /* addr_bits_remove */
433 0, /* smash_text_address */
434 0, /* software_single_step */
436 0, /* skip_trampoline_code */
437 0, /* in_solib_call_trampoline */
438 0, /* in_solib_return_trampoline */
439 0, /* pc_in_sigtramp */
440 0, /* sigtramp_start */
441 0, /* sigtramp_end */
442 generic_in_function_epilogue_p, /* in_function_epilogue_p */
443 construct_inferior_arguments, /* construct_inferior_arguments */
444 0, /* elf_make_msymbol_special */
445 0, /* coff_make_msymbol_special */
446 "malloc", /* name_of_malloc */
447 0, /* cannot_step_breakpoint */
448 0, /* have_nonsteppable_watchpoint */
449 0, /* address_class_type_flags */
450 0, /* address_class_type_flags_to_name */
451 0, /* address_class_name_to_type_flags */
452 default_register_reggroup_p, /* register_reggroup_p */
453 0, /* fetch_pointer_argument */
454 /* startup_gdbarch() */
457 struct gdbarch *current_gdbarch = &startup_gdbarch;
459 /* Do any initialization needed for a non-multiarch configuration
460 after the _initialize_MODULE functions have been run. */
462 initialize_non_multiarch (void)
464 alloc_gdbarch_data (&startup_gdbarch);
465 /* Ensure that all swap areas are zeroed so that they again think
466 they are starting from scratch. */
467 clear_gdbarch_swap (&startup_gdbarch);
468 init_gdbarch_swap (&startup_gdbarch);
472 /* Create a new ``struct gdbarch'' based on information provided by
473 ``struct gdbarch_info''. */
476 gdbarch_alloc (const struct gdbarch_info *info,
477 struct gdbarch_tdep *tdep)
479 /* NOTE: The new architecture variable is named ``current_gdbarch''
480 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
481 the current local architecture and not the previous global
482 architecture. This ensures that the new architectures initial
483 values are not influenced by the previous architecture. Once
484 everything is parameterised with gdbarch, this will go away. */
485 struct gdbarch *current_gdbarch;
487 /* Create an obstack for allocating all the per-architecture memory,
488 then use that to allocate the architecture vector. */
489 struct obstack *obstack = XMALLOC (struct obstack);
490 obstack_init (obstack);
491 current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
492 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
493 current_gdbarch->obstack = obstack;
495 alloc_gdbarch_data (current_gdbarch);
497 current_gdbarch->tdep = tdep;
499 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
500 current_gdbarch->byte_order = info->byte_order;
501 current_gdbarch->osabi = info->osabi;
503 /* Force the explicit initialization of these. */
504 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
505 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
506 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
507 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
508 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
509 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
510 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
511 current_gdbarch->ptr_bit = TARGET_INT_BIT;
512 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
513 current_gdbarch->char_signed = -1;
514 current_gdbarch->write_pc = generic_target_write_pc;
515 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
516 current_gdbarch->num_regs = -1;
517 current_gdbarch->sp_regnum = -1;
518 current_gdbarch->pc_regnum = -1;
519 current_gdbarch->ps_regnum = -1;
520 current_gdbarch->fp0_regnum = -1;
521 current_gdbarch->npc_regnum = -1;
522 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
523 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
524 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
525 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
526 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
527 current_gdbarch->deprecated_register_byte = generic_register_byte;
528 current_gdbarch->deprecated_register_raw_size = generic_register_size;
529 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
530 current_gdbarch->deprecated_fp_regnum = -1;
531 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
532 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
533 current_gdbarch->call_dummy_address = entry_point_address;
534 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
535 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
536 current_gdbarch->print_registers_info = default_print_registers_info;
537 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
538 current_gdbarch->cannot_fetch_register = cannot_register_not;
539 current_gdbarch->cannot_store_register = cannot_register_not;
540 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
541 current_gdbarch->deprecated_register_convertible = deprecated_register_convertible_not;
542 current_gdbarch->convert_register_p = legacy_convert_register_p;
543 current_gdbarch->register_to_value = legacy_register_to_value;
544 current_gdbarch->value_to_register = legacy_value_to_register;
545 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
546 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
547 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
548 current_gdbarch->extract_return_value = legacy_extract_return_value;
549 current_gdbarch->store_return_value = legacy_store_return_value;
550 current_gdbarch->use_struct_convention = generic_use_struct_convention;
551 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
552 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
553 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
554 current_gdbarch->decr_pc_after_break = -1;
555 current_gdbarch->function_start_offset = -1;
556 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
557 current_gdbarch->frame_args_skip = -1;
558 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
559 current_gdbarch->deprecated_frame_args_address = get_frame_base;
560 current_gdbarch->deprecated_frame_locals_address = get_frame_base;
561 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
562 current_gdbarch->addr_bits_remove = core_addr_identity;
563 current_gdbarch->smash_text_address = core_addr_identity;
564 current_gdbarch->print_insn = legacy_print_insn;
565 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
566 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
567 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
568 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
569 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
570 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
571 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
572 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
573 current_gdbarch->name_of_malloc = "malloc";
574 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
575 /* gdbarch_alloc() */
577 return current_gdbarch;
581 /* Allocate extra space using the per-architecture obstack. */
584 gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
586 void *data = obstack_alloc (arch->obstack, size);
587 memset (data, 0, size);
592 /* Free a gdbarch struct. This should never happen in normal
593 operation --- once you've created a gdbarch, you keep it around.
594 However, if an architecture's init function encounters an error
595 building the structure, it may need to clean up a partially
596 constructed gdbarch. */
599 gdbarch_free (struct gdbarch *arch)
601 struct obstack *obstack;
602 gdb_assert (arch != NULL);
603 gdb_assert (!arch->initialized_p);
604 obstack = arch->obstack;
605 obstack_free (obstack, 0); /* Includes the ARCH. */
610 /* Ensure that all values in a GDBARCH are reasonable. */
613 verify_gdbarch (struct gdbarch *gdbarch)
616 struct cleanup *cleanups;
619 /* Only perform sanity checks on a multi-arch target. */
622 log = mem_fileopen ();
623 cleanups = make_cleanup_ui_file_delete (log);
625 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
626 fprintf_unfiltered (log, "\n\tbyte-order");
627 if (gdbarch->bfd_arch_info == NULL)
628 fprintf_unfiltered (log, "\n\tbfd_arch_info");
629 /* Check those that need to be defined for the given multi-arch level. */
630 /* Skip verify of short_bit, invalid_p == 0 */
631 /* Skip verify of int_bit, invalid_p == 0 */
632 /* Skip verify of long_bit, invalid_p == 0 */
633 /* Skip verify of long_long_bit, invalid_p == 0 */
634 /* Skip verify of float_bit, invalid_p == 0 */
635 /* Skip verify of double_bit, invalid_p == 0 */
636 /* Skip verify of long_double_bit, invalid_p == 0 */
637 /* Skip verify of ptr_bit, invalid_p == 0 */
638 if (gdbarch->addr_bit == 0)
639 gdbarch->addr_bit = TARGET_PTR_BIT;
640 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
641 if (gdbarch->char_signed == -1)
642 gdbarch->char_signed = 1;
643 /* Skip verify of read_pc, has predicate */
644 /* Skip verify of write_pc, invalid_p == 0 */
645 /* Skip verify of read_sp, has predicate */
646 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
647 /* Skip verify of pseudo_register_read, has predicate */
648 /* Skip verify of pseudo_register_write, has predicate */
649 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
650 && (gdbarch->num_regs == -1))
651 fprintf_unfiltered (log, "\n\tnum_regs");
652 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
653 /* Skip verify of sp_regnum, invalid_p == 0 */
654 /* Skip verify of pc_regnum, invalid_p == 0 */
655 /* Skip verify of ps_regnum, invalid_p == 0 */
656 /* Skip verify of fp0_regnum, invalid_p == 0 */
657 /* Skip verify of npc_regnum, invalid_p == 0 */
658 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
659 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
660 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
661 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
662 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
663 /* Skip verify of register_type, has predicate */
664 /* Skip verify of deprecated_register_virtual_type, has predicate */
665 /* Skip verify of deprecated_register_byte, has predicate */
666 /* Skip verify of deprecated_register_raw_size, has predicate */
667 /* Skip verify of deprecated_register_virtual_size, has predicate */
668 /* Skip verify of deprecated_max_register_raw_size, has predicate */
669 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
670 /* Skip verify of unwind_dummy_id, has predicate */
671 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
672 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
673 /* Skip verify of deprecated_target_read_fp, has predicate */
674 /* Skip verify of push_dummy_call, has predicate */
675 /* Skip verify of deprecated_push_arguments, has predicate */
676 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
677 /* Skip verify of deprecated_push_return_address, has predicate */
678 /* Skip verify of deprecated_dummy_write_sp, has predicate */
679 /* Skip verify of call_dummy_location, invalid_p == 0 */
680 /* Skip verify of call_dummy_address, invalid_p == 0 */
681 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
682 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
683 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
684 /* Skip verify of deprecated_fix_call_dummy, has predicate */
685 /* Skip verify of push_dummy_code, has predicate */
686 /* Skip verify of deprecated_push_dummy_frame, has predicate */
687 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
688 /* Skip verify of deprecated_do_registers_info, has predicate */
689 /* Skip verify of print_registers_info, invalid_p == 0 */
690 /* Skip verify of print_float_info, has predicate */
691 /* Skip verify of print_vector_info, has predicate */
692 /* Skip verify of register_sim_regno, invalid_p == 0 */
693 /* Skip verify of register_bytes_ok, has predicate */
694 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
695 /* Skip verify of cannot_store_register, invalid_p == 0 */
696 /* Skip verify of get_longjmp_target, has predicate */
697 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
698 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
699 /* Skip verify of deprecated_init_frame_pc, has predicate */
700 /* Skip verify of deprecated_get_saved_register, has predicate */
701 /* Skip verify of deprecated_register_convertible, invalid_p == 0 */
702 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
703 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
704 /* Skip verify of convert_register_p, invalid_p == 0 */
705 /* Skip verify of register_to_value, invalid_p == 0 */
706 /* Skip verify of value_to_register, invalid_p == 0 */
707 /* Skip verify of pointer_to_address, invalid_p == 0 */
708 /* Skip verify of address_to_pointer, invalid_p == 0 */
709 /* Skip verify of integer_to_address, has predicate */
710 /* Skip verify of return_value_on_stack, invalid_p == 0 */
711 /* Skip verify of deprecated_pop_frame, has predicate */
712 /* Skip verify of deprecated_store_struct_return, has predicate */
713 /* Skip verify of extract_return_value, invalid_p == 0 */
714 /* Skip verify of store_return_value, invalid_p == 0 */
715 /* Skip verify of extract_struct_value_address, has predicate */
716 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
717 /* Skip verify of use_struct_convention, invalid_p == 0 */
718 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
719 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
720 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
721 && (gdbarch->skip_prologue == 0))
722 fprintf_unfiltered (log, "\n\tskip_prologue");
723 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
725 && (gdbarch->inner_than == 0))
726 fprintf_unfiltered (log, "\n\tinner_than");
727 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
728 && (gdbarch->breakpoint_from_pc == 0))
729 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
730 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
731 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
733 && (gdbarch->decr_pc_after_break == -1))
734 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
735 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
736 && (gdbarch->function_start_offset == -1))
737 fprintf_unfiltered (log, "\n\tfunction_start_offset");
738 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
740 && (gdbarch->frame_args_skip == -1))
741 fprintf_unfiltered (log, "\n\tframe_args_skip");
742 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
743 /* Skip verify of deprecated_frame_chain, has predicate */
744 /* Skip verify of deprecated_frame_chain_valid, has predicate */
745 /* Skip verify of deprecated_frame_saved_pc, has predicate */
746 /* Skip verify of unwind_pc, has predicate */
747 /* Skip verify of unwind_sp, has predicate */
748 /* Skip verify of deprecated_frame_args_address, has predicate */
749 /* Skip verify of deprecated_frame_locals_address, has predicate */
750 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
751 /* Skip verify of frame_num_args, has predicate */
752 /* Skip verify of stack_align, has predicate */
753 /* Skip verify of frame_align, has predicate */
754 /* Skip verify of reg_struct_has_addr, has predicate */
755 if (gdbarch->float_format == 0)
756 gdbarch->float_format = default_float_format (gdbarch);
757 if (gdbarch->double_format == 0)
758 gdbarch->double_format = default_double_format (gdbarch);
759 if (gdbarch->long_double_format == 0)
760 gdbarch->long_double_format = default_double_format (gdbarch);
761 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
762 /* Skip verify of addr_bits_remove, invalid_p == 0 */
763 /* Skip verify of smash_text_address, invalid_p == 0 */
764 /* Skip verify of software_single_step, has predicate */
765 /* Skip verify of print_insn, invalid_p == 0 */
766 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
767 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
768 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
769 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
770 /* Skip verify of sigtramp_start, has predicate */
771 /* Skip verify of sigtramp_end, has predicate */
772 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
773 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
774 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
775 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
776 /* Skip verify of name_of_malloc, invalid_p == 0 */
777 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
778 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
779 /* Skip verify of address_class_type_flags, has predicate */
780 /* Skip verify of address_class_type_flags_to_name, has predicate */
781 /* Skip verify of address_class_name_to_type_flags, has predicate */
782 /* Skip verify of register_reggroup_p, invalid_p == 0 */
783 /* Skip verify of fetch_pointer_argument, has predicate */
784 buf = ui_file_xstrdup (log, &dummy);
785 make_cleanup (xfree, buf);
786 if (strlen (buf) > 0)
787 internal_error (__FILE__, __LINE__,
788 "verify_gdbarch: the following are invalid ...%s",
790 do_cleanups (cleanups);
794 /* Print out the details of the current architecture. */
796 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
797 just happens to match the global variable ``current_gdbarch''. That
798 way macros refering to that variable get the local and not the global
799 version - ulgh. Once everything is parameterised with gdbarch, this
803 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
805 fprintf_unfiltered (file,
806 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
809 fprintf_unfiltered (file,
810 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
811 gdbarch_frame_align_p (current_gdbarch));
813 fprintf_unfiltered (file,
814 "gdbarch_dump: frame_align = 0x%08lx\n",
815 (long) current_gdbarch->frame_align);
817 fprintf_unfiltered (file,
818 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
819 (long) current_gdbarch->in_function_epilogue_p);
821 fprintf_unfiltered (file,
822 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
823 (long) current_gdbarch->register_reggroup_p);
825 fprintf_unfiltered (file,
826 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
827 gdbarch_pseudo_register_read_p (current_gdbarch));
829 fprintf_unfiltered (file,
830 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
831 (long) current_gdbarch->pseudo_register_read);
833 fprintf_unfiltered (file,
834 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
835 gdbarch_pseudo_register_write_p (current_gdbarch));
837 fprintf_unfiltered (file,
838 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
839 (long) current_gdbarch->pseudo_register_write);
841 fprintf_unfiltered (file,
842 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
843 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
845 fprintf_unfiltered (file,
846 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
847 (long) current_gdbarch->address_class_name_to_type_flags);
848 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
849 fprintf_unfiltered (file,
850 "gdbarch_dump: %s # %s\n",
851 "ADDRESS_CLASS_TYPE_FLAGS_P()",
852 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
855 ADDRESS_CLASS_TYPE_FLAGS_P ());
857 #ifdef ADDRESS_CLASS_TYPE_FLAGS
858 fprintf_unfiltered (file,
859 "gdbarch_dump: %s # %s\n",
860 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
861 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
863 fprintf_unfiltered (file,
864 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
865 (long) current_gdbarch->address_class_type_flags
866 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
869 fprintf_unfiltered (file,
870 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
871 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
873 fprintf_unfiltered (file,
874 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
875 (long) current_gdbarch->address_class_type_flags_to_name);
876 #ifdef ADDRESS_TO_POINTER
878 /* Macro might contain `[{}]' when not multi-arch */
879 fprintf_unfiltered (file,
880 "gdbarch_dump: %s # %s\n",
881 "ADDRESS_TO_POINTER(type, buf, addr)",
882 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
885 fprintf_unfiltered (file,
886 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
887 (long) current_gdbarch->address_to_pointer
888 /*ADDRESS_TO_POINTER ()*/);
890 #ifdef ADDR_BITS_REMOVE
891 fprintf_unfiltered (file,
892 "gdbarch_dump: %s # %s\n",
893 "ADDR_BITS_REMOVE(addr)",
894 XSTRING (ADDR_BITS_REMOVE (addr)));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
898 (long) current_gdbarch->addr_bits_remove
899 /*ADDR_BITS_REMOVE ()*/);
901 #ifdef BELIEVE_PCC_PROMOTION
902 fprintf_unfiltered (file,
903 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
904 XSTRING (BELIEVE_PCC_PROMOTION));
905 fprintf_unfiltered (file,
906 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
907 BELIEVE_PCC_PROMOTION);
909 #ifdef BELIEVE_PCC_PROMOTION_TYPE
910 fprintf_unfiltered (file,
911 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
912 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
915 BELIEVE_PCC_PROMOTION_TYPE);
917 #ifdef BREAKPOINT_FROM_PC
918 fprintf_unfiltered (file,
919 "gdbarch_dump: %s # %s\n",
920 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
921 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
925 (long) current_gdbarch->breakpoint_from_pc
926 /*BREAKPOINT_FROM_PC ()*/);
928 #ifdef CALL_DUMMY_ADDRESS
929 fprintf_unfiltered (file,
930 "gdbarch_dump: %s # %s\n",
931 "CALL_DUMMY_ADDRESS()",
932 XSTRING (CALL_DUMMY_ADDRESS ()));
934 fprintf_unfiltered (file,
935 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
936 (long) current_gdbarch->call_dummy_address
937 /*CALL_DUMMY_ADDRESS ()*/);
939 #ifdef CALL_DUMMY_LOCATION
940 fprintf_unfiltered (file,
941 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
942 XSTRING (CALL_DUMMY_LOCATION));
943 fprintf_unfiltered (file,
944 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
945 CALL_DUMMY_LOCATION);
947 #ifdef CANNOT_FETCH_REGISTER
948 fprintf_unfiltered (file,
949 "gdbarch_dump: %s # %s\n",
950 "CANNOT_FETCH_REGISTER(regnum)",
951 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
955 (long) current_gdbarch->cannot_fetch_register
956 /*CANNOT_FETCH_REGISTER ()*/);
958 #ifdef CANNOT_STEP_BREAKPOINT
959 fprintf_unfiltered (file,
960 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
961 XSTRING (CANNOT_STEP_BREAKPOINT));
962 fprintf_unfiltered (file,
963 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
964 CANNOT_STEP_BREAKPOINT);
966 #ifdef CANNOT_STORE_REGISTER
967 fprintf_unfiltered (file,
968 "gdbarch_dump: %s # %s\n",
969 "CANNOT_STORE_REGISTER(regnum)",
970 XSTRING (CANNOT_STORE_REGISTER (regnum)));
972 fprintf_unfiltered (file,
973 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
974 (long) current_gdbarch->cannot_store_register
975 /*CANNOT_STORE_REGISTER ()*/);
977 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
979 /* Macro might contain `[{}]' when not multi-arch */
980 fprintf_unfiltered (file,
981 "gdbarch_dump: %s # %s\n",
982 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
983 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
988 (long) current_gdbarch->coff_make_msymbol_special
989 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
992 fprintf_unfiltered (file,
993 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
994 (long) current_gdbarch->construct_inferior_arguments);
995 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
996 fprintf_unfiltered (file,
997 "gdbarch_dump: %s # %s\n",
998 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
999 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1003 (long) current_gdbarch->convert_from_func_ptr_addr
1004 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1006 #ifdef CONVERT_REGISTER_P
1007 fprintf_unfiltered (file,
1008 "gdbarch_dump: %s # %s\n",
1009 "CONVERT_REGISTER_P(regnum, type)",
1010 XSTRING (CONVERT_REGISTER_P (regnum, type)));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1014 (long) current_gdbarch->convert_register_p
1015 /*CONVERT_REGISTER_P ()*/);
1017 #ifdef DECR_PC_AFTER_BREAK
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1020 XSTRING (DECR_PC_AFTER_BREAK));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1023 (long) DECR_PC_AFTER_BREAK);
1025 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1028 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1031 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
1033 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1036 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1039 DEPRECATED_CALL_DUMMY_LENGTH);
1041 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: %s # %s\n",
1044 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1045 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1048 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1050 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1051 fprintf_unfiltered (file,
1052 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1053 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1056 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1058 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1061 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1064 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
1066 #ifdef DEPRECATED_CALL_DUMMY_WORDS
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1069 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1072 (long) DEPRECATED_CALL_DUMMY_WORDS);
1074 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: %s # %s\n",
1077 "DEPRECATED_DO_REGISTERS_INFO_P()",
1078 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1079 fprintf_unfiltered (file,
1080 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1081 DEPRECATED_DO_REGISTERS_INFO_P ());
1083 #ifdef DEPRECATED_DO_REGISTERS_INFO
1085 /* Macro might contain `[{}]' when not multi-arch */
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: %s # %s\n",
1088 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1089 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1094 (long) current_gdbarch->deprecated_do_registers_info
1095 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1097 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: %s # %s\n",
1100 "DEPRECATED_DUMMY_WRITE_SP_P()",
1101 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1104 DEPRECATED_DUMMY_WRITE_SP_P ());
1106 #ifdef DEPRECATED_DUMMY_WRITE_SP
1108 /* Macro might contain `[{}]' when not multi-arch */
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: %s # %s\n",
1111 "DEPRECATED_DUMMY_WRITE_SP(val)",
1112 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1117 (long) current_gdbarch->deprecated_dummy_write_sp
1118 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1120 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1122 /* Macro might contain `[{}]' when not multi-arch */
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: %s # %s\n",
1125 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1126 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1131 (long) current_gdbarch->deprecated_extract_return_value
1132 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1134 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: %s # %s\n",
1137 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1138 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1141 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1143 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: %s # %s\n",
1146 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1147 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1151 (long) current_gdbarch->deprecated_extract_struct_value_address
1152 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1154 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1157 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1160 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1162 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: %s # %s\n",
1165 "DEPRECATED_FIX_CALL_DUMMY_P()",
1166 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1167 fprintf_unfiltered (file,
1168 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1169 DEPRECATED_FIX_CALL_DUMMY_P ());
1171 #ifdef DEPRECATED_FIX_CALL_DUMMY
1173 /* Macro might contain `[{}]' when not multi-arch */
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: %s # %s\n",
1176 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1177 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1182 (long) current_gdbarch->deprecated_fix_call_dummy
1183 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1185 #ifdef DEPRECATED_FP_REGNUM
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1188 XSTRING (DEPRECATED_FP_REGNUM));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1191 DEPRECATED_FP_REGNUM);
1193 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: %s # %s\n",
1196 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1197 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1200 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1202 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: %s # %s\n",
1205 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1206 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1210 (long) current_gdbarch->deprecated_frame_args_address
1211 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1213 #ifdef DEPRECATED_FRAME_CHAIN_P
1214 fprintf_unfiltered (file,
1215 "gdbarch_dump: %s # %s\n",
1216 "DEPRECATED_FRAME_CHAIN_P()",
1217 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1218 fprintf_unfiltered (file,
1219 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1220 DEPRECATED_FRAME_CHAIN_P ());
1222 #ifdef DEPRECATED_FRAME_CHAIN
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: %s # %s\n",
1225 "DEPRECATED_FRAME_CHAIN(frame)",
1226 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1228 fprintf_unfiltered (file,
1229 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1230 (long) current_gdbarch->deprecated_frame_chain
1231 /*DEPRECATED_FRAME_CHAIN ()*/);
1233 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: %s # %s\n",
1236 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1237 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1238 fprintf_unfiltered (file,
1239 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1240 DEPRECATED_FRAME_CHAIN_VALID_P ());
1242 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1246 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1250 (long) current_gdbarch->deprecated_frame_chain_valid
1251 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1253 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1257 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1258 fprintf_unfiltered (file,
1259 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1260 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1262 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: %s # %s\n",
1267 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1268 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1273 (long) current_gdbarch->deprecated_frame_init_saved_regs
1274 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1276 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: %s # %s\n",
1279 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1280 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1283 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1285 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: %s # %s\n",
1288 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1289 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1293 (long) current_gdbarch->deprecated_frame_locals_address
1294 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1296 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: %s # %s\n",
1299 "DEPRECATED_FRAME_SAVED_PC_P()",
1300 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1303 DEPRECATED_FRAME_SAVED_PC_P ());
1305 #ifdef DEPRECATED_FRAME_SAVED_PC
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: %s # %s\n",
1308 "DEPRECATED_FRAME_SAVED_PC(fi)",
1309 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1313 (long) current_gdbarch->deprecated_frame_saved_pc
1314 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1316 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: %s # %s\n",
1319 "DEPRECATED_GET_SAVED_REGISTER_P()",
1320 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1321 fprintf_unfiltered (file,
1322 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1323 DEPRECATED_GET_SAVED_REGISTER_P ());
1325 #ifdef DEPRECATED_GET_SAVED_REGISTER
1327 /* Macro might contain `[{}]' when not multi-arch */
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: %s # %s\n",
1330 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1331 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1336 (long) current_gdbarch->deprecated_get_saved_register
1337 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1339 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: %s # %s\n",
1342 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1343 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1344 fprintf_unfiltered (file,
1345 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1346 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1348 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1350 /* Macro might contain `[{}]' when not multi-arch */
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: %s # %s\n",
1353 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1354 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1359 (long) current_gdbarch->deprecated_init_extra_frame_info
1360 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1362 #ifdef DEPRECATED_INIT_FRAME_PC_P
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: %s # %s\n",
1365 "DEPRECATED_INIT_FRAME_PC_P()",
1366 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1369 DEPRECATED_INIT_FRAME_PC_P ());
1371 #ifdef DEPRECATED_INIT_FRAME_PC
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: %s # %s\n",
1374 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1375 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1379 (long) current_gdbarch->deprecated_init_frame_pc
1380 /*DEPRECATED_INIT_FRAME_PC ()*/);
1382 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: %s # %s\n",
1385 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1386 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1389 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1391 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: %s # %s\n",
1394 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1395 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1399 (long) current_gdbarch->deprecated_init_frame_pc_first
1400 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1402 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: %s # %s\n",
1405 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1406 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1409 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1411 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1414 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1417 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1419 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: %s # %s\n",
1422 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1423 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1426 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1428 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1431 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1434 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1436 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: %s # %s\n",
1439 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1440 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1443 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1445 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1446 fprintf_unfiltered (file,
1447 "gdbarch_dump: %s # %s\n",
1448 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1449 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1451 fprintf_unfiltered (file,
1452 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1453 (long) current_gdbarch->deprecated_pc_in_call_dummy
1454 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1456 #ifdef DEPRECATED_POP_FRAME_P
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: %s # %s\n",
1459 "DEPRECATED_POP_FRAME_P()",
1460 XSTRING (DEPRECATED_POP_FRAME_P ()));
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1463 DEPRECATED_POP_FRAME_P ());
1465 #ifdef DEPRECATED_POP_FRAME
1467 /* Macro might contain `[{}]' when not multi-arch */
1468 fprintf_unfiltered (file,
1469 "gdbarch_dump: %s # %s\n",
1470 "DEPRECATED_POP_FRAME(-)",
1471 XSTRING (DEPRECATED_POP_FRAME (-)));
1474 fprintf_unfiltered (file,
1475 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1476 (long) current_gdbarch->deprecated_pop_frame
1477 /*DEPRECATED_POP_FRAME ()*/);
1479 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: %s # %s\n",
1482 "DEPRECATED_PUSH_ARGUMENTS_P()",
1483 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1484 fprintf_unfiltered (file,
1485 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1486 DEPRECATED_PUSH_ARGUMENTS_P ());
1488 #ifdef DEPRECATED_PUSH_ARGUMENTS
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: %s # %s\n",
1491 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1492 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1496 (long) current_gdbarch->deprecated_push_arguments
1497 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1499 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1500 fprintf_unfiltered (file,
1501 "gdbarch_dump: %s # %s\n",
1502 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1503 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1504 fprintf_unfiltered (file,
1505 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1506 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1508 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1510 /* Macro might contain `[{}]' when not multi-arch */
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: %s # %s\n",
1513 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1514 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1517 fprintf_unfiltered (file,
1518 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1519 (long) current_gdbarch->deprecated_push_dummy_frame
1520 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1522 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: %s # %s\n",
1525 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1526 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1529 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1531 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1532 fprintf_unfiltered (file,
1533 "gdbarch_dump: %s # %s\n",
1534 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1535 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1539 (long) current_gdbarch->deprecated_push_return_address
1540 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1542 #ifdef DEPRECATED_REGISTER_BYTES
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1545 XSTRING (DEPRECATED_REGISTER_BYTES));
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1548 DEPRECATED_REGISTER_BYTES);
1550 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: %s # %s\n",
1553 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1554 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1558 (long) current_gdbarch->deprecated_register_convertible
1559 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1561 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1563 /* Macro might contain `[{}]' when not multi-arch */
1564 fprintf_unfiltered (file,
1565 "gdbarch_dump: %s # %s\n",
1566 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1567 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1572 (long) current_gdbarch->deprecated_register_convert_to_raw
1573 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1575 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1577 /* Macro might contain `[{}]' when not multi-arch */
1578 fprintf_unfiltered (file,
1579 "gdbarch_dump: %s # %s\n",
1580 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1581 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1586 (long) current_gdbarch->deprecated_register_convert_to_virtual
1587 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1589 #ifdef DEPRECATED_REGISTER_SIZE
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1592 XSTRING (DEPRECATED_REGISTER_SIZE));
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1595 DEPRECATED_REGISTER_SIZE);
1597 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: %s # %s\n",
1600 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1601 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1602 fprintf_unfiltered (file,
1603 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1604 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1606 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: %s # %s\n",
1609 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1610 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1614 (long) current_gdbarch->deprecated_saved_pc_after_call
1615 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1617 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: %s # %s\n",
1620 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1621 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1622 fprintf_unfiltered (file,
1623 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1624 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1626 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1628 /* Macro might contain `[{}]' when not multi-arch */
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: %s # %s\n",
1631 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1632 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1635 fprintf_unfiltered (file,
1636 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1637 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1638 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1640 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1643 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1646 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1648 #ifdef DEPRECATED_STORE_RETURN_VALUE
1650 /* Macro might contain `[{}]' when not multi-arch */
1651 fprintf_unfiltered (file,
1652 "gdbarch_dump: %s # %s\n",
1653 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1654 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1659 (long) current_gdbarch->deprecated_store_return_value
1660 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1662 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: %s # %s\n",
1665 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1666 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1667 fprintf_unfiltered (file,
1668 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1669 DEPRECATED_STORE_STRUCT_RETURN_P ());
1671 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1673 /* Macro might contain `[{}]' when not multi-arch */
1674 fprintf_unfiltered (file,
1675 "gdbarch_dump: %s # %s\n",
1676 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1677 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1680 fprintf_unfiltered (file,
1681 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1682 (long) current_gdbarch->deprecated_store_struct_return
1683 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1685 #ifdef DEPRECATED_TARGET_READ_FP_P
1686 fprintf_unfiltered (file,
1687 "gdbarch_dump: %s # %s\n",
1688 "DEPRECATED_TARGET_READ_FP_P()",
1689 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1690 fprintf_unfiltered (file,
1691 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1692 DEPRECATED_TARGET_READ_FP_P ());
1694 #ifdef DEPRECATED_TARGET_READ_FP
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: %s # %s\n",
1697 "DEPRECATED_TARGET_READ_FP()",
1698 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1700 fprintf_unfiltered (file,
1701 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1702 (long) current_gdbarch->deprecated_target_read_fp
1703 /*DEPRECATED_TARGET_READ_FP ()*/);
1705 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1708 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1709 fprintf_unfiltered (file,
1710 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1711 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1713 #ifdef DWARF2_REG_TO_REGNUM
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: %s # %s\n",
1716 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1717 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1719 fprintf_unfiltered (file,
1720 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1721 (long) current_gdbarch->dwarf2_reg_to_regnum
1722 /*DWARF2_REG_TO_REGNUM ()*/);
1724 #ifdef DWARF_REG_TO_REGNUM
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: %s # %s\n",
1727 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1728 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1732 (long) current_gdbarch->dwarf_reg_to_regnum
1733 /*DWARF_REG_TO_REGNUM ()*/);
1735 #ifdef ECOFF_REG_TO_REGNUM
1736 fprintf_unfiltered (file,
1737 "gdbarch_dump: %s # %s\n",
1738 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1739 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1743 (long) current_gdbarch->ecoff_reg_to_regnum
1744 /*ECOFF_REG_TO_REGNUM ()*/);
1746 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1748 /* Macro might contain `[{}]' when not multi-arch */
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: %s # %s\n",
1751 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1752 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1757 (long) current_gdbarch->elf_make_msymbol_special
1758 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1760 #ifdef EXTRACT_RETURN_VALUE
1762 /* Macro might contain `[{}]' when not multi-arch */
1763 fprintf_unfiltered (file,
1764 "gdbarch_dump: %s # %s\n",
1765 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1766 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1771 (long) current_gdbarch->extract_return_value
1772 /*EXTRACT_RETURN_VALUE ()*/);
1774 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: %s # %s\n",
1777 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1778 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1781 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1783 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: %s # %s\n",
1786 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1787 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1789 fprintf_unfiltered (file,
1790 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1791 (long) current_gdbarch->extract_struct_value_address
1792 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1794 #ifdef FETCH_POINTER_ARGUMENT_P
1795 fprintf_unfiltered (file,
1796 "gdbarch_dump: %s # %s\n",
1797 "FETCH_POINTER_ARGUMENT_P()",
1798 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1801 FETCH_POINTER_ARGUMENT_P ());
1803 #ifdef FETCH_POINTER_ARGUMENT
1804 fprintf_unfiltered (file,
1805 "gdbarch_dump: %s # %s\n",
1806 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1807 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1811 (long) current_gdbarch->fetch_pointer_argument
1812 /*FETCH_POINTER_ARGUMENT ()*/);
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: FP0_REGNUM # %s\n",
1817 XSTRING (FP0_REGNUM));
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: FP0_REGNUM = %d\n",
1822 #ifdef FRAMELESS_FUNCTION_INVOCATION
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: %s # %s\n",
1825 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1826 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1828 fprintf_unfiltered (file,
1829 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1830 (long) current_gdbarch->frameless_function_invocation
1831 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1833 #ifdef FRAME_ARGS_SKIP
1834 fprintf_unfiltered (file,
1835 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1836 XSTRING (FRAME_ARGS_SKIP));
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1839 (long) FRAME_ARGS_SKIP);
1841 #ifdef FRAME_NUM_ARGS_P
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: %s # %s\n",
1844 "FRAME_NUM_ARGS_P()",
1845 XSTRING (FRAME_NUM_ARGS_P ()));
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1848 FRAME_NUM_ARGS_P ());
1850 #ifdef FRAME_NUM_ARGS
1851 fprintf_unfiltered (file,
1852 "gdbarch_dump: %s # %s\n",
1853 "FRAME_NUM_ARGS(frame)",
1854 XSTRING (FRAME_NUM_ARGS (frame)));
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1858 (long) current_gdbarch->frame_num_args
1859 /*FRAME_NUM_ARGS ()*/);
1861 #ifdef FUNCTION_START_OFFSET
1862 fprintf_unfiltered (file,
1863 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1864 XSTRING (FUNCTION_START_OFFSET));
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1867 (long) FUNCTION_START_OFFSET);
1869 #ifdef GET_LONGJMP_TARGET_P
1870 fprintf_unfiltered (file,
1871 "gdbarch_dump: %s # %s\n",
1872 "GET_LONGJMP_TARGET_P()",
1873 XSTRING (GET_LONGJMP_TARGET_P ()));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1876 GET_LONGJMP_TARGET_P ());
1878 #ifdef GET_LONGJMP_TARGET
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: %s # %s\n",
1881 "GET_LONGJMP_TARGET(pc)",
1882 XSTRING (GET_LONGJMP_TARGET (pc)));
1884 fprintf_unfiltered (file,
1885 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1886 (long) current_gdbarch->get_longjmp_target
1887 /*GET_LONGJMP_TARGET ()*/);
1889 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1892 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1895 HAVE_NONSTEPPABLE_WATCHPOINT);
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: %s # %s\n",
1900 "INNER_THAN(lhs, rhs)",
1901 XSTRING (INNER_THAN (lhs, rhs)));
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1905 (long) current_gdbarch->inner_than
1908 #ifdef INTEGER_TO_ADDRESS_P
1909 fprintf_unfiltered (file,
1910 "gdbarch_dump: %s # %s\n",
1911 "INTEGER_TO_ADDRESS_P()",
1912 XSTRING (INTEGER_TO_ADDRESS_P ()));
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1915 INTEGER_TO_ADDRESS_P ());
1917 #ifdef INTEGER_TO_ADDRESS
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: %s # %s\n",
1920 "INTEGER_TO_ADDRESS(type, buf)",
1921 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1923 fprintf_unfiltered (file,
1924 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1925 (long) current_gdbarch->integer_to_address
1926 /*INTEGER_TO_ADDRESS ()*/);
1928 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: %s # %s\n",
1931 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1932 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1936 (long) current_gdbarch->in_solib_call_trampoline
1937 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1939 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: %s # %s\n",
1942 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1943 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1945 fprintf_unfiltered (file,
1946 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1947 (long) current_gdbarch->in_solib_return_trampoline
1948 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1950 #ifdef MEMORY_INSERT_BREAKPOINT
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: %s # %s\n",
1953 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1954 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1958 (long) current_gdbarch->memory_insert_breakpoint
1959 /*MEMORY_INSERT_BREAKPOINT ()*/);
1961 #ifdef MEMORY_REMOVE_BREAKPOINT
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: %s # %s\n",
1964 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1965 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1969 (long) current_gdbarch->memory_remove_breakpoint
1970 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1972 #ifdef NAME_OF_MALLOC
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1975 XSTRING (NAME_OF_MALLOC));
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: NPC_REGNUM # %s\n",
1983 XSTRING (NPC_REGNUM));
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: NPC_REGNUM = %d\n",
1988 #ifdef NUM_PSEUDO_REGS
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1991 XSTRING (NUM_PSEUDO_REGS));
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: NUM_REGS # %s\n",
1999 XSTRING (NUM_REGS));
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: NUM_REGS = %d\n",
2004 #ifdef PARM_BOUNDARY
2005 fprintf_unfiltered (file,
2006 "gdbarch_dump: PARM_BOUNDARY # %s\n",
2007 XSTRING (PARM_BOUNDARY));
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: PARM_BOUNDARY = %d\n",
2012 #ifdef PC_IN_SIGTRAMP
2013 fprintf_unfiltered (file,
2014 "gdbarch_dump: %s # %s\n",
2015 "PC_IN_SIGTRAMP(pc, name)",
2016 XSTRING (PC_IN_SIGTRAMP (pc, name)));
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
2020 (long) current_gdbarch->pc_in_sigtramp
2021 /*PC_IN_SIGTRAMP ()*/);
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: PC_REGNUM # %s\n",
2026 XSTRING (PC_REGNUM));
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: PC_REGNUM = %d\n",
2031 #ifdef POINTER_TO_ADDRESS
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: %s # %s\n",
2034 "POINTER_TO_ADDRESS(type, buf)",
2035 XSTRING (POINTER_TO_ADDRESS (type, buf)));
2037 fprintf_unfiltered (file,
2038 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
2039 (long) current_gdbarch->pointer_to_address
2040 /*POINTER_TO_ADDRESS ()*/);
2043 fprintf_unfiltered (file,
2044 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
2045 gdbarch_print_float_info_p (current_gdbarch));
2047 fprintf_unfiltered (file,
2048 "gdbarch_dump: print_float_info = 0x%08lx\n",
2049 (long) current_gdbarch->print_float_info);
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: print_registers_info = 0x%08lx\n",
2053 (long) current_gdbarch->print_registers_info);
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
2057 gdbarch_print_vector_info_p (current_gdbarch));
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: print_vector_info = 0x%08lx\n",
2061 (long) current_gdbarch->print_vector_info);
2062 #ifdef PROLOGUE_FRAMELESS_P
2063 fprintf_unfiltered (file,
2064 "gdbarch_dump: %s # %s\n",
2065 "PROLOGUE_FRAMELESS_P(ip)",
2066 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
2070 (long) current_gdbarch->prologue_frameless_p
2071 /*PROLOGUE_FRAMELESS_P ()*/);
2074 fprintf_unfiltered (file,
2075 "gdbarch_dump: PS_REGNUM # %s\n",
2076 XSTRING (PS_REGNUM));
2077 fprintf_unfiltered (file,
2078 "gdbarch_dump: PS_REGNUM = %d\n",
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
2084 gdbarch_push_dummy_call_p (current_gdbarch));
2086 fprintf_unfiltered (file,
2087 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
2088 (long) current_gdbarch->push_dummy_call);
2090 fprintf_unfiltered (file,
2091 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
2092 gdbarch_push_dummy_code_p (current_gdbarch));
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2096 (long) current_gdbarch->push_dummy_code);
2097 #ifdef REGISTER_BYTE_P
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: %s # %s\n",
2100 "REGISTER_BYTE_P()",
2101 XSTRING (REGISTER_BYTE_P ()));
2102 fprintf_unfiltered (file,
2103 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2104 REGISTER_BYTE_P ());
2106 #ifdef REGISTER_BYTE
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: %s # %s\n",
2109 "REGISTER_BYTE(reg_nr)",
2110 XSTRING (REGISTER_BYTE (reg_nr)));
2112 fprintf_unfiltered (file,
2113 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
2114 (long) current_gdbarch->deprecated_register_byte
2115 /*REGISTER_BYTE ()*/);
2117 #ifdef REGISTER_BYTES_OK_P
2118 fprintf_unfiltered (file,
2119 "gdbarch_dump: %s # %s\n",
2120 "REGISTER_BYTES_OK_P()",
2121 XSTRING (REGISTER_BYTES_OK_P ()));
2122 fprintf_unfiltered (file,
2123 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2124 REGISTER_BYTES_OK_P ());
2126 #ifdef REGISTER_BYTES_OK
2127 fprintf_unfiltered (file,
2128 "gdbarch_dump: %s # %s\n",
2129 "REGISTER_BYTES_OK(nr_bytes)",
2130 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2134 (long) current_gdbarch->register_bytes_ok
2135 /*REGISTER_BYTES_OK ()*/);
2137 #ifdef REGISTER_NAME
2138 fprintf_unfiltered (file,
2139 "gdbarch_dump: %s # %s\n",
2140 "REGISTER_NAME(regnr)",
2141 XSTRING (REGISTER_NAME (regnr)));
2143 fprintf_unfiltered (file,
2144 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2145 (long) current_gdbarch->register_name
2146 /*REGISTER_NAME ()*/);
2148 #ifdef REGISTER_RAW_SIZE_P
2149 fprintf_unfiltered (file,
2150 "gdbarch_dump: %s # %s\n",
2151 "REGISTER_RAW_SIZE_P()",
2152 XSTRING (REGISTER_RAW_SIZE_P ()));
2153 fprintf_unfiltered (file,
2154 "gdbarch_dump: REGISTER_RAW_SIZE_P() = %d\n",
2155 REGISTER_RAW_SIZE_P ());
2157 #ifdef REGISTER_RAW_SIZE
2158 fprintf_unfiltered (file,
2159 "gdbarch_dump: %s # %s\n",
2160 "REGISTER_RAW_SIZE(reg_nr)",
2161 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2165 (long) current_gdbarch->deprecated_register_raw_size
2166 /*REGISTER_RAW_SIZE ()*/);
2168 #ifdef REGISTER_SIM_REGNO
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: %s # %s\n",
2171 "REGISTER_SIM_REGNO(reg_nr)",
2172 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2176 (long) current_gdbarch->register_sim_regno
2177 /*REGISTER_SIM_REGNO ()*/);
2179 #ifdef REGISTER_TO_VALUE
2181 /* Macro might contain `[{}]' when not multi-arch */
2182 fprintf_unfiltered (file,
2183 "gdbarch_dump: %s # %s\n",
2184 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
2185 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
2188 fprintf_unfiltered (file,
2189 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2190 (long) current_gdbarch->register_to_value
2191 /*REGISTER_TO_VALUE ()*/);
2194 fprintf_unfiltered (file,
2195 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2196 gdbarch_register_type_p (current_gdbarch));
2198 fprintf_unfiltered (file,
2199 "gdbarch_dump: register_type = 0x%08lx\n",
2200 (long) current_gdbarch->register_type);
2201 #ifdef REGISTER_VIRTUAL_SIZE_P
2202 fprintf_unfiltered (file,
2203 "gdbarch_dump: %s # %s\n",
2204 "REGISTER_VIRTUAL_SIZE_P()",
2205 XSTRING (REGISTER_VIRTUAL_SIZE_P ()));
2206 fprintf_unfiltered (file,
2207 "gdbarch_dump: REGISTER_VIRTUAL_SIZE_P() = %d\n",
2208 REGISTER_VIRTUAL_SIZE_P ());
2210 #ifdef REGISTER_VIRTUAL_SIZE
2211 fprintf_unfiltered (file,
2212 "gdbarch_dump: %s # %s\n",
2213 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2214 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2216 fprintf_unfiltered (file,
2217 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2218 (long) current_gdbarch->deprecated_register_virtual_size
2219 /*REGISTER_VIRTUAL_SIZE ()*/);
2221 #ifdef REGISTER_VIRTUAL_TYPE_P
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: %s # %s\n",
2224 "REGISTER_VIRTUAL_TYPE_P()",
2225 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2226 fprintf_unfiltered (file,
2227 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2228 REGISTER_VIRTUAL_TYPE_P ());
2230 #ifdef REGISTER_VIRTUAL_TYPE
2231 fprintf_unfiltered (file,
2232 "gdbarch_dump: %s # %s\n",
2233 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2234 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2236 fprintf_unfiltered (file,
2237 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2238 (long) current_gdbarch->deprecated_register_virtual_type
2239 /*REGISTER_VIRTUAL_TYPE ()*/);
2241 #ifdef REG_STRUCT_HAS_ADDR_P
2242 fprintf_unfiltered (file,
2243 "gdbarch_dump: %s # %s\n",
2244 "REG_STRUCT_HAS_ADDR_P()",
2245 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2246 fprintf_unfiltered (file,
2247 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2248 REG_STRUCT_HAS_ADDR_P ());
2250 #ifdef REG_STRUCT_HAS_ADDR
2251 fprintf_unfiltered (file,
2252 "gdbarch_dump: %s # %s\n",
2253 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2254 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2256 fprintf_unfiltered (file,
2257 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2258 (long) current_gdbarch->reg_struct_has_addr
2259 /*REG_STRUCT_HAS_ADDR ()*/);
2262 fprintf_unfiltered (file,
2263 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2264 (long) current_gdbarch->remote_translate_xfer_address);
2265 #ifdef RETURN_VALUE_ON_STACK
2266 fprintf_unfiltered (file,
2267 "gdbarch_dump: %s # %s\n",
2268 "RETURN_VALUE_ON_STACK(type)",
2269 XSTRING (RETURN_VALUE_ON_STACK (type)));
2271 fprintf_unfiltered (file,
2272 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2273 (long) current_gdbarch->return_value_on_stack
2274 /*RETURN_VALUE_ON_STACK ()*/);
2276 #ifdef SDB_REG_TO_REGNUM
2277 fprintf_unfiltered (file,
2278 "gdbarch_dump: %s # %s\n",
2279 "SDB_REG_TO_REGNUM(sdb_regnr)",
2280 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2282 fprintf_unfiltered (file,
2283 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2284 (long) current_gdbarch->sdb_reg_to_regnum
2285 /*SDB_REG_TO_REGNUM ()*/);
2287 #ifdef SIGTRAMP_END_P
2288 fprintf_unfiltered (file,
2289 "gdbarch_dump: %s # %s\n",
2291 XSTRING (SIGTRAMP_END_P ()));
2292 fprintf_unfiltered (file,
2293 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2297 fprintf_unfiltered (file,
2298 "gdbarch_dump: %s # %s\n",
2300 XSTRING (SIGTRAMP_END (pc)));
2302 fprintf_unfiltered (file,
2303 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2304 (long) current_gdbarch->sigtramp_end
2305 /*SIGTRAMP_END ()*/);
2307 #ifdef SIGTRAMP_START_P
2308 fprintf_unfiltered (file,
2309 "gdbarch_dump: %s # %s\n",
2310 "SIGTRAMP_START_P()",
2311 XSTRING (SIGTRAMP_START_P ()));
2312 fprintf_unfiltered (file,
2313 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2314 SIGTRAMP_START_P ());
2316 #ifdef SIGTRAMP_START
2317 fprintf_unfiltered (file,
2318 "gdbarch_dump: %s # %s\n",
2319 "SIGTRAMP_START(pc)",
2320 XSTRING (SIGTRAMP_START (pc)));
2322 fprintf_unfiltered (file,
2323 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2324 (long) current_gdbarch->sigtramp_start
2325 /*SIGTRAMP_START ()*/);
2327 #ifdef SKIP_PROLOGUE
2328 fprintf_unfiltered (file,
2329 "gdbarch_dump: %s # %s\n",
2330 "SKIP_PROLOGUE(ip)",
2331 XSTRING (SKIP_PROLOGUE (ip)));
2333 fprintf_unfiltered (file,
2334 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2335 (long) current_gdbarch->skip_prologue
2336 /*SKIP_PROLOGUE ()*/);
2338 #ifdef SKIP_TRAMPOLINE_CODE
2339 fprintf_unfiltered (file,
2340 "gdbarch_dump: %s # %s\n",
2341 "SKIP_TRAMPOLINE_CODE(pc)",
2342 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2344 fprintf_unfiltered (file,
2345 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2346 (long) current_gdbarch->skip_trampoline_code
2347 /*SKIP_TRAMPOLINE_CODE ()*/);
2349 #ifdef SMASH_TEXT_ADDRESS
2350 fprintf_unfiltered (file,
2351 "gdbarch_dump: %s # %s\n",
2352 "SMASH_TEXT_ADDRESS(addr)",
2353 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2355 fprintf_unfiltered (file,
2356 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2357 (long) current_gdbarch->smash_text_address
2358 /*SMASH_TEXT_ADDRESS ()*/);
2360 #ifdef SOFTWARE_SINGLE_STEP_P
2361 fprintf_unfiltered (file,
2362 "gdbarch_dump: %s # %s\n",
2363 "SOFTWARE_SINGLE_STEP_P()",
2364 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2365 fprintf_unfiltered (file,
2366 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2367 SOFTWARE_SINGLE_STEP_P ());
2369 #ifdef SOFTWARE_SINGLE_STEP
2371 /* Macro might contain `[{}]' when not multi-arch */
2372 fprintf_unfiltered (file,
2373 "gdbarch_dump: %s # %s\n",
2374 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2375 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2378 fprintf_unfiltered (file,
2379 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2380 (long) current_gdbarch->software_single_step
2381 /*SOFTWARE_SINGLE_STEP ()*/);
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: SP_REGNUM # %s\n",
2386 XSTRING (SP_REGNUM));
2387 fprintf_unfiltered (file,
2388 "gdbarch_dump: SP_REGNUM = %d\n",
2391 #ifdef STAB_REG_TO_REGNUM
2392 fprintf_unfiltered (file,
2393 "gdbarch_dump: %s # %s\n",
2394 "STAB_REG_TO_REGNUM(stab_regnr)",
2395 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2397 fprintf_unfiltered (file,
2398 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2399 (long) current_gdbarch->stab_reg_to_regnum
2400 /*STAB_REG_TO_REGNUM ()*/);
2402 #ifdef STACK_ALIGN_P
2403 fprintf_unfiltered (file,
2404 "gdbarch_dump: %s # %s\n",
2406 XSTRING (STACK_ALIGN_P ()));
2407 fprintf_unfiltered (file,
2408 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2412 fprintf_unfiltered (file,
2413 "gdbarch_dump: %s # %s\n",
2415 XSTRING (STACK_ALIGN (sp)));
2417 fprintf_unfiltered (file,
2418 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2419 (long) current_gdbarch->stack_align
2420 /*STACK_ALIGN ()*/);
2422 #ifdef STORE_RETURN_VALUE
2424 /* Macro might contain `[{}]' when not multi-arch */
2425 fprintf_unfiltered (file,
2426 "gdbarch_dump: %s # %s\n",
2427 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2428 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2431 fprintf_unfiltered (file,
2432 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2433 (long) current_gdbarch->store_return_value
2434 /*STORE_RETURN_VALUE ()*/);
2436 #ifdef TARGET_ADDR_BIT
2437 fprintf_unfiltered (file,
2438 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2439 XSTRING (TARGET_ADDR_BIT));
2440 fprintf_unfiltered (file,
2441 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2444 #ifdef TARGET_ARCHITECTURE
2445 fprintf_unfiltered (file,
2446 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2447 XSTRING (TARGET_ARCHITECTURE));
2448 if (TARGET_ARCHITECTURE != NULL)
2449 fprintf_unfiltered (file,
2450 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2451 TARGET_ARCHITECTURE->printable_name);
2453 #ifdef TARGET_BFD_VMA_BIT
2454 fprintf_unfiltered (file,
2455 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2456 XSTRING (TARGET_BFD_VMA_BIT));
2457 fprintf_unfiltered (file,
2458 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2459 TARGET_BFD_VMA_BIT);
2461 #ifdef TARGET_BYTE_ORDER
2462 fprintf_unfiltered (file,
2463 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2464 XSTRING (TARGET_BYTE_ORDER));
2465 fprintf_unfiltered (file,
2466 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2467 (long) TARGET_BYTE_ORDER);
2469 #ifdef TARGET_CHAR_SIGNED
2470 fprintf_unfiltered (file,
2471 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2472 XSTRING (TARGET_CHAR_SIGNED));
2473 fprintf_unfiltered (file,
2474 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2475 TARGET_CHAR_SIGNED);
2477 #ifdef TARGET_DOUBLE_BIT
2478 fprintf_unfiltered (file,
2479 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2480 XSTRING (TARGET_DOUBLE_BIT));
2481 fprintf_unfiltered (file,
2482 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2485 #ifdef TARGET_DOUBLE_FORMAT
2486 fprintf_unfiltered (file,
2487 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2488 XSTRING (TARGET_DOUBLE_FORMAT));
2489 fprintf_unfiltered (file,
2490 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2491 (TARGET_DOUBLE_FORMAT)->name);
2493 #ifdef TARGET_FLOAT_BIT
2494 fprintf_unfiltered (file,
2495 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2496 XSTRING (TARGET_FLOAT_BIT));
2497 fprintf_unfiltered (file,
2498 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2501 #ifdef TARGET_FLOAT_FORMAT
2502 fprintf_unfiltered (file,
2503 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2504 XSTRING (TARGET_FLOAT_FORMAT));
2505 fprintf_unfiltered (file,
2506 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2507 (TARGET_FLOAT_FORMAT)->name);
2509 #ifdef TARGET_INT_BIT
2510 fprintf_unfiltered (file,
2511 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2512 XSTRING (TARGET_INT_BIT));
2513 fprintf_unfiltered (file,
2514 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2517 #ifdef TARGET_LONG_BIT
2518 fprintf_unfiltered (file,
2519 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2520 XSTRING (TARGET_LONG_BIT));
2521 fprintf_unfiltered (file,
2522 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2525 #ifdef TARGET_LONG_DOUBLE_BIT
2526 fprintf_unfiltered (file,
2527 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2528 XSTRING (TARGET_LONG_DOUBLE_BIT));
2529 fprintf_unfiltered (file,
2530 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2531 TARGET_LONG_DOUBLE_BIT);
2533 #ifdef TARGET_LONG_DOUBLE_FORMAT
2534 fprintf_unfiltered (file,
2535 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2536 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2537 fprintf_unfiltered (file,
2538 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2539 (TARGET_LONG_DOUBLE_FORMAT)->name);
2541 #ifdef TARGET_LONG_LONG_BIT
2542 fprintf_unfiltered (file,
2543 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2544 XSTRING (TARGET_LONG_LONG_BIT));
2545 fprintf_unfiltered (file,
2546 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2547 TARGET_LONG_LONG_BIT);
2550 fprintf_unfiltered (file,
2551 "gdbarch_dump: TARGET_OSABI # %s\n",
2552 XSTRING (TARGET_OSABI));
2553 fprintf_unfiltered (file,
2554 "gdbarch_dump: TARGET_OSABI = %ld\n",
2555 (long) TARGET_OSABI);
2557 #ifdef TARGET_PRINT_INSN
2558 fprintf_unfiltered (file,
2559 "gdbarch_dump: %s # %s\n",
2560 "TARGET_PRINT_INSN(vma, info)",
2561 XSTRING (TARGET_PRINT_INSN (vma, info)));
2563 fprintf_unfiltered (file,
2564 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2565 (long) current_gdbarch->print_insn
2566 /*TARGET_PRINT_INSN ()*/);
2568 #ifdef TARGET_PTR_BIT
2569 fprintf_unfiltered (file,
2570 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2571 XSTRING (TARGET_PTR_BIT));
2572 fprintf_unfiltered (file,
2573 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2576 #ifdef TARGET_READ_PC_P
2577 fprintf_unfiltered (file,
2578 "gdbarch_dump: %s # %s\n",
2579 "TARGET_READ_PC_P()",
2580 XSTRING (TARGET_READ_PC_P ()));
2581 fprintf_unfiltered (file,
2582 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2583 TARGET_READ_PC_P ());
2585 #ifdef TARGET_READ_PC
2586 fprintf_unfiltered (file,
2587 "gdbarch_dump: %s # %s\n",
2588 "TARGET_READ_PC(ptid)",
2589 XSTRING (TARGET_READ_PC (ptid)));
2591 fprintf_unfiltered (file,
2592 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2593 (long) current_gdbarch->read_pc
2594 /*TARGET_READ_PC ()*/);
2596 #ifdef TARGET_READ_SP_P
2597 fprintf_unfiltered (file,
2598 "gdbarch_dump: %s # %s\n",
2599 "TARGET_READ_SP_P()",
2600 XSTRING (TARGET_READ_SP_P ()));
2601 fprintf_unfiltered (file,
2602 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2603 TARGET_READ_SP_P ());
2605 #ifdef TARGET_READ_SP
2606 fprintf_unfiltered (file,
2607 "gdbarch_dump: %s # %s\n",
2609 XSTRING (TARGET_READ_SP ()));
2611 fprintf_unfiltered (file,
2612 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2613 (long) current_gdbarch->read_sp
2614 /*TARGET_READ_SP ()*/);
2616 #ifdef TARGET_SHORT_BIT
2617 fprintf_unfiltered (file,
2618 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2619 XSTRING (TARGET_SHORT_BIT));
2620 fprintf_unfiltered (file,
2621 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2624 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2626 /* Macro might contain `[{}]' when not multi-arch */
2627 fprintf_unfiltered (file,
2628 "gdbarch_dump: %s # %s\n",
2629 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2630 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2633 fprintf_unfiltered (file,
2634 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2635 (long) current_gdbarch->virtual_frame_pointer
2636 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2638 #ifdef TARGET_WRITE_PC
2640 /* Macro might contain `[{}]' when not multi-arch */
2641 fprintf_unfiltered (file,
2642 "gdbarch_dump: %s # %s\n",
2643 "TARGET_WRITE_PC(val, ptid)",
2644 XSTRING (TARGET_WRITE_PC (val, ptid)));
2647 fprintf_unfiltered (file,
2648 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2649 (long) current_gdbarch->write_pc
2650 /*TARGET_WRITE_PC ()*/);
2653 fprintf_unfiltered (file,
2654 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2655 gdbarch_unwind_dummy_id_p (current_gdbarch));
2657 fprintf_unfiltered (file,
2658 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2659 (long) current_gdbarch->unwind_dummy_id);
2661 fprintf_unfiltered (file,
2662 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2663 gdbarch_unwind_pc_p (current_gdbarch));
2665 fprintf_unfiltered (file,
2666 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2667 (long) current_gdbarch->unwind_pc);
2669 fprintf_unfiltered (file,
2670 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2671 gdbarch_unwind_sp_p (current_gdbarch));
2673 fprintf_unfiltered (file,
2674 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2675 (long) current_gdbarch->unwind_sp);
2676 #ifdef USE_STRUCT_CONVENTION
2677 fprintf_unfiltered (file,
2678 "gdbarch_dump: %s # %s\n",
2679 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2680 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2682 fprintf_unfiltered (file,
2683 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2684 (long) current_gdbarch->use_struct_convention
2685 /*USE_STRUCT_CONVENTION ()*/);
2687 #ifdef VALUE_TO_REGISTER
2689 /* Macro might contain `[{}]' when not multi-arch */
2690 fprintf_unfiltered (file,
2691 "gdbarch_dump: %s # %s\n",
2692 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2693 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2696 fprintf_unfiltered (file,
2697 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2698 (long) current_gdbarch->value_to_register
2699 /*VALUE_TO_REGISTER ()*/);
2701 if (current_gdbarch->dump_tdep != NULL)
2702 current_gdbarch->dump_tdep (current_gdbarch, file);
2705 struct gdbarch_tdep *
2706 gdbarch_tdep (struct gdbarch *gdbarch)
2708 if (gdbarch_debug >= 2)
2709 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2710 return gdbarch->tdep;
2714 const struct bfd_arch_info *
2715 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2717 gdb_assert (gdbarch != NULL);
2718 if (gdbarch_debug >= 2)
2719 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2720 return gdbarch->bfd_arch_info;
2724 gdbarch_byte_order (struct gdbarch *gdbarch)
2726 gdb_assert (gdbarch != NULL);
2727 if (gdbarch_debug >= 2)
2728 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2729 return gdbarch->byte_order;
2733 gdbarch_osabi (struct gdbarch *gdbarch)
2735 gdb_assert (gdbarch != NULL);
2736 if (gdbarch_debug >= 2)
2737 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2738 return gdbarch->osabi;
2742 gdbarch_short_bit (struct gdbarch *gdbarch)
2744 gdb_assert (gdbarch != NULL);
2745 /* Skip verify of short_bit, invalid_p == 0 */
2746 if (gdbarch_debug >= 2)
2747 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2748 return gdbarch->short_bit;
2752 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2755 gdbarch->short_bit = short_bit;
2759 gdbarch_int_bit (struct gdbarch *gdbarch)
2761 gdb_assert (gdbarch != NULL);
2762 /* Skip verify of int_bit, invalid_p == 0 */
2763 if (gdbarch_debug >= 2)
2764 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2765 return gdbarch->int_bit;
2769 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2772 gdbarch->int_bit = int_bit;
2776 gdbarch_long_bit (struct gdbarch *gdbarch)
2778 gdb_assert (gdbarch != NULL);
2779 /* Skip verify of long_bit, invalid_p == 0 */
2780 if (gdbarch_debug >= 2)
2781 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2782 return gdbarch->long_bit;
2786 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2789 gdbarch->long_bit = long_bit;
2793 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2795 gdb_assert (gdbarch != NULL);
2796 /* Skip verify of long_long_bit, invalid_p == 0 */
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2799 return gdbarch->long_long_bit;
2803 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2806 gdbarch->long_long_bit = long_long_bit;
2810 gdbarch_float_bit (struct gdbarch *gdbarch)
2812 gdb_assert (gdbarch != NULL);
2813 /* Skip verify of float_bit, invalid_p == 0 */
2814 if (gdbarch_debug >= 2)
2815 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2816 return gdbarch->float_bit;
2820 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2823 gdbarch->float_bit = float_bit;
2827 gdbarch_double_bit (struct gdbarch *gdbarch)
2829 gdb_assert (gdbarch != NULL);
2830 /* Skip verify of double_bit, invalid_p == 0 */
2831 if (gdbarch_debug >= 2)
2832 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2833 return gdbarch->double_bit;
2837 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2840 gdbarch->double_bit = double_bit;
2844 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2846 gdb_assert (gdbarch != NULL);
2847 /* Skip verify of long_double_bit, invalid_p == 0 */
2848 if (gdbarch_debug >= 2)
2849 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2850 return gdbarch->long_double_bit;
2854 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2855 int long_double_bit)
2857 gdbarch->long_double_bit = long_double_bit;
2861 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2863 gdb_assert (gdbarch != NULL);
2864 /* Skip verify of ptr_bit, invalid_p == 0 */
2865 if (gdbarch_debug >= 2)
2866 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2867 return gdbarch->ptr_bit;
2871 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2874 gdbarch->ptr_bit = ptr_bit;
2878 gdbarch_addr_bit (struct gdbarch *gdbarch)
2880 gdb_assert (gdbarch != NULL);
2881 /* Check variable changed from pre-default. */
2882 gdb_assert (gdbarch->addr_bit != 0);
2883 if (gdbarch_debug >= 2)
2884 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2885 return gdbarch->addr_bit;
2889 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2892 gdbarch->addr_bit = addr_bit;
2896 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2898 gdb_assert (gdbarch != NULL);
2899 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2900 if (gdbarch_debug >= 2)
2901 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2902 return gdbarch->bfd_vma_bit;
2906 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2909 gdbarch->bfd_vma_bit = bfd_vma_bit;
2913 gdbarch_char_signed (struct gdbarch *gdbarch)
2915 gdb_assert (gdbarch != NULL);
2916 /* Check variable changed from pre-default. */
2917 gdb_assert (gdbarch->char_signed != -1);
2918 if (gdbarch_debug >= 2)
2919 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2920 return gdbarch->char_signed;
2924 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2927 gdbarch->char_signed = char_signed;
2931 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2933 gdb_assert (gdbarch != NULL);
2934 return gdbarch->read_pc != NULL;
2938 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2940 gdb_assert (gdbarch != NULL);
2941 gdb_assert (gdbarch->read_pc != NULL);
2942 if (gdbarch_debug >= 2)
2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2944 return gdbarch->read_pc (ptid);
2948 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2949 gdbarch_read_pc_ftype read_pc)
2951 gdbarch->read_pc = read_pc;
2955 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2957 gdb_assert (gdbarch != NULL);
2958 gdb_assert (gdbarch->write_pc != NULL);
2959 if (gdbarch_debug >= 2)
2960 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2961 gdbarch->write_pc (val, ptid);
2965 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2966 gdbarch_write_pc_ftype write_pc)
2968 gdbarch->write_pc = write_pc;
2972 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2974 gdb_assert (gdbarch != NULL);
2975 return gdbarch->read_sp != NULL;
2979 gdbarch_read_sp (struct gdbarch *gdbarch)
2981 gdb_assert (gdbarch != NULL);
2982 gdb_assert (gdbarch->read_sp != NULL);
2983 if (gdbarch_debug >= 2)
2984 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2985 return gdbarch->read_sp ();
2989 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2990 gdbarch_read_sp_ftype read_sp)
2992 gdbarch->read_sp = read_sp;
2996 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2998 gdb_assert (gdbarch != NULL);
2999 gdb_assert (gdbarch->virtual_frame_pointer != NULL);
3000 if (gdbarch_debug >= 2)
3001 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
3002 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
3006 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
3007 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
3009 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
3013 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
3015 gdb_assert (gdbarch != NULL);
3016 return gdbarch->pseudo_register_read != NULL;
3020 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
3022 gdb_assert (gdbarch != NULL);
3023 gdb_assert (gdbarch->pseudo_register_read != NULL);
3024 if (gdbarch_debug >= 2)
3025 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
3026 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
3030 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
3031 gdbarch_pseudo_register_read_ftype pseudo_register_read)
3033 gdbarch->pseudo_register_read = pseudo_register_read;
3037 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
3039 gdb_assert (gdbarch != NULL);
3040 return gdbarch->pseudo_register_write != NULL;
3044 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3046 gdb_assert (gdbarch != NULL);
3047 gdb_assert (gdbarch->pseudo_register_write != NULL);
3048 if (gdbarch_debug >= 2)
3049 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3050 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3054 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3055 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3057 gdbarch->pseudo_register_write = pseudo_register_write;
3061 gdbarch_num_regs (struct gdbarch *gdbarch)
3063 gdb_assert (gdbarch != NULL);
3064 /* Check variable changed from pre-default. */
3065 gdb_assert (gdbarch->num_regs != -1);
3066 if (gdbarch_debug >= 2)
3067 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3068 return gdbarch->num_regs;
3072 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3075 gdbarch->num_regs = num_regs;
3079 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3081 gdb_assert (gdbarch != NULL);
3082 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3083 if (gdbarch_debug >= 2)
3084 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3085 return gdbarch->num_pseudo_regs;
3089 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3090 int num_pseudo_regs)
3092 gdbarch->num_pseudo_regs = num_pseudo_regs;
3096 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3098 gdb_assert (gdbarch != NULL);
3099 /* Skip verify of sp_regnum, invalid_p == 0 */
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3102 return gdbarch->sp_regnum;
3106 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3109 gdbarch->sp_regnum = sp_regnum;
3113 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3115 gdb_assert (gdbarch != NULL);
3116 /* Skip verify of pc_regnum, invalid_p == 0 */
3117 if (gdbarch_debug >= 2)
3118 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3119 return gdbarch->pc_regnum;
3123 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3126 gdbarch->pc_regnum = pc_regnum;
3130 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3132 gdb_assert (gdbarch != NULL);
3133 /* Skip verify of ps_regnum, invalid_p == 0 */
3134 if (gdbarch_debug >= 2)
3135 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3136 return gdbarch->ps_regnum;
3140 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3143 gdbarch->ps_regnum = ps_regnum;
3147 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3149 gdb_assert (gdbarch != NULL);
3150 /* Skip verify of fp0_regnum, invalid_p == 0 */
3151 if (gdbarch_debug >= 2)
3152 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3153 return gdbarch->fp0_regnum;
3157 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3160 gdbarch->fp0_regnum = fp0_regnum;
3164 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3166 gdb_assert (gdbarch != NULL);
3167 /* Skip verify of npc_regnum, invalid_p == 0 */
3168 if (gdbarch_debug >= 2)
3169 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3170 return gdbarch->npc_regnum;
3174 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3177 gdbarch->npc_regnum = npc_regnum;
3181 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3183 gdb_assert (gdbarch != NULL);
3184 gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
3185 if (gdbarch_debug >= 2)
3186 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3187 return gdbarch->stab_reg_to_regnum (stab_regnr);
3191 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3192 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3194 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3198 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3200 gdb_assert (gdbarch != NULL);
3201 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
3202 if (gdbarch_debug >= 2)
3203 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3204 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3208 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3209 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3211 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3215 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3217 gdb_assert (gdbarch != NULL);
3218 gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
3219 if (gdbarch_debug >= 2)
3220 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3221 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3225 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3226 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3228 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3232 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3234 gdb_assert (gdbarch != NULL);
3235 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
3236 if (gdbarch_debug >= 2)
3237 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3238 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3242 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3243 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3245 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3249 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3251 gdb_assert (gdbarch != NULL);
3252 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
3253 if (gdbarch_debug >= 2)
3254 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3255 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3259 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3260 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3262 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3266 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3268 gdb_assert (gdbarch != NULL);
3269 gdb_assert (gdbarch->register_name != NULL);
3270 if (gdbarch_debug >= 2)
3271 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3272 return gdbarch->register_name (regnr);
3276 set_gdbarch_register_name (struct gdbarch *gdbarch,
3277 gdbarch_register_name_ftype register_name)
3279 gdbarch->register_name = register_name;
3283 gdbarch_register_type_p (struct gdbarch *gdbarch)
3285 gdb_assert (gdbarch != NULL);
3286 return gdbarch->register_type != NULL;
3290 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3292 gdb_assert (gdbarch != NULL);
3293 gdb_assert (gdbarch->register_type != NULL);
3294 if (gdbarch_debug >= 2)
3295 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3296 return gdbarch->register_type (gdbarch, reg_nr);
3300 set_gdbarch_register_type (struct gdbarch *gdbarch,
3301 gdbarch_register_type_ftype register_type)
3303 gdbarch->register_type = register_type;
3307 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
3309 gdb_assert (gdbarch != NULL);
3310 return gdbarch->deprecated_register_virtual_type != NULL;
3314 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3316 gdb_assert (gdbarch != NULL);
3317 gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
3318 if (gdbarch_debug >= 2)
3319 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
3320 return gdbarch->deprecated_register_virtual_type (reg_nr);
3324 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
3325 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
3327 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
3331 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
3333 gdb_assert (gdbarch != NULL);
3334 if (gdbarch_debug >= 2)
3335 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
3336 return gdbarch->deprecated_register_bytes;
3340 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
3341 int deprecated_register_bytes)
3343 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
3347 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
3349 gdb_assert (gdbarch != NULL);
3350 return gdbarch->deprecated_register_byte != generic_register_byte;
3354 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
3356 gdb_assert (gdbarch != NULL);
3357 gdb_assert (gdbarch->deprecated_register_byte != NULL);
3358 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
3359 if (gdbarch_debug >= 2)
3360 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
3361 return gdbarch->deprecated_register_byte (reg_nr);
3365 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
3366 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
3368 gdbarch->deprecated_register_byte = deprecated_register_byte;
3372 gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
3374 gdb_assert (gdbarch != NULL);
3375 return gdbarch->deprecated_register_raw_size != generic_register_size;
3379 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3381 gdb_assert (gdbarch != NULL);
3382 gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
3383 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
3384 if (gdbarch_debug >= 2)
3385 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
3386 return gdbarch->deprecated_register_raw_size (reg_nr);
3390 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
3391 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
3393 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
3397 gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
3399 gdb_assert (gdbarch != NULL);
3400 return gdbarch->deprecated_register_virtual_size != generic_register_size;
3404 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3406 gdb_assert (gdbarch != NULL);
3407 gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
3408 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
3409 if (gdbarch_debug >= 2)
3410 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
3411 return gdbarch->deprecated_register_virtual_size (reg_nr);
3415 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
3416 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
3418 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
3422 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3424 gdb_assert (gdbarch != NULL);
3425 return gdbarch->deprecated_max_register_raw_size != 0;
3429 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3431 gdb_assert (gdbarch != NULL);
3432 if (gdbarch_debug >= 2)
3433 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3434 return gdbarch->deprecated_max_register_raw_size;
3438 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3439 int deprecated_max_register_raw_size)
3441 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3445 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3447 gdb_assert (gdbarch != NULL);
3448 return gdbarch->deprecated_max_register_virtual_size != 0;
3452 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3454 gdb_assert (gdbarch != NULL);
3455 if (gdbarch_debug >= 2)
3456 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3457 return gdbarch->deprecated_max_register_virtual_size;
3461 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3462 int deprecated_max_register_virtual_size)
3464 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3468 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
3470 gdb_assert (gdbarch != NULL);
3471 return gdbarch->unwind_dummy_id != NULL;
3475 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
3477 gdb_assert (gdbarch != NULL);
3478 gdb_assert (gdbarch->unwind_dummy_id != NULL);
3479 if (gdbarch_debug >= 2)
3480 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
3481 return gdbarch->unwind_dummy_id (gdbarch, info);
3485 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
3486 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
3488 gdbarch->unwind_dummy_id = unwind_dummy_id;
3492 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3494 gdb_assert (gdbarch != NULL);
3495 return gdbarch->deprecated_save_dummy_frame_tos != NULL;
3499 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3501 gdb_assert (gdbarch != NULL);
3502 gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
3503 if (gdbarch_debug >= 2)
3504 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3505 gdbarch->deprecated_save_dummy_frame_tos (sp);
3509 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
3510 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
3512 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
3516 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3518 gdb_assert (gdbarch != NULL);
3519 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3520 if (gdbarch_debug >= 2)
3521 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3522 return gdbarch->deprecated_fp_regnum;
3526 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3527 int deprecated_fp_regnum)
3529 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3533 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
3535 gdb_assert (gdbarch != NULL);
3536 return gdbarch->deprecated_target_read_fp != NULL;
3540 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3542 gdb_assert (gdbarch != NULL);
3543 gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
3544 if (gdbarch_debug >= 2)
3545 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3546 return gdbarch->deprecated_target_read_fp ();
3550 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3551 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3553 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3557 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3559 gdb_assert (gdbarch != NULL);
3560 return gdbarch->push_dummy_call != NULL;
3564 gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3566 gdb_assert (gdbarch != NULL);
3567 gdb_assert (gdbarch->push_dummy_call != NULL);
3568 if (gdbarch_debug >= 2)
3569 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3570 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3574 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3575 gdbarch_push_dummy_call_ftype push_dummy_call)
3577 gdbarch->push_dummy_call = push_dummy_call;
3581 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3583 gdb_assert (gdbarch != NULL);
3584 return gdbarch->deprecated_push_arguments != NULL;
3588 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3590 gdb_assert (gdbarch != NULL);
3591 gdb_assert (gdbarch->deprecated_push_arguments != NULL);
3592 if (gdbarch_debug >= 2)
3593 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3594 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3598 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3599 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3601 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3605 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3607 gdb_assert (gdbarch != NULL);
3608 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3609 if (gdbarch_debug >= 2)
3610 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3611 return gdbarch->deprecated_use_generic_dummy_frames;
3615 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3616 int deprecated_use_generic_dummy_frames)
3618 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3622 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3624 gdb_assert (gdbarch != NULL);
3625 return gdbarch->deprecated_push_return_address != NULL;
3629 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3631 gdb_assert (gdbarch != NULL);
3632 gdb_assert (gdbarch->deprecated_push_return_address != NULL);
3633 if (gdbarch_debug >= 2)
3634 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3635 return gdbarch->deprecated_push_return_address (pc, sp);
3639 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3640 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3642 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3646 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3648 gdb_assert (gdbarch != NULL);
3649 return gdbarch->deprecated_dummy_write_sp != NULL;
3653 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3655 gdb_assert (gdbarch != NULL);
3656 gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
3657 if (gdbarch_debug >= 2)
3658 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3659 gdbarch->deprecated_dummy_write_sp (val);
3663 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3664 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3666 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3670 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3672 gdb_assert (gdbarch != NULL);
3673 if (gdbarch_debug >= 2)
3674 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3675 return gdbarch->deprecated_register_size;
3679 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3680 int deprecated_register_size)
3682 gdbarch->deprecated_register_size = deprecated_register_size;
3686 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3688 gdb_assert (gdbarch != NULL);
3689 /* Skip verify of call_dummy_location, invalid_p == 0 */
3690 if (gdbarch_debug >= 2)
3691 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3692 return gdbarch->call_dummy_location;
3696 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3697 int call_dummy_location)
3699 gdbarch->call_dummy_location = call_dummy_location;
3703 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3705 gdb_assert (gdbarch != NULL);
3706 gdb_assert (gdbarch->call_dummy_address != NULL);
3707 if (gdbarch_debug >= 2)
3708 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3709 return gdbarch->call_dummy_address ();
3713 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3714 gdbarch_call_dummy_address_ftype call_dummy_address)
3716 gdbarch->call_dummy_address = call_dummy_address;
3720 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
3722 gdb_assert (gdbarch != NULL);
3723 if (gdbarch_debug >= 2)
3724 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3725 return gdbarch->deprecated_call_dummy_start_offset;
3729 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3730 CORE_ADDR deprecated_call_dummy_start_offset)
3732 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3736 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3738 gdb_assert (gdbarch != NULL);
3739 if (gdbarch_debug >= 2)
3740 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3741 return gdbarch->deprecated_call_dummy_breakpoint_offset;
3745 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3746 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3748 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3752 gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
3754 gdb_assert (gdbarch != NULL);
3755 if (gdbarch_debug >= 2)
3756 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
3757 return gdbarch->deprecated_call_dummy_length;
3761 set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
3762 int deprecated_call_dummy_length)
3764 gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
3768 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3770 gdb_assert (gdbarch != NULL);
3771 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3772 if (gdbarch_debug >= 2)
3773 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3774 return gdbarch->deprecated_call_dummy_words;
3778 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3779 LONGEST * deprecated_call_dummy_words)
3781 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3785 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3787 gdb_assert (gdbarch != NULL);
3788 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3789 if (gdbarch_debug >= 2)
3790 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3791 return gdbarch->deprecated_sizeof_call_dummy_words;
3795 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3796 int deprecated_sizeof_call_dummy_words)
3798 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3802 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3804 gdb_assert (gdbarch != NULL);
3805 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3809 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3811 gdb_assert (gdbarch != NULL);
3812 if (gdbarch_debug >= 2)
3813 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3814 return gdbarch->deprecated_call_dummy_stack_adjust;
3818 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3819 int deprecated_call_dummy_stack_adjust)
3821 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3825 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3827 gdb_assert (gdbarch != NULL);
3828 return gdbarch->deprecated_fix_call_dummy != NULL;
3832 gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
3834 gdb_assert (gdbarch != NULL);
3835 gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3838 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3842 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3843 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3845 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3849 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3851 gdb_assert (gdbarch != NULL);
3852 return gdbarch->push_dummy_code != NULL;
3856 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)
3858 gdb_assert (gdbarch != NULL);
3859 gdb_assert (gdbarch->push_dummy_code != NULL);
3860 if (gdbarch_debug >= 2)
3861 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3862 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3866 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3867 gdbarch_push_dummy_code_ftype push_dummy_code)
3869 gdbarch->push_dummy_code = push_dummy_code;
3873 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
3875 gdb_assert (gdbarch != NULL);
3876 return gdbarch->deprecated_push_dummy_frame != NULL;
3880 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
3882 gdb_assert (gdbarch != NULL);
3883 gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
3884 if (gdbarch_debug >= 2)
3885 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
3886 gdbarch->deprecated_push_dummy_frame ();
3890 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
3891 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
3893 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
3897 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
3899 gdb_assert (gdbarch != NULL);
3900 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
3901 if (gdbarch_debug >= 2)
3902 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
3903 return gdbarch->deprecated_extra_stack_alignment_needed;
3907 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
3908 int deprecated_extra_stack_alignment_needed)
3910 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
3914 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3916 gdb_assert (gdbarch != NULL);
3917 return gdbarch->deprecated_do_registers_info != NULL;
3921 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3923 gdb_assert (gdbarch != NULL);
3924 gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
3925 if (gdbarch_debug >= 2)
3926 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3927 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3931 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3932 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3934 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3938 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3940 gdb_assert (gdbarch != NULL);
3941 gdb_assert (gdbarch->print_registers_info != NULL);
3942 if (gdbarch_debug >= 2)
3943 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3944 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3948 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3949 gdbarch_print_registers_info_ftype print_registers_info)
3951 gdbarch->print_registers_info = print_registers_info;
3955 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3957 gdb_assert (gdbarch != NULL);
3958 return gdbarch->print_float_info != NULL;
3962 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3964 gdb_assert (gdbarch != NULL);
3965 gdb_assert (gdbarch->print_float_info != NULL);
3966 if (gdbarch_debug >= 2)
3967 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3968 gdbarch->print_float_info (gdbarch, file, frame, args);
3972 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3973 gdbarch_print_float_info_ftype print_float_info)
3975 gdbarch->print_float_info = print_float_info;
3979 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3981 gdb_assert (gdbarch != NULL);
3982 return gdbarch->print_vector_info != NULL;
3986 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3988 gdb_assert (gdbarch != NULL);
3989 gdb_assert (gdbarch->print_vector_info != NULL);
3990 if (gdbarch_debug >= 2)
3991 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3992 gdbarch->print_vector_info (gdbarch, file, frame, args);
3996 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3997 gdbarch_print_vector_info_ftype print_vector_info)
3999 gdbarch->print_vector_info = print_vector_info;
4003 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
4005 gdb_assert (gdbarch != NULL);
4006 gdb_assert (gdbarch->register_sim_regno != NULL);
4007 if (gdbarch_debug >= 2)
4008 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
4009 return gdbarch->register_sim_regno (reg_nr);
4013 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
4014 gdbarch_register_sim_regno_ftype register_sim_regno)
4016 gdbarch->register_sim_regno = register_sim_regno;
4020 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
4022 gdb_assert (gdbarch != NULL);
4023 return gdbarch->register_bytes_ok != NULL;
4027 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
4029 gdb_assert (gdbarch != NULL);
4030 gdb_assert (gdbarch->register_bytes_ok != NULL);
4031 if (gdbarch_debug >= 2)
4032 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
4033 return gdbarch->register_bytes_ok (nr_bytes);
4037 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
4038 gdbarch_register_bytes_ok_ftype register_bytes_ok)
4040 gdbarch->register_bytes_ok = register_bytes_ok;
4044 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
4046 gdb_assert (gdbarch != NULL);
4047 gdb_assert (gdbarch->cannot_fetch_register != NULL);
4048 if (gdbarch_debug >= 2)
4049 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
4050 return gdbarch->cannot_fetch_register (regnum);
4054 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
4055 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
4057 gdbarch->cannot_fetch_register = cannot_fetch_register;
4061 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
4063 gdb_assert (gdbarch != NULL);
4064 gdb_assert (gdbarch->cannot_store_register != NULL);
4065 if (gdbarch_debug >= 2)
4066 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
4067 return gdbarch->cannot_store_register (regnum);
4071 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
4072 gdbarch_cannot_store_register_ftype cannot_store_register)
4074 gdbarch->cannot_store_register = cannot_store_register;
4078 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
4080 gdb_assert (gdbarch != NULL);
4081 return gdbarch->get_longjmp_target != NULL;
4085 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
4087 gdb_assert (gdbarch != NULL);
4088 gdb_assert (gdbarch->get_longjmp_target != NULL);
4089 if (gdbarch_debug >= 2)
4090 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
4091 return gdbarch->get_longjmp_target (pc);
4095 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
4096 gdbarch_get_longjmp_target_ftype get_longjmp_target)
4098 gdbarch->get_longjmp_target = get_longjmp_target;
4102 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
4104 gdb_assert (gdbarch != NULL);
4105 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
4109 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
4111 gdb_assert (gdbarch != NULL);
4112 gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
4113 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy, allow call. */
4114 if (gdbarch_debug >= 2)
4115 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
4116 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
4120 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
4121 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
4123 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
4127 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
4129 gdb_assert (gdbarch != NULL);
4130 return gdbarch->deprecated_init_frame_pc_first != NULL;
4134 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
4136 gdb_assert (gdbarch != NULL);
4137 gdb_assert (gdbarch->deprecated_init_frame_pc_first != NULL);
4138 if (gdbarch_debug >= 2)
4139 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
4140 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
4144 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
4145 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
4147 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
4151 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
4153 gdb_assert (gdbarch != NULL);
4154 return gdbarch->deprecated_init_frame_pc != NULL;
4158 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
4160 gdb_assert (gdbarch != NULL);
4161 gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
4162 if (gdbarch_debug >= 2)
4163 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
4164 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
4168 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
4169 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
4171 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
4175 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
4177 gdb_assert (gdbarch != NULL);
4178 if (gdbarch_debug >= 2)
4179 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
4180 return gdbarch->believe_pcc_promotion;
4184 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
4185 int believe_pcc_promotion)
4187 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
4191 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
4193 gdb_assert (gdbarch != NULL);
4194 if (gdbarch_debug >= 2)
4195 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
4196 return gdbarch->believe_pcc_promotion_type;
4200 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
4201 int believe_pcc_promotion_type)
4203 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
4207 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
4209 gdb_assert (gdbarch != NULL);
4210 return gdbarch->deprecated_get_saved_register != NULL;
4214 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)
4216 gdb_assert (gdbarch != NULL);
4217 gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
4218 if (gdbarch_debug >= 2)
4219 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
4220 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
4224 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
4225 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
4227 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
4231 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
4233 gdb_assert (gdbarch != NULL);
4234 gdb_assert (gdbarch->deprecated_register_convertible != NULL);
4235 if (gdbarch_debug >= 2)
4236 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
4237 return gdbarch->deprecated_register_convertible (nr);
4241 set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
4242 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
4244 gdbarch->deprecated_register_convertible = deprecated_register_convertible;
4248 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4250 gdb_assert (gdbarch != NULL);
4251 gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
4252 if (gdbarch_debug >= 2)
4253 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
4254 gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
4258 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
4259 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
4261 gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
4265 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
4267 gdb_assert (gdbarch != NULL);
4268 gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
4269 if (gdbarch_debug >= 2)
4270 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
4271 gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
4275 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
4276 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
4278 gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
4282 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
4284 gdb_assert (gdbarch != NULL);
4285 gdb_assert (gdbarch->convert_register_p != NULL);
4286 if (gdbarch_debug >= 2)
4287 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4288 return gdbarch->convert_register_p (regnum, type);
4292 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4293 gdbarch_convert_register_p_ftype convert_register_p)
4295 gdbarch->convert_register_p = convert_register_p;
4299 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
4301 gdb_assert (gdbarch != NULL);
4302 gdb_assert (gdbarch->register_to_value != NULL);
4303 if (gdbarch_debug >= 2)
4304 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4305 gdbarch->register_to_value (frame, regnum, type, buf);
4309 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4310 gdbarch_register_to_value_ftype register_to_value)
4312 gdbarch->register_to_value = register_to_value;
4316 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
4318 gdb_assert (gdbarch != NULL);
4319 gdb_assert (gdbarch->value_to_register != NULL);
4320 if (gdbarch_debug >= 2)
4321 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4322 gdbarch->value_to_register (frame, regnum, type, buf);
4326 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4327 gdbarch_value_to_register_ftype value_to_register)
4329 gdbarch->value_to_register = value_to_register;
4333 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4335 gdb_assert (gdbarch != NULL);
4336 gdb_assert (gdbarch->pointer_to_address != NULL);
4337 if (gdbarch_debug >= 2)
4338 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4339 return gdbarch->pointer_to_address (type, buf);
4343 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4344 gdbarch_pointer_to_address_ftype pointer_to_address)
4346 gdbarch->pointer_to_address = pointer_to_address;
4350 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4352 gdb_assert (gdbarch != NULL);
4353 gdb_assert (gdbarch->address_to_pointer != NULL);
4354 if (gdbarch_debug >= 2)
4355 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4356 gdbarch->address_to_pointer (type, buf, addr);
4360 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4361 gdbarch_address_to_pointer_ftype address_to_pointer)
4363 gdbarch->address_to_pointer = address_to_pointer;
4367 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4369 gdb_assert (gdbarch != NULL);
4370 return gdbarch->integer_to_address != NULL;
4374 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4376 gdb_assert (gdbarch != NULL);
4377 gdb_assert (gdbarch->integer_to_address != NULL);
4378 if (gdbarch_debug >= 2)
4379 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4380 return gdbarch->integer_to_address (type, buf);
4384 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4385 gdbarch_integer_to_address_ftype integer_to_address)
4387 gdbarch->integer_to_address = integer_to_address;
4391 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4393 gdb_assert (gdbarch != NULL);
4394 gdb_assert (gdbarch->return_value_on_stack != NULL);
4395 if (gdbarch_debug >= 2)
4396 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4397 return gdbarch->return_value_on_stack (type);
4401 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4402 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4404 gdbarch->return_value_on_stack = return_value_on_stack;
4408 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4410 gdb_assert (gdbarch != NULL);
4411 return gdbarch->deprecated_pop_frame != NULL;
4415 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4417 gdb_assert (gdbarch != NULL);
4418 gdb_assert (gdbarch->deprecated_pop_frame != NULL);
4419 if (gdbarch_debug >= 2)
4420 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4421 gdbarch->deprecated_pop_frame ();
4425 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4426 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4428 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4432 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4434 gdb_assert (gdbarch != NULL);
4435 return gdbarch->deprecated_store_struct_return != NULL;
4439 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4441 gdb_assert (gdbarch != NULL);
4442 gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
4443 if (gdbarch_debug >= 2)
4444 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4445 gdbarch->deprecated_store_struct_return (addr, sp);
4449 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4450 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4452 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4456 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4458 gdb_assert (gdbarch != NULL);
4459 gdb_assert (gdbarch->extract_return_value != NULL);
4460 if (gdbarch_debug >= 2)
4461 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4462 gdbarch->extract_return_value (type, regcache, valbuf);
4466 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4467 gdbarch_extract_return_value_ftype extract_return_value)
4469 gdbarch->extract_return_value = extract_return_value;
4473 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4475 gdb_assert (gdbarch != NULL);
4476 gdb_assert (gdbarch->store_return_value != NULL);
4477 if (gdbarch_debug >= 2)
4478 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4479 gdbarch->store_return_value (type, regcache, valbuf);
4483 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4484 gdbarch_store_return_value_ftype store_return_value)
4486 gdbarch->store_return_value = store_return_value;
4490 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4492 gdb_assert (gdbarch != NULL);
4493 gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
4494 if (gdbarch_debug >= 2)
4495 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4496 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4500 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4501 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4503 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4507 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4509 gdb_assert (gdbarch != NULL);
4510 gdb_assert (gdbarch->deprecated_store_return_value != NULL);
4511 if (gdbarch_debug >= 2)
4512 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4513 gdbarch->deprecated_store_return_value (type, valbuf);
4517 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4518 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4520 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4524 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4526 gdb_assert (gdbarch != NULL);
4527 return gdbarch->extract_struct_value_address != NULL;
4531 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4533 gdb_assert (gdbarch != NULL);
4534 gdb_assert (gdbarch->extract_struct_value_address != NULL);
4535 if (gdbarch_debug >= 2)
4536 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4537 return gdbarch->extract_struct_value_address (regcache);
4541 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4542 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4544 gdbarch->extract_struct_value_address = extract_struct_value_address;
4548 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4550 gdb_assert (gdbarch != NULL);
4551 return gdbarch->deprecated_extract_struct_value_address != NULL;
4555 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4557 gdb_assert (gdbarch != NULL);
4558 gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
4559 if (gdbarch_debug >= 2)
4560 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4561 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4565 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4566 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4568 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4572 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4574 gdb_assert (gdbarch != NULL);
4575 gdb_assert (gdbarch->use_struct_convention != NULL);
4576 if (gdbarch_debug >= 2)
4577 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4578 return gdbarch->use_struct_convention (gcc_p, value_type);
4582 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4583 gdbarch_use_struct_convention_ftype use_struct_convention)
4585 gdbarch->use_struct_convention = use_struct_convention;
4589 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4591 gdb_assert (gdbarch != NULL);
4592 return gdbarch->deprecated_frame_init_saved_regs != NULL;
4596 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4598 gdb_assert (gdbarch != NULL);
4599 gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
4600 if (gdbarch_debug >= 2)
4601 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4602 gdbarch->deprecated_frame_init_saved_regs (frame);
4606 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4607 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4609 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4613 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4615 gdb_assert (gdbarch != NULL);
4616 return gdbarch->deprecated_init_extra_frame_info != NULL;
4620 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4622 gdb_assert (gdbarch != NULL);
4623 gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
4624 if (gdbarch_debug >= 2)
4625 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4626 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4630 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4631 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4633 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4637 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4639 gdb_assert (gdbarch != NULL);
4640 gdb_assert (gdbarch->skip_prologue != NULL);
4641 if (gdbarch_debug >= 2)
4642 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4643 return gdbarch->skip_prologue (ip);
4647 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4648 gdbarch_skip_prologue_ftype skip_prologue)
4650 gdbarch->skip_prologue = skip_prologue;
4654 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4656 gdb_assert (gdbarch != NULL);
4657 gdb_assert (gdbarch->prologue_frameless_p != NULL);
4658 if (gdbarch_debug >= 2)
4659 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4660 return gdbarch->prologue_frameless_p (ip);
4664 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4665 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4667 gdbarch->prologue_frameless_p = prologue_frameless_p;
4671 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4673 gdb_assert (gdbarch != NULL);
4674 gdb_assert (gdbarch->inner_than != NULL);
4675 if (gdbarch_debug >= 2)
4676 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4677 return gdbarch->inner_than (lhs, rhs);
4681 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4682 gdbarch_inner_than_ftype inner_than)
4684 gdbarch->inner_than = inner_than;
4687 const unsigned char *
4688 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4690 gdb_assert (gdbarch != NULL);
4691 gdb_assert (gdbarch->breakpoint_from_pc != NULL);
4692 if (gdbarch_debug >= 2)
4693 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4694 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4698 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4699 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4701 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4705 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4707 gdb_assert (gdbarch != NULL);
4708 gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
4709 if (gdbarch_debug >= 2)
4710 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4711 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4715 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4716 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4718 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4722 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4724 gdb_assert (gdbarch != NULL);
4725 gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
4726 if (gdbarch_debug >= 2)
4727 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4728 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4732 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4733 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4735 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4739 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4741 gdb_assert (gdbarch != NULL);
4742 /* Check variable changed from pre-default. */
4743 gdb_assert (gdbarch->decr_pc_after_break != -1);
4744 if (gdbarch_debug >= 2)
4745 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4746 return gdbarch->decr_pc_after_break;
4750 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4751 CORE_ADDR decr_pc_after_break)
4753 gdbarch->decr_pc_after_break = decr_pc_after_break;
4757 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4759 gdb_assert (gdbarch != NULL);
4760 /* Check variable changed from pre-default. */
4761 gdb_assert (gdbarch->function_start_offset != -1);
4762 if (gdbarch_debug >= 2)
4763 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4764 return gdbarch->function_start_offset;
4768 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4769 CORE_ADDR function_start_offset)
4771 gdbarch->function_start_offset = function_start_offset;
4775 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)
4777 gdb_assert (gdbarch != NULL);
4778 gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
4779 if (gdbarch_debug >= 2)
4780 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4781 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4785 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4786 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4788 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4792 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4794 gdb_assert (gdbarch != NULL);
4795 /* Check variable changed from pre-default. */
4796 gdb_assert (gdbarch->frame_args_skip != -1);
4797 if (gdbarch_debug >= 2)
4798 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4799 return gdbarch->frame_args_skip;
4803 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4804 CORE_ADDR frame_args_skip)
4806 gdbarch->frame_args_skip = frame_args_skip;
4810 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4812 gdb_assert (gdbarch != NULL);
4813 gdb_assert (gdbarch->frameless_function_invocation != NULL);
4814 if (gdbarch_debug >= 2)
4815 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4816 return gdbarch->frameless_function_invocation (fi);
4820 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4821 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4823 gdbarch->frameless_function_invocation = frameless_function_invocation;
4827 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4829 gdb_assert (gdbarch != NULL);
4830 return gdbarch->deprecated_frame_chain != NULL;
4834 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4836 gdb_assert (gdbarch != NULL);
4837 gdb_assert (gdbarch->deprecated_frame_chain != NULL);
4838 if (gdbarch_debug >= 2)
4839 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4840 return gdbarch->deprecated_frame_chain (frame);
4844 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4845 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4847 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4851 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4853 gdb_assert (gdbarch != NULL);
4854 return gdbarch->deprecated_frame_chain_valid != NULL;
4858 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4860 gdb_assert (gdbarch != NULL);
4861 gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
4862 if (gdbarch_debug >= 2)
4863 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4864 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4868 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4869 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4871 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4875 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4877 gdb_assert (gdbarch != NULL);
4878 return gdbarch->deprecated_frame_saved_pc != NULL;
4882 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4884 gdb_assert (gdbarch != NULL);
4885 gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
4886 if (gdbarch_debug >= 2)
4887 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4888 return gdbarch->deprecated_frame_saved_pc (fi);
4892 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4893 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4895 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4899 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4901 gdb_assert (gdbarch != NULL);
4902 return gdbarch->unwind_pc != NULL;
4906 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4908 gdb_assert (gdbarch != NULL);
4909 gdb_assert (gdbarch->unwind_pc != NULL);
4910 if (gdbarch_debug >= 2)
4911 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4912 return gdbarch->unwind_pc (gdbarch, next_frame);
4916 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4917 gdbarch_unwind_pc_ftype unwind_pc)
4919 gdbarch->unwind_pc = unwind_pc;
4923 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4925 gdb_assert (gdbarch != NULL);
4926 return gdbarch->unwind_sp != NULL;
4930 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4932 gdb_assert (gdbarch != NULL);
4933 gdb_assert (gdbarch->unwind_sp != NULL);
4934 if (gdbarch_debug >= 2)
4935 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
4936 return gdbarch->unwind_sp (gdbarch, next_frame);
4940 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
4941 gdbarch_unwind_sp_ftype unwind_sp)
4943 gdbarch->unwind_sp = unwind_sp;
4947 gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
4949 gdb_assert (gdbarch != NULL);
4950 return gdbarch->deprecated_frame_args_address != get_frame_base;
4954 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4956 gdb_assert (gdbarch != NULL);
4957 gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
4958 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4959 if (gdbarch_debug >= 2)
4960 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
4961 return gdbarch->deprecated_frame_args_address (fi);
4965 set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
4966 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
4968 gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
4972 gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
4974 gdb_assert (gdbarch != NULL);
4975 return gdbarch->deprecated_frame_locals_address != get_frame_base;
4979 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4981 gdb_assert (gdbarch != NULL);
4982 gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
4983 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4984 if (gdbarch_debug >= 2)
4985 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
4986 return gdbarch->deprecated_frame_locals_address (fi);
4990 set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
4991 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
4993 gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
4997 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4999 gdb_assert (gdbarch != NULL);
5000 return gdbarch->deprecated_saved_pc_after_call != NULL;
5004 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
5006 gdb_assert (gdbarch != NULL);
5007 gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
5008 if (gdbarch_debug >= 2)
5009 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
5010 return gdbarch->deprecated_saved_pc_after_call (frame);
5014 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
5015 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
5017 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
5021 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
5023 gdb_assert (gdbarch != NULL);
5024 return gdbarch->frame_num_args != NULL;
5028 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
5030 gdb_assert (gdbarch != NULL);
5031 gdb_assert (gdbarch->frame_num_args != NULL);
5032 if (gdbarch_debug >= 2)
5033 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
5034 return gdbarch->frame_num_args (frame);
5038 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
5039 gdbarch_frame_num_args_ftype frame_num_args)
5041 gdbarch->frame_num_args = frame_num_args;
5045 gdbarch_stack_align_p (struct gdbarch *gdbarch)
5047 gdb_assert (gdbarch != NULL);
5048 return gdbarch->stack_align != NULL;
5052 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
5054 gdb_assert (gdbarch != NULL);
5055 gdb_assert (gdbarch->stack_align != NULL);
5056 if (gdbarch_debug >= 2)
5057 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
5058 return gdbarch->stack_align (sp);
5062 set_gdbarch_stack_align (struct gdbarch *gdbarch,
5063 gdbarch_stack_align_ftype stack_align)
5065 gdbarch->stack_align = stack_align;
5069 gdbarch_frame_align_p (struct gdbarch *gdbarch)
5071 gdb_assert (gdbarch != NULL);
5072 return gdbarch->frame_align != NULL;
5076 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
5078 gdb_assert (gdbarch != NULL);
5079 gdb_assert (gdbarch->frame_align != NULL);
5080 if (gdbarch_debug >= 2)
5081 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5082 return gdbarch->frame_align (gdbarch, address);
5086 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5087 gdbarch_frame_align_ftype frame_align)
5089 gdbarch->frame_align = frame_align;
5093 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5095 gdb_assert (gdbarch != NULL);
5096 return gdbarch->reg_struct_has_addr != NULL;
5100 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5102 gdb_assert (gdbarch != NULL);
5103 gdb_assert (gdbarch->reg_struct_has_addr != NULL);
5104 if (gdbarch_debug >= 2)
5105 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5106 return gdbarch->reg_struct_has_addr (gcc_p, type);
5110 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5111 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5113 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5117 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5119 gdb_assert (gdbarch != NULL);
5120 if (gdbarch_debug >= 2)
5121 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5122 return gdbarch->parm_boundary;
5126 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5129 gdbarch->parm_boundary = parm_boundary;
5132 const struct floatformat *
5133 gdbarch_float_format (struct gdbarch *gdbarch)
5135 gdb_assert (gdbarch != NULL);
5136 if (gdbarch_debug >= 2)
5137 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5138 return gdbarch->float_format;
5142 set_gdbarch_float_format (struct gdbarch *gdbarch,
5143 const struct floatformat * float_format)
5145 gdbarch->float_format = float_format;
5148 const struct floatformat *
5149 gdbarch_double_format (struct gdbarch *gdbarch)
5151 gdb_assert (gdbarch != NULL);
5152 if (gdbarch_debug >= 2)
5153 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5154 return gdbarch->double_format;
5158 set_gdbarch_double_format (struct gdbarch *gdbarch,
5159 const struct floatformat * double_format)
5161 gdbarch->double_format = double_format;
5164 const struct floatformat *
5165 gdbarch_long_double_format (struct gdbarch *gdbarch)
5167 gdb_assert (gdbarch != NULL);
5168 if (gdbarch_debug >= 2)
5169 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5170 return gdbarch->long_double_format;
5174 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5175 const struct floatformat * long_double_format)
5177 gdbarch->long_double_format = long_double_format;
5181 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5183 gdb_assert (gdbarch != NULL);
5184 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
5185 if (gdbarch_debug >= 2)
5186 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5187 return gdbarch->convert_from_func_ptr_addr (addr);
5191 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5192 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5194 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5198 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5200 gdb_assert (gdbarch != NULL);
5201 gdb_assert (gdbarch->addr_bits_remove != NULL);
5202 if (gdbarch_debug >= 2)
5203 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5204 return gdbarch->addr_bits_remove (addr);
5208 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5209 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5211 gdbarch->addr_bits_remove = addr_bits_remove;
5215 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5217 gdb_assert (gdbarch != NULL);
5218 gdb_assert (gdbarch->smash_text_address != NULL);
5219 if (gdbarch_debug >= 2)
5220 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5221 return gdbarch->smash_text_address (addr);
5225 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5226 gdbarch_smash_text_address_ftype smash_text_address)
5228 gdbarch->smash_text_address = smash_text_address;
5232 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5234 gdb_assert (gdbarch != NULL);
5235 return gdbarch->software_single_step != NULL;
5239 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5241 gdb_assert (gdbarch != NULL);
5242 gdb_assert (gdbarch->software_single_step != NULL);
5243 if (gdbarch_debug >= 2)
5244 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5245 gdbarch->software_single_step (sig, insert_breakpoints_p);
5249 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5250 gdbarch_software_single_step_ftype software_single_step)
5252 gdbarch->software_single_step = software_single_step;
5256 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5258 gdb_assert (gdbarch != NULL);
5259 gdb_assert (gdbarch->print_insn != NULL);
5260 if (gdbarch_debug >= 2)
5261 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5262 return gdbarch->print_insn (vma, info);
5266 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5267 gdbarch_print_insn_ftype print_insn)
5269 gdbarch->print_insn = print_insn;
5273 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5275 gdb_assert (gdbarch != NULL);
5276 gdb_assert (gdbarch->skip_trampoline_code != NULL);
5277 if (gdbarch_debug >= 2)
5278 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5279 return gdbarch->skip_trampoline_code (pc);
5283 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5284 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5286 gdbarch->skip_trampoline_code = skip_trampoline_code;
5290 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5292 gdb_assert (gdbarch != NULL);
5293 gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
5294 if (gdbarch_debug >= 2)
5295 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5296 return gdbarch->in_solib_call_trampoline (pc, name);
5300 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5301 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5303 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5307 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5309 gdb_assert (gdbarch != NULL);
5310 gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
5311 if (gdbarch_debug >= 2)
5312 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5313 return gdbarch->in_solib_return_trampoline (pc, name);
5317 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5318 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5320 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5324 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5326 gdb_assert (gdbarch != NULL);
5327 gdb_assert (gdbarch->pc_in_sigtramp != NULL);
5328 if (gdbarch_debug >= 2)
5329 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5330 return gdbarch->pc_in_sigtramp (pc, name);
5334 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5335 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5337 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5341 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5343 gdb_assert (gdbarch != NULL);
5344 return gdbarch->sigtramp_start != NULL;
5348 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5350 gdb_assert (gdbarch != NULL);
5351 gdb_assert (gdbarch->sigtramp_start != NULL);
5352 if (gdbarch_debug >= 2)
5353 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5354 return gdbarch->sigtramp_start (pc);
5358 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5359 gdbarch_sigtramp_start_ftype sigtramp_start)
5361 gdbarch->sigtramp_start = sigtramp_start;
5365 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5367 gdb_assert (gdbarch != NULL);
5368 return gdbarch->sigtramp_end != NULL;
5372 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5374 gdb_assert (gdbarch != NULL);
5375 gdb_assert (gdbarch->sigtramp_end != NULL);
5376 if (gdbarch_debug >= 2)
5377 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5378 return gdbarch->sigtramp_end (pc);
5382 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5383 gdbarch_sigtramp_end_ftype sigtramp_end)
5385 gdbarch->sigtramp_end = sigtramp_end;
5389 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5391 gdb_assert (gdbarch != NULL);
5392 gdb_assert (gdbarch->in_function_epilogue_p != NULL);
5393 if (gdbarch_debug >= 2)
5394 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5395 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5399 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5400 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5402 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5406 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5408 gdb_assert (gdbarch != NULL);
5409 gdb_assert (gdbarch->construct_inferior_arguments != NULL);
5410 if (gdbarch_debug >= 2)
5411 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5412 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5416 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5417 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5419 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5423 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5425 gdb_assert (gdbarch != NULL);
5426 gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
5427 if (gdbarch_debug >= 2)
5428 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5429 gdbarch->elf_make_msymbol_special (sym, msym);
5433 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5434 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5436 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5440 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5442 gdb_assert (gdbarch != NULL);
5443 gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
5444 if (gdbarch_debug >= 2)
5445 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5446 gdbarch->coff_make_msymbol_special (val, msym);
5450 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5451 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5453 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5457 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5459 gdb_assert (gdbarch != NULL);
5460 /* Skip verify of name_of_malloc, invalid_p == 0 */
5461 if (gdbarch_debug >= 2)
5462 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5463 return gdbarch->name_of_malloc;
5467 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5468 const char * name_of_malloc)
5470 gdbarch->name_of_malloc = name_of_malloc;
5474 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5476 gdb_assert (gdbarch != NULL);
5477 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5478 if (gdbarch_debug >= 2)
5479 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5480 return gdbarch->cannot_step_breakpoint;
5484 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5485 int cannot_step_breakpoint)
5487 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5491 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5493 gdb_assert (gdbarch != NULL);
5494 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5495 if (gdbarch_debug >= 2)
5496 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5497 return gdbarch->have_nonsteppable_watchpoint;
5501 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5502 int have_nonsteppable_watchpoint)
5504 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5508 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5510 gdb_assert (gdbarch != NULL);
5511 return gdbarch->address_class_type_flags != NULL;
5515 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5517 gdb_assert (gdbarch != NULL);
5518 gdb_assert (gdbarch->address_class_type_flags != NULL);
5519 if (gdbarch_debug >= 2)
5520 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5521 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5525 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5526 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5528 gdbarch->address_class_type_flags = address_class_type_flags;
5532 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5534 gdb_assert (gdbarch != NULL);
5535 return gdbarch->address_class_type_flags_to_name != NULL;
5539 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5541 gdb_assert (gdbarch != NULL);
5542 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
5543 if (gdbarch_debug >= 2)
5544 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5545 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5549 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5550 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5552 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5556 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5558 gdb_assert (gdbarch != NULL);
5559 return gdbarch->address_class_name_to_type_flags != NULL;
5563 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5565 gdb_assert (gdbarch != NULL);
5566 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
5567 if (gdbarch_debug >= 2)
5568 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5569 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5573 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5574 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5576 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5580 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5582 gdb_assert (gdbarch != NULL);
5583 gdb_assert (gdbarch->register_reggroup_p != NULL);
5584 if (gdbarch_debug >= 2)
5585 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5586 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5590 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5591 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5593 gdbarch->register_reggroup_p = register_reggroup_p;
5597 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5599 gdb_assert (gdbarch != NULL);
5600 return gdbarch->fetch_pointer_argument != NULL;
5604 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5606 gdb_assert (gdbarch != NULL);
5607 gdb_assert (gdbarch->fetch_pointer_argument != NULL);
5608 if (gdbarch_debug >= 2)
5609 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5610 return gdbarch->fetch_pointer_argument (frame, argi, type);
5614 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5615 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5617 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5621 /* Keep a registry of per-architecture data-pointers required by GDB
5628 gdbarch_data_init_ftype *init;
5631 struct gdbarch_data_registration
5633 struct gdbarch_data *data;
5634 struct gdbarch_data_registration *next;
5637 struct gdbarch_data_registry
5640 struct gdbarch_data_registration *registrations;
5643 struct gdbarch_data_registry gdbarch_data_registry =
5648 struct gdbarch_data *
5649 register_gdbarch_data (gdbarch_data_init_ftype *init)
5651 struct gdbarch_data_registration **curr;
5652 /* Append the new registraration. */
5653 for (curr = &gdbarch_data_registry.registrations;
5655 curr = &(*curr)->next);
5656 (*curr) = XMALLOC (struct gdbarch_data_registration);
5657 (*curr)->next = NULL;
5658 (*curr)->data = XMALLOC (struct gdbarch_data);
5659 (*curr)->data->index = gdbarch_data_registry.nr++;
5660 (*curr)->data->init = init;
5661 (*curr)->data->init_p = 1;
5662 return (*curr)->data;
5666 /* Create/delete the gdbarch data vector. */
5669 alloc_gdbarch_data (struct gdbarch *gdbarch)
5671 gdb_assert (gdbarch->data == NULL);
5672 gdbarch->nr_data = gdbarch_data_registry.nr;
5673 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
5676 /* Initialize the current value of the specified per-architecture
5680 set_gdbarch_data (struct gdbarch *gdbarch,
5681 struct gdbarch_data *data,
5684 gdb_assert (data->index < gdbarch->nr_data);
5685 gdb_assert (gdbarch->data[data->index] == NULL);
5686 gdbarch->data[data->index] = pointer;
5689 /* Return the current value of the specified per-architecture
5693 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5695 gdb_assert (data->index < gdbarch->nr_data);
5696 /* The data-pointer isn't initialized, call init() to get a value but
5697 only if the architecture initializaiton has completed. Otherwise
5698 punt - hope that the caller knows what they are doing. */
5699 if (gdbarch->data[data->index] == NULL
5700 && gdbarch->initialized_p)
5702 /* Be careful to detect an initialization cycle. */
5703 gdb_assert (data->init_p);
5705 gdb_assert (data->init != NULL);
5706 gdbarch->data[data->index] = data->init (gdbarch);
5708 gdb_assert (gdbarch->data[data->index] != NULL);
5710 return gdbarch->data[data->index];
5715 /* Keep a registry of swapped data required by GDB modules. */
5720 struct gdbarch_swap_registration *source;
5721 struct gdbarch_swap *next;
5724 struct gdbarch_swap_registration
5727 unsigned long sizeof_data;
5728 gdbarch_swap_ftype *init;
5729 struct gdbarch_swap_registration *next;
5732 struct gdbarch_swap_registry
5735 struct gdbarch_swap_registration *registrations;
5738 struct gdbarch_swap_registry gdbarch_swap_registry =
5744 register_gdbarch_swap (void *data,
5745 unsigned long sizeof_data,
5746 gdbarch_swap_ftype *init)
5748 struct gdbarch_swap_registration **rego;
5749 for (rego = &gdbarch_swap_registry.registrations;
5751 rego = &(*rego)->next);
5752 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5753 (*rego)->next = NULL;
5754 (*rego)->init = init;
5755 (*rego)->data = data;
5756 (*rego)->sizeof_data = sizeof_data;
5760 clear_gdbarch_swap (struct gdbarch *gdbarch)
5762 struct gdbarch_swap *curr;
5763 for (curr = gdbarch->swap;
5767 memset (curr->source->data, 0, curr->source->sizeof_data);
5772 init_gdbarch_swap (struct gdbarch *gdbarch)
5774 struct gdbarch_swap_registration *rego;
5775 struct gdbarch_swap **curr = &gdbarch->swap;
5776 for (rego = gdbarch_swap_registry.registrations;
5780 if (rego->data != NULL)
5782 (*curr) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct gdbarch_swap);
5783 (*curr)->source = rego;
5784 (*curr)->swap = gdbarch_obstack_zalloc (gdbarch, rego->sizeof_data);
5785 (*curr)->next = NULL;
5786 curr = &(*curr)->next;
5788 if (rego->init != NULL)
5794 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5796 struct gdbarch_swap *curr;
5797 for (curr = gdbarch->swap;
5800 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5804 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5806 struct gdbarch_swap *curr;
5807 for (curr = gdbarch->swap;
5810 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5814 /* Keep a registry of the architectures known by GDB. */
5816 struct gdbarch_registration
5818 enum bfd_architecture bfd_architecture;
5819 gdbarch_init_ftype *init;
5820 gdbarch_dump_tdep_ftype *dump_tdep;
5821 struct gdbarch_list *arches;
5822 struct gdbarch_registration *next;
5825 static struct gdbarch_registration *gdbarch_registry = NULL;
5828 append_name (const char ***buf, int *nr, const char *name)
5830 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5836 gdbarch_printable_names (void)
5840 /* Accumulate a list of names based on the registed list of
5842 enum bfd_architecture a;
5844 const char **arches = NULL;
5845 struct gdbarch_registration *rego;
5846 for (rego = gdbarch_registry;
5850 const struct bfd_arch_info *ap;
5851 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5853 internal_error (__FILE__, __LINE__,
5854 "gdbarch_architecture_names: multi-arch unknown");
5857 append_name (&arches, &nr_arches, ap->printable_name);
5862 append_name (&arches, &nr_arches, NULL);
5866 /* Just return all the architectures that BFD knows. Assume that
5867 the legacy architecture framework supports them. */
5868 return bfd_arch_list ();
5873 gdbarch_register (enum bfd_architecture bfd_architecture,
5874 gdbarch_init_ftype *init,
5875 gdbarch_dump_tdep_ftype *dump_tdep)
5877 struct gdbarch_registration **curr;
5878 const struct bfd_arch_info *bfd_arch_info;
5879 /* Check that BFD recognizes this architecture */
5880 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5881 if (bfd_arch_info == NULL)
5883 internal_error (__FILE__, __LINE__,
5884 "gdbarch: Attempt to register unknown architecture (%d)",
5887 /* Check that we haven't seen this architecture before */
5888 for (curr = &gdbarch_registry;
5890 curr = &(*curr)->next)
5892 if (bfd_architecture == (*curr)->bfd_architecture)
5893 internal_error (__FILE__, __LINE__,
5894 "gdbarch: Duplicate registraration of architecture (%s)",
5895 bfd_arch_info->printable_name);
5899 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5900 bfd_arch_info->printable_name,
5903 (*curr) = XMALLOC (struct gdbarch_registration);
5904 (*curr)->bfd_architecture = bfd_architecture;
5905 (*curr)->init = init;
5906 (*curr)->dump_tdep = dump_tdep;
5907 (*curr)->arches = NULL;
5908 (*curr)->next = NULL;
5909 /* When non- multi-arch, install whatever target dump routine we've
5910 been provided - hopefully that routine has been written correctly
5911 and works regardless of multi-arch. */
5912 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5913 && startup_gdbarch.dump_tdep == NULL)
5914 startup_gdbarch.dump_tdep = dump_tdep;
5918 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5919 gdbarch_init_ftype *init)
5921 gdbarch_register (bfd_architecture, init, NULL);
5925 /* Look for an architecture using gdbarch_info. Base search on only
5926 BFD_ARCH_INFO and BYTE_ORDER. */
5928 struct gdbarch_list *
5929 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5930 const struct gdbarch_info *info)
5932 for (; arches != NULL; arches = arches->next)
5934 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5936 if (info->byte_order != arches->gdbarch->byte_order)
5938 if (info->osabi != arches->gdbarch->osabi)
5946 /* Update the current architecture. Return ZERO if the update request
5950 gdbarch_update_p (struct gdbarch_info info)
5952 struct gdbarch *new_gdbarch;
5953 struct gdbarch *old_gdbarch;
5954 struct gdbarch_registration *rego;
5956 /* Fill in missing parts of the INFO struct using a number of
5957 sources: ``set ...''; INFOabfd supplied; existing target. */
5959 /* ``(gdb) set architecture ...'' */
5960 if (info.bfd_arch_info == NULL
5961 && !TARGET_ARCHITECTURE_AUTO)
5962 info.bfd_arch_info = TARGET_ARCHITECTURE;
5963 if (info.bfd_arch_info == NULL
5964 && info.abfd != NULL
5965 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5966 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5967 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5968 if (info.bfd_arch_info == NULL)
5969 info.bfd_arch_info = TARGET_ARCHITECTURE;
5971 /* ``(gdb) set byte-order ...'' */
5972 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5973 && !TARGET_BYTE_ORDER_AUTO)
5974 info.byte_order = TARGET_BYTE_ORDER;
5975 /* From the INFO struct. */
5976 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5977 && info.abfd != NULL)
5978 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5979 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5980 : BFD_ENDIAN_UNKNOWN);
5981 /* From the current target. */
5982 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5983 info.byte_order = TARGET_BYTE_ORDER;
5985 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
5986 if (info.osabi == GDB_OSABI_UNINITIALIZED)
5987 info.osabi = gdbarch_lookup_osabi (info.abfd);
5988 if (info.osabi == GDB_OSABI_UNINITIALIZED)
5989 info.osabi = current_gdbarch->osabi;
5991 /* Must have found some sort of architecture. */
5992 gdb_assert (info.bfd_arch_info != NULL);
5996 fprintf_unfiltered (gdb_stdlog,
5997 "gdbarch_update: info.bfd_arch_info %s\n",
5998 (info.bfd_arch_info != NULL
5999 ? info.bfd_arch_info->printable_name
6001 fprintf_unfiltered (gdb_stdlog,
6002 "gdbarch_update: info.byte_order %d (%s)\n",
6004 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6005 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6007 fprintf_unfiltered (gdb_stdlog,
6008 "gdbarch_update: info.osabi %d (%s)\n",
6009 info.osabi, gdbarch_osabi_name (info.osabi));
6010 fprintf_unfiltered (gdb_stdlog,
6011 "gdbarch_update: info.abfd 0x%lx\n",
6013 fprintf_unfiltered (gdb_stdlog,
6014 "gdbarch_update: info.tdep_info 0x%lx\n",
6015 (long) info.tdep_info);
6018 /* Find the target that knows about this architecture. */
6019 for (rego = gdbarch_registry;
6022 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6027 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6031 /* Swap the data belonging to the old target out setting the
6032 installed data to zero. This stops the ->init() function trying
6033 to refer to the previous architecture's global data structures. */
6034 swapout_gdbarch_swap (current_gdbarch);
6035 clear_gdbarch_swap (current_gdbarch);
6037 /* Save the previously selected architecture, setting the global to
6038 NULL. This stops ->init() trying to use the previous
6039 architecture's configuration. The previous architecture may not
6040 even be of the same architecture family. The most recent
6041 architecture of the same family is found at the head of the
6042 rego->arches list. */
6043 old_gdbarch = current_gdbarch;
6044 current_gdbarch = NULL;
6046 /* Ask the target for a replacement architecture. */
6047 new_gdbarch = rego->init (info, rego->arches);
6049 /* Did the target like it? No. Reject the change and revert to the
6050 old architecture. */
6051 if (new_gdbarch == NULL)
6054 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6055 swapin_gdbarch_swap (old_gdbarch);
6056 current_gdbarch = old_gdbarch;
6060 /* Did the architecture change? No. Oops, put the old architecture
6062 if (old_gdbarch == new_gdbarch)
6065 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6067 new_gdbarch->bfd_arch_info->printable_name);
6068 swapin_gdbarch_swap (old_gdbarch);
6069 current_gdbarch = old_gdbarch;
6073 /* Is this a pre-existing architecture? Yes. Move it to the front
6074 of the list of architectures (keeping the list sorted Most
6075 Recently Used) and then copy it in. */
6077 struct gdbarch_list **list;
6078 for (list = ®o->arches;
6080 list = &(*list)->next)
6082 if ((*list)->gdbarch == new_gdbarch)
6084 struct gdbarch_list *this;
6086 fprintf_unfiltered (gdb_stdlog,
6087 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6089 new_gdbarch->bfd_arch_info->printable_name);
6092 (*list) = this->next;
6093 /* Insert in the front. */
6094 this->next = rego->arches;
6095 rego->arches = this;
6096 /* Copy the new architecture in. */
6097 current_gdbarch = new_gdbarch;
6098 swapin_gdbarch_swap (new_gdbarch);
6099 architecture_changed_event ();
6105 /* Prepend this new architecture to the architecture list (keep the
6106 list sorted Most Recently Used). */
6108 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6109 this->next = rego->arches;
6110 this->gdbarch = new_gdbarch;
6111 rego->arches = this;
6114 /* Switch to this new architecture marking it initialized. */
6115 current_gdbarch = new_gdbarch;
6116 current_gdbarch->initialized_p = 1;
6119 fprintf_unfiltered (gdb_stdlog,
6120 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6122 new_gdbarch->bfd_arch_info->printable_name);
6125 /* Check that the newly installed architecture is valid. Plug in
6126 any post init values. */
6127 new_gdbarch->dump_tdep = rego->dump_tdep;
6128 verify_gdbarch (new_gdbarch);
6130 /* Initialize the per-architecture memory (swap) areas.
6131 CURRENT_GDBARCH must be update before these modules are
6133 init_gdbarch_swap (new_gdbarch);
6135 /* Initialize the per-architecture data. CURRENT_GDBARCH
6136 must be updated before these modules are called. */
6137 architecture_changed_event ();
6140 gdbarch_dump (current_gdbarch, gdb_stdlog);
6148 /* Pointer to the target-dependent disassembly function. */
6149 int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6151 extern void _initialize_gdbarch (void);
6154 _initialize_gdbarch (void)
6156 struct cmd_list_element *c;
6158 add_show_from_set (add_set_cmd ("arch",
6161 (char *)&gdbarch_debug,
6162 "Set architecture debugging.\n\
6163 When non-zero, architecture debugging is enabled.", &setdebuglist),
6165 c = add_set_cmd ("archdebug",
6168 (char *)&gdbarch_debug,
6169 "Set architecture debugging.\n\
6170 When non-zero, architecture debugging is enabled.", &setlist);
6172 deprecate_cmd (c, "set debug arch");
6173 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");