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. */
71 /* Static function declarations */
73 static void verify_gdbarch (struct gdbarch *gdbarch);
74 static void alloc_gdbarch_data (struct gdbarch *);
75 static void free_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? */
95 /* basic architectural information */
96 const struct bfd_arch_info * bfd_arch_info;
100 /* target specific vector. */
101 struct gdbarch_tdep *tdep;
102 gdbarch_dump_tdep_ftype *dump_tdep;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap *swap;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype *read_pc;
149 gdbarch_write_pc_ftype *write_pc;
150 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
151 gdbarch_read_sp_ftype *read_sp;
152 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
153 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
154 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
155 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
159 int deprecated_fp_regnum;
164 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
165 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
166 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
167 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
168 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
169 gdbarch_register_name_ftype *register_name;
170 int deprecated_register_size;
171 int deprecated_register_bytes;
172 gdbarch_register_byte_ftype *register_byte;
173 gdbarch_register_raw_size_ftype *register_raw_size;
174 int deprecated_max_register_raw_size;
175 gdbarch_register_virtual_size_ftype *register_virtual_size;
176 int deprecated_max_register_virtual_size;
177 gdbarch_register_virtual_type_ftype *register_virtual_type;
178 gdbarch_register_type_ftype *register_type;
179 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
180 gdbarch_print_registers_info_ftype *print_registers_info;
181 gdbarch_print_float_info_ftype *print_float_info;
182 gdbarch_print_vector_info_ftype *print_vector_info;
183 gdbarch_register_sim_regno_ftype *register_sim_regno;
184 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
185 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
186 gdbarch_cannot_store_register_ftype *cannot_store_register;
187 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
188 int deprecated_use_generic_dummy_frames;
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 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
195 LONGEST * deprecated_call_dummy_words;
196 int deprecated_sizeof_call_dummy_words;
197 int deprecated_call_dummy_stack_adjust;
198 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
199 gdbarch_push_dummy_code_ftype *push_dummy_code;
200 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
201 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
202 int believe_pcc_promotion;
203 int believe_pcc_promotion_type;
204 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
205 gdbarch_register_convertible_ftype *register_convertible;
206 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
207 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
208 gdbarch_convert_register_p_ftype *convert_register_p;
209 gdbarch_register_to_value_ftype *register_to_value;
210 gdbarch_value_to_register_ftype *value_to_register;
211 gdbarch_pointer_to_address_ftype *pointer_to_address;
212 gdbarch_address_to_pointer_ftype *address_to_pointer;
213 gdbarch_integer_to_address_ftype *integer_to_address;
214 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
215 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
216 gdbarch_push_dummy_call_ftype *push_dummy_call;
217 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
218 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
219 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
220 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
221 gdbarch_extract_return_value_ftype *extract_return_value;
222 gdbarch_store_return_value_ftype *store_return_value;
223 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
224 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
225 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
226 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
227 gdbarch_use_struct_convention_ftype *use_struct_convention;
228 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
229 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
230 gdbarch_skip_prologue_ftype *skip_prologue;
231 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
232 gdbarch_inner_than_ftype *inner_than;
233 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
234 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
235 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
236 CORE_ADDR decr_pc_after_break;
237 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
238 CORE_ADDR function_start_offset;
239 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
240 CORE_ADDR frame_args_skip;
241 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
242 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
243 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
244 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
245 gdbarch_unwind_pc_ftype *unwind_pc;
246 gdbarch_unwind_sp_ftype *unwind_sp;
247 gdbarch_frame_args_address_ftype *frame_args_address;
248 gdbarch_frame_locals_address_ftype *frame_locals_address;
249 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
250 gdbarch_frame_num_args_ftype *frame_num_args;
251 gdbarch_stack_align_ftype *stack_align;
252 gdbarch_frame_align_ftype *frame_align;
253 int deprecated_extra_stack_alignment_needed;
254 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
255 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
256 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
258 const struct floatformat * float_format;
259 const struct floatformat * double_format;
260 const struct floatformat * long_double_format;
261 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
262 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
263 gdbarch_smash_text_address_ftype *smash_text_address;
264 gdbarch_software_single_step_ftype *software_single_step;
265 gdbarch_print_insn_ftype *print_insn;
266 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
267 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
268 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
269 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
270 gdbarch_sigtramp_start_ftype *sigtramp_start;
271 gdbarch_sigtramp_end_ftype *sigtramp_end;
272 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
273 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
274 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
275 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
276 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
277 const char * name_of_malloc;
278 int cannot_step_breakpoint;
279 int have_nonsteppable_watchpoint;
280 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
281 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
282 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
283 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
284 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
288 /* The default architecture uses host values (for want of a better
291 extern const struct bfd_arch_info bfd_default_arch_struct;
293 struct gdbarch startup_gdbarch =
295 1, /* Always initialized. */
296 /* basic architecture information */
297 &bfd_default_arch_struct, /* bfd_arch_info */
298 BFD_ENDIAN_BIG, /* byte_order */
299 GDB_OSABI_UNKNOWN, /* osabi */
300 /* target specific vector and its dump routine */
302 /*per-architecture data-pointers and swap regions */
304 /* Multi-arch values */
305 8 * sizeof (short), /* short_bit */
306 8 * sizeof (int), /* int_bit */
307 8 * sizeof (long), /* long_bit */
308 8 * sizeof (LONGEST), /* long_long_bit */
309 8 * sizeof (float), /* float_bit */
310 8 * sizeof (double), /* double_bit */
311 8 * sizeof (long double), /* long_double_bit */
312 8 * sizeof (void*), /* ptr_bit */
313 8 * sizeof (void*), /* addr_bit */
314 8 * sizeof (void*), /* bfd_vma_bit */
318 0, /* deprecated_target_read_fp */
320 0, /* deprecated_dummy_write_sp */
321 0, /* virtual_frame_pointer */
322 0, /* pseudo_register_read */
323 0, /* pseudo_register_write */
325 0, /* num_pseudo_regs */
327 -1, /* deprecated_fp_regnum */
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, /* deprecated_register_size */
339 0, /* deprecated_register_bytes */
340 generic_register_byte, /* register_byte */
341 generic_register_size, /* register_raw_size */
342 0, /* deprecated_max_register_raw_size */
343 generic_register_size, /* register_virtual_size */
344 0, /* deprecated_max_register_virtual_size */
345 0, /* register_virtual_type */
346 0, /* register_type */
347 0, /* deprecated_do_registers_info */
348 default_print_registers_info, /* print_registers_info */
349 0, /* print_float_info */
350 0, /* print_vector_info */
351 0, /* register_sim_regno */
352 0, /* register_bytes_ok */
353 0, /* cannot_fetch_register */
354 0, /* cannot_store_register */
355 0, /* get_longjmp_target */
356 0, /* deprecated_use_generic_dummy_frames */
357 0, /* call_dummy_location */
358 0, /* call_dummy_address */
359 0, /* deprecated_call_dummy_start_offset */
360 0, /* deprecated_call_dummy_breakpoint_offset */
361 0, /* deprecated_call_dummy_length */
362 generic_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
363 0, /* deprecated_call_dummy_words */
364 0, /* deprecated_sizeof_call_dummy_words */
365 0, /* deprecated_call_dummy_stack_adjust */
366 0, /* deprecated_fix_call_dummy */
367 0, /* push_dummy_code */
368 0, /* deprecated_init_frame_pc_first */
369 0, /* deprecated_init_frame_pc */
370 0, /* believe_pcc_promotion */
371 0, /* believe_pcc_promotion_type */
372 0, /* deprecated_get_saved_register */
373 0, /* register_convertible */
374 0, /* register_convert_to_virtual */
375 0, /* register_convert_to_raw */
376 0, /* convert_register_p */
377 0, /* register_to_value */
378 0, /* value_to_register */
379 0, /* pointer_to_address */
380 0, /* address_to_pointer */
381 0, /* integer_to_address */
382 0, /* return_value_on_stack */
383 0, /* deprecated_push_arguments */
384 0, /* push_dummy_call */
385 0, /* deprecated_push_dummy_frame */
386 0, /* deprecated_push_return_address */
387 0, /* deprecated_pop_frame */
388 0, /* deprecated_store_struct_return */
389 0, /* extract_return_value */
390 0, /* store_return_value */
391 0, /* deprecated_extract_return_value */
392 0, /* deprecated_store_return_value */
393 0, /* extract_struct_value_address */
394 0, /* deprecated_extract_struct_value_address */
395 0, /* use_struct_convention */
396 0, /* deprecated_frame_init_saved_regs */
397 0, /* deprecated_init_extra_frame_info */
398 0, /* skip_prologue */
399 0, /* prologue_frameless_p */
401 0, /* breakpoint_from_pc */
402 0, /* memory_insert_breakpoint */
403 0, /* memory_remove_breakpoint */
404 0, /* decr_pc_after_break */
405 0, /* prepare_to_proceed */
406 0, /* function_start_offset */
407 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
408 0, /* frame_args_skip */
409 0, /* frameless_function_invocation */
410 0, /* deprecated_frame_chain */
411 0, /* deprecated_frame_chain_valid */
412 0, /* deprecated_frame_saved_pc */
415 0, /* frame_args_address */
416 0, /* frame_locals_address */
417 0, /* deprecated_saved_pc_after_call */
418 0, /* frame_num_args */
421 0, /* deprecated_extra_stack_alignment_needed */
422 0, /* reg_struct_has_addr */
423 0, /* save_dummy_frame_tos */
424 0, /* unwind_dummy_id */
425 0, /* parm_boundary */
426 0, /* float_format */
427 0, /* double_format */
428 0, /* long_double_format */
429 0, /* convert_from_func_ptr_addr */
430 0, /* addr_bits_remove */
431 0, /* smash_text_address */
432 0, /* software_single_step */
434 0, /* skip_trampoline_code */
435 0, /* in_solib_call_trampoline */
436 0, /* in_solib_return_trampoline */
437 0, /* pc_in_sigtramp */
438 0, /* sigtramp_start */
439 0, /* sigtramp_end */
440 generic_in_function_epilogue_p, /* in_function_epilogue_p */
441 construct_inferior_arguments, /* construct_inferior_arguments */
442 0, /* dwarf2_build_frame_info */
443 0, /* elf_make_msymbol_special */
444 0, /* coff_make_msymbol_special */
445 "malloc", /* name_of_malloc */
446 0, /* cannot_step_breakpoint */
447 0, /* have_nonsteppable_watchpoint */
448 0, /* address_class_type_flags */
449 0, /* address_class_type_flags_to_name */
450 0, /* address_class_name_to_type_flags */
451 default_register_reggroup_p, /* register_reggroup_p */
452 0, /* fetch_pointer_argument */
453 /* startup_gdbarch() */
456 struct gdbarch *current_gdbarch = &startup_gdbarch;
458 /* Do any initialization needed for a non-multiarch configuration
459 after the _initialize_MODULE functions have been run. */
461 initialize_non_multiarch (void)
463 alloc_gdbarch_data (&startup_gdbarch);
464 /* Ensure that all swap areas are zeroed so that they again think
465 they are starting from scratch. */
466 clear_gdbarch_swap (&startup_gdbarch);
467 init_gdbarch_swap (&startup_gdbarch);
471 /* Create a new ``struct gdbarch'' based on information provided by
472 ``struct gdbarch_info''. */
475 gdbarch_alloc (const struct gdbarch_info *info,
476 struct gdbarch_tdep *tdep)
478 /* NOTE: The new architecture variable is named ``current_gdbarch''
479 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
480 the current local architecture and not the previous global
481 architecture. This ensures that the new architectures initial
482 values are not influenced by the previous architecture. Once
483 everything is parameterised with gdbarch, this will go away. */
484 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
485 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
487 alloc_gdbarch_data (current_gdbarch);
489 current_gdbarch->tdep = tdep;
491 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
492 current_gdbarch->byte_order = info->byte_order;
493 current_gdbarch->osabi = info->osabi;
495 /* Force the explicit initialization of these. */
496 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
497 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
498 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
499 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
500 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
501 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
502 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
503 current_gdbarch->ptr_bit = TARGET_INT_BIT;
504 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
505 current_gdbarch->char_signed = -1;
506 current_gdbarch->write_pc = generic_target_write_pc;
507 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
508 current_gdbarch->num_regs = -1;
509 current_gdbarch->sp_regnum = -1;
510 current_gdbarch->deprecated_fp_regnum = -1;
511 current_gdbarch->pc_regnum = -1;
512 current_gdbarch->ps_regnum = -1;
513 current_gdbarch->fp0_regnum = -1;
514 current_gdbarch->npc_regnum = -1;
515 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
517 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
518 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
519 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
520 current_gdbarch->register_name = legacy_register_name;
521 current_gdbarch->register_byte = generic_register_byte;
522 current_gdbarch->register_raw_size = generic_register_size;
523 current_gdbarch->register_virtual_size = generic_register_size;
524 current_gdbarch->print_registers_info = default_print_registers_info;
525 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
526 current_gdbarch->cannot_fetch_register = cannot_register_not;
527 current_gdbarch->cannot_store_register = cannot_register_not;
528 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
529 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
530 current_gdbarch->call_dummy_address = entry_point_address;
531 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
532 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
533 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
534 current_gdbarch->register_convertible = generic_register_convertible_not;
535 current_gdbarch->convert_register_p = legacy_convert_register_p;
536 current_gdbarch->register_to_value = legacy_register_to_value;
537 current_gdbarch->value_to_register = legacy_value_to_register;
538 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
539 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
540 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
541 current_gdbarch->extract_return_value = legacy_extract_return_value;
542 current_gdbarch->store_return_value = legacy_store_return_value;
543 current_gdbarch->use_struct_convention = generic_use_struct_convention;
544 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
545 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
546 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
547 current_gdbarch->decr_pc_after_break = -1;
548 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
549 current_gdbarch->function_start_offset = -1;
550 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
551 current_gdbarch->frame_args_skip = -1;
552 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
553 current_gdbarch->frame_args_address = get_frame_base;
554 current_gdbarch->frame_locals_address = get_frame_base;
555 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
556 current_gdbarch->addr_bits_remove = core_addr_identity;
557 current_gdbarch->smash_text_address = core_addr_identity;
558 current_gdbarch->print_insn = legacy_print_insn;
559 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
560 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
561 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
562 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
563 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
564 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
565 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
566 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
567 current_gdbarch->name_of_malloc = "malloc";
568 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
569 /* gdbarch_alloc() */
571 return current_gdbarch;
575 /* Free a gdbarch struct. This should never happen in normal
576 operation --- once you've created a gdbarch, you keep it around.
577 However, if an architecture's init function encounters an error
578 building the structure, it may need to clean up a partially
579 constructed gdbarch. */
582 gdbarch_free (struct gdbarch *arch)
584 gdb_assert (arch != NULL);
585 free_gdbarch_data (arch);
590 /* Ensure that all values in a GDBARCH are reasonable. */
593 verify_gdbarch (struct gdbarch *gdbarch)
596 struct cleanup *cleanups;
599 /* Only perform sanity checks on a multi-arch target. */
602 log = mem_fileopen ();
603 cleanups = make_cleanup_ui_file_delete (log);
605 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
606 fprintf_unfiltered (log, "\n\tbyte-order");
607 if (gdbarch->bfd_arch_info == NULL)
608 fprintf_unfiltered (log, "\n\tbfd_arch_info");
609 /* Check those that need to be defined for the given multi-arch level. */
610 /* Skip verify of short_bit, invalid_p == 0 */
611 /* Skip verify of int_bit, invalid_p == 0 */
612 /* Skip verify of long_bit, invalid_p == 0 */
613 /* Skip verify of long_long_bit, invalid_p == 0 */
614 /* Skip verify of float_bit, invalid_p == 0 */
615 /* Skip verify of double_bit, invalid_p == 0 */
616 /* Skip verify of long_double_bit, invalid_p == 0 */
617 /* Skip verify of ptr_bit, invalid_p == 0 */
618 if (gdbarch->addr_bit == 0)
619 gdbarch->addr_bit = TARGET_PTR_BIT;
620 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
621 if (gdbarch->char_signed == -1)
622 gdbarch->char_signed = 1;
623 /* Skip verify of read_pc, has predicate */
624 /* Skip verify of write_pc, invalid_p == 0 */
625 /* Skip verify of deprecated_target_read_fp, has predicate */
626 /* Skip verify of read_sp, has predicate */
627 /* Skip verify of deprecated_dummy_write_sp, has predicate */
628 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
629 /* Skip verify of pseudo_register_read, has predicate */
630 /* Skip verify of pseudo_register_write, has predicate */
631 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
632 && (gdbarch->num_regs == -1))
633 fprintf_unfiltered (log, "\n\tnum_regs");
634 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
635 /* Skip verify of sp_regnum, invalid_p == 0 */
636 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
637 /* Skip verify of pc_regnum, invalid_p == 0 */
638 /* Skip verify of ps_regnum, invalid_p == 0 */
639 /* Skip verify of fp0_regnum, invalid_p == 0 */
640 /* Skip verify of npc_regnum, invalid_p == 0 */
641 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
642 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
643 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
645 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
646 /* Skip verify of register_name, invalid_p == 0 */
647 /* Skip verify of register_byte, has predicate */
648 /* Skip verify of register_raw_size, invalid_p == 0 */
649 /* Skip verify of deprecated_max_register_raw_size, has predicate */
650 /* Skip verify of register_virtual_size, invalid_p == 0 */
651 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
652 /* Skip verify of register_virtual_type, has predicate */
653 /* Skip verify of register_type, has predicate */
654 /* Skip verify of deprecated_do_registers_info, has predicate */
655 /* Skip verify of print_registers_info, invalid_p == 0 */
656 /* Skip verify of print_float_info, has predicate */
657 /* Skip verify of print_vector_info, has predicate */
658 /* Skip verify of register_sim_regno, invalid_p == 0 */
659 /* Skip verify of register_bytes_ok, has predicate */
660 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
661 /* Skip verify of cannot_store_register, invalid_p == 0 */
662 /* Skip verify of get_longjmp_target, has predicate */
663 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
664 /* Skip verify of call_dummy_location, invalid_p == 0 */
665 /* Skip verify of call_dummy_address, invalid_p == 0 */
666 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
667 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
668 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
669 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
670 /* Skip verify of deprecated_fix_call_dummy, has predicate */
671 /* Skip verify of push_dummy_code, has predicate */
672 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
673 /* Skip verify of deprecated_init_frame_pc, has predicate */
674 /* Skip verify of deprecated_get_saved_register, has predicate */
675 /* Skip verify of register_convertible, invalid_p == 0 */
676 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
677 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
678 /* Skip verify of convert_register_p, invalid_p == 0 */
679 /* Skip verify of register_to_value, invalid_p == 0 */
680 /* Skip verify of value_to_register, invalid_p == 0 */
681 /* Skip verify of pointer_to_address, invalid_p == 0 */
682 /* Skip verify of address_to_pointer, invalid_p == 0 */
683 /* Skip verify of integer_to_address, has predicate */
684 /* Skip verify of return_value_on_stack, invalid_p == 0 */
685 /* Skip verify of deprecated_push_arguments, has predicate */
686 /* Skip verify of push_dummy_call, has predicate */
687 /* Skip verify of deprecated_push_dummy_frame, has predicate */
688 /* Skip verify of deprecated_push_return_address, has predicate */
689 /* Skip verify of deprecated_pop_frame, has predicate */
690 /* Skip verify of deprecated_store_struct_return, has predicate */
691 /* Skip verify of extract_return_value, invalid_p == 0 */
692 /* Skip verify of store_return_value, invalid_p == 0 */
693 /* Skip verify of extract_struct_value_address, has predicate */
694 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
695 /* Skip verify of use_struct_convention, invalid_p == 0 */
696 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
697 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
698 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
699 && (gdbarch->skip_prologue == 0))
700 fprintf_unfiltered (log, "\n\tskip_prologue");
701 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
702 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
703 && (gdbarch->inner_than == 0))
704 fprintf_unfiltered (log, "\n\tinner_than");
705 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
706 && (gdbarch->breakpoint_from_pc == 0))
707 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
708 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
709 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
710 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
711 && (gdbarch->decr_pc_after_break == -1))
712 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
713 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
714 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
715 && (gdbarch->function_start_offset == -1))
716 fprintf_unfiltered (log, "\n\tfunction_start_offset");
717 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
719 && (gdbarch->frame_args_skip == -1))
720 fprintf_unfiltered (log, "\n\tframe_args_skip");
721 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
722 /* Skip verify of deprecated_frame_chain, has predicate */
723 /* Skip verify of deprecated_frame_chain_valid, has predicate */
724 /* Skip verify of deprecated_frame_saved_pc, has predicate */
725 /* Skip verify of unwind_pc, has predicate */
726 /* Skip verify of unwind_sp, has predicate */
727 /* Skip verify of frame_args_address, invalid_p == 0 */
728 /* Skip verify of frame_locals_address, invalid_p == 0 */
729 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
730 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
731 && (gdbarch->frame_num_args == 0))
732 fprintf_unfiltered (log, "\n\tframe_num_args");
733 /* Skip verify of stack_align, has predicate */
734 /* Skip verify of frame_align, has predicate */
735 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
736 /* Skip verify of reg_struct_has_addr, has predicate */
737 /* Skip verify of save_dummy_frame_tos, has predicate */
738 /* Skip verify of unwind_dummy_id, has predicate */
739 if (gdbarch->float_format == 0)
740 gdbarch->float_format = default_float_format (gdbarch);
741 if (gdbarch->double_format == 0)
742 gdbarch->double_format = default_double_format (gdbarch);
743 if (gdbarch->long_double_format == 0)
744 gdbarch->long_double_format = default_double_format (gdbarch);
745 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
746 /* Skip verify of addr_bits_remove, invalid_p == 0 */
747 /* Skip verify of smash_text_address, invalid_p == 0 */
748 /* Skip verify of software_single_step, has predicate */
749 /* Skip verify of print_insn, invalid_p == 0 */
750 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
751 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
752 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
753 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
754 /* Skip verify of sigtramp_start, has predicate */
755 /* Skip verify of sigtramp_end, has predicate */
756 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
757 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
758 /* Skip verify of dwarf2_build_frame_info, has predicate */
759 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
760 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
761 /* Skip verify of name_of_malloc, invalid_p == 0 */
762 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
763 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
764 /* Skip verify of address_class_type_flags, has predicate */
765 /* Skip verify of address_class_type_flags_to_name, has predicate */
766 /* Skip verify of address_class_name_to_type_flags, has predicate */
767 /* Skip verify of register_reggroup_p, invalid_p == 0 */
768 /* Skip verify of fetch_pointer_argument, has predicate */
769 buf = ui_file_xstrdup (log, &dummy);
770 make_cleanup (xfree, buf);
771 if (strlen (buf) > 0)
772 internal_error (__FILE__, __LINE__,
773 "verify_gdbarch: the following are invalid ...%s",
775 do_cleanups (cleanups);
779 /* Print out the details of the current architecture. */
781 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
782 just happens to match the global variable ``current_gdbarch''. That
783 way macros refering to that variable get the local and not the global
784 version - ulgh. Once everything is parameterised with gdbarch, this
788 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
790 fprintf_unfiltered (file,
791 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
794 fprintf_unfiltered (file,
795 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
796 gdbarch_frame_align_p (current_gdbarch));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: frame_align = 0x%08lx\n",
800 (long) current_gdbarch->frame_align);
802 fprintf_unfiltered (file,
803 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
804 (long) current_gdbarch->in_function_epilogue_p);
806 fprintf_unfiltered (file,
807 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
808 (long) current_gdbarch->register_reggroup_p);
810 fprintf_unfiltered (file,
811 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
812 gdbarch_pseudo_register_read_p (current_gdbarch));
814 fprintf_unfiltered (file,
815 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
816 (long) current_gdbarch->pseudo_register_read);
818 fprintf_unfiltered (file,
819 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
820 gdbarch_pseudo_register_write_p (current_gdbarch));
822 fprintf_unfiltered (file,
823 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
824 (long) current_gdbarch->pseudo_register_write);
826 fprintf_unfiltered (file,
827 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
828 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
830 fprintf_unfiltered (file,
831 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
832 (long) current_gdbarch->address_class_name_to_type_flags);
833 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
834 fprintf_unfiltered (file,
835 "gdbarch_dump: %s # %s\n",
836 "ADDRESS_CLASS_TYPE_FLAGS_P()",
837 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
838 fprintf_unfiltered (file,
839 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
840 ADDRESS_CLASS_TYPE_FLAGS_P ());
842 #ifdef ADDRESS_CLASS_TYPE_FLAGS
843 fprintf_unfiltered (file,
844 "gdbarch_dump: %s # %s\n",
845 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
846 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
848 fprintf_unfiltered (file,
849 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
850 (long) current_gdbarch->address_class_type_flags
851 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
854 fprintf_unfiltered (file,
855 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
856 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
858 fprintf_unfiltered (file,
859 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
860 (long) current_gdbarch->address_class_type_flags_to_name);
861 #ifdef ADDRESS_TO_POINTER
863 /* Macro might contain `[{}]' when not multi-arch */
864 fprintf_unfiltered (file,
865 "gdbarch_dump: %s # %s\n",
866 "ADDRESS_TO_POINTER(type, buf, addr)",
867 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
870 fprintf_unfiltered (file,
871 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
872 (long) current_gdbarch->address_to_pointer
873 /*ADDRESS_TO_POINTER ()*/);
875 #ifdef ADDR_BITS_REMOVE
876 fprintf_unfiltered (file,
877 "gdbarch_dump: %s # %s\n",
878 "ADDR_BITS_REMOVE(addr)",
879 XSTRING (ADDR_BITS_REMOVE (addr)));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
883 (long) current_gdbarch->addr_bits_remove
884 /*ADDR_BITS_REMOVE ()*/);
886 #ifdef BELIEVE_PCC_PROMOTION
887 fprintf_unfiltered (file,
888 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
889 XSTRING (BELIEVE_PCC_PROMOTION));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
892 BELIEVE_PCC_PROMOTION);
894 #ifdef BELIEVE_PCC_PROMOTION_TYPE
895 fprintf_unfiltered (file,
896 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
897 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
900 BELIEVE_PCC_PROMOTION_TYPE);
902 #ifdef BREAKPOINT_FROM_PC
903 fprintf_unfiltered (file,
904 "gdbarch_dump: %s # %s\n",
905 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
906 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
908 fprintf_unfiltered (file,
909 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
910 (long) current_gdbarch->breakpoint_from_pc
911 /*BREAKPOINT_FROM_PC ()*/);
913 #ifdef CALL_DUMMY_ADDRESS
914 fprintf_unfiltered (file,
915 "gdbarch_dump: %s # %s\n",
916 "CALL_DUMMY_ADDRESS()",
917 XSTRING (CALL_DUMMY_ADDRESS ()));
919 fprintf_unfiltered (file,
920 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
921 (long) current_gdbarch->call_dummy_address
922 /*CALL_DUMMY_ADDRESS ()*/);
924 #ifdef CALL_DUMMY_LOCATION
925 fprintf_unfiltered (file,
926 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
927 XSTRING (CALL_DUMMY_LOCATION));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
930 CALL_DUMMY_LOCATION);
932 #ifdef CANNOT_FETCH_REGISTER
933 fprintf_unfiltered (file,
934 "gdbarch_dump: %s # %s\n",
935 "CANNOT_FETCH_REGISTER(regnum)",
936 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
938 fprintf_unfiltered (file,
939 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
940 (long) current_gdbarch->cannot_fetch_register
941 /*CANNOT_FETCH_REGISTER ()*/);
943 #ifdef CANNOT_STEP_BREAKPOINT
944 fprintf_unfiltered (file,
945 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
946 XSTRING (CANNOT_STEP_BREAKPOINT));
947 fprintf_unfiltered (file,
948 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
949 CANNOT_STEP_BREAKPOINT);
951 #ifdef CANNOT_STORE_REGISTER
952 fprintf_unfiltered (file,
953 "gdbarch_dump: %s # %s\n",
954 "CANNOT_STORE_REGISTER(regnum)",
955 XSTRING (CANNOT_STORE_REGISTER (regnum)));
957 fprintf_unfiltered (file,
958 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
959 (long) current_gdbarch->cannot_store_register
960 /*CANNOT_STORE_REGISTER ()*/);
962 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
964 /* Macro might contain `[{}]' when not multi-arch */
965 fprintf_unfiltered (file,
966 "gdbarch_dump: %s # %s\n",
967 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
968 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
973 (long) current_gdbarch->coff_make_msymbol_special
974 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
977 fprintf_unfiltered (file,
978 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
979 (long) current_gdbarch->construct_inferior_arguments);
980 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
981 fprintf_unfiltered (file,
982 "gdbarch_dump: %s # %s\n",
983 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
984 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
988 (long) current_gdbarch->convert_from_func_ptr_addr
989 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
991 #ifdef CONVERT_REGISTER_P
992 fprintf_unfiltered (file,
993 "gdbarch_dump: %s # %s\n",
994 "CONVERT_REGISTER_P(regnum)",
995 XSTRING (CONVERT_REGISTER_P (regnum)));
997 fprintf_unfiltered (file,
998 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
999 (long) current_gdbarch->convert_register_p
1000 /*CONVERT_REGISTER_P ()*/);
1002 #ifdef DECR_PC_AFTER_BREAK
1003 fprintf_unfiltered (file,
1004 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1005 XSTRING (DECR_PC_AFTER_BREAK));
1006 fprintf_unfiltered (file,
1007 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1008 (long) DECR_PC_AFTER_BREAK);
1010 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1013 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1016 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
1018 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1021 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1024 DEPRECATED_CALL_DUMMY_LENGTH);
1026 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: %s # %s\n",
1029 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1030 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1031 fprintf_unfiltered (file,
1032 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1033 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1035 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1038 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1041 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1043 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1046 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1049 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
1051 #ifdef DEPRECATED_CALL_DUMMY_WORDS
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1054 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1057 (long) DEPRECATED_CALL_DUMMY_WORDS);
1059 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1060 fprintf_unfiltered (file,
1061 "gdbarch_dump: %s # %s\n",
1062 "DEPRECATED_DO_REGISTERS_INFO_P()",
1063 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1066 DEPRECATED_DO_REGISTERS_INFO_P ());
1068 #ifdef DEPRECATED_DO_REGISTERS_INFO
1070 /* Macro might contain `[{}]' when not multi-arch */
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: %s # %s\n",
1073 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1074 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1079 (long) current_gdbarch->deprecated_do_registers_info
1080 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1082 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: %s # %s\n",
1085 "DEPRECATED_DUMMY_WRITE_SP_P()",
1086 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1087 fprintf_unfiltered (file,
1088 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1089 DEPRECATED_DUMMY_WRITE_SP_P ());
1091 #ifdef DEPRECATED_DUMMY_WRITE_SP
1093 /* Macro might contain `[{}]' when not multi-arch */
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: %s # %s\n",
1096 "DEPRECATED_DUMMY_WRITE_SP(val)",
1097 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1102 (long) current_gdbarch->deprecated_dummy_write_sp
1103 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1105 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1107 /* Macro might contain `[{}]' when not multi-arch */
1108 fprintf_unfiltered (file,
1109 "gdbarch_dump: %s # %s\n",
1110 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1111 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1114 fprintf_unfiltered (file,
1115 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1116 (long) current_gdbarch->deprecated_extract_return_value
1117 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1119 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: %s # %s\n",
1122 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1123 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1124 fprintf_unfiltered (file,
1125 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1126 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1128 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: %s # %s\n",
1131 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1132 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1136 (long) current_gdbarch->deprecated_extract_struct_value_address
1137 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1139 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1142 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1143 fprintf_unfiltered (file,
1144 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1145 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1147 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1148 fprintf_unfiltered (file,
1149 "gdbarch_dump: %s # %s\n",
1150 "DEPRECATED_FIX_CALL_DUMMY_P()",
1151 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1154 DEPRECATED_FIX_CALL_DUMMY_P ());
1156 #ifdef DEPRECATED_FIX_CALL_DUMMY
1158 /* Macro might contain `[{}]' when not multi-arch */
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: %s # %s\n",
1161 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1162 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1167 (long) current_gdbarch->deprecated_fix_call_dummy
1168 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1170 #ifdef DEPRECATED_FP_REGNUM
1171 fprintf_unfiltered (file,
1172 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1173 XSTRING (DEPRECATED_FP_REGNUM));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1176 DEPRECATED_FP_REGNUM);
1178 #ifdef DEPRECATED_FRAME_CHAIN_P
1179 fprintf_unfiltered (file,
1180 "gdbarch_dump: %s # %s\n",
1181 "DEPRECATED_FRAME_CHAIN_P()",
1182 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1185 DEPRECATED_FRAME_CHAIN_P ());
1187 #ifdef DEPRECATED_FRAME_CHAIN
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: %s # %s\n",
1190 "DEPRECATED_FRAME_CHAIN(frame)",
1191 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1195 (long) current_gdbarch->deprecated_frame_chain
1196 /*DEPRECATED_FRAME_CHAIN ()*/);
1198 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: %s # %s\n",
1201 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1202 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1205 DEPRECATED_FRAME_CHAIN_VALID_P ());
1207 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: %s # %s\n",
1210 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1211 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1215 (long) current_gdbarch->deprecated_frame_chain_valid
1216 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1218 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: %s # %s\n",
1221 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1222 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1225 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1227 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1229 /* Macro might contain `[{}]' when not multi-arch */
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: %s # %s\n",
1232 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1233 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1238 (long) current_gdbarch->deprecated_frame_init_saved_regs
1239 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1241 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1242 fprintf_unfiltered (file,
1243 "gdbarch_dump: %s # %s\n",
1244 "DEPRECATED_FRAME_SAVED_PC_P()",
1245 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1246 fprintf_unfiltered (file,
1247 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1248 DEPRECATED_FRAME_SAVED_PC_P ());
1250 #ifdef DEPRECATED_FRAME_SAVED_PC
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: %s # %s\n",
1253 "DEPRECATED_FRAME_SAVED_PC(fi)",
1254 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1258 (long) current_gdbarch->deprecated_frame_saved_pc
1259 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1261 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: %s # %s\n",
1264 "DEPRECATED_GET_SAVED_REGISTER_P()",
1265 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1268 DEPRECATED_GET_SAVED_REGISTER_P ());
1270 #ifdef DEPRECATED_GET_SAVED_REGISTER
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: %s # %s\n",
1275 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1276 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1281 (long) current_gdbarch->deprecated_get_saved_register
1282 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1284 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1285 fprintf_unfiltered (file,
1286 "gdbarch_dump: %s # %s\n",
1287 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1288 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1291 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1293 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1295 /* Macro might contain `[{}]' when not multi-arch */
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: %s # %s\n",
1298 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1299 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1304 (long) current_gdbarch->deprecated_init_extra_frame_info
1305 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1307 #ifdef DEPRECATED_INIT_FRAME_PC_P
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: %s # %s\n",
1310 "DEPRECATED_INIT_FRAME_PC_P()",
1311 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1314 DEPRECATED_INIT_FRAME_PC_P ());
1316 #ifdef DEPRECATED_INIT_FRAME_PC
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: %s # %s\n",
1319 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1320 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1324 (long) current_gdbarch->deprecated_init_frame_pc
1325 /*DEPRECATED_INIT_FRAME_PC ()*/);
1327 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: %s # %s\n",
1330 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1331 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1332 fprintf_unfiltered (file,
1333 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1334 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1336 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1337 fprintf_unfiltered (file,
1338 "gdbarch_dump: %s # %s\n",
1339 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1340 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1344 (long) current_gdbarch->deprecated_init_frame_pc_first
1345 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1347 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: %s # %s\n",
1350 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1351 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1354 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1356 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1359 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1362 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1364 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: %s # %s\n",
1367 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1368 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1371 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1373 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1374 fprintf_unfiltered (file,
1375 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1376 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1379 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1381 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: %s # %s\n",
1384 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1385 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1388 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1390 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: %s # %s\n",
1393 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1394 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1396 fprintf_unfiltered (file,
1397 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1398 (long) current_gdbarch->deprecated_pc_in_call_dummy
1399 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1401 #ifdef DEPRECATED_POP_FRAME_P
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: %s # %s\n",
1404 "DEPRECATED_POP_FRAME_P()",
1405 XSTRING (DEPRECATED_POP_FRAME_P ()));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1408 DEPRECATED_POP_FRAME_P ());
1410 #ifdef DEPRECATED_POP_FRAME
1412 /* Macro might contain `[{}]' when not multi-arch */
1413 fprintf_unfiltered (file,
1414 "gdbarch_dump: %s # %s\n",
1415 "DEPRECATED_POP_FRAME(-)",
1416 XSTRING (DEPRECATED_POP_FRAME (-)));
1419 fprintf_unfiltered (file,
1420 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1421 (long) current_gdbarch->deprecated_pop_frame
1422 /*DEPRECATED_POP_FRAME ()*/);
1424 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1425 fprintf_unfiltered (file,
1426 "gdbarch_dump: %s # %s\n",
1427 "DEPRECATED_PUSH_ARGUMENTS_P()",
1428 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1429 fprintf_unfiltered (file,
1430 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1431 DEPRECATED_PUSH_ARGUMENTS_P ());
1433 #ifdef DEPRECATED_PUSH_ARGUMENTS
1434 fprintf_unfiltered (file,
1435 "gdbarch_dump: %s # %s\n",
1436 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1437 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1441 (long) current_gdbarch->deprecated_push_arguments
1442 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1444 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1445 fprintf_unfiltered (file,
1446 "gdbarch_dump: %s # %s\n",
1447 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1448 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1449 fprintf_unfiltered (file,
1450 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1451 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1453 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1455 /* Macro might contain `[{}]' when not multi-arch */
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: %s # %s\n",
1458 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1459 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1464 (long) current_gdbarch->deprecated_push_dummy_frame
1465 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1467 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1468 fprintf_unfiltered (file,
1469 "gdbarch_dump: %s # %s\n",
1470 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1471 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1474 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1476 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: %s # %s\n",
1479 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1480 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1484 (long) current_gdbarch->deprecated_push_return_address
1485 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1487 #ifdef DEPRECATED_REGISTER_BYTES
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1490 XSTRING (DEPRECATED_REGISTER_BYTES));
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1493 DEPRECATED_REGISTER_BYTES);
1495 #ifdef DEPRECATED_REGISTER_SIZE
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1498 XSTRING (DEPRECATED_REGISTER_SIZE));
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1501 DEPRECATED_REGISTER_SIZE);
1503 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1504 fprintf_unfiltered (file,
1505 "gdbarch_dump: %s # %s\n",
1506 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1507 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1510 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1512 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: %s # %s\n",
1515 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1516 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1520 (long) current_gdbarch->deprecated_saved_pc_after_call
1521 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1523 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1524 fprintf_unfiltered (file,
1525 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1526 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1529 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1531 #ifdef DEPRECATED_STORE_RETURN_VALUE
1533 /* Macro might contain `[{}]' when not multi-arch */
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: %s # %s\n",
1536 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1537 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1540 fprintf_unfiltered (file,
1541 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1542 (long) current_gdbarch->deprecated_store_return_value
1543 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1545 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: %s # %s\n",
1548 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1549 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1550 fprintf_unfiltered (file,
1551 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1552 DEPRECATED_STORE_STRUCT_RETURN_P ());
1554 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1556 /* Macro might contain `[{}]' when not multi-arch */
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1560 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1563 fprintf_unfiltered (file,
1564 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1565 (long) current_gdbarch->deprecated_store_struct_return
1566 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1568 #ifdef DEPRECATED_TARGET_READ_FP_P
1569 fprintf_unfiltered (file,
1570 "gdbarch_dump: %s # %s\n",
1571 "DEPRECATED_TARGET_READ_FP_P()",
1572 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1575 DEPRECATED_TARGET_READ_FP_P ());
1577 #ifdef DEPRECATED_TARGET_READ_FP
1578 fprintf_unfiltered (file,
1579 "gdbarch_dump: %s # %s\n",
1580 "DEPRECATED_TARGET_READ_FP()",
1581 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1585 (long) current_gdbarch->deprecated_target_read_fp
1586 /*DEPRECATED_TARGET_READ_FP ()*/);
1588 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1591 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1594 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1596 #ifdef DWARF2_BUILD_FRAME_INFO_P
1597 fprintf_unfiltered (file,
1598 "gdbarch_dump: %s # %s\n",
1599 "DWARF2_BUILD_FRAME_INFO_P()",
1600 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1603 DWARF2_BUILD_FRAME_INFO_P ());
1605 #ifdef DWARF2_BUILD_FRAME_INFO
1607 /* Macro might contain `[{}]' when not multi-arch */
1608 fprintf_unfiltered (file,
1609 "gdbarch_dump: %s # %s\n",
1610 "DWARF2_BUILD_FRAME_INFO(objfile)",
1611 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1616 (long) current_gdbarch->dwarf2_build_frame_info
1617 /*DWARF2_BUILD_FRAME_INFO ()*/);
1619 #ifdef DWARF2_REG_TO_REGNUM
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: %s # %s\n",
1622 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1623 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1627 (long) current_gdbarch->dwarf2_reg_to_regnum
1628 /*DWARF2_REG_TO_REGNUM ()*/);
1630 #ifdef DWARF_REG_TO_REGNUM
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: %s # %s\n",
1633 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1634 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1638 (long) current_gdbarch->dwarf_reg_to_regnum
1639 /*DWARF_REG_TO_REGNUM ()*/);
1641 #ifdef ECOFF_REG_TO_REGNUM
1642 fprintf_unfiltered (file,
1643 "gdbarch_dump: %s # %s\n",
1644 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1645 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1649 (long) current_gdbarch->ecoff_reg_to_regnum
1650 /*ECOFF_REG_TO_REGNUM ()*/);
1652 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1654 /* Macro might contain `[{}]' when not multi-arch */
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: %s # %s\n",
1657 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1658 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1663 (long) current_gdbarch->elf_make_msymbol_special
1664 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1666 #ifdef EXTRACT_RETURN_VALUE
1668 /* Macro might contain `[{}]' when not multi-arch */
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: %s # %s\n",
1671 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1672 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1677 (long) current_gdbarch->extract_return_value
1678 /*EXTRACT_RETURN_VALUE ()*/);
1680 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: %s # %s\n",
1683 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1684 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1685 fprintf_unfiltered (file,
1686 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1687 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1689 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1690 fprintf_unfiltered (file,
1691 "gdbarch_dump: %s # %s\n",
1692 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1693 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1697 (long) current_gdbarch->extract_struct_value_address
1698 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1700 #ifdef FETCH_POINTER_ARGUMENT_P
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: %s # %s\n",
1703 "FETCH_POINTER_ARGUMENT_P()",
1704 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1707 FETCH_POINTER_ARGUMENT_P ());
1709 #ifdef FETCH_POINTER_ARGUMENT
1710 fprintf_unfiltered (file,
1711 "gdbarch_dump: %s # %s\n",
1712 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1713 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1715 fprintf_unfiltered (file,
1716 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1717 (long) current_gdbarch->fetch_pointer_argument
1718 /*FETCH_POINTER_ARGUMENT ()*/);
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: FP0_REGNUM # %s\n",
1723 XSTRING (FP0_REGNUM));
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: FP0_REGNUM = %d\n",
1728 #ifdef FRAMELESS_FUNCTION_INVOCATION
1729 fprintf_unfiltered (file,
1730 "gdbarch_dump: %s # %s\n",
1731 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1732 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1734 fprintf_unfiltered (file,
1735 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1736 (long) current_gdbarch->frameless_function_invocation
1737 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1739 #ifdef FRAME_ARGS_ADDRESS
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: %s # %s\n",
1742 "FRAME_ARGS_ADDRESS(fi)",
1743 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1747 (long) current_gdbarch->frame_args_address
1748 /*FRAME_ARGS_ADDRESS ()*/);
1750 #ifdef FRAME_ARGS_SKIP
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1753 XSTRING (FRAME_ARGS_SKIP));
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1756 (long) FRAME_ARGS_SKIP);
1758 #ifdef FRAME_LOCALS_ADDRESS
1759 fprintf_unfiltered (file,
1760 "gdbarch_dump: %s # %s\n",
1761 "FRAME_LOCALS_ADDRESS(fi)",
1762 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1764 fprintf_unfiltered (file,
1765 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1766 (long) current_gdbarch->frame_locals_address
1767 /*FRAME_LOCALS_ADDRESS ()*/);
1769 #ifdef FRAME_NUM_ARGS
1770 fprintf_unfiltered (file,
1771 "gdbarch_dump: %s # %s\n",
1772 "FRAME_NUM_ARGS(frame)",
1773 XSTRING (FRAME_NUM_ARGS (frame)));
1775 fprintf_unfiltered (file,
1776 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1777 (long) current_gdbarch->frame_num_args
1778 /*FRAME_NUM_ARGS ()*/);
1780 #ifdef FUNCTION_START_OFFSET
1781 fprintf_unfiltered (file,
1782 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1783 XSTRING (FUNCTION_START_OFFSET));
1784 fprintf_unfiltered (file,
1785 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1786 (long) FUNCTION_START_OFFSET);
1788 #ifdef GET_LONGJMP_TARGET_P
1789 fprintf_unfiltered (file,
1790 "gdbarch_dump: %s # %s\n",
1791 "GET_LONGJMP_TARGET_P()",
1792 XSTRING (GET_LONGJMP_TARGET_P ()));
1793 fprintf_unfiltered (file,
1794 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1795 GET_LONGJMP_TARGET_P ());
1797 #ifdef GET_LONGJMP_TARGET
1798 fprintf_unfiltered (file,
1799 "gdbarch_dump: %s # %s\n",
1800 "GET_LONGJMP_TARGET(pc)",
1801 XSTRING (GET_LONGJMP_TARGET (pc)));
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1805 (long) current_gdbarch->get_longjmp_target
1806 /*GET_LONGJMP_TARGET ()*/);
1808 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1811 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1814 HAVE_NONSTEPPABLE_WATCHPOINT);
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: %s # %s\n",
1819 "INNER_THAN(lhs, rhs)",
1820 XSTRING (INNER_THAN (lhs, rhs)));
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1824 (long) current_gdbarch->inner_than
1827 #ifdef INTEGER_TO_ADDRESS_P
1828 fprintf_unfiltered (file,
1829 "gdbarch_dump: %s # %s\n",
1830 "INTEGER_TO_ADDRESS_P()",
1831 XSTRING (INTEGER_TO_ADDRESS_P ()));
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1834 INTEGER_TO_ADDRESS_P ());
1836 #ifdef INTEGER_TO_ADDRESS
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: %s # %s\n",
1839 "INTEGER_TO_ADDRESS(type, buf)",
1840 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1844 (long) current_gdbarch->integer_to_address
1845 /*INTEGER_TO_ADDRESS ()*/);
1847 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: %s # %s\n",
1850 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1851 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1855 (long) current_gdbarch->in_solib_call_trampoline
1856 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1858 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: %s # %s\n",
1861 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1862 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1866 (long) current_gdbarch->in_solib_return_trampoline
1867 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1869 #ifdef MEMORY_INSERT_BREAKPOINT
1870 fprintf_unfiltered (file,
1871 "gdbarch_dump: %s # %s\n",
1872 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1873 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1875 fprintf_unfiltered (file,
1876 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1877 (long) current_gdbarch->memory_insert_breakpoint
1878 /*MEMORY_INSERT_BREAKPOINT ()*/);
1880 #ifdef MEMORY_REMOVE_BREAKPOINT
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: %s # %s\n",
1883 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1884 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1886 fprintf_unfiltered (file,
1887 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1888 (long) current_gdbarch->memory_remove_breakpoint
1889 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1891 #ifdef NAME_OF_MALLOC
1892 fprintf_unfiltered (file,
1893 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1894 XSTRING (NAME_OF_MALLOC));
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1900 fprintf_unfiltered (file,
1901 "gdbarch_dump: NPC_REGNUM # %s\n",
1902 XSTRING (NPC_REGNUM));
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: NPC_REGNUM = %d\n",
1907 #ifdef NUM_PSEUDO_REGS
1908 fprintf_unfiltered (file,
1909 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1910 XSTRING (NUM_PSEUDO_REGS));
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1916 fprintf_unfiltered (file,
1917 "gdbarch_dump: NUM_REGS # %s\n",
1918 XSTRING (NUM_REGS));
1919 fprintf_unfiltered (file,
1920 "gdbarch_dump: NUM_REGS = %d\n",
1923 #ifdef PARM_BOUNDARY
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1926 XSTRING (PARM_BOUNDARY));
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1931 #ifdef PC_IN_SIGTRAMP
1932 fprintf_unfiltered (file,
1933 "gdbarch_dump: %s # %s\n",
1934 "PC_IN_SIGTRAMP(pc, name)",
1935 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1937 fprintf_unfiltered (file,
1938 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1939 (long) current_gdbarch->pc_in_sigtramp
1940 /*PC_IN_SIGTRAMP ()*/);
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: PC_REGNUM # %s\n",
1945 XSTRING (PC_REGNUM));
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: PC_REGNUM = %d\n",
1950 #ifdef POINTER_TO_ADDRESS
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: %s # %s\n",
1953 "POINTER_TO_ADDRESS(type, buf)",
1954 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1956 fprintf_unfiltered (file,
1957 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1958 (long) current_gdbarch->pointer_to_address
1959 /*POINTER_TO_ADDRESS ()*/);
1961 #ifdef PREPARE_TO_PROCEED
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: %s # %s\n",
1964 "PREPARE_TO_PROCEED(select_it)",
1965 XSTRING (PREPARE_TO_PROCEED (select_it)));
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1969 (long) current_gdbarch->prepare_to_proceed
1970 /*PREPARE_TO_PROCEED ()*/);
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1975 gdbarch_print_float_info_p (current_gdbarch));
1977 fprintf_unfiltered (file,
1978 "gdbarch_dump: print_float_info = 0x%08lx\n",
1979 (long) current_gdbarch->print_float_info);
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1983 (long) current_gdbarch->print_registers_info);
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1987 gdbarch_print_vector_info_p (current_gdbarch));
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1991 (long) current_gdbarch->print_vector_info);
1992 #ifdef PROLOGUE_FRAMELESS_P
1993 fprintf_unfiltered (file,
1994 "gdbarch_dump: %s # %s\n",
1995 "PROLOGUE_FRAMELESS_P(ip)",
1996 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1998 fprintf_unfiltered (file,
1999 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
2000 (long) current_gdbarch->prologue_frameless_p
2001 /*PROLOGUE_FRAMELESS_P ()*/);
2004 fprintf_unfiltered (file,
2005 "gdbarch_dump: PS_REGNUM # %s\n",
2006 XSTRING (PS_REGNUM));
2007 fprintf_unfiltered (file,
2008 "gdbarch_dump: PS_REGNUM = %d\n",
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
2014 gdbarch_push_dummy_call_p (current_gdbarch));
2016 fprintf_unfiltered (file,
2017 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
2018 (long) current_gdbarch->push_dummy_call);
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
2022 gdbarch_push_dummy_code_p (current_gdbarch));
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2026 (long) current_gdbarch->push_dummy_code);
2027 #ifdef REGISTER_BYTE_P
2028 fprintf_unfiltered (file,
2029 "gdbarch_dump: %s # %s\n",
2030 "REGISTER_BYTE_P()",
2031 XSTRING (REGISTER_BYTE_P ()));
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2034 REGISTER_BYTE_P ());
2036 #ifdef REGISTER_BYTE
2037 fprintf_unfiltered (file,
2038 "gdbarch_dump: %s # %s\n",
2039 "REGISTER_BYTE(reg_nr)",
2040 XSTRING (REGISTER_BYTE (reg_nr)));
2042 fprintf_unfiltered (file,
2043 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
2044 (long) current_gdbarch->register_byte
2045 /*REGISTER_BYTE ()*/);
2047 #ifdef REGISTER_BYTES_OK_P
2048 fprintf_unfiltered (file,
2049 "gdbarch_dump: %s # %s\n",
2050 "REGISTER_BYTES_OK_P()",
2051 XSTRING (REGISTER_BYTES_OK_P ()));
2052 fprintf_unfiltered (file,
2053 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2054 REGISTER_BYTES_OK_P ());
2056 #ifdef REGISTER_BYTES_OK
2057 fprintf_unfiltered (file,
2058 "gdbarch_dump: %s # %s\n",
2059 "REGISTER_BYTES_OK(nr_bytes)",
2060 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2062 fprintf_unfiltered (file,
2063 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2064 (long) current_gdbarch->register_bytes_ok
2065 /*REGISTER_BYTES_OK ()*/);
2067 #ifdef REGISTER_CONVERTIBLE
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: %s # %s\n",
2070 "REGISTER_CONVERTIBLE(nr)",
2071 XSTRING (REGISTER_CONVERTIBLE (nr)));
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2075 (long) current_gdbarch->register_convertible
2076 /*REGISTER_CONVERTIBLE ()*/);
2078 #ifdef REGISTER_CONVERT_TO_RAW
2080 /* Macro might contain `[{}]' when not multi-arch */
2081 fprintf_unfiltered (file,
2082 "gdbarch_dump: %s # %s\n",
2083 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2084 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2087 fprintf_unfiltered (file,
2088 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2089 (long) current_gdbarch->register_convert_to_raw
2090 /*REGISTER_CONVERT_TO_RAW ()*/);
2092 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2094 /* Macro might contain `[{}]' when not multi-arch */
2095 fprintf_unfiltered (file,
2096 "gdbarch_dump: %s # %s\n",
2097 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2098 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
2101 fprintf_unfiltered (file,
2102 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2103 (long) current_gdbarch->register_convert_to_virtual
2104 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2106 #ifdef REGISTER_NAME
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: %s # %s\n",
2109 "REGISTER_NAME(regnr)",
2110 XSTRING (REGISTER_NAME (regnr)));
2112 fprintf_unfiltered (file,
2113 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2114 (long) current_gdbarch->register_name
2115 /*REGISTER_NAME ()*/);
2117 #ifdef REGISTER_RAW_SIZE
2118 fprintf_unfiltered (file,
2119 "gdbarch_dump: %s # %s\n",
2120 "REGISTER_RAW_SIZE(reg_nr)",
2121 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2125 (long) current_gdbarch->register_raw_size
2126 /*REGISTER_RAW_SIZE ()*/);
2128 #ifdef REGISTER_SIM_REGNO
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: %s # %s\n",
2131 "REGISTER_SIM_REGNO(reg_nr)",
2132 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2136 (long) current_gdbarch->register_sim_regno
2137 /*REGISTER_SIM_REGNO ()*/);
2139 #ifdef REGISTER_TO_VALUE
2141 /* Macro might contain `[{}]' when not multi-arch */
2142 fprintf_unfiltered (file,
2143 "gdbarch_dump: %s # %s\n",
2144 "REGISTER_TO_VALUE(regnum, type, from, to)",
2145 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2150 (long) current_gdbarch->register_to_value
2151 /*REGISTER_TO_VALUE ()*/);
2154 fprintf_unfiltered (file,
2155 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2156 gdbarch_register_type_p (current_gdbarch));
2158 fprintf_unfiltered (file,
2159 "gdbarch_dump: register_type = 0x%08lx\n",
2160 (long) current_gdbarch->register_type);
2161 #ifdef REGISTER_VIRTUAL_SIZE
2162 fprintf_unfiltered (file,
2163 "gdbarch_dump: %s # %s\n",
2164 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2165 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2167 fprintf_unfiltered (file,
2168 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2169 (long) current_gdbarch->register_virtual_size
2170 /*REGISTER_VIRTUAL_SIZE ()*/);
2172 #ifdef REGISTER_VIRTUAL_TYPE_P
2173 fprintf_unfiltered (file,
2174 "gdbarch_dump: %s # %s\n",
2175 "REGISTER_VIRTUAL_TYPE_P()",
2176 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2179 REGISTER_VIRTUAL_TYPE_P ());
2181 #ifdef REGISTER_VIRTUAL_TYPE
2182 fprintf_unfiltered (file,
2183 "gdbarch_dump: %s # %s\n",
2184 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2185 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2187 fprintf_unfiltered (file,
2188 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2189 (long) current_gdbarch->register_virtual_type
2190 /*REGISTER_VIRTUAL_TYPE ()*/);
2192 #ifdef REG_STRUCT_HAS_ADDR_P
2193 fprintf_unfiltered (file,
2194 "gdbarch_dump: %s # %s\n",
2195 "REG_STRUCT_HAS_ADDR_P()",
2196 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2197 fprintf_unfiltered (file,
2198 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2199 REG_STRUCT_HAS_ADDR_P ());
2201 #ifdef REG_STRUCT_HAS_ADDR
2202 fprintf_unfiltered (file,
2203 "gdbarch_dump: %s # %s\n",
2204 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2205 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2207 fprintf_unfiltered (file,
2208 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2209 (long) current_gdbarch->reg_struct_has_addr
2210 /*REG_STRUCT_HAS_ADDR ()*/);
2213 fprintf_unfiltered (file,
2214 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2215 (long) current_gdbarch->remote_translate_xfer_address);
2216 #ifdef RETURN_VALUE_ON_STACK
2217 fprintf_unfiltered (file,
2218 "gdbarch_dump: %s # %s\n",
2219 "RETURN_VALUE_ON_STACK(type)",
2220 XSTRING (RETURN_VALUE_ON_STACK (type)));
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2224 (long) current_gdbarch->return_value_on_stack
2225 /*RETURN_VALUE_ON_STACK ()*/);
2227 #ifdef SAVE_DUMMY_FRAME_TOS_P
2228 fprintf_unfiltered (file,
2229 "gdbarch_dump: %s # %s\n",
2230 "SAVE_DUMMY_FRAME_TOS_P()",
2231 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2232 fprintf_unfiltered (file,
2233 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2234 SAVE_DUMMY_FRAME_TOS_P ());
2236 #ifdef SAVE_DUMMY_FRAME_TOS
2238 /* Macro might contain `[{}]' when not multi-arch */
2239 fprintf_unfiltered (file,
2240 "gdbarch_dump: %s # %s\n",
2241 "SAVE_DUMMY_FRAME_TOS(sp)",
2242 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2245 fprintf_unfiltered (file,
2246 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2247 (long) current_gdbarch->save_dummy_frame_tos
2248 /*SAVE_DUMMY_FRAME_TOS ()*/);
2250 #ifdef SDB_REG_TO_REGNUM
2251 fprintf_unfiltered (file,
2252 "gdbarch_dump: %s # %s\n",
2253 "SDB_REG_TO_REGNUM(sdb_regnr)",
2254 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2256 fprintf_unfiltered (file,
2257 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2258 (long) current_gdbarch->sdb_reg_to_regnum
2259 /*SDB_REG_TO_REGNUM ()*/);
2261 #ifdef SIGTRAMP_END_P
2262 fprintf_unfiltered (file,
2263 "gdbarch_dump: %s # %s\n",
2265 XSTRING (SIGTRAMP_END_P ()));
2266 fprintf_unfiltered (file,
2267 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2271 fprintf_unfiltered (file,
2272 "gdbarch_dump: %s # %s\n",
2274 XSTRING (SIGTRAMP_END (pc)));
2276 fprintf_unfiltered (file,
2277 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2278 (long) current_gdbarch->sigtramp_end
2279 /*SIGTRAMP_END ()*/);
2281 #ifdef SIGTRAMP_START_P
2282 fprintf_unfiltered (file,
2283 "gdbarch_dump: %s # %s\n",
2284 "SIGTRAMP_START_P()",
2285 XSTRING (SIGTRAMP_START_P ()));
2286 fprintf_unfiltered (file,
2287 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2288 SIGTRAMP_START_P ());
2290 #ifdef SIGTRAMP_START
2291 fprintf_unfiltered (file,
2292 "gdbarch_dump: %s # %s\n",
2293 "SIGTRAMP_START(pc)",
2294 XSTRING (SIGTRAMP_START (pc)));
2296 fprintf_unfiltered (file,
2297 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2298 (long) current_gdbarch->sigtramp_start
2299 /*SIGTRAMP_START ()*/);
2301 #ifdef SKIP_PROLOGUE
2302 fprintf_unfiltered (file,
2303 "gdbarch_dump: %s # %s\n",
2304 "SKIP_PROLOGUE(ip)",
2305 XSTRING (SKIP_PROLOGUE (ip)));
2307 fprintf_unfiltered (file,
2308 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2309 (long) current_gdbarch->skip_prologue
2310 /*SKIP_PROLOGUE ()*/);
2312 #ifdef SKIP_TRAMPOLINE_CODE
2313 fprintf_unfiltered (file,
2314 "gdbarch_dump: %s # %s\n",
2315 "SKIP_TRAMPOLINE_CODE(pc)",
2316 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2318 fprintf_unfiltered (file,
2319 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2320 (long) current_gdbarch->skip_trampoline_code
2321 /*SKIP_TRAMPOLINE_CODE ()*/);
2323 #ifdef SMASH_TEXT_ADDRESS
2324 fprintf_unfiltered (file,
2325 "gdbarch_dump: %s # %s\n",
2326 "SMASH_TEXT_ADDRESS(addr)",
2327 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2329 fprintf_unfiltered (file,
2330 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2331 (long) current_gdbarch->smash_text_address
2332 /*SMASH_TEXT_ADDRESS ()*/);
2334 #ifdef SOFTWARE_SINGLE_STEP_P
2335 fprintf_unfiltered (file,
2336 "gdbarch_dump: %s # %s\n",
2337 "SOFTWARE_SINGLE_STEP_P()",
2338 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2339 fprintf_unfiltered (file,
2340 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2341 SOFTWARE_SINGLE_STEP_P ());
2343 #ifdef SOFTWARE_SINGLE_STEP
2345 /* Macro might contain `[{}]' when not multi-arch */
2346 fprintf_unfiltered (file,
2347 "gdbarch_dump: %s # %s\n",
2348 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2349 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2352 fprintf_unfiltered (file,
2353 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2354 (long) current_gdbarch->software_single_step
2355 /*SOFTWARE_SINGLE_STEP ()*/);
2358 fprintf_unfiltered (file,
2359 "gdbarch_dump: SP_REGNUM # %s\n",
2360 XSTRING (SP_REGNUM));
2361 fprintf_unfiltered (file,
2362 "gdbarch_dump: SP_REGNUM = %d\n",
2365 #ifdef STAB_REG_TO_REGNUM
2366 fprintf_unfiltered (file,
2367 "gdbarch_dump: %s # %s\n",
2368 "STAB_REG_TO_REGNUM(stab_regnr)",
2369 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2371 fprintf_unfiltered (file,
2372 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2373 (long) current_gdbarch->stab_reg_to_regnum
2374 /*STAB_REG_TO_REGNUM ()*/);
2376 #ifdef STACK_ALIGN_P
2377 fprintf_unfiltered (file,
2378 "gdbarch_dump: %s # %s\n",
2380 XSTRING (STACK_ALIGN_P ()));
2381 fprintf_unfiltered (file,
2382 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2386 fprintf_unfiltered (file,
2387 "gdbarch_dump: %s # %s\n",
2389 XSTRING (STACK_ALIGN (sp)));
2391 fprintf_unfiltered (file,
2392 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2393 (long) current_gdbarch->stack_align
2394 /*STACK_ALIGN ()*/);
2396 #ifdef STORE_RETURN_VALUE
2398 /* Macro might contain `[{}]' when not multi-arch */
2399 fprintf_unfiltered (file,
2400 "gdbarch_dump: %s # %s\n",
2401 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2402 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2405 fprintf_unfiltered (file,
2406 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2407 (long) current_gdbarch->store_return_value
2408 /*STORE_RETURN_VALUE ()*/);
2410 #ifdef TARGET_ADDR_BIT
2411 fprintf_unfiltered (file,
2412 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2413 XSTRING (TARGET_ADDR_BIT));
2414 fprintf_unfiltered (file,
2415 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2418 #ifdef TARGET_ARCHITECTURE
2419 fprintf_unfiltered (file,
2420 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2421 XSTRING (TARGET_ARCHITECTURE));
2422 if (TARGET_ARCHITECTURE != NULL)
2423 fprintf_unfiltered (file,
2424 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2425 TARGET_ARCHITECTURE->printable_name);
2427 #ifdef TARGET_BFD_VMA_BIT
2428 fprintf_unfiltered (file,
2429 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2430 XSTRING (TARGET_BFD_VMA_BIT));
2431 fprintf_unfiltered (file,
2432 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2433 TARGET_BFD_VMA_BIT);
2435 #ifdef TARGET_BYTE_ORDER
2436 fprintf_unfiltered (file,
2437 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2438 XSTRING (TARGET_BYTE_ORDER));
2439 fprintf_unfiltered (file,
2440 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2441 (long) TARGET_BYTE_ORDER);
2443 #ifdef TARGET_CHAR_SIGNED
2444 fprintf_unfiltered (file,
2445 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2446 XSTRING (TARGET_CHAR_SIGNED));
2447 fprintf_unfiltered (file,
2448 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2449 TARGET_CHAR_SIGNED);
2451 #ifdef TARGET_DOUBLE_BIT
2452 fprintf_unfiltered (file,
2453 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2454 XSTRING (TARGET_DOUBLE_BIT));
2455 fprintf_unfiltered (file,
2456 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2459 #ifdef TARGET_DOUBLE_FORMAT
2460 fprintf_unfiltered (file,
2461 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2462 XSTRING (TARGET_DOUBLE_FORMAT));
2463 fprintf_unfiltered (file,
2464 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2465 (TARGET_DOUBLE_FORMAT)->name);
2467 #ifdef TARGET_FLOAT_BIT
2468 fprintf_unfiltered (file,
2469 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2470 XSTRING (TARGET_FLOAT_BIT));
2471 fprintf_unfiltered (file,
2472 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2475 #ifdef TARGET_FLOAT_FORMAT
2476 fprintf_unfiltered (file,
2477 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2478 XSTRING (TARGET_FLOAT_FORMAT));
2479 fprintf_unfiltered (file,
2480 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2481 (TARGET_FLOAT_FORMAT)->name);
2483 #ifdef TARGET_INT_BIT
2484 fprintf_unfiltered (file,
2485 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2486 XSTRING (TARGET_INT_BIT));
2487 fprintf_unfiltered (file,
2488 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2491 #ifdef TARGET_LONG_BIT
2492 fprintf_unfiltered (file,
2493 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2494 XSTRING (TARGET_LONG_BIT));
2495 fprintf_unfiltered (file,
2496 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2499 #ifdef TARGET_LONG_DOUBLE_BIT
2500 fprintf_unfiltered (file,
2501 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2502 XSTRING (TARGET_LONG_DOUBLE_BIT));
2503 fprintf_unfiltered (file,
2504 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2505 TARGET_LONG_DOUBLE_BIT);
2507 #ifdef TARGET_LONG_DOUBLE_FORMAT
2508 fprintf_unfiltered (file,
2509 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2510 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2511 fprintf_unfiltered (file,
2512 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2513 (TARGET_LONG_DOUBLE_FORMAT)->name);
2515 #ifdef TARGET_LONG_LONG_BIT
2516 fprintf_unfiltered (file,
2517 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2518 XSTRING (TARGET_LONG_LONG_BIT));
2519 fprintf_unfiltered (file,
2520 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2521 TARGET_LONG_LONG_BIT);
2524 fprintf_unfiltered (file,
2525 "gdbarch_dump: TARGET_OSABI # %s\n",
2526 XSTRING (TARGET_OSABI));
2527 fprintf_unfiltered (file,
2528 "gdbarch_dump: TARGET_OSABI = %ld\n",
2529 (long) TARGET_OSABI);
2531 #ifdef TARGET_PRINT_INSN
2532 fprintf_unfiltered (file,
2533 "gdbarch_dump: %s # %s\n",
2534 "TARGET_PRINT_INSN(vma, info)",
2535 XSTRING (TARGET_PRINT_INSN (vma, info)));
2537 fprintf_unfiltered (file,
2538 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2539 (long) current_gdbarch->print_insn
2540 /*TARGET_PRINT_INSN ()*/);
2542 #ifdef TARGET_PTR_BIT
2543 fprintf_unfiltered (file,
2544 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2545 XSTRING (TARGET_PTR_BIT));
2546 fprintf_unfiltered (file,
2547 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2550 #ifdef TARGET_READ_PC_P
2551 fprintf_unfiltered (file,
2552 "gdbarch_dump: %s # %s\n",
2553 "TARGET_READ_PC_P()",
2554 XSTRING (TARGET_READ_PC_P ()));
2555 fprintf_unfiltered (file,
2556 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2557 TARGET_READ_PC_P ());
2559 #ifdef TARGET_READ_PC
2560 fprintf_unfiltered (file,
2561 "gdbarch_dump: %s # %s\n",
2562 "TARGET_READ_PC(ptid)",
2563 XSTRING (TARGET_READ_PC (ptid)));
2565 fprintf_unfiltered (file,
2566 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2567 (long) current_gdbarch->read_pc
2568 /*TARGET_READ_PC ()*/);
2570 #ifdef TARGET_READ_SP_P
2571 fprintf_unfiltered (file,
2572 "gdbarch_dump: %s # %s\n",
2573 "TARGET_READ_SP_P()",
2574 XSTRING (TARGET_READ_SP_P ()));
2575 fprintf_unfiltered (file,
2576 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2577 TARGET_READ_SP_P ());
2579 #ifdef TARGET_READ_SP
2580 fprintf_unfiltered (file,
2581 "gdbarch_dump: %s # %s\n",
2583 XSTRING (TARGET_READ_SP ()));
2585 fprintf_unfiltered (file,
2586 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2587 (long) current_gdbarch->read_sp
2588 /*TARGET_READ_SP ()*/);
2590 #ifdef TARGET_SHORT_BIT
2591 fprintf_unfiltered (file,
2592 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2593 XSTRING (TARGET_SHORT_BIT));
2594 fprintf_unfiltered (file,
2595 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2598 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2600 /* Macro might contain `[{}]' when not multi-arch */
2601 fprintf_unfiltered (file,
2602 "gdbarch_dump: %s # %s\n",
2603 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2604 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2607 fprintf_unfiltered (file,
2608 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2609 (long) current_gdbarch->virtual_frame_pointer
2610 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2612 #ifdef TARGET_WRITE_PC
2614 /* Macro might contain `[{}]' when not multi-arch */
2615 fprintf_unfiltered (file,
2616 "gdbarch_dump: %s # %s\n",
2617 "TARGET_WRITE_PC(val, ptid)",
2618 XSTRING (TARGET_WRITE_PC (val, ptid)));
2621 fprintf_unfiltered (file,
2622 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2623 (long) current_gdbarch->write_pc
2624 /*TARGET_WRITE_PC ()*/);
2627 fprintf_unfiltered (file,
2628 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2629 gdbarch_unwind_dummy_id_p (current_gdbarch));
2631 fprintf_unfiltered (file,
2632 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2633 (long) current_gdbarch->unwind_dummy_id);
2635 fprintf_unfiltered (file,
2636 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2637 gdbarch_unwind_pc_p (current_gdbarch));
2639 fprintf_unfiltered (file,
2640 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2641 (long) current_gdbarch->unwind_pc);
2643 fprintf_unfiltered (file,
2644 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2645 gdbarch_unwind_sp_p (current_gdbarch));
2647 fprintf_unfiltered (file,
2648 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2649 (long) current_gdbarch->unwind_sp);
2650 #ifdef USE_STRUCT_CONVENTION
2651 fprintf_unfiltered (file,
2652 "gdbarch_dump: %s # %s\n",
2653 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2654 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2656 fprintf_unfiltered (file,
2657 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2658 (long) current_gdbarch->use_struct_convention
2659 /*USE_STRUCT_CONVENTION ()*/);
2661 #ifdef VALUE_TO_REGISTER
2663 /* Macro might contain `[{}]' when not multi-arch */
2664 fprintf_unfiltered (file,
2665 "gdbarch_dump: %s # %s\n",
2666 "VALUE_TO_REGISTER(type, regnum, from, to)",
2667 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2670 fprintf_unfiltered (file,
2671 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2672 (long) current_gdbarch->value_to_register
2673 /*VALUE_TO_REGISTER ()*/);
2675 if (current_gdbarch->dump_tdep != NULL)
2676 current_gdbarch->dump_tdep (current_gdbarch, file);
2679 struct gdbarch_tdep *
2680 gdbarch_tdep (struct gdbarch *gdbarch)
2682 if (gdbarch_debug >= 2)
2683 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2684 return gdbarch->tdep;
2688 const struct bfd_arch_info *
2689 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2691 gdb_assert (gdbarch != NULL);
2692 if (gdbarch_debug >= 2)
2693 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2694 return gdbarch->bfd_arch_info;
2698 gdbarch_byte_order (struct gdbarch *gdbarch)
2700 gdb_assert (gdbarch != NULL);
2701 if (gdbarch_debug >= 2)
2702 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2703 return gdbarch->byte_order;
2707 gdbarch_osabi (struct gdbarch *gdbarch)
2709 gdb_assert (gdbarch != NULL);
2710 if (gdbarch_debug >= 2)
2711 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2712 return gdbarch->osabi;
2716 gdbarch_short_bit (struct gdbarch *gdbarch)
2718 gdb_assert (gdbarch != NULL);
2719 /* Skip verify of short_bit, invalid_p == 0 */
2720 if (gdbarch_debug >= 2)
2721 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2722 return gdbarch->short_bit;
2726 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2729 gdbarch->short_bit = short_bit;
2733 gdbarch_int_bit (struct gdbarch *gdbarch)
2735 gdb_assert (gdbarch != NULL);
2736 /* Skip verify of int_bit, invalid_p == 0 */
2737 if (gdbarch_debug >= 2)
2738 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2739 return gdbarch->int_bit;
2743 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2746 gdbarch->int_bit = int_bit;
2750 gdbarch_long_bit (struct gdbarch *gdbarch)
2752 gdb_assert (gdbarch != NULL);
2753 /* Skip verify of long_bit, invalid_p == 0 */
2754 if (gdbarch_debug >= 2)
2755 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2756 return gdbarch->long_bit;
2760 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2763 gdbarch->long_bit = long_bit;
2767 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2769 gdb_assert (gdbarch != NULL);
2770 /* Skip verify of long_long_bit, invalid_p == 0 */
2771 if (gdbarch_debug >= 2)
2772 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2773 return gdbarch->long_long_bit;
2777 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2780 gdbarch->long_long_bit = long_long_bit;
2784 gdbarch_float_bit (struct gdbarch *gdbarch)
2786 gdb_assert (gdbarch != NULL);
2787 /* Skip verify of float_bit, invalid_p == 0 */
2788 if (gdbarch_debug >= 2)
2789 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2790 return gdbarch->float_bit;
2794 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2797 gdbarch->float_bit = float_bit;
2801 gdbarch_double_bit (struct gdbarch *gdbarch)
2803 gdb_assert (gdbarch != NULL);
2804 /* Skip verify of double_bit, invalid_p == 0 */
2805 if (gdbarch_debug >= 2)
2806 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2807 return gdbarch->double_bit;
2811 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2814 gdbarch->double_bit = double_bit;
2818 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2820 gdb_assert (gdbarch != NULL);
2821 /* Skip verify of long_double_bit, invalid_p == 0 */
2822 if (gdbarch_debug >= 2)
2823 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2824 return gdbarch->long_double_bit;
2828 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2829 int long_double_bit)
2831 gdbarch->long_double_bit = long_double_bit;
2835 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2837 gdb_assert (gdbarch != NULL);
2838 /* Skip verify of ptr_bit, invalid_p == 0 */
2839 if (gdbarch_debug >= 2)
2840 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2841 return gdbarch->ptr_bit;
2845 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2848 gdbarch->ptr_bit = ptr_bit;
2852 gdbarch_addr_bit (struct gdbarch *gdbarch)
2854 gdb_assert (gdbarch != NULL);
2855 if (gdbarch->addr_bit == 0)
2856 internal_error (__FILE__, __LINE__,
2857 "gdbarch: gdbarch_addr_bit invalid");
2858 if (gdbarch_debug >= 2)
2859 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2860 return gdbarch->addr_bit;
2864 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2867 gdbarch->addr_bit = addr_bit;
2871 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2873 gdb_assert (gdbarch != NULL);
2874 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2875 if (gdbarch_debug >= 2)
2876 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2877 return gdbarch->bfd_vma_bit;
2881 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2884 gdbarch->bfd_vma_bit = bfd_vma_bit;
2888 gdbarch_char_signed (struct gdbarch *gdbarch)
2890 gdb_assert (gdbarch != NULL);
2891 if (gdbarch->char_signed == -1)
2892 internal_error (__FILE__, __LINE__,
2893 "gdbarch: gdbarch_char_signed invalid");
2894 if (gdbarch_debug >= 2)
2895 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2896 return gdbarch->char_signed;
2900 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2903 gdbarch->char_signed = char_signed;
2907 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2909 gdb_assert (gdbarch != NULL);
2910 return gdbarch->read_pc != 0;
2914 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2916 gdb_assert (gdbarch != NULL);
2917 if (gdbarch->read_pc == 0)
2918 internal_error (__FILE__, __LINE__,
2919 "gdbarch: gdbarch_read_pc invalid");
2920 if (gdbarch_debug >= 2)
2921 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2922 return gdbarch->read_pc (ptid);
2926 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2927 gdbarch_read_pc_ftype read_pc)
2929 gdbarch->read_pc = read_pc;
2933 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2935 gdb_assert (gdbarch != NULL);
2936 if (gdbarch->write_pc == 0)
2937 internal_error (__FILE__, __LINE__,
2938 "gdbarch: gdbarch_write_pc invalid");
2939 if (gdbarch_debug >= 2)
2940 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2941 gdbarch->write_pc (val, ptid);
2945 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2946 gdbarch_write_pc_ftype write_pc)
2948 gdbarch->write_pc = write_pc;
2952 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2954 gdb_assert (gdbarch != NULL);
2955 return gdbarch->deprecated_target_read_fp != 0;
2959 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2961 gdb_assert (gdbarch != NULL);
2962 if (gdbarch->deprecated_target_read_fp == 0)
2963 internal_error (__FILE__, __LINE__,
2964 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2965 if (gdbarch_debug >= 2)
2966 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2967 return gdbarch->deprecated_target_read_fp ();
2971 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2972 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2974 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2978 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2980 gdb_assert (gdbarch != NULL);
2981 return gdbarch->read_sp != 0;
2985 gdbarch_read_sp (struct gdbarch *gdbarch)
2987 gdb_assert (gdbarch != NULL);
2988 if (gdbarch->read_sp == 0)
2989 internal_error (__FILE__, __LINE__,
2990 "gdbarch: gdbarch_read_sp invalid");
2991 if (gdbarch_debug >= 2)
2992 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2993 return gdbarch->read_sp ();
2997 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2998 gdbarch_read_sp_ftype read_sp)
3000 gdbarch->read_sp = read_sp;
3004 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3006 gdb_assert (gdbarch != NULL);
3007 return gdbarch->deprecated_dummy_write_sp != 0;
3011 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3013 gdb_assert (gdbarch != NULL);
3014 if (gdbarch->deprecated_dummy_write_sp == 0)
3015 internal_error (__FILE__, __LINE__,
3016 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
3017 if (gdbarch_debug >= 2)
3018 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3019 gdbarch->deprecated_dummy_write_sp (val);
3023 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3024 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3026 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3030 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
3032 gdb_assert (gdbarch != NULL);
3033 if (gdbarch->virtual_frame_pointer == 0)
3034 internal_error (__FILE__, __LINE__,
3035 "gdbarch: gdbarch_virtual_frame_pointer invalid");
3036 if (gdbarch_debug >= 2)
3037 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
3038 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
3042 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
3043 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
3045 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
3049 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
3051 gdb_assert (gdbarch != NULL);
3052 return gdbarch->pseudo_register_read != 0;
3056 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
3058 gdb_assert (gdbarch != NULL);
3059 if (gdbarch->pseudo_register_read == 0)
3060 internal_error (__FILE__, __LINE__,
3061 "gdbarch: gdbarch_pseudo_register_read invalid");
3062 if (gdbarch_debug >= 2)
3063 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
3064 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
3068 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
3069 gdbarch_pseudo_register_read_ftype pseudo_register_read)
3071 gdbarch->pseudo_register_read = pseudo_register_read;
3075 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
3077 gdb_assert (gdbarch != NULL);
3078 return gdbarch->pseudo_register_write != 0;
3082 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3084 gdb_assert (gdbarch != NULL);
3085 if (gdbarch->pseudo_register_write == 0)
3086 internal_error (__FILE__, __LINE__,
3087 "gdbarch: gdbarch_pseudo_register_write invalid");
3088 if (gdbarch_debug >= 2)
3089 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3090 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3094 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3095 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3097 gdbarch->pseudo_register_write = pseudo_register_write;
3101 gdbarch_num_regs (struct gdbarch *gdbarch)
3103 gdb_assert (gdbarch != NULL);
3104 if (gdbarch->num_regs == -1)
3105 internal_error (__FILE__, __LINE__,
3106 "gdbarch: gdbarch_num_regs invalid");
3107 if (gdbarch_debug >= 2)
3108 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3109 return gdbarch->num_regs;
3113 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3116 gdbarch->num_regs = num_regs;
3120 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3122 gdb_assert (gdbarch != NULL);
3123 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3124 if (gdbarch_debug >= 2)
3125 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3126 return gdbarch->num_pseudo_regs;
3130 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3131 int num_pseudo_regs)
3133 gdbarch->num_pseudo_regs = num_pseudo_regs;
3137 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3139 gdb_assert (gdbarch != NULL);
3140 /* Skip verify of sp_regnum, invalid_p == 0 */
3141 if (gdbarch_debug >= 2)
3142 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3143 return gdbarch->sp_regnum;
3147 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3150 gdbarch->sp_regnum = sp_regnum;
3154 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3156 gdb_assert (gdbarch != NULL);
3157 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3158 if (gdbarch_debug >= 2)
3159 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3160 return gdbarch->deprecated_fp_regnum;
3164 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3165 int deprecated_fp_regnum)
3167 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3171 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3173 gdb_assert (gdbarch != NULL);
3174 /* Skip verify of pc_regnum, invalid_p == 0 */
3175 if (gdbarch_debug >= 2)
3176 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3177 return gdbarch->pc_regnum;
3181 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3184 gdbarch->pc_regnum = pc_regnum;
3188 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3190 gdb_assert (gdbarch != NULL);
3191 /* Skip verify of ps_regnum, invalid_p == 0 */
3192 if (gdbarch_debug >= 2)
3193 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3194 return gdbarch->ps_regnum;
3198 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3201 gdbarch->ps_regnum = ps_regnum;
3205 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3207 gdb_assert (gdbarch != NULL);
3208 /* Skip verify of fp0_regnum, invalid_p == 0 */
3209 if (gdbarch_debug >= 2)
3210 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3211 return gdbarch->fp0_regnum;
3215 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3218 gdbarch->fp0_regnum = fp0_regnum;
3222 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3224 gdb_assert (gdbarch != NULL);
3225 /* Skip verify of npc_regnum, invalid_p == 0 */
3226 if (gdbarch_debug >= 2)
3227 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3228 return gdbarch->npc_regnum;
3232 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3235 gdbarch->npc_regnum = npc_regnum;
3239 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3241 gdb_assert (gdbarch != NULL);
3242 if (gdbarch->stab_reg_to_regnum == 0)
3243 internal_error (__FILE__, __LINE__,
3244 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3245 if (gdbarch_debug >= 2)
3246 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3247 return gdbarch->stab_reg_to_regnum (stab_regnr);
3251 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3252 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3254 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3258 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3260 gdb_assert (gdbarch != NULL);
3261 if (gdbarch->ecoff_reg_to_regnum == 0)
3262 internal_error (__FILE__, __LINE__,
3263 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3264 if (gdbarch_debug >= 2)
3265 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3266 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3270 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3271 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3273 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3277 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3279 gdb_assert (gdbarch != NULL);
3280 if (gdbarch->dwarf_reg_to_regnum == 0)
3281 internal_error (__FILE__, __LINE__,
3282 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3283 if (gdbarch_debug >= 2)
3284 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3285 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3289 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3290 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3292 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3296 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3298 gdb_assert (gdbarch != NULL);
3299 if (gdbarch->sdb_reg_to_regnum == 0)
3300 internal_error (__FILE__, __LINE__,
3301 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3302 if (gdbarch_debug >= 2)
3303 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3304 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3308 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3309 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3311 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3315 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3317 gdb_assert (gdbarch != NULL);
3318 if (gdbarch->dwarf2_reg_to_regnum == 0)
3319 internal_error (__FILE__, __LINE__,
3320 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3321 if (gdbarch_debug >= 2)
3322 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3323 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3327 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3328 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3330 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3334 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3336 gdb_assert (gdbarch != NULL);
3337 if (gdbarch->register_name == 0)
3338 internal_error (__FILE__, __LINE__,
3339 "gdbarch: gdbarch_register_name invalid");
3340 if (gdbarch_debug >= 2)
3341 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3342 return gdbarch->register_name (regnr);
3346 set_gdbarch_register_name (struct gdbarch *gdbarch,
3347 gdbarch_register_name_ftype register_name)
3349 gdbarch->register_name = register_name;
3353 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3355 gdb_assert (gdbarch != NULL);
3356 if (gdbarch_debug >= 2)
3357 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3358 return gdbarch->deprecated_register_size;
3362 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3363 int deprecated_register_size)
3365 gdbarch->deprecated_register_size = deprecated_register_size;
3369 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
3371 gdb_assert (gdbarch != NULL);
3372 if (gdbarch_debug >= 2)
3373 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
3374 return gdbarch->deprecated_register_bytes;
3378 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
3379 int deprecated_register_bytes)
3381 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
3385 gdbarch_register_byte_p (struct gdbarch *gdbarch)
3387 gdb_assert (gdbarch != NULL);
3388 return gdbarch->register_byte != generic_register_byte;
3392 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3394 gdb_assert (gdbarch != NULL);
3395 if (gdbarch->register_byte == 0)
3396 internal_error (__FILE__, __LINE__,
3397 "gdbarch: gdbarch_register_byte invalid");
3398 /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
3399 if (gdbarch_debug >= 2)
3400 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3401 return gdbarch->register_byte (reg_nr);
3405 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3406 gdbarch_register_byte_ftype register_byte)
3408 gdbarch->register_byte = register_byte;
3412 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3414 gdb_assert (gdbarch != NULL);
3415 if (gdbarch->register_raw_size == 0)
3416 internal_error (__FILE__, __LINE__,
3417 "gdbarch: gdbarch_register_raw_size invalid");
3418 if (gdbarch_debug >= 2)
3419 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3420 return gdbarch->register_raw_size (reg_nr);
3424 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3425 gdbarch_register_raw_size_ftype register_raw_size)
3427 gdbarch->register_raw_size = register_raw_size;
3431 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3433 gdb_assert (gdbarch != NULL);
3434 return gdbarch->deprecated_max_register_raw_size != 0;
3438 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3440 gdb_assert (gdbarch != NULL);
3441 if (gdbarch_debug >= 2)
3442 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3443 return gdbarch->deprecated_max_register_raw_size;
3447 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3448 int deprecated_max_register_raw_size)
3450 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3454 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3456 gdb_assert (gdbarch != NULL);
3457 if (gdbarch->register_virtual_size == 0)
3458 internal_error (__FILE__, __LINE__,
3459 "gdbarch: gdbarch_register_virtual_size invalid");
3460 if (gdbarch_debug >= 2)
3461 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3462 return gdbarch->register_virtual_size (reg_nr);
3466 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3467 gdbarch_register_virtual_size_ftype register_virtual_size)
3469 gdbarch->register_virtual_size = register_virtual_size;
3473 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3475 gdb_assert (gdbarch != NULL);
3476 return gdbarch->deprecated_max_register_virtual_size != 0;
3480 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3482 gdb_assert (gdbarch != NULL);
3483 if (gdbarch_debug >= 2)
3484 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3485 return gdbarch->deprecated_max_register_virtual_size;
3489 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3490 int deprecated_max_register_virtual_size)
3492 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3496 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3498 gdb_assert (gdbarch != NULL);
3499 return gdbarch->register_virtual_type != 0;
3503 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3505 gdb_assert (gdbarch != NULL);
3506 if (gdbarch->register_virtual_type == 0)
3507 internal_error (__FILE__, __LINE__,
3508 "gdbarch: gdbarch_register_virtual_type invalid");
3509 if (gdbarch_debug >= 2)
3510 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3511 return gdbarch->register_virtual_type (reg_nr);
3515 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3516 gdbarch_register_virtual_type_ftype register_virtual_type)
3518 gdbarch->register_virtual_type = register_virtual_type;
3522 gdbarch_register_type_p (struct gdbarch *gdbarch)
3524 gdb_assert (gdbarch != NULL);
3525 return gdbarch->register_type != 0;
3529 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3531 gdb_assert (gdbarch != NULL);
3532 if (gdbarch->register_type == 0)
3533 internal_error (__FILE__, __LINE__,
3534 "gdbarch: gdbarch_register_type invalid");
3535 if (gdbarch_debug >= 2)
3536 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3537 return gdbarch->register_type (gdbarch, reg_nr);
3541 set_gdbarch_register_type (struct gdbarch *gdbarch,
3542 gdbarch_register_type_ftype register_type)
3544 gdbarch->register_type = register_type;
3548 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3550 gdb_assert (gdbarch != NULL);
3551 return gdbarch->deprecated_do_registers_info != 0;
3555 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3557 gdb_assert (gdbarch != NULL);
3558 if (gdbarch->deprecated_do_registers_info == 0)
3559 internal_error (__FILE__, __LINE__,
3560 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3561 if (gdbarch_debug >= 2)
3562 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3563 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3567 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3568 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3570 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3574 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3576 gdb_assert (gdbarch != NULL);
3577 if (gdbarch->print_registers_info == 0)
3578 internal_error (__FILE__, __LINE__,
3579 "gdbarch: gdbarch_print_registers_info invalid");
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3582 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3586 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3587 gdbarch_print_registers_info_ftype print_registers_info)
3589 gdbarch->print_registers_info = print_registers_info;
3593 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3595 gdb_assert (gdbarch != NULL);
3596 return gdbarch->print_float_info != 0;
3600 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3602 gdb_assert (gdbarch != NULL);
3603 if (gdbarch->print_float_info == 0)
3604 internal_error (__FILE__, __LINE__,
3605 "gdbarch: gdbarch_print_float_info invalid");
3606 if (gdbarch_debug >= 2)
3607 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3608 gdbarch->print_float_info (gdbarch, file, frame, args);
3612 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3613 gdbarch_print_float_info_ftype print_float_info)
3615 gdbarch->print_float_info = print_float_info;
3619 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3621 gdb_assert (gdbarch != NULL);
3622 return gdbarch->print_vector_info != 0;
3626 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3628 gdb_assert (gdbarch != NULL);
3629 if (gdbarch->print_vector_info == 0)
3630 internal_error (__FILE__, __LINE__,
3631 "gdbarch: gdbarch_print_vector_info invalid");
3632 if (gdbarch_debug >= 2)
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3634 gdbarch->print_vector_info (gdbarch, file, frame, args);
3638 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3639 gdbarch_print_vector_info_ftype print_vector_info)
3641 gdbarch->print_vector_info = print_vector_info;
3645 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3647 gdb_assert (gdbarch != NULL);
3648 if (gdbarch->register_sim_regno == 0)
3649 internal_error (__FILE__, __LINE__,
3650 "gdbarch: gdbarch_register_sim_regno invalid");
3651 if (gdbarch_debug >= 2)
3652 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3653 return gdbarch->register_sim_regno (reg_nr);
3657 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3658 gdbarch_register_sim_regno_ftype register_sim_regno)
3660 gdbarch->register_sim_regno = register_sim_regno;
3664 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3666 gdb_assert (gdbarch != NULL);
3667 return gdbarch->register_bytes_ok != 0;
3671 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3673 gdb_assert (gdbarch != NULL);
3674 if (gdbarch->register_bytes_ok == 0)
3675 internal_error (__FILE__, __LINE__,
3676 "gdbarch: gdbarch_register_bytes_ok invalid");
3677 if (gdbarch_debug >= 2)
3678 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3679 return gdbarch->register_bytes_ok (nr_bytes);
3683 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3684 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3686 gdbarch->register_bytes_ok = register_bytes_ok;
3690 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3692 gdb_assert (gdbarch != NULL);
3693 if (gdbarch->cannot_fetch_register == 0)
3694 internal_error (__FILE__, __LINE__,
3695 "gdbarch: gdbarch_cannot_fetch_register invalid");
3696 if (gdbarch_debug >= 2)
3697 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3698 return gdbarch->cannot_fetch_register (regnum);
3702 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3703 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3705 gdbarch->cannot_fetch_register = cannot_fetch_register;
3709 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3711 gdb_assert (gdbarch != NULL);
3712 if (gdbarch->cannot_store_register == 0)
3713 internal_error (__FILE__, __LINE__,
3714 "gdbarch: gdbarch_cannot_store_register invalid");
3715 if (gdbarch_debug >= 2)
3716 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3717 return gdbarch->cannot_store_register (regnum);
3721 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3722 gdbarch_cannot_store_register_ftype cannot_store_register)
3724 gdbarch->cannot_store_register = cannot_store_register;
3728 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3730 gdb_assert (gdbarch != NULL);
3731 return gdbarch->get_longjmp_target != 0;
3735 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3737 gdb_assert (gdbarch != NULL);
3738 if (gdbarch->get_longjmp_target == 0)
3739 internal_error (__FILE__, __LINE__,
3740 "gdbarch: gdbarch_get_longjmp_target invalid");
3741 if (gdbarch_debug >= 2)
3742 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3743 return gdbarch->get_longjmp_target (pc);
3747 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3748 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3750 gdbarch->get_longjmp_target = get_longjmp_target;
3754 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3756 gdb_assert (gdbarch != NULL);
3757 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3758 if (gdbarch_debug >= 2)
3759 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3760 return gdbarch->deprecated_use_generic_dummy_frames;
3764 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3765 int deprecated_use_generic_dummy_frames)
3767 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3771 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3773 gdb_assert (gdbarch != NULL);
3774 /* Skip verify of call_dummy_location, invalid_p == 0 */
3775 if (gdbarch_debug >= 2)
3776 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3777 return gdbarch->call_dummy_location;
3781 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3782 int call_dummy_location)
3784 gdbarch->call_dummy_location = call_dummy_location;
3788 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3790 gdb_assert (gdbarch != NULL);
3791 if (gdbarch->call_dummy_address == 0)
3792 internal_error (__FILE__, __LINE__,
3793 "gdbarch: gdbarch_call_dummy_address invalid");
3794 if (gdbarch_debug >= 2)
3795 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3796 return gdbarch->call_dummy_address ();
3800 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3801 gdbarch_call_dummy_address_ftype call_dummy_address)
3803 gdbarch->call_dummy_address = call_dummy_address;
3807 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
3809 gdb_assert (gdbarch != NULL);
3810 if (gdbarch_debug >= 2)
3811 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3812 return gdbarch->deprecated_call_dummy_start_offset;
3816 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3817 CORE_ADDR deprecated_call_dummy_start_offset)
3819 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3823 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3825 gdb_assert (gdbarch != NULL);
3826 if (gdbarch_debug >= 2)
3827 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3828 return gdbarch->deprecated_call_dummy_breakpoint_offset;
3832 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3833 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3835 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3839 gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
3841 gdb_assert (gdbarch != NULL);
3842 if (gdbarch_debug >= 2)
3843 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
3844 return gdbarch->deprecated_call_dummy_length;
3848 set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
3849 int deprecated_call_dummy_length)
3851 gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
3855 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3857 gdb_assert (gdbarch != NULL);
3858 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3862 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3864 gdb_assert (gdbarch != NULL);
3865 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3866 internal_error (__FILE__, __LINE__,
3867 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3868 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3869 if (gdbarch_debug >= 2)
3870 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3871 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3875 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3876 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3878 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3882 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3884 gdb_assert (gdbarch != NULL);
3885 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3886 if (gdbarch_debug >= 2)
3887 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3888 return gdbarch->deprecated_call_dummy_words;
3892 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3893 LONGEST * deprecated_call_dummy_words)
3895 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3899 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3901 gdb_assert (gdbarch != NULL);
3902 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3903 if (gdbarch_debug >= 2)
3904 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3905 return gdbarch->deprecated_sizeof_call_dummy_words;
3909 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3910 int deprecated_sizeof_call_dummy_words)
3912 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3916 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3918 gdb_assert (gdbarch != NULL);
3919 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3923 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3925 gdb_assert (gdbarch != NULL);
3926 if (gdbarch_debug >= 2)
3927 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3928 return gdbarch->deprecated_call_dummy_stack_adjust;
3932 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3933 int deprecated_call_dummy_stack_adjust)
3935 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3939 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3941 gdb_assert (gdbarch != NULL);
3942 return gdbarch->deprecated_fix_call_dummy != 0;
3946 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)
3948 gdb_assert (gdbarch != NULL);
3949 if (gdbarch->deprecated_fix_call_dummy == 0)
3950 internal_error (__FILE__, __LINE__,
3951 "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3954 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3958 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3959 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3961 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3965 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3967 gdb_assert (gdbarch != NULL);
3968 return gdbarch->push_dummy_code != 0;
3972 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)
3974 gdb_assert (gdbarch != NULL);
3975 if (gdbarch->push_dummy_code == 0)
3976 internal_error (__FILE__, __LINE__,
3977 "gdbarch: gdbarch_push_dummy_code invalid");
3978 if (gdbarch_debug >= 2)
3979 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3980 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3984 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3985 gdbarch_push_dummy_code_ftype push_dummy_code)
3987 gdbarch->push_dummy_code = push_dummy_code;
3991 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3993 gdb_assert (gdbarch != NULL);
3994 return gdbarch->deprecated_init_frame_pc_first != 0;
3998 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
4000 gdb_assert (gdbarch != NULL);
4001 if (gdbarch->deprecated_init_frame_pc_first == 0)
4002 internal_error (__FILE__, __LINE__,
4003 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
4004 if (gdbarch_debug >= 2)
4005 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
4006 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
4010 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
4011 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
4013 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
4017 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
4019 gdb_assert (gdbarch != NULL);
4020 return gdbarch->deprecated_init_frame_pc != 0;
4024 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
4026 gdb_assert (gdbarch != NULL);
4027 if (gdbarch->deprecated_init_frame_pc == 0)
4028 internal_error (__FILE__, __LINE__,
4029 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
4030 if (gdbarch_debug >= 2)
4031 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
4032 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
4036 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
4037 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
4039 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
4043 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
4045 gdb_assert (gdbarch != NULL);
4046 if (gdbarch_debug >= 2)
4047 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
4048 return gdbarch->believe_pcc_promotion;
4052 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
4053 int believe_pcc_promotion)
4055 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
4059 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
4061 gdb_assert (gdbarch != NULL);
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
4064 return gdbarch->believe_pcc_promotion_type;
4068 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
4069 int believe_pcc_promotion_type)
4071 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
4075 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
4077 gdb_assert (gdbarch != NULL);
4078 return gdbarch->deprecated_get_saved_register != 0;
4082 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)
4084 gdb_assert (gdbarch != NULL);
4085 if (gdbarch->deprecated_get_saved_register == 0)
4086 internal_error (__FILE__, __LINE__,
4087 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
4090 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
4094 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
4095 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
4097 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
4101 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
4103 gdb_assert (gdbarch != NULL);
4104 if (gdbarch->register_convertible == 0)
4105 internal_error (__FILE__, __LINE__,
4106 "gdbarch: gdbarch_register_convertible invalid");
4107 if (gdbarch_debug >= 2)
4108 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4109 return gdbarch->register_convertible (nr);
4113 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4114 gdbarch_register_convertible_ftype register_convertible)
4116 gdbarch->register_convertible = register_convertible;
4120 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4122 gdb_assert (gdbarch != NULL);
4123 if (gdbarch->register_convert_to_virtual == 0)
4124 internal_error (__FILE__, __LINE__,
4125 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4126 if (gdbarch_debug >= 2)
4127 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4128 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4132 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4133 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4135 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4139 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4141 gdb_assert (gdbarch != NULL);
4142 if (gdbarch->register_convert_to_raw == 0)
4143 internal_error (__FILE__, __LINE__,
4144 "gdbarch: gdbarch_register_convert_to_raw invalid");
4145 if (gdbarch_debug >= 2)
4146 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4147 gdbarch->register_convert_to_raw (type, regnum, from, to);
4151 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4152 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4154 gdbarch->register_convert_to_raw = register_convert_to_raw;
4158 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4160 gdb_assert (gdbarch != NULL);
4161 if (gdbarch->convert_register_p == 0)
4162 internal_error (__FILE__, __LINE__,
4163 "gdbarch: gdbarch_convert_register_p invalid");
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4166 return gdbarch->convert_register_p (regnum);
4170 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4171 gdbarch_convert_register_p_ftype convert_register_p)
4173 gdbarch->convert_register_p = convert_register_p;
4177 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4179 gdb_assert (gdbarch != NULL);
4180 if (gdbarch->register_to_value == 0)
4181 internal_error (__FILE__, __LINE__,
4182 "gdbarch: gdbarch_register_to_value invalid");
4183 if (gdbarch_debug >= 2)
4184 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4185 gdbarch->register_to_value (regnum, type, from, to);
4189 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4190 gdbarch_register_to_value_ftype register_to_value)
4192 gdbarch->register_to_value = register_to_value;
4196 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4198 gdb_assert (gdbarch != NULL);
4199 if (gdbarch->value_to_register == 0)
4200 internal_error (__FILE__, __LINE__,
4201 "gdbarch: gdbarch_value_to_register invalid");
4202 if (gdbarch_debug >= 2)
4203 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4204 gdbarch->value_to_register (type, regnum, from, to);
4208 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4209 gdbarch_value_to_register_ftype value_to_register)
4211 gdbarch->value_to_register = value_to_register;
4215 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4217 gdb_assert (gdbarch != NULL);
4218 if (gdbarch->pointer_to_address == 0)
4219 internal_error (__FILE__, __LINE__,
4220 "gdbarch: gdbarch_pointer_to_address invalid");
4221 if (gdbarch_debug >= 2)
4222 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4223 return gdbarch->pointer_to_address (type, buf);
4227 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4228 gdbarch_pointer_to_address_ftype pointer_to_address)
4230 gdbarch->pointer_to_address = pointer_to_address;
4234 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4236 gdb_assert (gdbarch != NULL);
4237 if (gdbarch->address_to_pointer == 0)
4238 internal_error (__FILE__, __LINE__,
4239 "gdbarch: gdbarch_address_to_pointer invalid");
4240 if (gdbarch_debug >= 2)
4241 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4242 gdbarch->address_to_pointer (type, buf, addr);
4246 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4247 gdbarch_address_to_pointer_ftype address_to_pointer)
4249 gdbarch->address_to_pointer = address_to_pointer;
4253 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4255 gdb_assert (gdbarch != NULL);
4256 return gdbarch->integer_to_address != 0;
4260 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4262 gdb_assert (gdbarch != NULL);
4263 if (gdbarch->integer_to_address == 0)
4264 internal_error (__FILE__, __LINE__,
4265 "gdbarch: gdbarch_integer_to_address invalid");
4266 if (gdbarch_debug >= 2)
4267 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4268 return gdbarch->integer_to_address (type, buf);
4272 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4273 gdbarch_integer_to_address_ftype integer_to_address)
4275 gdbarch->integer_to_address = integer_to_address;
4279 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4281 gdb_assert (gdbarch != NULL);
4282 if (gdbarch->return_value_on_stack == 0)
4283 internal_error (__FILE__, __LINE__,
4284 "gdbarch: gdbarch_return_value_on_stack invalid");
4285 if (gdbarch_debug >= 2)
4286 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4287 return gdbarch->return_value_on_stack (type);
4291 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4292 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4294 gdbarch->return_value_on_stack = return_value_on_stack;
4298 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4300 gdb_assert (gdbarch != NULL);
4301 return gdbarch->deprecated_push_arguments != 0;
4305 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4307 gdb_assert (gdbarch != NULL);
4308 if (gdbarch->deprecated_push_arguments == 0)
4309 internal_error (__FILE__, __LINE__,
4310 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4311 if (gdbarch_debug >= 2)
4312 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4313 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4317 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4318 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4320 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4324 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4326 gdb_assert (gdbarch != NULL);
4327 return gdbarch->push_dummy_call != 0;
4331 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)
4333 gdb_assert (gdbarch != NULL);
4334 if (gdbarch->push_dummy_call == 0)
4335 internal_error (__FILE__, __LINE__,
4336 "gdbarch: gdbarch_push_dummy_call invalid");
4337 if (gdbarch_debug >= 2)
4338 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4339 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
4343 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4344 gdbarch_push_dummy_call_ftype push_dummy_call)
4346 gdbarch->push_dummy_call = push_dummy_call;
4350 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4352 gdb_assert (gdbarch != NULL);
4353 return gdbarch->deprecated_push_dummy_frame != 0;
4357 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4359 gdb_assert (gdbarch != NULL);
4360 if (gdbarch->deprecated_push_dummy_frame == 0)
4361 internal_error (__FILE__, __LINE__,
4362 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4363 if (gdbarch_debug >= 2)
4364 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4365 gdbarch->deprecated_push_dummy_frame ();
4369 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4370 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4372 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4376 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
4378 gdb_assert (gdbarch != NULL);
4379 return gdbarch->deprecated_push_return_address != 0;
4383 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4385 gdb_assert (gdbarch != NULL);
4386 if (gdbarch->deprecated_push_return_address == 0)
4387 internal_error (__FILE__, __LINE__,
4388 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4389 if (gdbarch_debug >= 2)
4390 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4391 return gdbarch->deprecated_push_return_address (pc, sp);
4395 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4396 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
4398 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
4402 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4404 gdb_assert (gdbarch != NULL);
4405 return gdbarch->deprecated_pop_frame != 0;
4409 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4411 gdb_assert (gdbarch != NULL);
4412 if (gdbarch->deprecated_pop_frame == 0)
4413 internal_error (__FILE__, __LINE__,
4414 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4415 if (gdbarch_debug >= 2)
4416 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4417 gdbarch->deprecated_pop_frame ();
4421 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4422 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4424 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4428 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4430 gdb_assert (gdbarch != NULL);
4431 return gdbarch->deprecated_store_struct_return != 0;
4435 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4437 gdb_assert (gdbarch != NULL);
4438 if (gdbarch->deprecated_store_struct_return == 0)
4439 internal_error (__FILE__, __LINE__,
4440 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4441 if (gdbarch_debug >= 2)
4442 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4443 gdbarch->deprecated_store_struct_return (addr, sp);
4447 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4448 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4450 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4454 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4456 gdb_assert (gdbarch != NULL);
4457 if (gdbarch->extract_return_value == 0)
4458 internal_error (__FILE__, __LINE__,
4459 "gdbarch: gdbarch_extract_return_value invalid");
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 if (gdbarch->store_return_value == 0)
4477 internal_error (__FILE__, __LINE__,
4478 "gdbarch: gdbarch_store_return_value invalid");
4479 if (gdbarch_debug >= 2)
4480 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4481 gdbarch->store_return_value (type, regcache, valbuf);
4485 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4486 gdbarch_store_return_value_ftype store_return_value)
4488 gdbarch->store_return_value = store_return_value;
4492 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4494 gdb_assert (gdbarch != NULL);
4495 if (gdbarch->deprecated_extract_return_value == 0)
4496 internal_error (__FILE__, __LINE__,
4497 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4498 if (gdbarch_debug >= 2)
4499 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4500 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4504 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4505 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4507 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4511 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4513 gdb_assert (gdbarch != NULL);
4514 if (gdbarch->deprecated_store_return_value == 0)
4515 internal_error (__FILE__, __LINE__,
4516 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4517 if (gdbarch_debug >= 2)
4518 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4519 gdbarch->deprecated_store_return_value (type, valbuf);
4523 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4524 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4526 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4530 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4532 gdb_assert (gdbarch != NULL);
4533 return gdbarch->extract_struct_value_address != 0;
4537 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4539 gdb_assert (gdbarch != NULL);
4540 if (gdbarch->extract_struct_value_address == 0)
4541 internal_error (__FILE__, __LINE__,
4542 "gdbarch: gdbarch_extract_struct_value_address invalid");
4543 if (gdbarch_debug >= 2)
4544 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4545 return gdbarch->extract_struct_value_address (regcache);
4549 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4550 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4552 gdbarch->extract_struct_value_address = extract_struct_value_address;
4556 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4558 gdb_assert (gdbarch != NULL);
4559 return gdbarch->deprecated_extract_struct_value_address != 0;
4563 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4565 gdb_assert (gdbarch != NULL);
4566 if (gdbarch->deprecated_extract_struct_value_address == 0)
4567 internal_error (__FILE__, __LINE__,
4568 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4569 if (gdbarch_debug >= 2)
4570 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4571 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4575 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4576 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4578 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4582 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4584 gdb_assert (gdbarch != NULL);
4585 if (gdbarch->use_struct_convention == 0)
4586 internal_error (__FILE__, __LINE__,
4587 "gdbarch: gdbarch_use_struct_convention invalid");
4588 if (gdbarch_debug >= 2)
4589 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4590 return gdbarch->use_struct_convention (gcc_p, value_type);
4594 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4595 gdbarch_use_struct_convention_ftype use_struct_convention)
4597 gdbarch->use_struct_convention = use_struct_convention;
4601 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4603 gdb_assert (gdbarch != NULL);
4604 return gdbarch->deprecated_frame_init_saved_regs != 0;
4608 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4610 gdb_assert (gdbarch != NULL);
4611 if (gdbarch->deprecated_frame_init_saved_regs == 0)
4612 internal_error (__FILE__, __LINE__,
4613 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4614 if (gdbarch_debug >= 2)
4615 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4616 gdbarch->deprecated_frame_init_saved_regs (frame);
4620 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4621 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4623 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4627 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4629 gdb_assert (gdbarch != NULL);
4630 return gdbarch->deprecated_init_extra_frame_info != 0;
4634 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4636 gdb_assert (gdbarch != NULL);
4637 if (gdbarch->deprecated_init_extra_frame_info == 0)
4638 internal_error (__FILE__, __LINE__,
4639 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4640 if (gdbarch_debug >= 2)
4641 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4642 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4646 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4647 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4649 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4653 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4655 gdb_assert (gdbarch != NULL);
4656 if (gdbarch->skip_prologue == 0)
4657 internal_error (__FILE__, __LINE__,
4658 "gdbarch: gdbarch_skip_prologue invalid");
4659 if (gdbarch_debug >= 2)
4660 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4661 return gdbarch->skip_prologue (ip);
4665 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4666 gdbarch_skip_prologue_ftype skip_prologue)
4668 gdbarch->skip_prologue = skip_prologue;
4672 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4674 gdb_assert (gdbarch != NULL);
4675 if (gdbarch->prologue_frameless_p == 0)
4676 internal_error (__FILE__, __LINE__,
4677 "gdbarch: gdbarch_prologue_frameless_p invalid");
4678 if (gdbarch_debug >= 2)
4679 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4680 return gdbarch->prologue_frameless_p (ip);
4684 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4685 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4687 gdbarch->prologue_frameless_p = prologue_frameless_p;
4691 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4693 gdb_assert (gdbarch != NULL);
4694 if (gdbarch->inner_than == 0)
4695 internal_error (__FILE__, __LINE__,
4696 "gdbarch: gdbarch_inner_than invalid");
4697 if (gdbarch_debug >= 2)
4698 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4699 return gdbarch->inner_than (lhs, rhs);
4703 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4704 gdbarch_inner_than_ftype inner_than)
4706 gdbarch->inner_than = inner_than;
4709 const unsigned char *
4710 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4712 gdb_assert (gdbarch != NULL);
4713 if (gdbarch->breakpoint_from_pc == 0)
4714 internal_error (__FILE__, __LINE__,
4715 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4716 if (gdbarch_debug >= 2)
4717 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4718 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4722 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4723 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4725 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4729 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4731 gdb_assert (gdbarch != NULL);
4732 if (gdbarch->memory_insert_breakpoint == 0)
4733 internal_error (__FILE__, __LINE__,
4734 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4735 if (gdbarch_debug >= 2)
4736 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4737 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4741 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4742 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4744 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4748 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4750 gdb_assert (gdbarch != NULL);
4751 if (gdbarch->memory_remove_breakpoint == 0)
4752 internal_error (__FILE__, __LINE__,
4753 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4754 if (gdbarch_debug >= 2)
4755 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4756 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4760 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4761 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4763 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4767 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4769 gdb_assert (gdbarch != NULL);
4770 if (gdbarch->decr_pc_after_break == -1)
4771 internal_error (__FILE__, __LINE__,
4772 "gdbarch: gdbarch_decr_pc_after_break invalid");
4773 if (gdbarch_debug >= 2)
4774 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4775 return gdbarch->decr_pc_after_break;
4779 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4780 CORE_ADDR decr_pc_after_break)
4782 gdbarch->decr_pc_after_break = decr_pc_after_break;
4786 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4788 gdb_assert (gdbarch != NULL);
4789 if (gdbarch->prepare_to_proceed == 0)
4790 internal_error (__FILE__, __LINE__,
4791 "gdbarch: gdbarch_prepare_to_proceed invalid");
4792 if (gdbarch_debug >= 2)
4793 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4794 return gdbarch->prepare_to_proceed (select_it);
4798 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4799 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4801 gdbarch->prepare_to_proceed = prepare_to_proceed;
4805 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4807 gdb_assert (gdbarch != NULL);
4808 if (gdbarch->function_start_offset == -1)
4809 internal_error (__FILE__, __LINE__,
4810 "gdbarch: gdbarch_function_start_offset invalid");
4811 if (gdbarch_debug >= 2)
4812 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4813 return gdbarch->function_start_offset;
4817 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4818 CORE_ADDR function_start_offset)
4820 gdbarch->function_start_offset = function_start_offset;
4824 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)
4826 gdb_assert (gdbarch != NULL);
4827 if (gdbarch->remote_translate_xfer_address == 0)
4828 internal_error (__FILE__, __LINE__,
4829 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4830 if (gdbarch_debug >= 2)
4831 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4832 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4836 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4837 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4839 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4843 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4845 gdb_assert (gdbarch != NULL);
4846 if (gdbarch->frame_args_skip == -1)
4847 internal_error (__FILE__, __LINE__,
4848 "gdbarch: gdbarch_frame_args_skip invalid");
4849 if (gdbarch_debug >= 2)
4850 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4851 return gdbarch->frame_args_skip;
4855 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4856 CORE_ADDR frame_args_skip)
4858 gdbarch->frame_args_skip = frame_args_skip;
4862 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4864 gdb_assert (gdbarch != NULL);
4865 if (gdbarch->frameless_function_invocation == 0)
4866 internal_error (__FILE__, __LINE__,
4867 "gdbarch: gdbarch_frameless_function_invocation invalid");
4868 if (gdbarch_debug >= 2)
4869 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4870 return gdbarch->frameless_function_invocation (fi);
4874 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4875 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4877 gdbarch->frameless_function_invocation = frameless_function_invocation;
4881 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4883 gdb_assert (gdbarch != NULL);
4884 return gdbarch->deprecated_frame_chain != 0;
4888 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4890 gdb_assert (gdbarch != NULL);
4891 if (gdbarch->deprecated_frame_chain == 0)
4892 internal_error (__FILE__, __LINE__,
4893 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4894 if (gdbarch_debug >= 2)
4895 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4896 return gdbarch->deprecated_frame_chain (frame);
4900 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4901 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4903 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4907 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4909 gdb_assert (gdbarch != NULL);
4910 return gdbarch->deprecated_frame_chain_valid != 0;
4914 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4916 gdb_assert (gdbarch != NULL);
4917 if (gdbarch->deprecated_frame_chain_valid == 0)
4918 internal_error (__FILE__, __LINE__,
4919 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4920 if (gdbarch_debug >= 2)
4921 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4922 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4926 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4927 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4929 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4933 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4935 gdb_assert (gdbarch != NULL);
4936 return gdbarch->deprecated_frame_saved_pc != 0;
4940 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4942 gdb_assert (gdbarch != NULL);
4943 if (gdbarch->deprecated_frame_saved_pc == 0)
4944 internal_error (__FILE__, __LINE__,
4945 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4946 if (gdbarch_debug >= 2)
4947 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4948 return gdbarch->deprecated_frame_saved_pc (fi);
4952 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4953 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4955 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4959 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4961 gdb_assert (gdbarch != NULL);
4962 return gdbarch->unwind_pc != 0;
4966 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4968 gdb_assert (gdbarch != NULL);
4969 if (gdbarch->unwind_pc == 0)
4970 internal_error (__FILE__, __LINE__,
4971 "gdbarch: gdbarch_unwind_pc invalid");
4972 if (gdbarch_debug >= 2)
4973 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4974 return gdbarch->unwind_pc (gdbarch, next_frame);
4978 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4979 gdbarch_unwind_pc_ftype unwind_pc)
4981 gdbarch->unwind_pc = unwind_pc;
4985 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
4987 gdb_assert (gdbarch != NULL);
4988 return gdbarch->unwind_sp != 0;
4992 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
4994 gdb_assert (gdbarch != NULL);
4995 if (gdbarch->unwind_sp == 0)
4996 internal_error (__FILE__, __LINE__,
4997 "gdbarch: gdbarch_unwind_sp invalid");
4998 if (gdbarch_debug >= 2)
4999 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
5000 return gdbarch->unwind_sp (gdbarch, next_frame);
5004 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
5005 gdbarch_unwind_sp_ftype unwind_sp)
5007 gdbarch->unwind_sp = unwind_sp;
5011 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
5013 gdb_assert (gdbarch != NULL);
5014 if (gdbarch->frame_args_address == 0)
5015 internal_error (__FILE__, __LINE__,
5016 "gdbarch: gdbarch_frame_args_address invalid");
5017 if (gdbarch_debug >= 2)
5018 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
5019 return gdbarch->frame_args_address (fi);
5023 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
5024 gdbarch_frame_args_address_ftype frame_args_address)
5026 gdbarch->frame_args_address = frame_args_address;
5030 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
5032 gdb_assert (gdbarch != NULL);
5033 if (gdbarch->frame_locals_address == 0)
5034 internal_error (__FILE__, __LINE__,
5035 "gdbarch: gdbarch_frame_locals_address invalid");
5036 if (gdbarch_debug >= 2)
5037 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
5038 return gdbarch->frame_locals_address (fi);
5042 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
5043 gdbarch_frame_locals_address_ftype frame_locals_address)
5045 gdbarch->frame_locals_address = frame_locals_address;
5049 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
5051 gdb_assert (gdbarch != NULL);
5052 return gdbarch->deprecated_saved_pc_after_call != 0;
5056 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
5058 gdb_assert (gdbarch != NULL);
5059 if (gdbarch->deprecated_saved_pc_after_call == 0)
5060 internal_error (__FILE__, __LINE__,
5061 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
5062 if (gdbarch_debug >= 2)
5063 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
5064 return gdbarch->deprecated_saved_pc_after_call (frame);
5068 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
5069 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
5071 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
5075 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
5077 gdb_assert (gdbarch != NULL);
5078 if (gdbarch->frame_num_args == 0)
5079 internal_error (__FILE__, __LINE__,
5080 "gdbarch: gdbarch_frame_num_args invalid");
5081 if (gdbarch_debug >= 2)
5082 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
5083 return gdbarch->frame_num_args (frame);
5087 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
5088 gdbarch_frame_num_args_ftype frame_num_args)
5090 gdbarch->frame_num_args = frame_num_args;
5094 gdbarch_stack_align_p (struct gdbarch *gdbarch)
5096 gdb_assert (gdbarch != NULL);
5097 return gdbarch->stack_align != 0;
5101 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
5103 gdb_assert (gdbarch != NULL);
5104 if (gdbarch->stack_align == 0)
5105 internal_error (__FILE__, __LINE__,
5106 "gdbarch: gdbarch_stack_align invalid");
5107 if (gdbarch_debug >= 2)
5108 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
5109 return gdbarch->stack_align (sp);
5113 set_gdbarch_stack_align (struct gdbarch *gdbarch,
5114 gdbarch_stack_align_ftype stack_align)
5116 gdbarch->stack_align = stack_align;
5120 gdbarch_frame_align_p (struct gdbarch *gdbarch)
5122 gdb_assert (gdbarch != NULL);
5123 return gdbarch->frame_align != 0;
5127 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
5129 gdb_assert (gdbarch != NULL);
5130 if (gdbarch->frame_align == 0)
5131 internal_error (__FILE__, __LINE__,
5132 "gdbarch: gdbarch_frame_align invalid");
5133 if (gdbarch_debug >= 2)
5134 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5135 return gdbarch->frame_align (gdbarch, address);
5139 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5140 gdbarch_frame_align_ftype frame_align)
5142 gdbarch->frame_align = frame_align;
5146 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
5148 gdb_assert (gdbarch != NULL);
5149 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5150 if (gdbarch_debug >= 2)
5151 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5152 return gdbarch->deprecated_extra_stack_alignment_needed;
5156 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
5157 int deprecated_extra_stack_alignment_needed)
5159 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
5163 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5165 gdb_assert (gdbarch != NULL);
5166 return gdbarch->reg_struct_has_addr != 0;
5170 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5172 gdb_assert (gdbarch != NULL);
5173 if (gdbarch->reg_struct_has_addr == 0)
5174 internal_error (__FILE__, __LINE__,
5175 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5176 if (gdbarch_debug >= 2)
5177 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5178 return gdbarch->reg_struct_has_addr (gcc_p, type);
5182 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5183 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5185 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5189 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
5191 gdb_assert (gdbarch != NULL);
5192 return gdbarch->save_dummy_frame_tos != 0;
5196 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
5198 gdb_assert (gdbarch != NULL);
5199 if (gdbarch->save_dummy_frame_tos == 0)
5200 internal_error (__FILE__, __LINE__,
5201 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5202 if (gdbarch_debug >= 2)
5203 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5204 gdbarch->save_dummy_frame_tos (sp);
5208 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5209 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5211 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5215 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
5217 gdb_assert (gdbarch != NULL);
5218 return gdbarch->unwind_dummy_id != 0;
5222 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
5224 gdb_assert (gdbarch != NULL);
5225 if (gdbarch->unwind_dummy_id == 0)
5226 internal_error (__FILE__, __LINE__,
5227 "gdbarch: gdbarch_unwind_dummy_id invalid");
5228 if (gdbarch_debug >= 2)
5229 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
5230 return gdbarch->unwind_dummy_id (gdbarch, info);
5234 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
5235 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
5237 gdbarch->unwind_dummy_id = unwind_dummy_id;
5241 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5243 gdb_assert (gdbarch != NULL);
5244 if (gdbarch_debug >= 2)
5245 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5246 return gdbarch->parm_boundary;
5250 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5253 gdbarch->parm_boundary = parm_boundary;
5256 const struct floatformat *
5257 gdbarch_float_format (struct gdbarch *gdbarch)
5259 gdb_assert (gdbarch != NULL);
5260 if (gdbarch_debug >= 2)
5261 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5262 return gdbarch->float_format;
5266 set_gdbarch_float_format (struct gdbarch *gdbarch,
5267 const struct floatformat * float_format)
5269 gdbarch->float_format = float_format;
5272 const struct floatformat *
5273 gdbarch_double_format (struct gdbarch *gdbarch)
5275 gdb_assert (gdbarch != NULL);
5276 if (gdbarch_debug >= 2)
5277 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5278 return gdbarch->double_format;
5282 set_gdbarch_double_format (struct gdbarch *gdbarch,
5283 const struct floatformat * double_format)
5285 gdbarch->double_format = double_format;
5288 const struct floatformat *
5289 gdbarch_long_double_format (struct gdbarch *gdbarch)
5291 gdb_assert (gdbarch != NULL);
5292 if (gdbarch_debug >= 2)
5293 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5294 return gdbarch->long_double_format;
5298 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5299 const struct floatformat * long_double_format)
5301 gdbarch->long_double_format = long_double_format;
5305 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5307 gdb_assert (gdbarch != NULL);
5308 if (gdbarch->convert_from_func_ptr_addr == 0)
5309 internal_error (__FILE__, __LINE__,
5310 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5311 if (gdbarch_debug >= 2)
5312 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5313 return gdbarch->convert_from_func_ptr_addr (addr);
5317 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5318 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5320 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5324 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5326 gdb_assert (gdbarch != NULL);
5327 if (gdbarch->addr_bits_remove == 0)
5328 internal_error (__FILE__, __LINE__,
5329 "gdbarch: gdbarch_addr_bits_remove invalid");
5330 if (gdbarch_debug >= 2)
5331 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5332 return gdbarch->addr_bits_remove (addr);
5336 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5337 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5339 gdbarch->addr_bits_remove = addr_bits_remove;
5343 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5345 gdb_assert (gdbarch != NULL);
5346 if (gdbarch->smash_text_address == 0)
5347 internal_error (__FILE__, __LINE__,
5348 "gdbarch: gdbarch_smash_text_address invalid");
5349 if (gdbarch_debug >= 2)
5350 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5351 return gdbarch->smash_text_address (addr);
5355 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5356 gdbarch_smash_text_address_ftype smash_text_address)
5358 gdbarch->smash_text_address = smash_text_address;
5362 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5364 gdb_assert (gdbarch != NULL);
5365 return gdbarch->software_single_step != 0;
5369 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5371 gdb_assert (gdbarch != NULL);
5372 if (gdbarch->software_single_step == 0)
5373 internal_error (__FILE__, __LINE__,
5374 "gdbarch: gdbarch_software_single_step invalid");
5375 if (gdbarch_debug >= 2)
5376 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5377 gdbarch->software_single_step (sig, insert_breakpoints_p);
5381 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5382 gdbarch_software_single_step_ftype software_single_step)
5384 gdbarch->software_single_step = software_single_step;
5388 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5390 gdb_assert (gdbarch != NULL);
5391 if (gdbarch->print_insn == 0)
5392 internal_error (__FILE__, __LINE__,
5393 "gdbarch: gdbarch_print_insn invalid");
5394 if (gdbarch_debug >= 2)
5395 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5396 return gdbarch->print_insn (vma, info);
5400 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5401 gdbarch_print_insn_ftype print_insn)
5403 gdbarch->print_insn = print_insn;
5407 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5409 gdb_assert (gdbarch != NULL);
5410 if (gdbarch->skip_trampoline_code == 0)
5411 internal_error (__FILE__, __LINE__,
5412 "gdbarch: gdbarch_skip_trampoline_code invalid");
5413 if (gdbarch_debug >= 2)
5414 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5415 return gdbarch->skip_trampoline_code (pc);
5419 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5420 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5422 gdbarch->skip_trampoline_code = skip_trampoline_code;
5426 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5428 gdb_assert (gdbarch != NULL);
5429 if (gdbarch->in_solib_call_trampoline == 0)
5430 internal_error (__FILE__, __LINE__,
5431 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5432 if (gdbarch_debug >= 2)
5433 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5434 return gdbarch->in_solib_call_trampoline (pc, name);
5438 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5439 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5441 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5445 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5447 gdb_assert (gdbarch != NULL);
5448 if (gdbarch->in_solib_return_trampoline == 0)
5449 internal_error (__FILE__, __LINE__,
5450 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5451 if (gdbarch_debug >= 2)
5452 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5453 return gdbarch->in_solib_return_trampoline (pc, name);
5457 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5458 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5460 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5464 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5466 gdb_assert (gdbarch != NULL);
5467 if (gdbarch->pc_in_sigtramp == 0)
5468 internal_error (__FILE__, __LINE__,
5469 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5470 if (gdbarch_debug >= 2)
5471 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5472 return gdbarch->pc_in_sigtramp (pc, name);
5476 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5477 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5479 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5483 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5485 gdb_assert (gdbarch != NULL);
5486 return gdbarch->sigtramp_start != 0;
5490 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5492 gdb_assert (gdbarch != NULL);
5493 if (gdbarch->sigtramp_start == 0)
5494 internal_error (__FILE__, __LINE__,
5495 "gdbarch: gdbarch_sigtramp_start invalid");
5496 if (gdbarch_debug >= 2)
5497 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5498 return gdbarch->sigtramp_start (pc);
5502 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5503 gdbarch_sigtramp_start_ftype sigtramp_start)
5505 gdbarch->sigtramp_start = sigtramp_start;
5509 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5511 gdb_assert (gdbarch != NULL);
5512 return gdbarch->sigtramp_end != 0;
5516 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5518 gdb_assert (gdbarch != NULL);
5519 if (gdbarch->sigtramp_end == 0)
5520 internal_error (__FILE__, __LINE__,
5521 "gdbarch: gdbarch_sigtramp_end invalid");
5522 if (gdbarch_debug >= 2)
5523 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5524 return gdbarch->sigtramp_end (pc);
5528 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5529 gdbarch_sigtramp_end_ftype sigtramp_end)
5531 gdbarch->sigtramp_end = sigtramp_end;
5535 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5537 gdb_assert (gdbarch != NULL);
5538 if (gdbarch->in_function_epilogue_p == 0)
5539 internal_error (__FILE__, __LINE__,
5540 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5541 if (gdbarch_debug >= 2)
5542 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5543 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5547 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5548 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5550 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5554 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5556 gdb_assert (gdbarch != NULL);
5557 if (gdbarch->construct_inferior_arguments == 0)
5558 internal_error (__FILE__, __LINE__,
5559 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5560 if (gdbarch_debug >= 2)
5561 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5562 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5566 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5567 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5569 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5573 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5575 gdb_assert (gdbarch != NULL);
5576 return gdbarch->dwarf2_build_frame_info != 0;
5580 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5582 gdb_assert (gdbarch != NULL);
5583 if (gdbarch->dwarf2_build_frame_info == 0)
5584 internal_error (__FILE__, __LINE__,
5585 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5586 if (gdbarch_debug >= 2)
5587 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5588 gdbarch->dwarf2_build_frame_info (objfile);
5592 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5593 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5595 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5599 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5601 gdb_assert (gdbarch != NULL);
5602 if (gdbarch->elf_make_msymbol_special == 0)
5603 internal_error (__FILE__, __LINE__,
5604 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5605 if (gdbarch_debug >= 2)
5606 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5607 gdbarch->elf_make_msymbol_special (sym, msym);
5611 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5612 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5614 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5618 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5620 gdb_assert (gdbarch != NULL);
5621 if (gdbarch->coff_make_msymbol_special == 0)
5622 internal_error (__FILE__, __LINE__,
5623 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5624 if (gdbarch_debug >= 2)
5625 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5626 gdbarch->coff_make_msymbol_special (val, msym);
5630 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5631 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5633 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5637 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5639 gdb_assert (gdbarch != NULL);
5640 /* Skip verify of name_of_malloc, invalid_p == 0 */
5641 if (gdbarch_debug >= 2)
5642 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5643 return gdbarch->name_of_malloc;
5647 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5648 const char * name_of_malloc)
5650 gdbarch->name_of_malloc = name_of_malloc;
5654 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5656 gdb_assert (gdbarch != NULL);
5657 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5658 if (gdbarch_debug >= 2)
5659 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5660 return gdbarch->cannot_step_breakpoint;
5664 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5665 int cannot_step_breakpoint)
5667 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5671 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5673 gdb_assert (gdbarch != NULL);
5674 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5675 if (gdbarch_debug >= 2)
5676 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5677 return gdbarch->have_nonsteppable_watchpoint;
5681 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5682 int have_nonsteppable_watchpoint)
5684 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5688 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5690 gdb_assert (gdbarch != NULL);
5691 return gdbarch->address_class_type_flags != 0;
5695 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5697 gdb_assert (gdbarch != NULL);
5698 if (gdbarch->address_class_type_flags == 0)
5699 internal_error (__FILE__, __LINE__,
5700 "gdbarch: gdbarch_address_class_type_flags invalid");
5701 if (gdbarch_debug >= 2)
5702 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5703 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5707 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5708 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5710 gdbarch->address_class_type_flags = address_class_type_flags;
5714 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5716 gdb_assert (gdbarch != NULL);
5717 return gdbarch->address_class_type_flags_to_name != 0;
5721 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5723 gdb_assert (gdbarch != NULL);
5724 if (gdbarch->address_class_type_flags_to_name == 0)
5725 internal_error (__FILE__, __LINE__,
5726 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5727 if (gdbarch_debug >= 2)
5728 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5729 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5733 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5734 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5736 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5740 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5742 gdb_assert (gdbarch != NULL);
5743 return gdbarch->address_class_name_to_type_flags != 0;
5747 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5749 gdb_assert (gdbarch != NULL);
5750 if (gdbarch->address_class_name_to_type_flags == 0)
5751 internal_error (__FILE__, __LINE__,
5752 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5753 if (gdbarch_debug >= 2)
5754 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5755 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5759 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5760 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5762 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5766 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5768 gdb_assert (gdbarch != NULL);
5769 if (gdbarch->register_reggroup_p == 0)
5770 internal_error (__FILE__, __LINE__,
5771 "gdbarch: gdbarch_register_reggroup_p invalid");
5772 if (gdbarch_debug >= 2)
5773 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5774 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5778 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5779 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5781 gdbarch->register_reggroup_p = register_reggroup_p;
5785 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5787 gdb_assert (gdbarch != NULL);
5788 return gdbarch->fetch_pointer_argument != 0;
5792 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5794 gdb_assert (gdbarch != NULL);
5795 if (gdbarch->fetch_pointer_argument == 0)
5796 internal_error (__FILE__, __LINE__,
5797 "gdbarch: gdbarch_fetch_pointer_argument invalid");
5798 if (gdbarch_debug >= 2)
5799 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5800 return gdbarch->fetch_pointer_argument (frame, argi, type);
5804 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5805 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5807 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5811 /* Keep a registry of per-architecture data-pointers required by GDB
5818 gdbarch_data_init_ftype *init;
5819 gdbarch_data_free_ftype *free;
5822 struct gdbarch_data_registration
5824 struct gdbarch_data *data;
5825 struct gdbarch_data_registration *next;
5828 struct gdbarch_data_registry
5831 struct gdbarch_data_registration *registrations;
5834 struct gdbarch_data_registry gdbarch_data_registry =
5839 struct gdbarch_data *
5840 register_gdbarch_data (gdbarch_data_init_ftype *init,
5841 gdbarch_data_free_ftype *free)
5843 struct gdbarch_data_registration **curr;
5844 /* Append the new registraration. */
5845 for (curr = &gdbarch_data_registry.registrations;
5847 curr = &(*curr)->next);
5848 (*curr) = XMALLOC (struct gdbarch_data_registration);
5849 (*curr)->next = NULL;
5850 (*curr)->data = XMALLOC (struct gdbarch_data);
5851 (*curr)->data->index = gdbarch_data_registry.nr++;
5852 (*curr)->data->init = init;
5853 (*curr)->data->init_p = 1;
5854 (*curr)->data->free = free;
5855 return (*curr)->data;
5859 /* Create/delete the gdbarch data vector. */
5862 alloc_gdbarch_data (struct gdbarch *gdbarch)
5864 gdb_assert (gdbarch->data == NULL);
5865 gdbarch->nr_data = gdbarch_data_registry.nr;
5866 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5870 free_gdbarch_data (struct gdbarch *gdbarch)
5872 struct gdbarch_data_registration *rego;
5873 gdb_assert (gdbarch->data != NULL);
5874 for (rego = gdbarch_data_registry.registrations;
5878 struct gdbarch_data *data = rego->data;
5879 gdb_assert (data->index < gdbarch->nr_data);
5880 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5882 data->free (gdbarch, gdbarch->data[data->index]);
5883 gdbarch->data[data->index] = NULL;
5886 xfree (gdbarch->data);
5887 gdbarch->data = NULL;
5891 /* Initialize the current value of the specified per-architecture
5895 set_gdbarch_data (struct gdbarch *gdbarch,
5896 struct gdbarch_data *data,
5899 gdb_assert (data->index < gdbarch->nr_data);
5900 if (gdbarch->data[data->index] != NULL)
5902 gdb_assert (data->free != NULL);
5903 data->free (gdbarch, gdbarch->data[data->index]);
5905 gdbarch->data[data->index] = pointer;
5908 /* Return the current value of the specified per-architecture
5912 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5914 gdb_assert (data->index < gdbarch->nr_data);
5915 /* The data-pointer isn't initialized, call init() to get a value but
5916 only if the architecture initializaiton has completed. Otherwise
5917 punt - hope that the caller knows what they are doing. */
5918 if (gdbarch->data[data->index] == NULL
5919 && gdbarch->initialized_p)
5921 /* Be careful to detect an initialization cycle. */
5922 gdb_assert (data->init_p);
5924 gdb_assert (data->init != NULL);
5925 gdbarch->data[data->index] = data->init (gdbarch);
5927 gdb_assert (gdbarch->data[data->index] != NULL);
5929 return gdbarch->data[data->index];
5934 /* Keep a registry of swapped data required by GDB modules. */
5939 struct gdbarch_swap_registration *source;
5940 struct gdbarch_swap *next;
5943 struct gdbarch_swap_registration
5946 unsigned long sizeof_data;
5947 gdbarch_swap_ftype *init;
5948 struct gdbarch_swap_registration *next;
5951 struct gdbarch_swap_registry
5954 struct gdbarch_swap_registration *registrations;
5957 struct gdbarch_swap_registry gdbarch_swap_registry =
5963 register_gdbarch_swap (void *data,
5964 unsigned long sizeof_data,
5965 gdbarch_swap_ftype *init)
5967 struct gdbarch_swap_registration **rego;
5968 for (rego = &gdbarch_swap_registry.registrations;
5970 rego = &(*rego)->next);
5971 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5972 (*rego)->next = NULL;
5973 (*rego)->init = init;
5974 (*rego)->data = data;
5975 (*rego)->sizeof_data = sizeof_data;
5979 clear_gdbarch_swap (struct gdbarch *gdbarch)
5981 struct gdbarch_swap *curr;
5982 for (curr = gdbarch->swap;
5986 memset (curr->source->data, 0, curr->source->sizeof_data);
5991 init_gdbarch_swap (struct gdbarch *gdbarch)
5993 struct gdbarch_swap_registration *rego;
5994 struct gdbarch_swap **curr = &gdbarch->swap;
5995 for (rego = gdbarch_swap_registry.registrations;
5999 if (rego->data != NULL)
6001 (*curr) = XMALLOC (struct gdbarch_swap);
6002 (*curr)->source = rego;
6003 (*curr)->swap = xmalloc (rego->sizeof_data);
6004 (*curr)->next = NULL;
6005 curr = &(*curr)->next;
6007 if (rego->init != NULL)
6013 swapout_gdbarch_swap (struct gdbarch *gdbarch)
6015 struct gdbarch_swap *curr;
6016 for (curr = gdbarch->swap;
6019 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
6023 swapin_gdbarch_swap (struct gdbarch *gdbarch)
6025 struct gdbarch_swap *curr;
6026 for (curr = gdbarch->swap;
6029 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
6033 /* Keep a registry of the architectures known by GDB. */
6035 struct gdbarch_registration
6037 enum bfd_architecture bfd_architecture;
6038 gdbarch_init_ftype *init;
6039 gdbarch_dump_tdep_ftype *dump_tdep;
6040 struct gdbarch_list *arches;
6041 struct gdbarch_registration *next;
6044 static struct gdbarch_registration *gdbarch_registry = NULL;
6047 append_name (const char ***buf, int *nr, const char *name)
6049 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
6055 gdbarch_printable_names (void)
6059 /* Accumulate a list of names based on the registed list of
6061 enum bfd_architecture a;
6063 const char **arches = NULL;
6064 struct gdbarch_registration *rego;
6065 for (rego = gdbarch_registry;
6069 const struct bfd_arch_info *ap;
6070 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
6072 internal_error (__FILE__, __LINE__,
6073 "gdbarch_architecture_names: multi-arch unknown");
6076 append_name (&arches, &nr_arches, ap->printable_name);
6081 append_name (&arches, &nr_arches, NULL);
6085 /* Just return all the architectures that BFD knows. Assume that
6086 the legacy architecture framework supports them. */
6087 return bfd_arch_list ();
6092 gdbarch_register (enum bfd_architecture bfd_architecture,
6093 gdbarch_init_ftype *init,
6094 gdbarch_dump_tdep_ftype *dump_tdep)
6096 struct gdbarch_registration **curr;
6097 const struct bfd_arch_info *bfd_arch_info;
6098 /* Check that BFD recognizes this architecture */
6099 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
6100 if (bfd_arch_info == NULL)
6102 internal_error (__FILE__, __LINE__,
6103 "gdbarch: Attempt to register unknown architecture (%d)",
6106 /* Check that we haven't seen this architecture before */
6107 for (curr = &gdbarch_registry;
6109 curr = &(*curr)->next)
6111 if (bfd_architecture == (*curr)->bfd_architecture)
6112 internal_error (__FILE__, __LINE__,
6113 "gdbarch: Duplicate registraration of architecture (%s)",
6114 bfd_arch_info->printable_name);
6118 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
6119 bfd_arch_info->printable_name,
6122 (*curr) = XMALLOC (struct gdbarch_registration);
6123 (*curr)->bfd_architecture = bfd_architecture;
6124 (*curr)->init = init;
6125 (*curr)->dump_tdep = dump_tdep;
6126 (*curr)->arches = NULL;
6127 (*curr)->next = NULL;
6128 /* When non- multi-arch, install whatever target dump routine we've
6129 been provided - hopefully that routine has been written correctly
6130 and works regardless of multi-arch. */
6131 if (!GDB_MULTI_ARCH && dump_tdep != NULL
6132 && startup_gdbarch.dump_tdep == NULL)
6133 startup_gdbarch.dump_tdep = dump_tdep;
6137 register_gdbarch_init (enum bfd_architecture bfd_architecture,
6138 gdbarch_init_ftype *init)
6140 gdbarch_register (bfd_architecture, init, NULL);
6144 /* Look for an architecture using gdbarch_info. Base search on only
6145 BFD_ARCH_INFO and BYTE_ORDER. */
6147 struct gdbarch_list *
6148 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
6149 const struct gdbarch_info *info)
6151 for (; arches != NULL; arches = arches->next)
6153 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
6155 if (info->byte_order != arches->gdbarch->byte_order)
6157 if (info->osabi != arches->gdbarch->osabi)
6165 /* Update the current architecture. Return ZERO if the update request
6169 gdbarch_update_p (struct gdbarch_info info)
6171 struct gdbarch *new_gdbarch;
6172 struct gdbarch *old_gdbarch;
6173 struct gdbarch_registration *rego;
6175 /* Fill in missing parts of the INFO struct using a number of
6176 sources: ``set ...''; INFOabfd supplied; existing target. */
6178 /* ``(gdb) set architecture ...'' */
6179 if (info.bfd_arch_info == NULL
6180 && !TARGET_ARCHITECTURE_AUTO)
6181 info.bfd_arch_info = TARGET_ARCHITECTURE;
6182 if (info.bfd_arch_info == NULL
6183 && info.abfd != NULL
6184 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6185 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6186 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
6187 if (info.bfd_arch_info == NULL)
6188 info.bfd_arch_info = TARGET_ARCHITECTURE;
6190 /* ``(gdb) set byte-order ...'' */
6191 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6192 && !TARGET_BYTE_ORDER_AUTO)
6193 info.byte_order = TARGET_BYTE_ORDER;
6194 /* From the INFO struct. */
6195 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6196 && info.abfd != NULL)
6197 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
6198 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
6199 : BFD_ENDIAN_UNKNOWN);
6200 /* From the current target. */
6201 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
6202 info.byte_order = TARGET_BYTE_ORDER;
6204 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6205 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6206 info.osabi = gdbarch_lookup_osabi (info.abfd);
6207 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6208 info.osabi = current_gdbarch->osabi;
6210 /* Must have found some sort of architecture. */
6211 gdb_assert (info.bfd_arch_info != NULL);
6215 fprintf_unfiltered (gdb_stdlog,
6216 "gdbarch_update: info.bfd_arch_info %s\n",
6217 (info.bfd_arch_info != NULL
6218 ? info.bfd_arch_info->printable_name
6220 fprintf_unfiltered (gdb_stdlog,
6221 "gdbarch_update: info.byte_order %d (%s)\n",
6223 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6224 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6226 fprintf_unfiltered (gdb_stdlog,
6227 "gdbarch_update: info.osabi %d (%s)\n",
6228 info.osabi, gdbarch_osabi_name (info.osabi));
6229 fprintf_unfiltered (gdb_stdlog,
6230 "gdbarch_update: info.abfd 0x%lx\n",
6232 fprintf_unfiltered (gdb_stdlog,
6233 "gdbarch_update: info.tdep_info 0x%lx\n",
6234 (long) info.tdep_info);
6237 /* Find the target that knows about this architecture. */
6238 for (rego = gdbarch_registry;
6241 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6246 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6250 /* Swap the data belonging to the old target out setting the
6251 installed data to zero. This stops the ->init() function trying
6252 to refer to the previous architecture's global data structures. */
6253 swapout_gdbarch_swap (current_gdbarch);
6254 clear_gdbarch_swap (current_gdbarch);
6256 /* Save the previously selected architecture, setting the global to
6257 NULL. This stops ->init() trying to use the previous
6258 architecture's configuration. The previous architecture may not
6259 even be of the same architecture family. The most recent
6260 architecture of the same family is found at the head of the
6261 rego->arches list. */
6262 old_gdbarch = current_gdbarch;
6263 current_gdbarch = NULL;
6265 /* Ask the target for a replacement architecture. */
6266 new_gdbarch = rego->init (info, rego->arches);
6268 /* Did the target like it? No. Reject the change and revert to the
6269 old architecture. */
6270 if (new_gdbarch == NULL)
6273 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6274 swapin_gdbarch_swap (old_gdbarch);
6275 current_gdbarch = old_gdbarch;
6279 /* Did the architecture change? No. Oops, put the old architecture
6281 if (old_gdbarch == new_gdbarch)
6284 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6286 new_gdbarch->bfd_arch_info->printable_name);
6287 swapin_gdbarch_swap (old_gdbarch);
6288 current_gdbarch = old_gdbarch;
6292 /* Is this a pre-existing architecture? Yes. Move it to the front
6293 of the list of architectures (keeping the list sorted Most
6294 Recently Used) and then copy it in. */
6296 struct gdbarch_list **list;
6297 for (list = ®o->arches;
6299 list = &(*list)->next)
6301 if ((*list)->gdbarch == new_gdbarch)
6303 struct gdbarch_list *this;
6305 fprintf_unfiltered (gdb_stdlog,
6306 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6308 new_gdbarch->bfd_arch_info->printable_name);
6311 (*list) = this->next;
6312 /* Insert in the front. */
6313 this->next = rego->arches;
6314 rego->arches = this;
6315 /* Copy the new architecture in. */
6316 current_gdbarch = new_gdbarch;
6317 swapin_gdbarch_swap (new_gdbarch);
6318 architecture_changed_event ();
6324 /* Prepend this new architecture to the architecture list (keep the
6325 list sorted Most Recently Used). */
6327 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6328 this->next = rego->arches;
6329 this->gdbarch = new_gdbarch;
6330 rego->arches = this;
6333 /* Switch to this new architecture marking it initialized. */
6334 current_gdbarch = new_gdbarch;
6335 current_gdbarch->initialized_p = 1;
6338 fprintf_unfiltered (gdb_stdlog,
6339 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6341 new_gdbarch->bfd_arch_info->printable_name);
6344 /* Check that the newly installed architecture is valid. Plug in
6345 any post init values. */
6346 new_gdbarch->dump_tdep = rego->dump_tdep;
6347 verify_gdbarch (new_gdbarch);
6349 /* Initialize the per-architecture memory (swap) areas.
6350 CURRENT_GDBARCH must be update before these modules are
6352 init_gdbarch_swap (new_gdbarch);
6354 /* Initialize the per-architecture data. CURRENT_GDBARCH
6355 must be updated before these modules are called. */
6356 architecture_changed_event ();
6359 gdbarch_dump (current_gdbarch, gdb_stdlog);
6367 /* Pointer to the target-dependent disassembly function. */
6368 int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6370 extern void _initialize_gdbarch (void);
6373 _initialize_gdbarch (void)
6375 struct cmd_list_element *c;
6377 add_show_from_set (add_set_cmd ("arch",
6380 (char *)&gdbarch_debug,
6381 "Set architecture debugging.\n\
6382 When non-zero, architecture debugging is enabled.", &setdebuglist),
6384 c = add_set_cmd ("archdebug",
6387 (char *)&gdbarch_debug,
6388 "Set architecture debugging.\n\
6389 When non-zero, architecture debugging is enabled.", &setlist);
6391 deprecate_cmd (c, "set debug arch");
6392 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");