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_read_sp_ftype *read_sp;
151 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
152 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
153 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
161 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
162 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
163 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
164 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
165 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
166 gdbarch_register_name_ftype *register_name;
167 gdbarch_register_type_ftype *register_type;
168 gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
169 int deprecated_register_bytes;
170 gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
171 gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
172 gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
173 int deprecated_max_register_raw_size;
174 int deprecated_max_register_virtual_size;
175 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
176 gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
177 int deprecated_fp_regnum;
178 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
179 gdbarch_push_dummy_call_ftype *push_dummy_call;
180 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
181 int deprecated_use_generic_dummy_frames;
182 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
183 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
184 int deprecated_register_size;
185 int call_dummy_location;
186 gdbarch_call_dummy_address_ftype *call_dummy_address;
187 CORE_ADDR deprecated_call_dummy_start_offset;
188 CORE_ADDR deprecated_call_dummy_breakpoint_offset;
189 int deprecated_call_dummy_length;
190 LONGEST * deprecated_call_dummy_words;
191 int deprecated_sizeof_call_dummy_words;
192 int deprecated_call_dummy_stack_adjust;
193 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
194 gdbarch_push_dummy_code_ftype *push_dummy_code;
195 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
196 int deprecated_extra_stack_alignment_needed;
197 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
198 gdbarch_print_registers_info_ftype *print_registers_info;
199 gdbarch_print_float_info_ftype *print_float_info;
200 gdbarch_print_vector_info_ftype *print_vector_info;
201 gdbarch_register_sim_regno_ftype *register_sim_regno;
202 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
203 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
204 gdbarch_cannot_store_register_ftype *cannot_store_register;
205 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
206 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
207 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
208 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
209 int believe_pcc_promotion;
210 int believe_pcc_promotion_type;
211 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
212 gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
213 gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
214 gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
215 gdbarch_convert_register_p_ftype *convert_register_p;
216 gdbarch_register_to_value_ftype *register_to_value;
217 gdbarch_value_to_register_ftype *value_to_register;
218 gdbarch_pointer_to_address_ftype *pointer_to_address;
219 gdbarch_address_to_pointer_ftype *address_to_pointer;
220 gdbarch_integer_to_address_ftype *integer_to_address;
221 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
222 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
223 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
224 gdbarch_extract_return_value_ftype *extract_return_value;
225 gdbarch_store_return_value_ftype *store_return_value;
226 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
227 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
228 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
229 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
230 gdbarch_use_struct_convention_ftype *use_struct_convention;
231 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
232 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
233 gdbarch_skip_prologue_ftype *skip_prologue;
234 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
235 gdbarch_inner_than_ftype *inner_than;
236 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
237 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
238 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
239 CORE_ADDR decr_pc_after_break;
240 CORE_ADDR function_start_offset;
241 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
242 CORE_ADDR frame_args_skip;
243 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
244 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
245 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
246 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
247 gdbarch_unwind_pc_ftype *unwind_pc;
248 gdbarch_unwind_sp_ftype *unwind_sp;
249 gdbarch_frame_args_address_ftype *frame_args_address;
250 gdbarch_frame_locals_address_ftype *frame_locals_address;
251 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
252 gdbarch_frame_num_args_ftype *frame_num_args;
253 gdbarch_stack_align_ftype *stack_align;
254 gdbarch_frame_align_ftype *frame_align;
255 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
257 const struct floatformat * float_format;
258 const struct floatformat * double_format;
259 const struct floatformat * long_double_format;
260 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
261 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
262 gdbarch_smash_text_address_ftype *smash_text_address;
263 gdbarch_software_single_step_ftype *software_single_step;
264 gdbarch_print_insn_ftype *print_insn;
265 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
266 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
267 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
268 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
269 gdbarch_sigtramp_start_ftype *sigtramp_start;
270 gdbarch_sigtramp_end_ftype *sigtramp_end;
271 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
272 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
273 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
274 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
275 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
276 const char * name_of_malloc;
277 int cannot_step_breakpoint;
278 int have_nonsteppable_watchpoint;
279 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
280 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
281 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
282 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
283 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
287 /* The default architecture uses host values (for want of a better
290 extern const struct bfd_arch_info bfd_default_arch_struct;
292 struct gdbarch startup_gdbarch =
294 1, /* Always initialized. */
295 /* basic architecture information */
296 &bfd_default_arch_struct, /* bfd_arch_info */
297 BFD_ENDIAN_BIG, /* byte_order */
298 GDB_OSABI_UNKNOWN, /* osabi */
299 /* target specific vector and its dump routine */
301 /*per-architecture data-pointers and swap regions */
303 /* Multi-arch values */
304 8 * sizeof (short), /* short_bit */
305 8 * sizeof (int), /* int_bit */
306 8 * sizeof (long), /* long_bit */
307 8 * sizeof (LONGEST), /* long_long_bit */
308 8 * sizeof (float), /* float_bit */
309 8 * sizeof (double), /* double_bit */
310 8 * sizeof (long double), /* long_double_bit */
311 8 * sizeof (void*), /* ptr_bit */
312 8 * sizeof (void*), /* addr_bit */
313 8 * sizeof (void*), /* bfd_vma_bit */
318 0, /* virtual_frame_pointer */
319 0, /* pseudo_register_read */
320 0, /* pseudo_register_write */
322 0, /* num_pseudo_regs */
328 0, /* stab_reg_to_regnum */
329 0, /* ecoff_reg_to_regnum */
330 0, /* dwarf_reg_to_regnum */
331 0, /* sdb_reg_to_regnum */
332 0, /* dwarf2_reg_to_regnum */
333 0, /* register_name */
334 0, /* register_type */
335 0, /* deprecated_register_virtual_type */
336 0, /* deprecated_register_bytes */
337 generic_register_byte, /* deprecated_register_byte */
338 generic_register_size, /* deprecated_register_raw_size */
339 generic_register_size, /* deprecated_register_virtual_size */
340 0, /* deprecated_max_register_raw_size */
341 0, /* deprecated_max_register_virtual_size */
342 0, /* unwind_dummy_id */
343 0, /* deprecated_save_dummy_frame_tos */
344 -1, /* deprecated_fp_regnum */
345 0, /* deprecated_target_read_fp */
346 0, /* push_dummy_call */
347 0, /* deprecated_push_arguments */
348 0, /* deprecated_use_generic_dummy_frames */
349 0, /* deprecated_push_return_address */
350 0, /* deprecated_dummy_write_sp */
351 0, /* deprecated_register_size */
352 0, /* call_dummy_location */
353 0, /* call_dummy_address */
354 0, /* deprecated_call_dummy_start_offset */
355 0, /* deprecated_call_dummy_breakpoint_offset */
356 0, /* deprecated_call_dummy_length */
357 0, /* deprecated_call_dummy_words */
358 0, /* deprecated_sizeof_call_dummy_words */
359 0, /* deprecated_call_dummy_stack_adjust */
360 0, /* deprecated_fix_call_dummy */
361 0, /* push_dummy_code */
362 0, /* deprecated_push_dummy_frame */
363 0, /* deprecated_extra_stack_alignment_needed */
364 0, /* deprecated_do_registers_info */
365 default_print_registers_info, /* print_registers_info */
366 0, /* print_float_info */
367 0, /* print_vector_info */
368 0, /* register_sim_regno */
369 0, /* register_bytes_ok */
370 0, /* cannot_fetch_register */
371 0, /* cannot_store_register */
372 0, /* get_longjmp_target */
373 generic_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
374 0, /* deprecated_init_frame_pc_first */
375 0, /* deprecated_init_frame_pc */
376 0, /* believe_pcc_promotion */
377 0, /* believe_pcc_promotion_type */
378 0, /* deprecated_get_saved_register */
379 0, /* deprecated_register_convertible */
380 0, /* deprecated_register_convert_to_virtual */
381 0, /* deprecated_register_convert_to_raw */
382 0, /* convert_register_p */
383 0, /* register_to_value */
384 0, /* value_to_register */
385 0, /* pointer_to_address */
386 0, /* address_to_pointer */
387 0, /* integer_to_address */
388 0, /* return_value_on_stack */
389 0, /* deprecated_pop_frame */
390 0, /* deprecated_store_struct_return */
391 0, /* extract_return_value */
392 0, /* store_return_value */
393 0, /* deprecated_extract_return_value */
394 0, /* deprecated_store_return_value */
395 0, /* extract_struct_value_address */
396 0, /* deprecated_extract_struct_value_address */
397 0, /* use_struct_convention */
398 0, /* deprecated_frame_init_saved_regs */
399 0, /* deprecated_init_extra_frame_info */
400 0, /* skip_prologue */
401 0, /* prologue_frameless_p */
403 0, /* breakpoint_from_pc */
404 0, /* memory_insert_breakpoint */
405 0, /* memory_remove_breakpoint */
406 0, /* decr_pc_after_break */
407 0, /* function_start_offset */
408 generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
409 0, /* frame_args_skip */
410 0, /* frameless_function_invocation */
411 0, /* deprecated_frame_chain */
412 0, /* deprecated_frame_chain_valid */
413 0, /* deprecated_frame_saved_pc */
416 0, /* frame_args_address */
417 0, /* frame_locals_address */
418 0, /* deprecated_saved_pc_after_call */
419 0, /* frame_num_args */
422 0, /* reg_struct_has_addr */
423 0, /* parm_boundary */
424 0, /* float_format */
425 0, /* double_format */
426 0, /* long_double_format */
427 0, /* convert_from_func_ptr_addr */
428 0, /* addr_bits_remove */
429 0, /* smash_text_address */
430 0, /* software_single_step */
432 0, /* skip_trampoline_code */
433 0, /* in_solib_call_trampoline */
434 0, /* in_solib_return_trampoline */
435 0, /* pc_in_sigtramp */
436 0, /* sigtramp_start */
437 0, /* sigtramp_end */
438 generic_in_function_epilogue_p, /* in_function_epilogue_p */
439 construct_inferior_arguments, /* construct_inferior_arguments */
440 0, /* dwarf2_build_frame_info */
441 0, /* elf_make_msymbol_special */
442 0, /* coff_make_msymbol_special */
443 "malloc", /* name_of_malloc */
444 0, /* cannot_step_breakpoint */
445 0, /* have_nonsteppable_watchpoint */
446 0, /* address_class_type_flags */
447 0, /* address_class_type_flags_to_name */
448 0, /* address_class_name_to_type_flags */
449 default_register_reggroup_p, /* register_reggroup_p */
450 0, /* fetch_pointer_argument */
451 /* startup_gdbarch() */
454 struct gdbarch *current_gdbarch = &startup_gdbarch;
456 /* Do any initialization needed for a non-multiarch configuration
457 after the _initialize_MODULE functions have been run. */
459 initialize_non_multiarch (void)
461 alloc_gdbarch_data (&startup_gdbarch);
462 /* Ensure that all swap areas are zeroed so that they again think
463 they are starting from scratch. */
464 clear_gdbarch_swap (&startup_gdbarch);
465 init_gdbarch_swap (&startup_gdbarch);
469 /* Create a new ``struct gdbarch'' based on information provided by
470 ``struct gdbarch_info''. */
473 gdbarch_alloc (const struct gdbarch_info *info,
474 struct gdbarch_tdep *tdep)
476 /* NOTE: The new architecture variable is named ``current_gdbarch''
477 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
478 the current local architecture and not the previous global
479 architecture. This ensures that the new architectures initial
480 values are not influenced by the previous architecture. Once
481 everything is parameterised with gdbarch, this will go away. */
482 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
483 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
485 alloc_gdbarch_data (current_gdbarch);
487 current_gdbarch->tdep = tdep;
489 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
490 current_gdbarch->byte_order = info->byte_order;
491 current_gdbarch->osabi = info->osabi;
493 /* Force the explicit initialization of these. */
494 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
495 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
496 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
497 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
498 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
499 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
500 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
501 current_gdbarch->ptr_bit = TARGET_INT_BIT;
502 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
503 current_gdbarch->char_signed = -1;
504 current_gdbarch->write_pc = generic_target_write_pc;
505 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
506 current_gdbarch->num_regs = -1;
507 current_gdbarch->sp_regnum = -1;
508 current_gdbarch->pc_regnum = -1;
509 current_gdbarch->ps_regnum = -1;
510 current_gdbarch->fp0_regnum = -1;
511 current_gdbarch->npc_regnum = -1;
512 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
513 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
514 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
517 current_gdbarch->register_name = legacy_register_name;
518 current_gdbarch->deprecated_register_byte = generic_register_byte;
519 current_gdbarch->deprecated_register_raw_size = generic_register_size;
520 current_gdbarch->deprecated_register_virtual_size = generic_register_size;
521 current_gdbarch->deprecated_fp_regnum = -1;
522 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
523 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
524 current_gdbarch->call_dummy_address = entry_point_address;
525 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
526 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
527 current_gdbarch->print_registers_info = default_print_registers_info;
528 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
529 current_gdbarch->cannot_fetch_register = cannot_register_not;
530 current_gdbarch->cannot_store_register = cannot_register_not;
531 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
532 current_gdbarch->deprecated_register_convertible = deprecated_register_convertible_not;
533 current_gdbarch->convert_register_p = legacy_convert_register_p;
534 current_gdbarch->register_to_value = legacy_register_to_value;
535 current_gdbarch->value_to_register = legacy_value_to_register;
536 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
537 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
538 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
539 current_gdbarch->extract_return_value = legacy_extract_return_value;
540 current_gdbarch->store_return_value = legacy_store_return_value;
541 current_gdbarch->use_struct_convention = generic_use_struct_convention;
542 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
543 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
544 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
545 current_gdbarch->decr_pc_after_break = -1;
546 current_gdbarch->function_start_offset = -1;
547 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
548 current_gdbarch->frame_args_skip = -1;
549 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
550 current_gdbarch->frame_args_address = get_frame_base;
551 current_gdbarch->frame_locals_address = get_frame_base;
552 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
553 current_gdbarch->addr_bits_remove = core_addr_identity;
554 current_gdbarch->smash_text_address = core_addr_identity;
555 current_gdbarch->print_insn = legacy_print_insn;
556 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
557 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
558 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
559 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
560 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
561 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
562 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
563 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
564 current_gdbarch->name_of_malloc = "malloc";
565 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
566 /* gdbarch_alloc() */
568 return current_gdbarch;
572 /* Free a gdbarch struct. This should never happen in normal
573 operation --- once you've created a gdbarch, you keep it around.
574 However, if an architecture's init function encounters an error
575 building the structure, it may need to clean up a partially
576 constructed gdbarch. */
579 gdbarch_free (struct gdbarch *arch)
581 gdb_assert (arch != NULL);
582 free_gdbarch_data (arch);
587 /* Ensure that all values in a GDBARCH are reasonable. */
590 verify_gdbarch (struct gdbarch *gdbarch)
593 struct cleanup *cleanups;
596 /* Only perform sanity checks on a multi-arch target. */
599 log = mem_fileopen ();
600 cleanups = make_cleanup_ui_file_delete (log);
602 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
603 fprintf_unfiltered (log, "\n\tbyte-order");
604 if (gdbarch->bfd_arch_info == NULL)
605 fprintf_unfiltered (log, "\n\tbfd_arch_info");
606 /* Check those that need to be defined for the given multi-arch level. */
607 /* Skip verify of short_bit, invalid_p == 0 */
608 /* Skip verify of int_bit, invalid_p == 0 */
609 /* Skip verify of long_bit, invalid_p == 0 */
610 /* Skip verify of long_long_bit, invalid_p == 0 */
611 /* Skip verify of float_bit, invalid_p == 0 */
612 /* Skip verify of double_bit, invalid_p == 0 */
613 /* Skip verify of long_double_bit, invalid_p == 0 */
614 /* Skip verify of ptr_bit, invalid_p == 0 */
615 if (gdbarch->addr_bit == 0)
616 gdbarch->addr_bit = TARGET_PTR_BIT;
617 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
618 if (gdbarch->char_signed == -1)
619 gdbarch->char_signed = 1;
620 /* Skip verify of read_pc, has predicate */
621 /* Skip verify of write_pc, invalid_p == 0 */
622 /* Skip verify of read_sp, has predicate */
623 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
624 /* Skip verify of pseudo_register_read, has predicate */
625 /* Skip verify of pseudo_register_write, has predicate */
626 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
627 && (gdbarch->num_regs == -1))
628 fprintf_unfiltered (log, "\n\tnum_regs");
629 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
630 /* Skip verify of sp_regnum, invalid_p == 0 */
631 /* Skip verify of pc_regnum, invalid_p == 0 */
632 /* Skip verify of ps_regnum, invalid_p == 0 */
633 /* Skip verify of fp0_regnum, invalid_p == 0 */
634 /* Skip verify of npc_regnum, invalid_p == 0 */
635 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
636 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
637 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
638 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
639 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
640 /* Skip verify of register_name, invalid_p == 0 */
641 /* Skip verify of register_type, has predicate */
642 /* Skip verify of deprecated_register_virtual_type, has predicate */
643 /* Skip verify of deprecated_register_byte, has predicate */
644 /* Skip verify of deprecated_register_raw_size, invalid_p == 0 */
645 /* Skip verify of deprecated_register_virtual_size, invalid_p == 0 */
646 /* Skip verify of deprecated_max_register_raw_size, has predicate */
647 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
648 /* Skip verify of unwind_dummy_id, has predicate */
649 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
650 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
651 /* Skip verify of deprecated_target_read_fp, has predicate */
652 /* Skip verify of push_dummy_call, has predicate */
653 /* Skip verify of deprecated_push_arguments, has predicate */
654 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
655 /* Skip verify of deprecated_push_return_address, has predicate */
656 /* Skip verify of deprecated_dummy_write_sp, has predicate */
657 /* Skip verify of call_dummy_location, invalid_p == 0 */
658 /* Skip verify of call_dummy_address, invalid_p == 0 */
659 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
660 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
661 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
662 /* Skip verify of deprecated_fix_call_dummy, has predicate */
663 /* Skip verify of push_dummy_code, has predicate */
664 /* Skip verify of deprecated_push_dummy_frame, has predicate */
665 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
666 /* Skip verify of deprecated_do_registers_info, has predicate */
667 /* Skip verify of print_registers_info, invalid_p == 0 */
668 /* Skip verify of print_float_info, has predicate */
669 /* Skip verify of print_vector_info, has predicate */
670 /* Skip verify of register_sim_regno, invalid_p == 0 */
671 /* Skip verify of register_bytes_ok, has predicate */
672 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
673 /* Skip verify of cannot_store_register, invalid_p == 0 */
674 /* Skip verify of get_longjmp_target, has predicate */
675 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
676 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
677 /* Skip verify of deprecated_init_frame_pc, has predicate */
678 /* Skip verify of deprecated_get_saved_register, has predicate */
679 /* Skip verify of deprecated_register_convertible, invalid_p == 0 */
680 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
681 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
682 /* Skip verify of convert_register_p, invalid_p == 0 */
683 /* Skip verify of register_to_value, invalid_p == 0 */
684 /* Skip verify of value_to_register, invalid_p == 0 */
685 /* Skip verify of pointer_to_address, invalid_p == 0 */
686 /* Skip verify of address_to_pointer, invalid_p == 0 */
687 /* Skip verify of integer_to_address, has predicate */
688 /* Skip verify of return_value_on_stack, invalid_p == 0 */
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 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
714 && (gdbarch->function_start_offset == -1))
715 fprintf_unfiltered (log, "\n\tfunction_start_offset");
716 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
718 && (gdbarch->frame_args_skip == -1))
719 fprintf_unfiltered (log, "\n\tframe_args_skip");
720 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
721 /* Skip verify of deprecated_frame_chain, has predicate */
722 /* Skip verify of deprecated_frame_chain_valid, has predicate */
723 /* Skip verify of deprecated_frame_saved_pc, has predicate */
724 /* Skip verify of unwind_pc, has predicate */
725 /* Skip verify of unwind_sp, has predicate */
726 /* Skip verify of frame_args_address, invalid_p == 0 */
727 /* Skip verify of frame_locals_address, invalid_p == 0 */
728 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
729 /* Skip verify of frame_num_args, has predicate */
730 /* Skip verify of stack_align, has predicate */
731 /* Skip verify of frame_align, has predicate */
732 /* Skip verify of reg_struct_has_addr, has predicate */
733 if (gdbarch->float_format == 0)
734 gdbarch->float_format = default_float_format (gdbarch);
735 if (gdbarch->double_format == 0)
736 gdbarch->double_format = default_double_format (gdbarch);
737 if (gdbarch->long_double_format == 0)
738 gdbarch->long_double_format = default_double_format (gdbarch);
739 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
740 /* Skip verify of addr_bits_remove, invalid_p == 0 */
741 /* Skip verify of smash_text_address, invalid_p == 0 */
742 /* Skip verify of software_single_step, has predicate */
743 /* Skip verify of print_insn, invalid_p == 0 */
744 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
745 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
746 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
747 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
748 /* Skip verify of sigtramp_start, has predicate */
749 /* Skip verify of sigtramp_end, has predicate */
750 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
751 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
752 /* Skip verify of dwarf2_build_frame_info, has predicate */
753 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
754 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
755 /* Skip verify of name_of_malloc, invalid_p == 0 */
756 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
757 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
758 /* Skip verify of address_class_type_flags, has predicate */
759 /* Skip verify of address_class_type_flags_to_name, has predicate */
760 /* Skip verify of address_class_name_to_type_flags, has predicate */
761 /* Skip verify of register_reggroup_p, invalid_p == 0 */
762 /* Skip verify of fetch_pointer_argument, has predicate */
763 buf = ui_file_xstrdup (log, &dummy);
764 make_cleanup (xfree, buf);
765 if (strlen (buf) > 0)
766 internal_error (__FILE__, __LINE__,
767 "verify_gdbarch: the following are invalid ...%s",
769 do_cleanups (cleanups);
773 /* Print out the details of the current architecture. */
775 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
776 just happens to match the global variable ``current_gdbarch''. That
777 way macros refering to that variable get the local and not the global
778 version - ulgh. Once everything is parameterised with gdbarch, this
782 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
784 fprintf_unfiltered (file,
785 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
788 fprintf_unfiltered (file,
789 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
790 gdbarch_frame_align_p (current_gdbarch));
792 fprintf_unfiltered (file,
793 "gdbarch_dump: frame_align = 0x%08lx\n",
794 (long) current_gdbarch->frame_align);
796 fprintf_unfiltered (file,
797 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
798 (long) current_gdbarch->in_function_epilogue_p);
800 fprintf_unfiltered (file,
801 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
802 (long) current_gdbarch->register_reggroup_p);
804 fprintf_unfiltered (file,
805 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
806 gdbarch_pseudo_register_read_p (current_gdbarch));
808 fprintf_unfiltered (file,
809 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
810 (long) current_gdbarch->pseudo_register_read);
812 fprintf_unfiltered (file,
813 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
814 gdbarch_pseudo_register_write_p (current_gdbarch));
816 fprintf_unfiltered (file,
817 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
818 (long) current_gdbarch->pseudo_register_write);
820 fprintf_unfiltered (file,
821 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
822 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
826 (long) current_gdbarch->address_class_name_to_type_flags);
827 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
828 fprintf_unfiltered (file,
829 "gdbarch_dump: %s # %s\n",
830 "ADDRESS_CLASS_TYPE_FLAGS_P()",
831 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
834 ADDRESS_CLASS_TYPE_FLAGS_P ());
836 #ifdef ADDRESS_CLASS_TYPE_FLAGS
837 fprintf_unfiltered (file,
838 "gdbarch_dump: %s # %s\n",
839 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
840 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
844 (long) current_gdbarch->address_class_type_flags
845 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
848 fprintf_unfiltered (file,
849 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
850 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
852 fprintf_unfiltered (file,
853 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
854 (long) current_gdbarch->address_class_type_flags_to_name);
855 #ifdef ADDRESS_TO_POINTER
857 /* Macro might contain `[{}]' when not multi-arch */
858 fprintf_unfiltered (file,
859 "gdbarch_dump: %s # %s\n",
860 "ADDRESS_TO_POINTER(type, buf, addr)",
861 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
864 fprintf_unfiltered (file,
865 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
866 (long) current_gdbarch->address_to_pointer
867 /*ADDRESS_TO_POINTER ()*/);
869 #ifdef ADDR_BITS_REMOVE
870 fprintf_unfiltered (file,
871 "gdbarch_dump: %s # %s\n",
872 "ADDR_BITS_REMOVE(addr)",
873 XSTRING (ADDR_BITS_REMOVE (addr)));
875 fprintf_unfiltered (file,
876 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
877 (long) current_gdbarch->addr_bits_remove
878 /*ADDR_BITS_REMOVE ()*/);
880 #ifdef BELIEVE_PCC_PROMOTION
881 fprintf_unfiltered (file,
882 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
883 XSTRING (BELIEVE_PCC_PROMOTION));
884 fprintf_unfiltered (file,
885 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
886 BELIEVE_PCC_PROMOTION);
888 #ifdef BELIEVE_PCC_PROMOTION_TYPE
889 fprintf_unfiltered (file,
890 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
891 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
894 BELIEVE_PCC_PROMOTION_TYPE);
896 #ifdef BREAKPOINT_FROM_PC
897 fprintf_unfiltered (file,
898 "gdbarch_dump: %s # %s\n",
899 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
900 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
902 fprintf_unfiltered (file,
903 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
904 (long) current_gdbarch->breakpoint_from_pc
905 /*BREAKPOINT_FROM_PC ()*/);
907 #ifdef CALL_DUMMY_ADDRESS
908 fprintf_unfiltered (file,
909 "gdbarch_dump: %s # %s\n",
910 "CALL_DUMMY_ADDRESS()",
911 XSTRING (CALL_DUMMY_ADDRESS ()));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
915 (long) current_gdbarch->call_dummy_address
916 /*CALL_DUMMY_ADDRESS ()*/);
918 #ifdef CALL_DUMMY_LOCATION
919 fprintf_unfiltered (file,
920 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
921 XSTRING (CALL_DUMMY_LOCATION));
922 fprintf_unfiltered (file,
923 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
924 CALL_DUMMY_LOCATION);
926 #ifdef CANNOT_FETCH_REGISTER
927 fprintf_unfiltered (file,
928 "gdbarch_dump: %s # %s\n",
929 "CANNOT_FETCH_REGISTER(regnum)",
930 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
934 (long) current_gdbarch->cannot_fetch_register
935 /*CANNOT_FETCH_REGISTER ()*/);
937 #ifdef CANNOT_STEP_BREAKPOINT
938 fprintf_unfiltered (file,
939 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
940 XSTRING (CANNOT_STEP_BREAKPOINT));
941 fprintf_unfiltered (file,
942 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
943 CANNOT_STEP_BREAKPOINT);
945 #ifdef CANNOT_STORE_REGISTER
946 fprintf_unfiltered (file,
947 "gdbarch_dump: %s # %s\n",
948 "CANNOT_STORE_REGISTER(regnum)",
949 XSTRING (CANNOT_STORE_REGISTER (regnum)));
951 fprintf_unfiltered (file,
952 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
953 (long) current_gdbarch->cannot_store_register
954 /*CANNOT_STORE_REGISTER ()*/);
956 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
958 /* Macro might contain `[{}]' when not multi-arch */
959 fprintf_unfiltered (file,
960 "gdbarch_dump: %s # %s\n",
961 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
962 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
965 fprintf_unfiltered (file,
966 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
967 (long) current_gdbarch->coff_make_msymbol_special
968 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
971 fprintf_unfiltered (file,
972 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
973 (long) current_gdbarch->construct_inferior_arguments);
974 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
975 fprintf_unfiltered (file,
976 "gdbarch_dump: %s # %s\n",
977 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
978 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
982 (long) current_gdbarch->convert_from_func_ptr_addr
983 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
985 #ifdef CONVERT_REGISTER_P
986 fprintf_unfiltered (file,
987 "gdbarch_dump: %s # %s\n",
988 "CONVERT_REGISTER_P(regnum, type)",
989 XSTRING (CONVERT_REGISTER_P (regnum, type)));
991 fprintf_unfiltered (file,
992 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
993 (long) current_gdbarch->convert_register_p
994 /*CONVERT_REGISTER_P ()*/);
996 #ifdef DECR_PC_AFTER_BREAK
997 fprintf_unfiltered (file,
998 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
999 XSTRING (DECR_PC_AFTER_BREAK));
1000 fprintf_unfiltered (file,
1001 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1002 (long) DECR_PC_AFTER_BREAK);
1004 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1007 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1010 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
1012 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1015 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1018 DEPRECATED_CALL_DUMMY_LENGTH);
1020 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: %s # %s\n",
1023 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1024 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1027 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1029 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1032 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1033 fprintf_unfiltered (file,
1034 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1035 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1037 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1038 fprintf_unfiltered (file,
1039 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1040 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1043 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
1045 #ifdef DEPRECATED_CALL_DUMMY_WORDS
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1048 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
1049 fprintf_unfiltered (file,
1050 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1051 (long) DEPRECATED_CALL_DUMMY_WORDS);
1053 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1054 fprintf_unfiltered (file,
1055 "gdbarch_dump: %s # %s\n",
1056 "DEPRECATED_DO_REGISTERS_INFO_P()",
1057 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1060 DEPRECATED_DO_REGISTERS_INFO_P ());
1062 #ifdef DEPRECATED_DO_REGISTERS_INFO
1064 /* Macro might contain `[{}]' when not multi-arch */
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: %s # %s\n",
1067 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1068 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1071 fprintf_unfiltered (file,
1072 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1073 (long) current_gdbarch->deprecated_do_registers_info
1074 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1076 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: %s # %s\n",
1079 "DEPRECATED_DUMMY_WRITE_SP_P()",
1080 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1083 DEPRECATED_DUMMY_WRITE_SP_P ());
1085 #ifdef DEPRECATED_DUMMY_WRITE_SP
1087 /* Macro might contain `[{}]' when not multi-arch */
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: %s # %s\n",
1090 "DEPRECATED_DUMMY_WRITE_SP(val)",
1091 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1096 (long) current_gdbarch->deprecated_dummy_write_sp
1097 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1099 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1101 /* Macro might contain `[{}]' when not multi-arch */
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: %s # %s\n",
1104 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1105 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1108 fprintf_unfiltered (file,
1109 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1110 (long) current_gdbarch->deprecated_extract_return_value
1111 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1113 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1114 fprintf_unfiltered (file,
1115 "gdbarch_dump: %s # %s\n",
1116 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1117 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1120 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1122 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1123 fprintf_unfiltered (file,
1124 "gdbarch_dump: %s # %s\n",
1125 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1126 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1128 fprintf_unfiltered (file,
1129 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1130 (long) current_gdbarch->deprecated_extract_struct_value_address
1131 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1133 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1136 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1139 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1141 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: %s # %s\n",
1144 "DEPRECATED_FIX_CALL_DUMMY_P()",
1145 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1148 DEPRECATED_FIX_CALL_DUMMY_P ());
1150 #ifdef DEPRECATED_FIX_CALL_DUMMY
1152 /* Macro might contain `[{}]' when not multi-arch */
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: %s # %s\n",
1155 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1156 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1159 fprintf_unfiltered (file,
1160 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1161 (long) current_gdbarch->deprecated_fix_call_dummy
1162 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1164 #ifdef DEPRECATED_FP_REGNUM
1165 fprintf_unfiltered (file,
1166 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1167 XSTRING (DEPRECATED_FP_REGNUM));
1168 fprintf_unfiltered (file,
1169 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1170 DEPRECATED_FP_REGNUM);
1172 #ifdef DEPRECATED_FRAME_CHAIN_P
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: %s # %s\n",
1175 "DEPRECATED_FRAME_CHAIN_P()",
1176 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1179 DEPRECATED_FRAME_CHAIN_P ());
1181 #ifdef DEPRECATED_FRAME_CHAIN
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: %s # %s\n",
1184 "DEPRECATED_FRAME_CHAIN(frame)",
1185 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1189 (long) current_gdbarch->deprecated_frame_chain
1190 /*DEPRECATED_FRAME_CHAIN ()*/);
1192 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: %s # %s\n",
1195 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1196 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1199 DEPRECATED_FRAME_CHAIN_VALID_P ());
1201 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: %s # %s\n",
1204 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1205 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1207 fprintf_unfiltered (file,
1208 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1209 (long) current_gdbarch->deprecated_frame_chain_valid
1210 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1212 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: %s # %s\n",
1215 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1216 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1219 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1221 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1223 /* Macro might contain `[{}]' when not multi-arch */
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: %s # %s\n",
1226 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1227 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1230 fprintf_unfiltered (file,
1231 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1232 (long) current_gdbarch->deprecated_frame_init_saved_regs
1233 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1235 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: %s # %s\n",
1238 "DEPRECATED_FRAME_SAVED_PC_P()",
1239 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1242 DEPRECATED_FRAME_SAVED_PC_P ());
1244 #ifdef DEPRECATED_FRAME_SAVED_PC
1245 fprintf_unfiltered (file,
1246 "gdbarch_dump: %s # %s\n",
1247 "DEPRECATED_FRAME_SAVED_PC(fi)",
1248 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1250 fprintf_unfiltered (file,
1251 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1252 (long) current_gdbarch->deprecated_frame_saved_pc
1253 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1255 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: %s # %s\n",
1258 "DEPRECATED_GET_SAVED_REGISTER_P()",
1259 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1262 DEPRECATED_GET_SAVED_REGISTER_P ());
1264 #ifdef DEPRECATED_GET_SAVED_REGISTER
1266 /* Macro might contain `[{}]' when not multi-arch */
1267 fprintf_unfiltered (file,
1268 "gdbarch_dump: %s # %s\n",
1269 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1270 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1275 (long) current_gdbarch->deprecated_get_saved_register
1276 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1278 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: %s # %s\n",
1281 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1282 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1285 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1287 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1289 /* Macro might contain `[{}]' when not multi-arch */
1290 fprintf_unfiltered (file,
1291 "gdbarch_dump: %s # %s\n",
1292 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1293 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1298 (long) current_gdbarch->deprecated_init_extra_frame_info
1299 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1301 #ifdef DEPRECATED_INIT_FRAME_PC_P
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: %s # %s\n",
1304 "DEPRECATED_INIT_FRAME_PC_P()",
1305 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1308 DEPRECATED_INIT_FRAME_PC_P ());
1310 #ifdef DEPRECATED_INIT_FRAME_PC
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: %s # %s\n",
1313 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1314 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1318 (long) current_gdbarch->deprecated_init_frame_pc
1319 /*DEPRECATED_INIT_FRAME_PC ()*/);
1321 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: %s # %s\n",
1324 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1325 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1326 fprintf_unfiltered (file,
1327 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1328 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1330 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1331 fprintf_unfiltered (file,
1332 "gdbarch_dump: %s # %s\n",
1333 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1334 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1336 fprintf_unfiltered (file,
1337 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1338 (long) current_gdbarch->deprecated_init_frame_pc_first
1339 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1341 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: %s # %s\n",
1344 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1345 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1348 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1350 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1351 fprintf_unfiltered (file,
1352 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1353 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1356 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1358 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1359 fprintf_unfiltered (file,
1360 "gdbarch_dump: %s # %s\n",
1361 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1362 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1365 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1367 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1370 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1371 fprintf_unfiltered (file,
1372 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1373 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1375 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: %s # %s\n",
1378 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1379 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1382 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1384 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1385 fprintf_unfiltered (file,
1386 "gdbarch_dump: %s # %s\n",
1387 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1388 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1392 (long) current_gdbarch->deprecated_pc_in_call_dummy
1393 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1395 #ifdef DEPRECATED_POP_FRAME_P
1396 fprintf_unfiltered (file,
1397 "gdbarch_dump: %s # %s\n",
1398 "DEPRECATED_POP_FRAME_P()",
1399 XSTRING (DEPRECATED_POP_FRAME_P ()));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1402 DEPRECATED_POP_FRAME_P ());
1404 #ifdef DEPRECATED_POP_FRAME
1406 /* Macro might contain `[{}]' when not multi-arch */
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: %s # %s\n",
1409 "DEPRECATED_POP_FRAME(-)",
1410 XSTRING (DEPRECATED_POP_FRAME (-)));
1413 fprintf_unfiltered (file,
1414 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1415 (long) current_gdbarch->deprecated_pop_frame
1416 /*DEPRECATED_POP_FRAME ()*/);
1418 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1419 fprintf_unfiltered (file,
1420 "gdbarch_dump: %s # %s\n",
1421 "DEPRECATED_PUSH_ARGUMENTS_P()",
1422 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1425 DEPRECATED_PUSH_ARGUMENTS_P ());
1427 #ifdef DEPRECATED_PUSH_ARGUMENTS
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: %s # %s\n",
1430 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1431 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1435 (long) current_gdbarch->deprecated_push_arguments
1436 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1438 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: %s # %s\n",
1441 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1442 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1445 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1447 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1449 /* Macro might contain `[{}]' when not multi-arch */
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: %s # %s\n",
1452 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1453 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1458 (long) current_gdbarch->deprecated_push_dummy_frame
1459 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1461 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: %s # %s\n",
1464 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1465 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1468 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1470 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: %s # %s\n",
1473 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1474 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1478 (long) current_gdbarch->deprecated_push_return_address
1479 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1481 #ifdef DEPRECATED_REGISTER_BYTES
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1484 XSTRING (DEPRECATED_REGISTER_BYTES));
1485 fprintf_unfiltered (file,
1486 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1487 DEPRECATED_REGISTER_BYTES);
1489 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1490 fprintf_unfiltered (file,
1491 "gdbarch_dump: %s # %s\n",
1492 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1493 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
1495 fprintf_unfiltered (file,
1496 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1497 (long) current_gdbarch->deprecated_register_convertible
1498 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1500 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1502 /* Macro might contain `[{}]' when not multi-arch */
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: %s # %s\n",
1505 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1506 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1511 (long) current_gdbarch->deprecated_register_convert_to_raw
1512 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1514 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1516 /* Macro might contain `[{}]' when not multi-arch */
1517 fprintf_unfiltered (file,
1518 "gdbarch_dump: %s # %s\n",
1519 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1520 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1525 (long) current_gdbarch->deprecated_register_convert_to_virtual
1526 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1528 #ifdef DEPRECATED_REGISTER_SIZE
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1531 XSTRING (DEPRECATED_REGISTER_SIZE));
1532 fprintf_unfiltered (file,
1533 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1534 DEPRECATED_REGISTER_SIZE);
1536 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: %s # %s\n",
1539 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1540 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1543 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1545 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: %s # %s\n",
1548 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1549 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1553 (long) current_gdbarch->deprecated_saved_pc_after_call
1554 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1556 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1560 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1563 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1565 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1567 /* Macro might contain `[{}]' when not multi-arch */
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: %s # %s\n",
1570 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1571 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1576 (long) current_gdbarch->deprecated_save_dummy_frame_tos
1577 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1579 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1582 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1585 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1587 #ifdef DEPRECATED_STORE_RETURN_VALUE
1589 /* Macro might contain `[{}]' when not multi-arch */
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: %s # %s\n",
1592 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1593 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1598 (long) current_gdbarch->deprecated_store_return_value
1599 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1601 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1602 fprintf_unfiltered (file,
1603 "gdbarch_dump: %s # %s\n",
1604 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1605 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1606 fprintf_unfiltered (file,
1607 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1608 DEPRECATED_STORE_STRUCT_RETURN_P ());
1610 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1612 /* Macro might contain `[{}]' when not multi-arch */
1613 fprintf_unfiltered (file,
1614 "gdbarch_dump: %s # %s\n",
1615 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1616 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1619 fprintf_unfiltered (file,
1620 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1621 (long) current_gdbarch->deprecated_store_struct_return
1622 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1624 #ifdef DEPRECATED_TARGET_READ_FP_P
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: %s # %s\n",
1627 "DEPRECATED_TARGET_READ_FP_P()",
1628 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1631 DEPRECATED_TARGET_READ_FP_P ());
1633 #ifdef DEPRECATED_TARGET_READ_FP
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: %s # %s\n",
1636 "DEPRECATED_TARGET_READ_FP()",
1637 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1641 (long) current_gdbarch->deprecated_target_read_fp
1642 /*DEPRECATED_TARGET_READ_FP ()*/);
1644 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1647 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1648 fprintf_unfiltered (file,
1649 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1650 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1652 #ifdef DWARF2_BUILD_FRAME_INFO_P
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: %s # %s\n",
1655 "DWARF2_BUILD_FRAME_INFO_P()",
1656 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1659 DWARF2_BUILD_FRAME_INFO_P ());
1661 #ifdef DWARF2_BUILD_FRAME_INFO
1663 /* Macro might contain `[{}]' when not multi-arch */
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: %s # %s\n",
1666 "DWARF2_BUILD_FRAME_INFO(objfile)",
1667 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1672 (long) current_gdbarch->dwarf2_build_frame_info
1673 /*DWARF2_BUILD_FRAME_INFO ()*/);
1675 #ifdef DWARF2_REG_TO_REGNUM
1676 fprintf_unfiltered (file,
1677 "gdbarch_dump: %s # %s\n",
1678 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1679 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1683 (long) current_gdbarch->dwarf2_reg_to_regnum
1684 /*DWARF2_REG_TO_REGNUM ()*/);
1686 #ifdef DWARF_REG_TO_REGNUM
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: %s # %s\n",
1689 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1690 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1694 (long) current_gdbarch->dwarf_reg_to_regnum
1695 /*DWARF_REG_TO_REGNUM ()*/);
1697 #ifdef ECOFF_REG_TO_REGNUM
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: %s # %s\n",
1700 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1701 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1703 fprintf_unfiltered (file,
1704 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1705 (long) current_gdbarch->ecoff_reg_to_regnum
1706 /*ECOFF_REG_TO_REGNUM ()*/);
1708 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1710 /* Macro might contain `[{}]' when not multi-arch */
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: %s # %s\n",
1713 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1714 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1719 (long) current_gdbarch->elf_make_msymbol_special
1720 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1722 #ifdef EXTRACT_RETURN_VALUE
1724 /* Macro might contain `[{}]' when not multi-arch */
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: %s # %s\n",
1727 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1728 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1733 (long) current_gdbarch->extract_return_value
1734 /*EXTRACT_RETURN_VALUE ()*/);
1736 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: %s # %s\n",
1739 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1740 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1743 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1745 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1746 fprintf_unfiltered (file,
1747 "gdbarch_dump: %s # %s\n",
1748 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1749 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1753 (long) current_gdbarch->extract_struct_value_address
1754 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1756 #ifdef FETCH_POINTER_ARGUMENT_P
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: %s # %s\n",
1759 "FETCH_POINTER_ARGUMENT_P()",
1760 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1763 FETCH_POINTER_ARGUMENT_P ());
1765 #ifdef FETCH_POINTER_ARGUMENT
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: %s # %s\n",
1768 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1769 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1771 fprintf_unfiltered (file,
1772 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1773 (long) current_gdbarch->fetch_pointer_argument
1774 /*FETCH_POINTER_ARGUMENT ()*/);
1777 fprintf_unfiltered (file,
1778 "gdbarch_dump: FP0_REGNUM # %s\n",
1779 XSTRING (FP0_REGNUM));
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: FP0_REGNUM = %d\n",
1784 #ifdef FRAMELESS_FUNCTION_INVOCATION
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: %s # %s\n",
1787 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1788 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1792 (long) current_gdbarch->frameless_function_invocation
1793 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1795 #ifdef FRAME_ARGS_ADDRESS
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "FRAME_ARGS_ADDRESS(fi)",
1799 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1803 (long) current_gdbarch->frame_args_address
1804 /*FRAME_ARGS_ADDRESS ()*/);
1806 #ifdef FRAME_ARGS_SKIP
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1809 XSTRING (FRAME_ARGS_SKIP));
1810 fprintf_unfiltered (file,
1811 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1812 (long) FRAME_ARGS_SKIP);
1814 #ifdef FRAME_LOCALS_ADDRESS
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: %s # %s\n",
1817 "FRAME_LOCALS_ADDRESS(fi)",
1818 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1820 fprintf_unfiltered (file,
1821 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1822 (long) current_gdbarch->frame_locals_address
1823 /*FRAME_LOCALS_ADDRESS ()*/);
1825 #ifdef FRAME_NUM_ARGS_P
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: %s # %s\n",
1828 "FRAME_NUM_ARGS_P()",
1829 XSTRING (FRAME_NUM_ARGS_P ()));
1830 fprintf_unfiltered (file,
1831 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1832 FRAME_NUM_ARGS_P ());
1834 #ifdef FRAME_NUM_ARGS
1835 fprintf_unfiltered (file,
1836 "gdbarch_dump: %s # %s\n",
1837 "FRAME_NUM_ARGS(frame)",
1838 XSTRING (FRAME_NUM_ARGS (frame)));
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1842 (long) current_gdbarch->frame_num_args
1843 /*FRAME_NUM_ARGS ()*/);
1845 #ifdef FUNCTION_START_OFFSET
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1848 XSTRING (FUNCTION_START_OFFSET));
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1851 (long) FUNCTION_START_OFFSET);
1853 #ifdef GET_LONGJMP_TARGET_P
1854 fprintf_unfiltered (file,
1855 "gdbarch_dump: %s # %s\n",
1856 "GET_LONGJMP_TARGET_P()",
1857 XSTRING (GET_LONGJMP_TARGET_P ()));
1858 fprintf_unfiltered (file,
1859 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1860 GET_LONGJMP_TARGET_P ());
1862 #ifdef GET_LONGJMP_TARGET
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: %s # %s\n",
1865 "GET_LONGJMP_TARGET(pc)",
1866 XSTRING (GET_LONGJMP_TARGET (pc)));
1868 fprintf_unfiltered (file,
1869 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1870 (long) current_gdbarch->get_longjmp_target
1871 /*GET_LONGJMP_TARGET ()*/);
1873 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1876 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1879 HAVE_NONSTEPPABLE_WATCHPOINT);
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: %s # %s\n",
1884 "INNER_THAN(lhs, rhs)",
1885 XSTRING (INNER_THAN (lhs, rhs)));
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1889 (long) current_gdbarch->inner_than
1892 #ifdef INTEGER_TO_ADDRESS_P
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: %s # %s\n",
1895 "INTEGER_TO_ADDRESS_P()",
1896 XSTRING (INTEGER_TO_ADDRESS_P ()));
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1899 INTEGER_TO_ADDRESS_P ());
1901 #ifdef INTEGER_TO_ADDRESS
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: %s # %s\n",
1904 "INTEGER_TO_ADDRESS(type, buf)",
1905 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1909 (long) current_gdbarch->integer_to_address
1910 /*INTEGER_TO_ADDRESS ()*/);
1912 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: %s # %s\n",
1915 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1916 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1920 (long) current_gdbarch->in_solib_call_trampoline
1921 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1923 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: %s # %s\n",
1926 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1927 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1931 (long) current_gdbarch->in_solib_return_trampoline
1932 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1934 #ifdef MEMORY_INSERT_BREAKPOINT
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: %s # %s\n",
1937 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1938 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1942 (long) current_gdbarch->memory_insert_breakpoint
1943 /*MEMORY_INSERT_BREAKPOINT ()*/);
1945 #ifdef MEMORY_REMOVE_BREAKPOINT
1946 fprintf_unfiltered (file,
1947 "gdbarch_dump: %s # %s\n",
1948 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1949 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1953 (long) current_gdbarch->memory_remove_breakpoint
1954 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1956 #ifdef NAME_OF_MALLOC
1957 fprintf_unfiltered (file,
1958 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1959 XSTRING (NAME_OF_MALLOC));
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: NPC_REGNUM # %s\n",
1967 XSTRING (NPC_REGNUM));
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: NPC_REGNUM = %d\n",
1972 #ifdef NUM_PSEUDO_REGS
1973 fprintf_unfiltered (file,
1974 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1975 XSTRING (NUM_PSEUDO_REGS));
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: NUM_REGS # %s\n",
1983 XSTRING (NUM_REGS));
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: NUM_REGS = %d\n",
1988 #ifdef PARM_BOUNDARY
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1991 XSTRING (PARM_BOUNDARY));
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1996 #ifdef PC_IN_SIGTRAMP
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: %s # %s\n",
1999 "PC_IN_SIGTRAMP(pc, name)",
2000 XSTRING (PC_IN_SIGTRAMP (pc, name)));
2002 fprintf_unfiltered (file,
2003 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
2004 (long) current_gdbarch->pc_in_sigtramp
2005 /*PC_IN_SIGTRAMP ()*/);
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: PC_REGNUM # %s\n",
2010 XSTRING (PC_REGNUM));
2011 fprintf_unfiltered (file,
2012 "gdbarch_dump: PC_REGNUM = %d\n",
2015 #ifdef POINTER_TO_ADDRESS
2016 fprintf_unfiltered (file,
2017 "gdbarch_dump: %s # %s\n",
2018 "POINTER_TO_ADDRESS(type, buf)",
2019 XSTRING (POINTER_TO_ADDRESS (type, buf)));
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
2023 (long) current_gdbarch->pointer_to_address
2024 /*POINTER_TO_ADDRESS ()*/);
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
2029 gdbarch_print_float_info_p (current_gdbarch));
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: print_float_info = 0x%08lx\n",
2033 (long) current_gdbarch->print_float_info);
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: print_registers_info = 0x%08lx\n",
2037 (long) current_gdbarch->print_registers_info);
2039 fprintf_unfiltered (file,
2040 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
2041 gdbarch_print_vector_info_p (current_gdbarch));
2043 fprintf_unfiltered (file,
2044 "gdbarch_dump: print_vector_info = 0x%08lx\n",
2045 (long) current_gdbarch->print_vector_info);
2046 #ifdef PROLOGUE_FRAMELESS_P
2047 fprintf_unfiltered (file,
2048 "gdbarch_dump: %s # %s\n",
2049 "PROLOGUE_FRAMELESS_P(ip)",
2050 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
2052 fprintf_unfiltered (file,
2053 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
2054 (long) current_gdbarch->prologue_frameless_p
2055 /*PROLOGUE_FRAMELESS_P ()*/);
2058 fprintf_unfiltered (file,
2059 "gdbarch_dump: PS_REGNUM # %s\n",
2060 XSTRING (PS_REGNUM));
2061 fprintf_unfiltered (file,
2062 "gdbarch_dump: PS_REGNUM = %d\n",
2066 fprintf_unfiltered (file,
2067 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
2068 gdbarch_push_dummy_call_p (current_gdbarch));
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
2072 (long) current_gdbarch->push_dummy_call);
2074 fprintf_unfiltered (file,
2075 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
2076 gdbarch_push_dummy_code_p (current_gdbarch));
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2080 (long) current_gdbarch->push_dummy_code);
2081 #ifdef REGISTER_BYTE_P
2082 fprintf_unfiltered (file,
2083 "gdbarch_dump: %s # %s\n",
2084 "REGISTER_BYTE_P()",
2085 XSTRING (REGISTER_BYTE_P ()));
2086 fprintf_unfiltered (file,
2087 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2088 REGISTER_BYTE_P ());
2090 #ifdef REGISTER_BYTE
2091 fprintf_unfiltered (file,
2092 "gdbarch_dump: %s # %s\n",
2093 "REGISTER_BYTE(reg_nr)",
2094 XSTRING (REGISTER_BYTE (reg_nr)));
2096 fprintf_unfiltered (file,
2097 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
2098 (long) current_gdbarch->deprecated_register_byte
2099 /*REGISTER_BYTE ()*/);
2101 #ifdef REGISTER_BYTES_OK_P
2102 fprintf_unfiltered (file,
2103 "gdbarch_dump: %s # %s\n",
2104 "REGISTER_BYTES_OK_P()",
2105 XSTRING (REGISTER_BYTES_OK_P ()));
2106 fprintf_unfiltered (file,
2107 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2108 REGISTER_BYTES_OK_P ());
2110 #ifdef REGISTER_BYTES_OK
2111 fprintf_unfiltered (file,
2112 "gdbarch_dump: %s # %s\n",
2113 "REGISTER_BYTES_OK(nr_bytes)",
2114 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2118 (long) current_gdbarch->register_bytes_ok
2119 /*REGISTER_BYTES_OK ()*/);
2121 #ifdef REGISTER_NAME
2122 fprintf_unfiltered (file,
2123 "gdbarch_dump: %s # %s\n",
2124 "REGISTER_NAME(regnr)",
2125 XSTRING (REGISTER_NAME (regnr)));
2127 fprintf_unfiltered (file,
2128 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2129 (long) current_gdbarch->register_name
2130 /*REGISTER_NAME ()*/);
2132 #ifdef REGISTER_RAW_SIZE
2133 fprintf_unfiltered (file,
2134 "gdbarch_dump: %s # %s\n",
2135 "REGISTER_RAW_SIZE(reg_nr)",
2136 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2138 fprintf_unfiltered (file,
2139 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2140 (long) current_gdbarch->deprecated_register_raw_size
2141 /*REGISTER_RAW_SIZE ()*/);
2143 #ifdef REGISTER_SIM_REGNO
2144 fprintf_unfiltered (file,
2145 "gdbarch_dump: %s # %s\n",
2146 "REGISTER_SIM_REGNO(reg_nr)",
2147 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2149 fprintf_unfiltered (file,
2150 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2151 (long) current_gdbarch->register_sim_regno
2152 /*REGISTER_SIM_REGNO ()*/);
2154 #ifdef REGISTER_TO_VALUE
2156 /* Macro might contain `[{}]' when not multi-arch */
2157 fprintf_unfiltered (file,
2158 "gdbarch_dump: %s # %s\n",
2159 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
2160 XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2165 (long) current_gdbarch->register_to_value
2166 /*REGISTER_TO_VALUE ()*/);
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2171 gdbarch_register_type_p (current_gdbarch));
2173 fprintf_unfiltered (file,
2174 "gdbarch_dump: register_type = 0x%08lx\n",
2175 (long) current_gdbarch->register_type);
2176 #ifdef REGISTER_VIRTUAL_SIZE
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: %s # %s\n",
2179 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2180 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2182 fprintf_unfiltered (file,
2183 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2184 (long) current_gdbarch->deprecated_register_virtual_size
2185 /*REGISTER_VIRTUAL_SIZE ()*/);
2187 #ifdef REGISTER_VIRTUAL_TYPE_P
2188 fprintf_unfiltered (file,
2189 "gdbarch_dump: %s # %s\n",
2190 "REGISTER_VIRTUAL_TYPE_P()",
2191 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2192 fprintf_unfiltered (file,
2193 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2194 REGISTER_VIRTUAL_TYPE_P ());
2196 #ifdef REGISTER_VIRTUAL_TYPE
2197 fprintf_unfiltered (file,
2198 "gdbarch_dump: %s # %s\n",
2199 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2200 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2202 fprintf_unfiltered (file,
2203 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2204 (long) current_gdbarch->deprecated_register_virtual_type
2205 /*REGISTER_VIRTUAL_TYPE ()*/);
2207 #ifdef REG_STRUCT_HAS_ADDR_P
2208 fprintf_unfiltered (file,
2209 "gdbarch_dump: %s # %s\n",
2210 "REG_STRUCT_HAS_ADDR_P()",
2211 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2212 fprintf_unfiltered (file,
2213 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2214 REG_STRUCT_HAS_ADDR_P ());
2216 #ifdef REG_STRUCT_HAS_ADDR
2217 fprintf_unfiltered (file,
2218 "gdbarch_dump: %s # %s\n",
2219 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2220 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2224 (long) current_gdbarch->reg_struct_has_addr
2225 /*REG_STRUCT_HAS_ADDR ()*/);
2228 fprintf_unfiltered (file,
2229 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2230 (long) current_gdbarch->remote_translate_xfer_address);
2231 #ifdef RETURN_VALUE_ON_STACK
2232 fprintf_unfiltered (file,
2233 "gdbarch_dump: %s # %s\n",
2234 "RETURN_VALUE_ON_STACK(type)",
2235 XSTRING (RETURN_VALUE_ON_STACK (type)));
2237 fprintf_unfiltered (file,
2238 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2239 (long) current_gdbarch->return_value_on_stack
2240 /*RETURN_VALUE_ON_STACK ()*/);
2242 #ifdef SDB_REG_TO_REGNUM
2243 fprintf_unfiltered (file,
2244 "gdbarch_dump: %s # %s\n",
2245 "SDB_REG_TO_REGNUM(sdb_regnr)",
2246 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2248 fprintf_unfiltered (file,
2249 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2250 (long) current_gdbarch->sdb_reg_to_regnum
2251 /*SDB_REG_TO_REGNUM ()*/);
2253 #ifdef SIGTRAMP_END_P
2254 fprintf_unfiltered (file,
2255 "gdbarch_dump: %s # %s\n",
2257 XSTRING (SIGTRAMP_END_P ()));
2258 fprintf_unfiltered (file,
2259 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2263 fprintf_unfiltered (file,
2264 "gdbarch_dump: %s # %s\n",
2266 XSTRING (SIGTRAMP_END (pc)));
2268 fprintf_unfiltered (file,
2269 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2270 (long) current_gdbarch->sigtramp_end
2271 /*SIGTRAMP_END ()*/);
2273 #ifdef SIGTRAMP_START_P
2274 fprintf_unfiltered (file,
2275 "gdbarch_dump: %s # %s\n",
2276 "SIGTRAMP_START_P()",
2277 XSTRING (SIGTRAMP_START_P ()));
2278 fprintf_unfiltered (file,
2279 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2280 SIGTRAMP_START_P ());
2282 #ifdef SIGTRAMP_START
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: %s # %s\n",
2285 "SIGTRAMP_START(pc)",
2286 XSTRING (SIGTRAMP_START (pc)));
2288 fprintf_unfiltered (file,
2289 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2290 (long) current_gdbarch->sigtramp_start
2291 /*SIGTRAMP_START ()*/);
2293 #ifdef SKIP_PROLOGUE
2294 fprintf_unfiltered (file,
2295 "gdbarch_dump: %s # %s\n",
2296 "SKIP_PROLOGUE(ip)",
2297 XSTRING (SKIP_PROLOGUE (ip)));
2299 fprintf_unfiltered (file,
2300 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2301 (long) current_gdbarch->skip_prologue
2302 /*SKIP_PROLOGUE ()*/);
2304 #ifdef SKIP_TRAMPOLINE_CODE
2305 fprintf_unfiltered (file,
2306 "gdbarch_dump: %s # %s\n",
2307 "SKIP_TRAMPOLINE_CODE(pc)",
2308 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2310 fprintf_unfiltered (file,
2311 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2312 (long) current_gdbarch->skip_trampoline_code
2313 /*SKIP_TRAMPOLINE_CODE ()*/);
2315 #ifdef SMASH_TEXT_ADDRESS
2316 fprintf_unfiltered (file,
2317 "gdbarch_dump: %s # %s\n",
2318 "SMASH_TEXT_ADDRESS(addr)",
2319 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2321 fprintf_unfiltered (file,
2322 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2323 (long) current_gdbarch->smash_text_address
2324 /*SMASH_TEXT_ADDRESS ()*/);
2326 #ifdef SOFTWARE_SINGLE_STEP_P
2327 fprintf_unfiltered (file,
2328 "gdbarch_dump: %s # %s\n",
2329 "SOFTWARE_SINGLE_STEP_P()",
2330 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2333 SOFTWARE_SINGLE_STEP_P ());
2335 #ifdef SOFTWARE_SINGLE_STEP
2337 /* Macro might contain `[{}]' when not multi-arch */
2338 fprintf_unfiltered (file,
2339 "gdbarch_dump: %s # %s\n",
2340 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2341 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2344 fprintf_unfiltered (file,
2345 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2346 (long) current_gdbarch->software_single_step
2347 /*SOFTWARE_SINGLE_STEP ()*/);
2350 fprintf_unfiltered (file,
2351 "gdbarch_dump: SP_REGNUM # %s\n",
2352 XSTRING (SP_REGNUM));
2353 fprintf_unfiltered (file,
2354 "gdbarch_dump: SP_REGNUM = %d\n",
2357 #ifdef STAB_REG_TO_REGNUM
2358 fprintf_unfiltered (file,
2359 "gdbarch_dump: %s # %s\n",
2360 "STAB_REG_TO_REGNUM(stab_regnr)",
2361 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2363 fprintf_unfiltered (file,
2364 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2365 (long) current_gdbarch->stab_reg_to_regnum
2366 /*STAB_REG_TO_REGNUM ()*/);
2368 #ifdef STACK_ALIGN_P
2369 fprintf_unfiltered (file,
2370 "gdbarch_dump: %s # %s\n",
2372 XSTRING (STACK_ALIGN_P ()));
2373 fprintf_unfiltered (file,
2374 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2378 fprintf_unfiltered (file,
2379 "gdbarch_dump: %s # %s\n",
2381 XSTRING (STACK_ALIGN (sp)));
2383 fprintf_unfiltered (file,
2384 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2385 (long) current_gdbarch->stack_align
2386 /*STACK_ALIGN ()*/);
2388 #ifdef STORE_RETURN_VALUE
2390 /* Macro might contain `[{}]' when not multi-arch */
2391 fprintf_unfiltered (file,
2392 "gdbarch_dump: %s # %s\n",
2393 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2394 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2397 fprintf_unfiltered (file,
2398 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2399 (long) current_gdbarch->store_return_value
2400 /*STORE_RETURN_VALUE ()*/);
2402 #ifdef TARGET_ADDR_BIT
2403 fprintf_unfiltered (file,
2404 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2405 XSTRING (TARGET_ADDR_BIT));
2406 fprintf_unfiltered (file,
2407 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2410 #ifdef TARGET_ARCHITECTURE
2411 fprintf_unfiltered (file,
2412 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2413 XSTRING (TARGET_ARCHITECTURE));
2414 if (TARGET_ARCHITECTURE != NULL)
2415 fprintf_unfiltered (file,
2416 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2417 TARGET_ARCHITECTURE->printable_name);
2419 #ifdef TARGET_BFD_VMA_BIT
2420 fprintf_unfiltered (file,
2421 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2422 XSTRING (TARGET_BFD_VMA_BIT));
2423 fprintf_unfiltered (file,
2424 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2425 TARGET_BFD_VMA_BIT);
2427 #ifdef TARGET_BYTE_ORDER
2428 fprintf_unfiltered (file,
2429 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2430 XSTRING (TARGET_BYTE_ORDER));
2431 fprintf_unfiltered (file,
2432 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2433 (long) TARGET_BYTE_ORDER);
2435 #ifdef TARGET_CHAR_SIGNED
2436 fprintf_unfiltered (file,
2437 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2438 XSTRING (TARGET_CHAR_SIGNED));
2439 fprintf_unfiltered (file,
2440 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2441 TARGET_CHAR_SIGNED);
2443 #ifdef TARGET_DOUBLE_BIT
2444 fprintf_unfiltered (file,
2445 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2446 XSTRING (TARGET_DOUBLE_BIT));
2447 fprintf_unfiltered (file,
2448 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2451 #ifdef TARGET_DOUBLE_FORMAT
2452 fprintf_unfiltered (file,
2453 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2454 XSTRING (TARGET_DOUBLE_FORMAT));
2455 fprintf_unfiltered (file,
2456 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2457 (TARGET_DOUBLE_FORMAT)->name);
2459 #ifdef TARGET_FLOAT_BIT
2460 fprintf_unfiltered (file,
2461 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2462 XSTRING (TARGET_FLOAT_BIT));
2463 fprintf_unfiltered (file,
2464 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2467 #ifdef TARGET_FLOAT_FORMAT
2468 fprintf_unfiltered (file,
2469 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2470 XSTRING (TARGET_FLOAT_FORMAT));
2471 fprintf_unfiltered (file,
2472 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2473 (TARGET_FLOAT_FORMAT)->name);
2475 #ifdef TARGET_INT_BIT
2476 fprintf_unfiltered (file,
2477 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2478 XSTRING (TARGET_INT_BIT));
2479 fprintf_unfiltered (file,
2480 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2483 #ifdef TARGET_LONG_BIT
2484 fprintf_unfiltered (file,
2485 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2486 XSTRING (TARGET_LONG_BIT));
2487 fprintf_unfiltered (file,
2488 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2491 #ifdef TARGET_LONG_DOUBLE_BIT
2492 fprintf_unfiltered (file,
2493 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2494 XSTRING (TARGET_LONG_DOUBLE_BIT));
2495 fprintf_unfiltered (file,
2496 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2497 TARGET_LONG_DOUBLE_BIT);
2499 #ifdef TARGET_LONG_DOUBLE_FORMAT
2500 fprintf_unfiltered (file,
2501 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2502 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2503 fprintf_unfiltered (file,
2504 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2505 (TARGET_LONG_DOUBLE_FORMAT)->name);
2507 #ifdef TARGET_LONG_LONG_BIT
2508 fprintf_unfiltered (file,
2509 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2510 XSTRING (TARGET_LONG_LONG_BIT));
2511 fprintf_unfiltered (file,
2512 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2513 TARGET_LONG_LONG_BIT);
2516 fprintf_unfiltered (file,
2517 "gdbarch_dump: TARGET_OSABI # %s\n",
2518 XSTRING (TARGET_OSABI));
2519 fprintf_unfiltered (file,
2520 "gdbarch_dump: TARGET_OSABI = %ld\n",
2521 (long) TARGET_OSABI);
2523 #ifdef TARGET_PRINT_INSN
2524 fprintf_unfiltered (file,
2525 "gdbarch_dump: %s # %s\n",
2526 "TARGET_PRINT_INSN(vma, info)",
2527 XSTRING (TARGET_PRINT_INSN (vma, info)));
2529 fprintf_unfiltered (file,
2530 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2531 (long) current_gdbarch->print_insn
2532 /*TARGET_PRINT_INSN ()*/);
2534 #ifdef TARGET_PTR_BIT
2535 fprintf_unfiltered (file,
2536 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2537 XSTRING (TARGET_PTR_BIT));
2538 fprintf_unfiltered (file,
2539 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2542 #ifdef TARGET_READ_PC_P
2543 fprintf_unfiltered (file,
2544 "gdbarch_dump: %s # %s\n",
2545 "TARGET_READ_PC_P()",
2546 XSTRING (TARGET_READ_PC_P ()));
2547 fprintf_unfiltered (file,
2548 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2549 TARGET_READ_PC_P ());
2551 #ifdef TARGET_READ_PC
2552 fprintf_unfiltered (file,
2553 "gdbarch_dump: %s # %s\n",
2554 "TARGET_READ_PC(ptid)",
2555 XSTRING (TARGET_READ_PC (ptid)));
2557 fprintf_unfiltered (file,
2558 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2559 (long) current_gdbarch->read_pc
2560 /*TARGET_READ_PC ()*/);
2562 #ifdef TARGET_READ_SP_P
2563 fprintf_unfiltered (file,
2564 "gdbarch_dump: %s # %s\n",
2565 "TARGET_READ_SP_P()",
2566 XSTRING (TARGET_READ_SP_P ()));
2567 fprintf_unfiltered (file,
2568 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2569 TARGET_READ_SP_P ());
2571 #ifdef TARGET_READ_SP
2572 fprintf_unfiltered (file,
2573 "gdbarch_dump: %s # %s\n",
2575 XSTRING (TARGET_READ_SP ()));
2577 fprintf_unfiltered (file,
2578 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2579 (long) current_gdbarch->read_sp
2580 /*TARGET_READ_SP ()*/);
2582 #ifdef TARGET_SHORT_BIT
2583 fprintf_unfiltered (file,
2584 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2585 XSTRING (TARGET_SHORT_BIT));
2586 fprintf_unfiltered (file,
2587 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2590 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2592 /* Macro might contain `[{}]' when not multi-arch */
2593 fprintf_unfiltered (file,
2594 "gdbarch_dump: %s # %s\n",
2595 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2596 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2599 fprintf_unfiltered (file,
2600 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2601 (long) current_gdbarch->virtual_frame_pointer
2602 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2604 #ifdef TARGET_WRITE_PC
2606 /* Macro might contain `[{}]' when not multi-arch */
2607 fprintf_unfiltered (file,
2608 "gdbarch_dump: %s # %s\n",
2609 "TARGET_WRITE_PC(val, ptid)",
2610 XSTRING (TARGET_WRITE_PC (val, ptid)));
2613 fprintf_unfiltered (file,
2614 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2615 (long) current_gdbarch->write_pc
2616 /*TARGET_WRITE_PC ()*/);
2619 fprintf_unfiltered (file,
2620 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2621 gdbarch_unwind_dummy_id_p (current_gdbarch));
2623 fprintf_unfiltered (file,
2624 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2625 (long) current_gdbarch->unwind_dummy_id);
2627 fprintf_unfiltered (file,
2628 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2629 gdbarch_unwind_pc_p (current_gdbarch));
2631 fprintf_unfiltered (file,
2632 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2633 (long) current_gdbarch->unwind_pc);
2635 fprintf_unfiltered (file,
2636 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2637 gdbarch_unwind_sp_p (current_gdbarch));
2639 fprintf_unfiltered (file,
2640 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2641 (long) current_gdbarch->unwind_sp);
2642 #ifdef USE_STRUCT_CONVENTION
2643 fprintf_unfiltered (file,
2644 "gdbarch_dump: %s # %s\n",
2645 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2646 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2648 fprintf_unfiltered (file,
2649 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2650 (long) current_gdbarch->use_struct_convention
2651 /*USE_STRUCT_CONVENTION ()*/);
2653 #ifdef VALUE_TO_REGISTER
2655 /* Macro might contain `[{}]' when not multi-arch */
2656 fprintf_unfiltered (file,
2657 "gdbarch_dump: %s # %s\n",
2658 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2659 XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
2662 fprintf_unfiltered (file,
2663 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2664 (long) current_gdbarch->value_to_register
2665 /*VALUE_TO_REGISTER ()*/);
2667 if (current_gdbarch->dump_tdep != NULL)
2668 current_gdbarch->dump_tdep (current_gdbarch, file);
2671 struct gdbarch_tdep *
2672 gdbarch_tdep (struct gdbarch *gdbarch)
2674 if (gdbarch_debug >= 2)
2675 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2676 return gdbarch->tdep;
2680 const struct bfd_arch_info *
2681 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2683 gdb_assert (gdbarch != NULL);
2684 if (gdbarch_debug >= 2)
2685 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2686 return gdbarch->bfd_arch_info;
2690 gdbarch_byte_order (struct gdbarch *gdbarch)
2692 gdb_assert (gdbarch != NULL);
2693 if (gdbarch_debug >= 2)
2694 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2695 return gdbarch->byte_order;
2699 gdbarch_osabi (struct gdbarch *gdbarch)
2701 gdb_assert (gdbarch != NULL);
2702 if (gdbarch_debug >= 2)
2703 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2704 return gdbarch->osabi;
2708 gdbarch_short_bit (struct gdbarch *gdbarch)
2710 gdb_assert (gdbarch != NULL);
2711 /* Skip verify of short_bit, invalid_p == 0 */
2712 if (gdbarch_debug >= 2)
2713 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2714 return gdbarch->short_bit;
2718 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2721 gdbarch->short_bit = short_bit;
2725 gdbarch_int_bit (struct gdbarch *gdbarch)
2727 gdb_assert (gdbarch != NULL);
2728 /* Skip verify of int_bit, invalid_p == 0 */
2729 if (gdbarch_debug >= 2)
2730 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2731 return gdbarch->int_bit;
2735 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2738 gdbarch->int_bit = int_bit;
2742 gdbarch_long_bit (struct gdbarch *gdbarch)
2744 gdb_assert (gdbarch != NULL);
2745 /* Skip verify of long_bit, invalid_p == 0 */
2746 if (gdbarch_debug >= 2)
2747 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2748 return gdbarch->long_bit;
2752 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2755 gdbarch->long_bit = long_bit;
2759 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2761 gdb_assert (gdbarch != NULL);
2762 /* Skip verify of long_long_bit, invalid_p == 0 */
2763 if (gdbarch_debug >= 2)
2764 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2765 return gdbarch->long_long_bit;
2769 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2772 gdbarch->long_long_bit = long_long_bit;
2776 gdbarch_float_bit (struct gdbarch *gdbarch)
2778 gdb_assert (gdbarch != NULL);
2779 /* Skip verify of float_bit, invalid_p == 0 */
2780 if (gdbarch_debug >= 2)
2781 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2782 return gdbarch->float_bit;
2786 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2789 gdbarch->float_bit = float_bit;
2793 gdbarch_double_bit (struct gdbarch *gdbarch)
2795 gdb_assert (gdbarch != NULL);
2796 /* Skip verify of double_bit, invalid_p == 0 */
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2799 return gdbarch->double_bit;
2803 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2806 gdbarch->double_bit = double_bit;
2810 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2812 gdb_assert (gdbarch != NULL);
2813 /* Skip verify of long_double_bit, invalid_p == 0 */
2814 if (gdbarch_debug >= 2)
2815 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2816 return gdbarch->long_double_bit;
2820 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2821 int long_double_bit)
2823 gdbarch->long_double_bit = long_double_bit;
2827 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2829 gdb_assert (gdbarch != NULL);
2830 /* Skip verify of ptr_bit, invalid_p == 0 */
2831 if (gdbarch_debug >= 2)
2832 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2833 return gdbarch->ptr_bit;
2837 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2840 gdbarch->ptr_bit = ptr_bit;
2844 gdbarch_addr_bit (struct gdbarch *gdbarch)
2846 gdb_assert (gdbarch != NULL);
2847 if (gdbarch->addr_bit == 0)
2848 internal_error (__FILE__, __LINE__,
2849 "gdbarch: gdbarch_addr_bit invalid");
2850 if (gdbarch_debug >= 2)
2851 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2852 return gdbarch->addr_bit;
2856 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2859 gdbarch->addr_bit = addr_bit;
2863 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2865 gdb_assert (gdbarch != NULL);
2866 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2867 if (gdbarch_debug >= 2)
2868 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2869 return gdbarch->bfd_vma_bit;
2873 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2876 gdbarch->bfd_vma_bit = bfd_vma_bit;
2880 gdbarch_char_signed (struct gdbarch *gdbarch)
2882 gdb_assert (gdbarch != NULL);
2883 if (gdbarch->char_signed == -1)
2884 internal_error (__FILE__, __LINE__,
2885 "gdbarch: gdbarch_char_signed invalid");
2886 if (gdbarch_debug >= 2)
2887 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2888 return gdbarch->char_signed;
2892 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2895 gdbarch->char_signed = char_signed;
2899 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2901 gdb_assert (gdbarch != NULL);
2902 return gdbarch->read_pc != 0;
2906 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2908 gdb_assert (gdbarch != NULL);
2909 if (gdbarch->read_pc == 0)
2910 internal_error (__FILE__, __LINE__,
2911 "gdbarch: gdbarch_read_pc invalid");
2912 if (gdbarch_debug >= 2)
2913 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2914 return gdbarch->read_pc (ptid);
2918 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2919 gdbarch_read_pc_ftype read_pc)
2921 gdbarch->read_pc = read_pc;
2925 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2927 gdb_assert (gdbarch != NULL);
2928 if (gdbarch->write_pc == 0)
2929 internal_error (__FILE__, __LINE__,
2930 "gdbarch: gdbarch_write_pc invalid");
2931 if (gdbarch_debug >= 2)
2932 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2933 gdbarch->write_pc (val, ptid);
2937 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2938 gdbarch_write_pc_ftype write_pc)
2940 gdbarch->write_pc = write_pc;
2944 gdbarch_read_sp_p (struct gdbarch *gdbarch)
2946 gdb_assert (gdbarch != NULL);
2947 return gdbarch->read_sp != 0;
2951 gdbarch_read_sp (struct gdbarch *gdbarch)
2953 gdb_assert (gdbarch != NULL);
2954 if (gdbarch->read_sp == 0)
2955 internal_error (__FILE__, __LINE__,
2956 "gdbarch: gdbarch_read_sp invalid");
2957 if (gdbarch_debug >= 2)
2958 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2959 return gdbarch->read_sp ();
2963 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2964 gdbarch_read_sp_ftype read_sp)
2966 gdbarch->read_sp = read_sp;
2970 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2972 gdb_assert (gdbarch != NULL);
2973 if (gdbarch->virtual_frame_pointer == 0)
2974 internal_error (__FILE__, __LINE__,
2975 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2976 if (gdbarch_debug >= 2)
2977 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2978 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2982 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2983 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2985 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2989 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2991 gdb_assert (gdbarch != NULL);
2992 return gdbarch->pseudo_register_read != 0;
2996 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2998 gdb_assert (gdbarch != NULL);
2999 if (gdbarch->pseudo_register_read == 0)
3000 internal_error (__FILE__, __LINE__,
3001 "gdbarch: gdbarch_pseudo_register_read invalid");
3002 if (gdbarch_debug >= 2)
3003 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
3004 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
3008 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
3009 gdbarch_pseudo_register_read_ftype pseudo_register_read)
3011 gdbarch->pseudo_register_read = pseudo_register_read;
3015 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
3017 gdb_assert (gdbarch != NULL);
3018 return gdbarch->pseudo_register_write != 0;
3022 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3024 gdb_assert (gdbarch != NULL);
3025 if (gdbarch->pseudo_register_write == 0)
3026 internal_error (__FILE__, __LINE__,
3027 "gdbarch: gdbarch_pseudo_register_write invalid");
3028 if (gdbarch_debug >= 2)
3029 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3030 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3034 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3035 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3037 gdbarch->pseudo_register_write = pseudo_register_write;
3041 gdbarch_num_regs (struct gdbarch *gdbarch)
3043 gdb_assert (gdbarch != NULL);
3044 if (gdbarch->num_regs == -1)
3045 internal_error (__FILE__, __LINE__,
3046 "gdbarch: gdbarch_num_regs invalid");
3047 if (gdbarch_debug >= 2)
3048 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3049 return gdbarch->num_regs;
3053 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3056 gdbarch->num_regs = num_regs;
3060 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3062 gdb_assert (gdbarch != NULL);
3063 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3064 if (gdbarch_debug >= 2)
3065 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3066 return gdbarch->num_pseudo_regs;
3070 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3071 int num_pseudo_regs)
3073 gdbarch->num_pseudo_regs = num_pseudo_regs;
3077 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3079 gdb_assert (gdbarch != NULL);
3080 /* Skip verify of sp_regnum, invalid_p == 0 */
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3083 return gdbarch->sp_regnum;
3087 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3090 gdbarch->sp_regnum = sp_regnum;
3094 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3096 gdb_assert (gdbarch != NULL);
3097 /* Skip verify of pc_regnum, invalid_p == 0 */
3098 if (gdbarch_debug >= 2)
3099 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3100 return gdbarch->pc_regnum;
3104 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3107 gdbarch->pc_regnum = pc_regnum;
3111 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3113 gdb_assert (gdbarch != NULL);
3114 /* Skip verify of ps_regnum, invalid_p == 0 */
3115 if (gdbarch_debug >= 2)
3116 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3117 return gdbarch->ps_regnum;
3121 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3124 gdbarch->ps_regnum = ps_regnum;
3128 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3130 gdb_assert (gdbarch != NULL);
3131 /* Skip verify of fp0_regnum, invalid_p == 0 */
3132 if (gdbarch_debug >= 2)
3133 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3134 return gdbarch->fp0_regnum;
3138 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3141 gdbarch->fp0_regnum = fp0_regnum;
3145 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3147 gdb_assert (gdbarch != NULL);
3148 /* Skip verify of npc_regnum, invalid_p == 0 */
3149 if (gdbarch_debug >= 2)
3150 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3151 return gdbarch->npc_regnum;
3155 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3158 gdbarch->npc_regnum = npc_regnum;
3162 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3164 gdb_assert (gdbarch != NULL);
3165 if (gdbarch->stab_reg_to_regnum == 0)
3166 internal_error (__FILE__, __LINE__,
3167 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3168 if (gdbarch_debug >= 2)
3169 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3170 return gdbarch->stab_reg_to_regnum (stab_regnr);
3174 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3175 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3177 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3181 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3183 gdb_assert (gdbarch != NULL);
3184 if (gdbarch->ecoff_reg_to_regnum == 0)
3185 internal_error (__FILE__, __LINE__,
3186 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3187 if (gdbarch_debug >= 2)
3188 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3189 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3193 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3194 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3196 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3200 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3202 gdb_assert (gdbarch != NULL);
3203 if (gdbarch->dwarf_reg_to_regnum == 0)
3204 internal_error (__FILE__, __LINE__,
3205 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3206 if (gdbarch_debug >= 2)
3207 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3208 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3212 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3213 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3215 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3219 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3221 gdb_assert (gdbarch != NULL);
3222 if (gdbarch->sdb_reg_to_regnum == 0)
3223 internal_error (__FILE__, __LINE__,
3224 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3225 if (gdbarch_debug >= 2)
3226 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3227 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3231 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3232 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3234 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3238 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3240 gdb_assert (gdbarch != NULL);
3241 if (gdbarch->dwarf2_reg_to_regnum == 0)
3242 internal_error (__FILE__, __LINE__,
3243 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3244 if (gdbarch_debug >= 2)
3245 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3246 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3250 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3251 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3253 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3257 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3259 gdb_assert (gdbarch != NULL);
3260 if (gdbarch->register_name == 0)
3261 internal_error (__FILE__, __LINE__,
3262 "gdbarch: gdbarch_register_name invalid");
3263 if (gdbarch_debug >= 2)
3264 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3265 return gdbarch->register_name (regnr);
3269 set_gdbarch_register_name (struct gdbarch *gdbarch,
3270 gdbarch_register_name_ftype register_name)
3272 gdbarch->register_name = register_name;
3276 gdbarch_register_type_p (struct gdbarch *gdbarch)
3278 gdb_assert (gdbarch != NULL);
3279 return gdbarch->register_type != 0;
3283 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3285 gdb_assert (gdbarch != NULL);
3286 if (gdbarch->register_type == 0)
3287 internal_error (__FILE__, __LINE__,
3288 "gdbarch: gdbarch_register_type invalid");
3289 if (gdbarch_debug >= 2)
3290 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3291 return gdbarch->register_type (gdbarch, reg_nr);
3295 set_gdbarch_register_type (struct gdbarch *gdbarch,
3296 gdbarch_register_type_ftype register_type)
3298 gdbarch->register_type = register_type;
3302 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
3304 gdb_assert (gdbarch != NULL);
3305 return gdbarch->deprecated_register_virtual_type != 0;
3309 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3311 gdb_assert (gdbarch != NULL);
3312 if (gdbarch->deprecated_register_virtual_type == 0)
3313 internal_error (__FILE__, __LINE__,
3314 "gdbarch: gdbarch_deprecated_register_virtual_type invalid");
3315 if (gdbarch_debug >= 2)
3316 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
3317 return gdbarch->deprecated_register_virtual_type (reg_nr);
3321 set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
3322 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
3324 gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
3328 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
3330 gdb_assert (gdbarch != NULL);
3331 if (gdbarch_debug >= 2)
3332 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
3333 return gdbarch->deprecated_register_bytes;
3337 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
3338 int deprecated_register_bytes)
3340 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
3344 gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
3346 gdb_assert (gdbarch != NULL);
3347 return gdbarch->deprecated_register_byte != generic_register_byte;
3351 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
3353 gdb_assert (gdbarch != NULL);
3354 if (gdbarch->deprecated_register_byte == 0)
3355 internal_error (__FILE__, __LINE__,
3356 "gdbarch: gdbarch_deprecated_register_byte invalid");
3357 /* Ignore predicate (gdbarch->deprecated_register_byte != generic_register_byte). */
3358 if (gdbarch_debug >= 2)
3359 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
3360 return gdbarch->deprecated_register_byte (reg_nr);
3364 set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
3365 gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
3367 gdbarch->deprecated_register_byte = deprecated_register_byte;
3371 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3373 gdb_assert (gdbarch != NULL);
3374 if (gdbarch->deprecated_register_raw_size == 0)
3375 internal_error (__FILE__, __LINE__,
3376 "gdbarch: gdbarch_deprecated_register_raw_size invalid");
3377 if (gdbarch_debug >= 2)
3378 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
3379 return gdbarch->deprecated_register_raw_size (reg_nr);
3383 set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
3384 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
3386 gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
3390 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3392 gdb_assert (gdbarch != NULL);
3393 if (gdbarch->deprecated_register_virtual_size == 0)
3394 internal_error (__FILE__, __LINE__,
3395 "gdbarch: gdbarch_deprecated_register_virtual_size invalid");
3396 if (gdbarch_debug >= 2)
3397 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
3398 return gdbarch->deprecated_register_virtual_size (reg_nr);
3402 set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
3403 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
3405 gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
3409 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3411 gdb_assert (gdbarch != NULL);
3412 return gdbarch->deprecated_max_register_raw_size != 0;
3416 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3418 gdb_assert (gdbarch != NULL);
3419 if (gdbarch_debug >= 2)
3420 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3421 return gdbarch->deprecated_max_register_raw_size;
3425 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3426 int deprecated_max_register_raw_size)
3428 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3432 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3434 gdb_assert (gdbarch != NULL);
3435 return gdbarch->deprecated_max_register_virtual_size != 0;
3439 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3441 gdb_assert (gdbarch != NULL);
3442 if (gdbarch_debug >= 2)
3443 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3444 return gdbarch->deprecated_max_register_virtual_size;
3448 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3449 int deprecated_max_register_virtual_size)
3451 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3455 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
3457 gdb_assert (gdbarch != NULL);
3458 return gdbarch->unwind_dummy_id != 0;
3462 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
3464 gdb_assert (gdbarch != NULL);
3465 if (gdbarch->unwind_dummy_id == 0)
3466 internal_error (__FILE__, __LINE__,
3467 "gdbarch: gdbarch_unwind_dummy_id invalid");
3468 if (gdbarch_debug >= 2)
3469 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
3470 return gdbarch->unwind_dummy_id (gdbarch, info);
3474 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
3475 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
3477 gdbarch->unwind_dummy_id = unwind_dummy_id;
3481 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
3483 gdb_assert (gdbarch != NULL);
3484 return gdbarch->deprecated_save_dummy_frame_tos != 0;
3488 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
3490 gdb_assert (gdbarch != NULL);
3491 if (gdbarch->deprecated_save_dummy_frame_tos == 0)
3492 internal_error (__FILE__, __LINE__,
3493 "gdbarch: gdbarch_deprecated_save_dummy_frame_tos invalid");
3494 if (gdbarch_debug >= 2)
3495 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3496 gdbarch->deprecated_save_dummy_frame_tos (sp);
3500 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
3501 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
3503 gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
3507 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3509 gdb_assert (gdbarch != NULL);
3510 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3511 if (gdbarch_debug >= 2)
3512 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3513 return gdbarch->deprecated_fp_regnum;
3517 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3518 int deprecated_fp_regnum)
3520 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3524 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
3526 gdb_assert (gdbarch != NULL);
3527 return gdbarch->deprecated_target_read_fp != 0;
3531 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
3533 gdb_assert (gdbarch != NULL);
3534 if (gdbarch->deprecated_target_read_fp == 0)
3535 internal_error (__FILE__, __LINE__,
3536 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
3537 if (gdbarch_debug >= 2)
3538 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
3539 return gdbarch->deprecated_target_read_fp ();
3543 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
3544 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
3546 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
3550 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
3552 gdb_assert (gdbarch != NULL);
3553 return gdbarch->push_dummy_call != 0;
3557 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)
3559 gdb_assert (gdbarch != NULL);
3560 if (gdbarch->push_dummy_call == 0)
3561 internal_error (__FILE__, __LINE__,
3562 "gdbarch: gdbarch_push_dummy_call invalid");
3563 if (gdbarch_debug >= 2)
3564 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
3565 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
3569 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
3570 gdbarch_push_dummy_call_ftype push_dummy_call)
3572 gdbarch->push_dummy_call = push_dummy_call;
3576 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
3578 gdb_assert (gdbarch != NULL);
3579 return gdbarch->deprecated_push_arguments != 0;
3583 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3585 gdb_assert (gdbarch != NULL);
3586 if (gdbarch->deprecated_push_arguments == 0)
3587 internal_error (__FILE__, __LINE__,
3588 "gdbarch: gdbarch_deprecated_push_arguments invalid");
3589 if (gdbarch_debug >= 2)
3590 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
3591 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
3595 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
3596 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
3598 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
3602 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3604 gdb_assert (gdbarch != NULL);
3605 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3606 if (gdbarch_debug >= 2)
3607 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3608 return gdbarch->deprecated_use_generic_dummy_frames;
3612 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3613 int deprecated_use_generic_dummy_frames)
3615 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3619 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
3621 gdb_assert (gdbarch != NULL);
3622 return gdbarch->deprecated_push_return_address != 0;
3626 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3628 gdb_assert (gdbarch != NULL);
3629 if (gdbarch->deprecated_push_return_address == 0)
3630 internal_error (__FILE__, __LINE__,
3631 "gdbarch: gdbarch_deprecated_push_return_address invalid");
3632 if (gdbarch_debug >= 2)
3633 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
3634 return gdbarch->deprecated_push_return_address (pc, sp);
3638 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
3639 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
3641 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
3645 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
3647 gdb_assert (gdbarch != NULL);
3648 return gdbarch->deprecated_dummy_write_sp != 0;
3652 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
3654 gdb_assert (gdbarch != NULL);
3655 if (gdbarch->deprecated_dummy_write_sp == 0)
3656 internal_error (__FILE__, __LINE__,
3657 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
3658 if (gdbarch_debug >= 2)
3659 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
3660 gdbarch->deprecated_dummy_write_sp (val);
3664 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
3665 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
3667 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3671 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3673 gdb_assert (gdbarch != NULL);
3674 if (gdbarch_debug >= 2)
3675 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3676 return gdbarch->deprecated_register_size;
3680 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3681 int deprecated_register_size)
3683 gdbarch->deprecated_register_size = deprecated_register_size;
3687 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3689 gdb_assert (gdbarch != NULL);
3690 /* Skip verify of call_dummy_location, invalid_p == 0 */
3691 if (gdbarch_debug >= 2)
3692 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3693 return gdbarch->call_dummy_location;
3697 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3698 int call_dummy_location)
3700 gdbarch->call_dummy_location = call_dummy_location;
3704 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3706 gdb_assert (gdbarch != NULL);
3707 if (gdbarch->call_dummy_address == 0)
3708 internal_error (__FILE__, __LINE__,
3709 "gdbarch: gdbarch_call_dummy_address invalid");
3710 if (gdbarch_debug >= 2)
3711 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3712 return gdbarch->call_dummy_address ();
3716 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3717 gdbarch_call_dummy_address_ftype call_dummy_address)
3719 gdbarch->call_dummy_address = call_dummy_address;
3723 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
3725 gdb_assert (gdbarch != NULL);
3726 if (gdbarch_debug >= 2)
3727 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3728 return gdbarch->deprecated_call_dummy_start_offset;
3732 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3733 CORE_ADDR deprecated_call_dummy_start_offset)
3735 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3739 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3741 gdb_assert (gdbarch != NULL);
3742 if (gdbarch_debug >= 2)
3743 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3744 return gdbarch->deprecated_call_dummy_breakpoint_offset;
3748 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3749 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3751 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3755 gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
3757 gdb_assert (gdbarch != NULL);
3758 if (gdbarch_debug >= 2)
3759 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
3760 return gdbarch->deprecated_call_dummy_length;
3764 set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
3765 int deprecated_call_dummy_length)
3767 gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
3771 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3773 gdb_assert (gdbarch != NULL);
3774 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3775 if (gdbarch_debug >= 2)
3776 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3777 return gdbarch->deprecated_call_dummy_words;
3781 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3782 LONGEST * deprecated_call_dummy_words)
3784 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3788 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3790 gdb_assert (gdbarch != NULL);
3791 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3792 if (gdbarch_debug >= 2)
3793 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3794 return gdbarch->deprecated_sizeof_call_dummy_words;
3798 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3799 int deprecated_sizeof_call_dummy_words)
3801 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3805 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3807 gdb_assert (gdbarch != NULL);
3808 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3812 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3814 gdb_assert (gdbarch != NULL);
3815 if (gdbarch_debug >= 2)
3816 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3817 return gdbarch->deprecated_call_dummy_stack_adjust;
3821 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3822 int deprecated_call_dummy_stack_adjust)
3824 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3828 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3830 gdb_assert (gdbarch != NULL);
3831 return gdbarch->deprecated_fix_call_dummy != 0;
3835 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)
3837 gdb_assert (gdbarch != NULL);
3838 if (gdbarch->deprecated_fix_call_dummy == 0)
3839 internal_error (__FILE__, __LINE__,
3840 "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
3841 if (gdbarch_debug >= 2)
3842 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3843 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3847 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3848 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3850 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3854 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3856 gdb_assert (gdbarch != NULL);
3857 return gdbarch->push_dummy_code != 0;
3861 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)
3863 gdb_assert (gdbarch != NULL);
3864 if (gdbarch->push_dummy_code == 0)
3865 internal_error (__FILE__, __LINE__,
3866 "gdbarch: gdbarch_push_dummy_code invalid");
3867 if (gdbarch_debug >= 2)
3868 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3869 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3873 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3874 gdbarch_push_dummy_code_ftype push_dummy_code)
3876 gdbarch->push_dummy_code = push_dummy_code;
3880 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
3882 gdb_assert (gdbarch != NULL);
3883 return gdbarch->deprecated_push_dummy_frame != 0;
3887 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
3889 gdb_assert (gdbarch != NULL);
3890 if (gdbarch->deprecated_push_dummy_frame == 0)
3891 internal_error (__FILE__, __LINE__,
3892 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
3893 if (gdbarch_debug >= 2)
3894 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
3895 gdbarch->deprecated_push_dummy_frame ();
3899 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
3900 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
3902 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
3906 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
3908 gdb_assert (gdbarch != NULL);
3909 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
3910 if (gdbarch_debug >= 2)
3911 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
3912 return gdbarch->deprecated_extra_stack_alignment_needed;
3916 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
3917 int deprecated_extra_stack_alignment_needed)
3919 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
3923 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3925 gdb_assert (gdbarch != NULL);
3926 return gdbarch->deprecated_do_registers_info != 0;
3930 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3932 gdb_assert (gdbarch != NULL);
3933 if (gdbarch->deprecated_do_registers_info == 0)
3934 internal_error (__FILE__, __LINE__,
3935 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3936 if (gdbarch_debug >= 2)
3937 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3938 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3942 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3943 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3945 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3949 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3951 gdb_assert (gdbarch != NULL);
3952 if (gdbarch->print_registers_info == 0)
3953 internal_error (__FILE__, __LINE__,
3954 "gdbarch: gdbarch_print_registers_info invalid");
3955 if (gdbarch_debug >= 2)
3956 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3957 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3961 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3962 gdbarch_print_registers_info_ftype print_registers_info)
3964 gdbarch->print_registers_info = print_registers_info;
3968 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3970 gdb_assert (gdbarch != NULL);
3971 return gdbarch->print_float_info != 0;
3975 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3977 gdb_assert (gdbarch != NULL);
3978 if (gdbarch->print_float_info == 0)
3979 internal_error (__FILE__, __LINE__,
3980 "gdbarch: gdbarch_print_float_info invalid");
3981 if (gdbarch_debug >= 2)
3982 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3983 gdbarch->print_float_info (gdbarch, file, frame, args);
3987 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3988 gdbarch_print_float_info_ftype print_float_info)
3990 gdbarch->print_float_info = print_float_info;
3994 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3996 gdb_assert (gdbarch != NULL);
3997 return gdbarch->print_vector_info != 0;
4001 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
4003 gdb_assert (gdbarch != NULL);
4004 if (gdbarch->print_vector_info == 0)
4005 internal_error (__FILE__, __LINE__,
4006 "gdbarch: gdbarch_print_vector_info invalid");
4007 if (gdbarch_debug >= 2)
4008 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
4009 gdbarch->print_vector_info (gdbarch, file, frame, args);
4013 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
4014 gdbarch_print_vector_info_ftype print_vector_info)
4016 gdbarch->print_vector_info = print_vector_info;
4020 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
4022 gdb_assert (gdbarch != NULL);
4023 if (gdbarch->register_sim_regno == 0)
4024 internal_error (__FILE__, __LINE__,
4025 "gdbarch: gdbarch_register_sim_regno invalid");
4026 if (gdbarch_debug >= 2)
4027 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
4028 return gdbarch->register_sim_regno (reg_nr);
4032 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
4033 gdbarch_register_sim_regno_ftype register_sim_regno)
4035 gdbarch->register_sim_regno = register_sim_regno;
4039 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
4041 gdb_assert (gdbarch != NULL);
4042 return gdbarch->register_bytes_ok != 0;
4046 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
4048 gdb_assert (gdbarch != NULL);
4049 if (gdbarch->register_bytes_ok == 0)
4050 internal_error (__FILE__, __LINE__,
4051 "gdbarch: gdbarch_register_bytes_ok invalid");
4052 if (gdbarch_debug >= 2)
4053 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
4054 return gdbarch->register_bytes_ok (nr_bytes);
4058 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
4059 gdbarch_register_bytes_ok_ftype register_bytes_ok)
4061 gdbarch->register_bytes_ok = register_bytes_ok;
4065 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
4067 gdb_assert (gdbarch != NULL);
4068 if (gdbarch->cannot_fetch_register == 0)
4069 internal_error (__FILE__, __LINE__,
4070 "gdbarch: gdbarch_cannot_fetch_register invalid");
4071 if (gdbarch_debug >= 2)
4072 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
4073 return gdbarch->cannot_fetch_register (regnum);
4077 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
4078 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
4080 gdbarch->cannot_fetch_register = cannot_fetch_register;
4084 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
4086 gdb_assert (gdbarch != NULL);
4087 if (gdbarch->cannot_store_register == 0)
4088 internal_error (__FILE__, __LINE__,
4089 "gdbarch: gdbarch_cannot_store_register invalid");
4090 if (gdbarch_debug >= 2)
4091 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
4092 return gdbarch->cannot_store_register (regnum);
4096 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
4097 gdbarch_cannot_store_register_ftype cannot_store_register)
4099 gdbarch->cannot_store_register = cannot_store_register;
4103 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
4105 gdb_assert (gdbarch != NULL);
4106 return gdbarch->get_longjmp_target != 0;
4110 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
4112 gdb_assert (gdbarch != NULL);
4113 if (gdbarch->get_longjmp_target == 0)
4114 internal_error (__FILE__, __LINE__,
4115 "gdbarch: gdbarch_get_longjmp_target invalid");
4116 if (gdbarch_debug >= 2)
4117 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
4118 return gdbarch->get_longjmp_target (pc);
4122 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
4123 gdbarch_get_longjmp_target_ftype get_longjmp_target)
4125 gdbarch->get_longjmp_target = get_longjmp_target;
4129 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
4131 gdb_assert (gdbarch != NULL);
4132 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
4136 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
4138 gdb_assert (gdbarch != NULL);
4139 if (gdbarch->deprecated_pc_in_call_dummy == 0)
4140 internal_error (__FILE__, __LINE__,
4141 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
4142 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
4143 if (gdbarch_debug >= 2)
4144 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
4145 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
4149 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
4150 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
4152 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
4156 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
4158 gdb_assert (gdbarch != NULL);
4159 return gdbarch->deprecated_init_frame_pc_first != 0;
4163 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
4165 gdb_assert (gdbarch != NULL);
4166 if (gdbarch->deprecated_init_frame_pc_first == 0)
4167 internal_error (__FILE__, __LINE__,
4168 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
4169 if (gdbarch_debug >= 2)
4170 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
4171 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
4175 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
4176 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
4178 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
4182 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
4184 gdb_assert (gdbarch != NULL);
4185 return gdbarch->deprecated_init_frame_pc != 0;
4189 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
4191 gdb_assert (gdbarch != NULL);
4192 if (gdbarch->deprecated_init_frame_pc == 0)
4193 internal_error (__FILE__, __LINE__,
4194 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
4195 if (gdbarch_debug >= 2)
4196 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
4197 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
4201 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
4202 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
4204 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
4208 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
4210 gdb_assert (gdbarch != NULL);
4211 if (gdbarch_debug >= 2)
4212 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
4213 return gdbarch->believe_pcc_promotion;
4217 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
4218 int believe_pcc_promotion)
4220 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
4224 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
4226 gdb_assert (gdbarch != NULL);
4227 if (gdbarch_debug >= 2)
4228 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
4229 return gdbarch->believe_pcc_promotion_type;
4233 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
4234 int believe_pcc_promotion_type)
4236 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
4240 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
4242 gdb_assert (gdbarch != NULL);
4243 return gdbarch->deprecated_get_saved_register != 0;
4247 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)
4249 gdb_assert (gdbarch != NULL);
4250 if (gdbarch->deprecated_get_saved_register == 0)
4251 internal_error (__FILE__, __LINE__,
4252 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4253 if (gdbarch_debug >= 2)
4254 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
4255 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
4259 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
4260 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
4262 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
4266 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
4268 gdb_assert (gdbarch != NULL);
4269 if (gdbarch->deprecated_register_convertible == 0)
4270 internal_error (__FILE__, __LINE__,
4271 "gdbarch: gdbarch_deprecated_register_convertible invalid");
4272 if (gdbarch_debug >= 2)
4273 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
4274 return gdbarch->deprecated_register_convertible (nr);
4278 set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
4279 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
4281 gdbarch->deprecated_register_convertible = deprecated_register_convertible;
4285 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4287 gdb_assert (gdbarch != NULL);
4288 if (gdbarch->deprecated_register_convert_to_virtual == 0)
4289 internal_error (__FILE__, __LINE__,
4290 "gdbarch: gdbarch_deprecated_register_convert_to_virtual invalid");
4291 if (gdbarch_debug >= 2)
4292 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
4293 gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
4297 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
4298 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
4300 gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
4304 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
4306 gdb_assert (gdbarch != NULL);
4307 if (gdbarch->deprecated_register_convert_to_raw == 0)
4308 internal_error (__FILE__, __LINE__,
4309 "gdbarch: gdbarch_deprecated_register_convert_to_raw invalid");
4310 if (gdbarch_debug >= 2)
4311 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
4312 gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
4316 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
4317 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
4319 gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
4323 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
4325 gdb_assert (gdbarch != NULL);
4326 if (gdbarch->convert_register_p == 0)
4327 internal_error (__FILE__, __LINE__,
4328 "gdbarch: gdbarch_convert_register_p invalid");
4329 if (gdbarch_debug >= 2)
4330 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4331 return gdbarch->convert_register_p (regnum, type);
4335 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4336 gdbarch_convert_register_p_ftype convert_register_p)
4338 gdbarch->convert_register_p = convert_register_p;
4342 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
4344 gdb_assert (gdbarch != NULL);
4345 if (gdbarch->register_to_value == 0)
4346 internal_error (__FILE__, __LINE__,
4347 "gdbarch: gdbarch_register_to_value invalid");
4348 if (gdbarch_debug >= 2)
4349 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4350 gdbarch->register_to_value (frame, regnum, type, buf);
4354 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4355 gdbarch_register_to_value_ftype register_to_value)
4357 gdbarch->register_to_value = register_to_value;
4361 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
4363 gdb_assert (gdbarch != NULL);
4364 if (gdbarch->value_to_register == 0)
4365 internal_error (__FILE__, __LINE__,
4366 "gdbarch: gdbarch_value_to_register invalid");
4367 if (gdbarch_debug >= 2)
4368 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4369 gdbarch->value_to_register (frame, regnum, type, buf);
4373 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4374 gdbarch_value_to_register_ftype value_to_register)
4376 gdbarch->value_to_register = value_to_register;
4380 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4382 gdb_assert (gdbarch != NULL);
4383 if (gdbarch->pointer_to_address == 0)
4384 internal_error (__FILE__, __LINE__,
4385 "gdbarch: gdbarch_pointer_to_address invalid");
4386 if (gdbarch_debug >= 2)
4387 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4388 return gdbarch->pointer_to_address (type, buf);
4392 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4393 gdbarch_pointer_to_address_ftype pointer_to_address)
4395 gdbarch->pointer_to_address = pointer_to_address;
4399 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4401 gdb_assert (gdbarch != NULL);
4402 if (gdbarch->address_to_pointer == 0)
4403 internal_error (__FILE__, __LINE__,
4404 "gdbarch: gdbarch_address_to_pointer invalid");
4405 if (gdbarch_debug >= 2)
4406 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4407 gdbarch->address_to_pointer (type, buf, addr);
4411 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4412 gdbarch_address_to_pointer_ftype address_to_pointer)
4414 gdbarch->address_to_pointer = address_to_pointer;
4418 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4420 gdb_assert (gdbarch != NULL);
4421 return gdbarch->integer_to_address != 0;
4425 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4427 gdb_assert (gdbarch != NULL);
4428 if (gdbarch->integer_to_address == 0)
4429 internal_error (__FILE__, __LINE__,
4430 "gdbarch: gdbarch_integer_to_address invalid");
4431 if (gdbarch_debug >= 2)
4432 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4433 return gdbarch->integer_to_address (type, buf);
4437 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4438 gdbarch_integer_to_address_ftype integer_to_address)
4440 gdbarch->integer_to_address = integer_to_address;
4444 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4446 gdb_assert (gdbarch != NULL);
4447 if (gdbarch->return_value_on_stack == 0)
4448 internal_error (__FILE__, __LINE__,
4449 "gdbarch: gdbarch_return_value_on_stack invalid");
4450 if (gdbarch_debug >= 2)
4451 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4452 return gdbarch->return_value_on_stack (type);
4456 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4457 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4459 gdbarch->return_value_on_stack = return_value_on_stack;
4463 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4465 gdb_assert (gdbarch != NULL);
4466 return gdbarch->deprecated_pop_frame != 0;
4470 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4472 gdb_assert (gdbarch != NULL);
4473 if (gdbarch->deprecated_pop_frame == 0)
4474 internal_error (__FILE__, __LINE__,
4475 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4476 if (gdbarch_debug >= 2)
4477 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4478 gdbarch->deprecated_pop_frame ();
4482 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4483 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4485 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4489 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4491 gdb_assert (gdbarch != NULL);
4492 return gdbarch->deprecated_store_struct_return != 0;
4496 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4498 gdb_assert (gdbarch != NULL);
4499 if (gdbarch->deprecated_store_struct_return == 0)
4500 internal_error (__FILE__, __LINE__,
4501 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4502 if (gdbarch_debug >= 2)
4503 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4504 gdbarch->deprecated_store_struct_return (addr, sp);
4508 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4509 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4511 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4515 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4517 gdb_assert (gdbarch != NULL);
4518 if (gdbarch->extract_return_value == 0)
4519 internal_error (__FILE__, __LINE__,
4520 "gdbarch: gdbarch_extract_return_value invalid");
4521 if (gdbarch_debug >= 2)
4522 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4523 gdbarch->extract_return_value (type, regcache, valbuf);
4527 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4528 gdbarch_extract_return_value_ftype extract_return_value)
4530 gdbarch->extract_return_value = extract_return_value;
4534 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4536 gdb_assert (gdbarch != NULL);
4537 if (gdbarch->store_return_value == 0)
4538 internal_error (__FILE__, __LINE__,
4539 "gdbarch: gdbarch_store_return_value invalid");
4540 if (gdbarch_debug >= 2)
4541 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4542 gdbarch->store_return_value (type, regcache, valbuf);
4546 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4547 gdbarch_store_return_value_ftype store_return_value)
4549 gdbarch->store_return_value = store_return_value;
4553 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4555 gdb_assert (gdbarch != NULL);
4556 if (gdbarch->deprecated_extract_return_value == 0)
4557 internal_error (__FILE__, __LINE__,
4558 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4559 if (gdbarch_debug >= 2)
4560 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4561 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4565 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4566 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4568 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4572 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4574 gdb_assert (gdbarch != NULL);
4575 if (gdbarch->deprecated_store_return_value == 0)
4576 internal_error (__FILE__, __LINE__,
4577 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4578 if (gdbarch_debug >= 2)
4579 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4580 gdbarch->deprecated_store_return_value (type, valbuf);
4584 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4585 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4587 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4591 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4593 gdb_assert (gdbarch != NULL);
4594 return gdbarch->extract_struct_value_address != 0;
4598 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4600 gdb_assert (gdbarch != NULL);
4601 if (gdbarch->extract_struct_value_address == 0)
4602 internal_error (__FILE__, __LINE__,
4603 "gdbarch: gdbarch_extract_struct_value_address invalid");
4604 if (gdbarch_debug >= 2)
4605 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4606 return gdbarch->extract_struct_value_address (regcache);
4610 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4611 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4613 gdbarch->extract_struct_value_address = extract_struct_value_address;
4617 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4619 gdb_assert (gdbarch != NULL);
4620 return gdbarch->deprecated_extract_struct_value_address != 0;
4624 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4626 gdb_assert (gdbarch != NULL);
4627 if (gdbarch->deprecated_extract_struct_value_address == 0)
4628 internal_error (__FILE__, __LINE__,
4629 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4630 if (gdbarch_debug >= 2)
4631 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4632 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4636 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4637 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4639 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4643 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4645 gdb_assert (gdbarch != NULL);
4646 if (gdbarch->use_struct_convention == 0)
4647 internal_error (__FILE__, __LINE__,
4648 "gdbarch: gdbarch_use_struct_convention invalid");
4649 if (gdbarch_debug >= 2)
4650 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4651 return gdbarch->use_struct_convention (gcc_p, value_type);
4655 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4656 gdbarch_use_struct_convention_ftype use_struct_convention)
4658 gdbarch->use_struct_convention = use_struct_convention;
4662 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4664 gdb_assert (gdbarch != NULL);
4665 return gdbarch->deprecated_frame_init_saved_regs != 0;
4669 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4671 gdb_assert (gdbarch != NULL);
4672 if (gdbarch->deprecated_frame_init_saved_regs == 0)
4673 internal_error (__FILE__, __LINE__,
4674 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4675 if (gdbarch_debug >= 2)
4676 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4677 gdbarch->deprecated_frame_init_saved_regs (frame);
4681 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4682 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4684 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4688 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4690 gdb_assert (gdbarch != NULL);
4691 return gdbarch->deprecated_init_extra_frame_info != 0;
4695 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4697 gdb_assert (gdbarch != NULL);
4698 if (gdbarch->deprecated_init_extra_frame_info == 0)
4699 internal_error (__FILE__, __LINE__,
4700 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4701 if (gdbarch_debug >= 2)
4702 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4703 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4707 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4708 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4710 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4714 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4716 gdb_assert (gdbarch != NULL);
4717 if (gdbarch->skip_prologue == 0)
4718 internal_error (__FILE__, __LINE__,
4719 "gdbarch: gdbarch_skip_prologue invalid");
4720 if (gdbarch_debug >= 2)
4721 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4722 return gdbarch->skip_prologue (ip);
4726 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4727 gdbarch_skip_prologue_ftype skip_prologue)
4729 gdbarch->skip_prologue = skip_prologue;
4733 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4735 gdb_assert (gdbarch != NULL);
4736 if (gdbarch->prologue_frameless_p == 0)
4737 internal_error (__FILE__, __LINE__,
4738 "gdbarch: gdbarch_prologue_frameless_p invalid");
4739 if (gdbarch_debug >= 2)
4740 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4741 return gdbarch->prologue_frameless_p (ip);
4745 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4746 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4748 gdbarch->prologue_frameless_p = prologue_frameless_p;
4752 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4754 gdb_assert (gdbarch != NULL);
4755 if (gdbarch->inner_than == 0)
4756 internal_error (__FILE__, __LINE__,
4757 "gdbarch: gdbarch_inner_than invalid");
4758 if (gdbarch_debug >= 2)
4759 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4760 return gdbarch->inner_than (lhs, rhs);
4764 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4765 gdbarch_inner_than_ftype inner_than)
4767 gdbarch->inner_than = inner_than;
4770 const unsigned char *
4771 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4773 gdb_assert (gdbarch != NULL);
4774 if (gdbarch->breakpoint_from_pc == 0)
4775 internal_error (__FILE__, __LINE__,
4776 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4777 if (gdbarch_debug >= 2)
4778 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4779 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4783 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4784 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4786 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4790 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4792 gdb_assert (gdbarch != NULL);
4793 if (gdbarch->memory_insert_breakpoint == 0)
4794 internal_error (__FILE__, __LINE__,
4795 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4796 if (gdbarch_debug >= 2)
4797 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4798 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4802 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4803 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4805 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4809 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4811 gdb_assert (gdbarch != NULL);
4812 if (gdbarch->memory_remove_breakpoint == 0)
4813 internal_error (__FILE__, __LINE__,
4814 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4815 if (gdbarch_debug >= 2)
4816 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4817 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4821 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4822 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4824 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4828 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4830 gdb_assert (gdbarch != NULL);
4831 if (gdbarch->decr_pc_after_break == -1)
4832 internal_error (__FILE__, __LINE__,
4833 "gdbarch: gdbarch_decr_pc_after_break invalid");
4834 if (gdbarch_debug >= 2)
4835 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4836 return gdbarch->decr_pc_after_break;
4840 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4841 CORE_ADDR decr_pc_after_break)
4843 gdbarch->decr_pc_after_break = decr_pc_after_break;
4847 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4849 gdb_assert (gdbarch != NULL);
4850 if (gdbarch->function_start_offset == -1)
4851 internal_error (__FILE__, __LINE__,
4852 "gdbarch: gdbarch_function_start_offset invalid");
4853 if (gdbarch_debug >= 2)
4854 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4855 return gdbarch->function_start_offset;
4859 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4860 CORE_ADDR function_start_offset)
4862 gdbarch->function_start_offset = function_start_offset;
4866 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)
4868 gdb_assert (gdbarch != NULL);
4869 if (gdbarch->remote_translate_xfer_address == 0)
4870 internal_error (__FILE__, __LINE__,
4871 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4872 if (gdbarch_debug >= 2)
4873 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4874 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4878 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4879 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4881 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4885 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4887 gdb_assert (gdbarch != NULL);
4888 if (gdbarch->frame_args_skip == -1)
4889 internal_error (__FILE__, __LINE__,
4890 "gdbarch: gdbarch_frame_args_skip invalid");
4891 if (gdbarch_debug >= 2)
4892 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4893 return gdbarch->frame_args_skip;
4897 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4898 CORE_ADDR frame_args_skip)
4900 gdbarch->frame_args_skip = frame_args_skip;
4904 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4906 gdb_assert (gdbarch != NULL);
4907 if (gdbarch->frameless_function_invocation == 0)
4908 internal_error (__FILE__, __LINE__,
4909 "gdbarch: gdbarch_frameless_function_invocation invalid");
4910 if (gdbarch_debug >= 2)
4911 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4912 return gdbarch->frameless_function_invocation (fi);
4916 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4917 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4919 gdbarch->frameless_function_invocation = frameless_function_invocation;
4923 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4925 gdb_assert (gdbarch != NULL);
4926 return gdbarch->deprecated_frame_chain != 0;
4930 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4932 gdb_assert (gdbarch != NULL);
4933 if (gdbarch->deprecated_frame_chain == 0)
4934 internal_error (__FILE__, __LINE__,
4935 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4936 if (gdbarch_debug >= 2)
4937 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4938 return gdbarch->deprecated_frame_chain (frame);
4942 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4943 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4945 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4949 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4951 gdb_assert (gdbarch != NULL);
4952 return gdbarch->deprecated_frame_chain_valid != 0;
4956 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4958 gdb_assert (gdbarch != NULL);
4959 if (gdbarch->deprecated_frame_chain_valid == 0)
4960 internal_error (__FILE__, __LINE__,
4961 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4962 if (gdbarch_debug >= 2)
4963 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4964 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4968 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4969 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4971 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4975 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4977 gdb_assert (gdbarch != NULL);
4978 return gdbarch->deprecated_frame_saved_pc != 0;
4982 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4984 gdb_assert (gdbarch != NULL);
4985 if (gdbarch->deprecated_frame_saved_pc == 0)
4986 internal_error (__FILE__, __LINE__,
4987 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4988 if (gdbarch_debug >= 2)
4989 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4990 return gdbarch->deprecated_frame_saved_pc (fi);
4994 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4995 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4997 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
5001 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
5003 gdb_assert (gdbarch != NULL);
5004 return gdbarch->unwind_pc != 0;
5008 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
5010 gdb_assert (gdbarch != NULL);
5011 if (gdbarch->unwind_pc == 0)
5012 internal_error (__FILE__, __LINE__,
5013 "gdbarch: gdbarch_unwind_pc invalid");
5014 if (gdbarch_debug >= 2)
5015 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
5016 return gdbarch->unwind_pc (gdbarch, next_frame);
5020 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
5021 gdbarch_unwind_pc_ftype unwind_pc)
5023 gdbarch->unwind_pc = unwind_pc;
5027 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
5029 gdb_assert (gdbarch != NULL);
5030 return gdbarch->unwind_sp != 0;
5034 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
5036 gdb_assert (gdbarch != NULL);
5037 if (gdbarch->unwind_sp == 0)
5038 internal_error (__FILE__, __LINE__,
5039 "gdbarch: gdbarch_unwind_sp invalid");
5040 if (gdbarch_debug >= 2)
5041 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
5042 return gdbarch->unwind_sp (gdbarch, next_frame);
5046 set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
5047 gdbarch_unwind_sp_ftype unwind_sp)
5049 gdbarch->unwind_sp = unwind_sp;
5053 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
5055 gdb_assert (gdbarch != NULL);
5056 if (gdbarch->frame_args_address == 0)
5057 internal_error (__FILE__, __LINE__,
5058 "gdbarch: gdbarch_frame_args_address invalid");
5059 if (gdbarch_debug >= 2)
5060 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
5061 return gdbarch->frame_args_address (fi);
5065 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
5066 gdbarch_frame_args_address_ftype frame_args_address)
5068 gdbarch->frame_args_address = frame_args_address;
5072 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
5074 gdb_assert (gdbarch != NULL);
5075 if (gdbarch->frame_locals_address == 0)
5076 internal_error (__FILE__, __LINE__,
5077 "gdbarch: gdbarch_frame_locals_address invalid");
5078 if (gdbarch_debug >= 2)
5079 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
5080 return gdbarch->frame_locals_address (fi);
5084 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
5085 gdbarch_frame_locals_address_ftype frame_locals_address)
5087 gdbarch->frame_locals_address = frame_locals_address;
5091 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
5093 gdb_assert (gdbarch != NULL);
5094 return gdbarch->deprecated_saved_pc_after_call != 0;
5098 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
5100 gdb_assert (gdbarch != NULL);
5101 if (gdbarch->deprecated_saved_pc_after_call == 0)
5102 internal_error (__FILE__, __LINE__,
5103 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
5104 if (gdbarch_debug >= 2)
5105 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
5106 return gdbarch->deprecated_saved_pc_after_call (frame);
5110 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
5111 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
5113 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
5117 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
5119 gdb_assert (gdbarch != NULL);
5120 return gdbarch->frame_num_args != 0;
5124 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
5126 gdb_assert (gdbarch != NULL);
5127 if (gdbarch->frame_num_args == 0)
5128 internal_error (__FILE__, __LINE__,
5129 "gdbarch: gdbarch_frame_num_args invalid");
5130 if (gdbarch_debug >= 2)
5131 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
5132 return gdbarch->frame_num_args (frame);
5136 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
5137 gdbarch_frame_num_args_ftype frame_num_args)
5139 gdbarch->frame_num_args = frame_num_args;
5143 gdbarch_stack_align_p (struct gdbarch *gdbarch)
5145 gdb_assert (gdbarch != NULL);
5146 return gdbarch->stack_align != 0;
5150 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
5152 gdb_assert (gdbarch != NULL);
5153 if (gdbarch->stack_align == 0)
5154 internal_error (__FILE__, __LINE__,
5155 "gdbarch: gdbarch_stack_align invalid");
5156 if (gdbarch_debug >= 2)
5157 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
5158 return gdbarch->stack_align (sp);
5162 set_gdbarch_stack_align (struct gdbarch *gdbarch,
5163 gdbarch_stack_align_ftype stack_align)
5165 gdbarch->stack_align = stack_align;
5169 gdbarch_frame_align_p (struct gdbarch *gdbarch)
5171 gdb_assert (gdbarch != NULL);
5172 return gdbarch->frame_align != 0;
5176 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
5178 gdb_assert (gdbarch != NULL);
5179 if (gdbarch->frame_align == 0)
5180 internal_error (__FILE__, __LINE__,
5181 "gdbarch: gdbarch_frame_align invalid");
5182 if (gdbarch_debug >= 2)
5183 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5184 return gdbarch->frame_align (gdbarch, address);
5188 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5189 gdbarch_frame_align_ftype frame_align)
5191 gdbarch->frame_align = frame_align;
5195 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5197 gdb_assert (gdbarch != NULL);
5198 return gdbarch->reg_struct_has_addr != 0;
5202 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5204 gdb_assert (gdbarch != NULL);
5205 if (gdbarch->reg_struct_has_addr == 0)
5206 internal_error (__FILE__, __LINE__,
5207 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5208 if (gdbarch_debug >= 2)
5209 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5210 return gdbarch->reg_struct_has_addr (gcc_p, type);
5214 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5215 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5217 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5221 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5223 gdb_assert (gdbarch != NULL);
5224 if (gdbarch_debug >= 2)
5225 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5226 return gdbarch->parm_boundary;
5230 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5233 gdbarch->parm_boundary = parm_boundary;
5236 const struct floatformat *
5237 gdbarch_float_format (struct gdbarch *gdbarch)
5239 gdb_assert (gdbarch != NULL);
5240 if (gdbarch_debug >= 2)
5241 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5242 return gdbarch->float_format;
5246 set_gdbarch_float_format (struct gdbarch *gdbarch,
5247 const struct floatformat * float_format)
5249 gdbarch->float_format = float_format;
5252 const struct floatformat *
5253 gdbarch_double_format (struct gdbarch *gdbarch)
5255 gdb_assert (gdbarch != NULL);
5256 if (gdbarch_debug >= 2)
5257 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5258 return gdbarch->double_format;
5262 set_gdbarch_double_format (struct gdbarch *gdbarch,
5263 const struct floatformat * double_format)
5265 gdbarch->double_format = double_format;
5268 const struct floatformat *
5269 gdbarch_long_double_format (struct gdbarch *gdbarch)
5271 gdb_assert (gdbarch != NULL);
5272 if (gdbarch_debug >= 2)
5273 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5274 return gdbarch->long_double_format;
5278 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5279 const struct floatformat * long_double_format)
5281 gdbarch->long_double_format = long_double_format;
5285 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5287 gdb_assert (gdbarch != NULL);
5288 if (gdbarch->convert_from_func_ptr_addr == 0)
5289 internal_error (__FILE__, __LINE__,
5290 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5291 if (gdbarch_debug >= 2)
5292 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5293 return gdbarch->convert_from_func_ptr_addr (addr);
5297 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5298 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5300 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5304 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5306 gdb_assert (gdbarch != NULL);
5307 if (gdbarch->addr_bits_remove == 0)
5308 internal_error (__FILE__, __LINE__,
5309 "gdbarch: gdbarch_addr_bits_remove invalid");
5310 if (gdbarch_debug >= 2)
5311 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5312 return gdbarch->addr_bits_remove (addr);
5316 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5317 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5319 gdbarch->addr_bits_remove = addr_bits_remove;
5323 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5325 gdb_assert (gdbarch != NULL);
5326 if (gdbarch->smash_text_address == 0)
5327 internal_error (__FILE__, __LINE__,
5328 "gdbarch: gdbarch_smash_text_address invalid");
5329 if (gdbarch_debug >= 2)
5330 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5331 return gdbarch->smash_text_address (addr);
5335 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5336 gdbarch_smash_text_address_ftype smash_text_address)
5338 gdbarch->smash_text_address = smash_text_address;
5342 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5344 gdb_assert (gdbarch != NULL);
5345 return gdbarch->software_single_step != 0;
5349 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5351 gdb_assert (gdbarch != NULL);
5352 if (gdbarch->software_single_step == 0)
5353 internal_error (__FILE__, __LINE__,
5354 "gdbarch: gdbarch_software_single_step invalid");
5355 if (gdbarch_debug >= 2)
5356 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5357 gdbarch->software_single_step (sig, insert_breakpoints_p);
5361 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5362 gdbarch_software_single_step_ftype software_single_step)
5364 gdbarch->software_single_step = software_single_step;
5368 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5370 gdb_assert (gdbarch != NULL);
5371 if (gdbarch->print_insn == 0)
5372 internal_error (__FILE__, __LINE__,
5373 "gdbarch: gdbarch_print_insn invalid");
5374 if (gdbarch_debug >= 2)
5375 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5376 return gdbarch->print_insn (vma, info);
5380 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5381 gdbarch_print_insn_ftype print_insn)
5383 gdbarch->print_insn = print_insn;
5387 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5389 gdb_assert (gdbarch != NULL);
5390 if (gdbarch->skip_trampoline_code == 0)
5391 internal_error (__FILE__, __LINE__,
5392 "gdbarch: gdbarch_skip_trampoline_code invalid");
5393 if (gdbarch_debug >= 2)
5394 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5395 return gdbarch->skip_trampoline_code (pc);
5399 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5400 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5402 gdbarch->skip_trampoline_code = skip_trampoline_code;
5406 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5408 gdb_assert (gdbarch != NULL);
5409 if (gdbarch->in_solib_call_trampoline == 0)
5410 internal_error (__FILE__, __LINE__,
5411 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5412 if (gdbarch_debug >= 2)
5413 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5414 return gdbarch->in_solib_call_trampoline (pc, name);
5418 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5419 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5421 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5425 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5427 gdb_assert (gdbarch != NULL);
5428 if (gdbarch->in_solib_return_trampoline == 0)
5429 internal_error (__FILE__, __LINE__,
5430 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5431 if (gdbarch_debug >= 2)
5432 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5433 return gdbarch->in_solib_return_trampoline (pc, name);
5437 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5438 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5440 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5444 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5446 gdb_assert (gdbarch != NULL);
5447 if (gdbarch->pc_in_sigtramp == 0)
5448 internal_error (__FILE__, __LINE__,
5449 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5450 if (gdbarch_debug >= 2)
5451 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5452 return gdbarch->pc_in_sigtramp (pc, name);
5456 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5457 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5459 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5463 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5465 gdb_assert (gdbarch != NULL);
5466 return gdbarch->sigtramp_start != 0;
5470 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5472 gdb_assert (gdbarch != NULL);
5473 if (gdbarch->sigtramp_start == 0)
5474 internal_error (__FILE__, __LINE__,
5475 "gdbarch: gdbarch_sigtramp_start invalid");
5476 if (gdbarch_debug >= 2)
5477 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5478 return gdbarch->sigtramp_start (pc);
5482 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5483 gdbarch_sigtramp_start_ftype sigtramp_start)
5485 gdbarch->sigtramp_start = sigtramp_start;
5489 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5491 gdb_assert (gdbarch != NULL);
5492 return gdbarch->sigtramp_end != 0;
5496 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5498 gdb_assert (gdbarch != NULL);
5499 if (gdbarch->sigtramp_end == 0)
5500 internal_error (__FILE__, __LINE__,
5501 "gdbarch: gdbarch_sigtramp_end invalid");
5502 if (gdbarch_debug >= 2)
5503 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5504 return gdbarch->sigtramp_end (pc);
5508 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5509 gdbarch_sigtramp_end_ftype sigtramp_end)
5511 gdbarch->sigtramp_end = sigtramp_end;
5515 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5517 gdb_assert (gdbarch != NULL);
5518 if (gdbarch->in_function_epilogue_p == 0)
5519 internal_error (__FILE__, __LINE__,
5520 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5521 if (gdbarch_debug >= 2)
5522 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5523 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5527 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5528 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5530 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5534 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5536 gdb_assert (gdbarch != NULL);
5537 if (gdbarch->construct_inferior_arguments == 0)
5538 internal_error (__FILE__, __LINE__,
5539 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5540 if (gdbarch_debug >= 2)
5541 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5542 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5546 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5547 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5549 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5553 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5555 gdb_assert (gdbarch != NULL);
5556 return gdbarch->dwarf2_build_frame_info != 0;
5560 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5562 gdb_assert (gdbarch != NULL);
5563 if (gdbarch->dwarf2_build_frame_info == 0)
5564 internal_error (__FILE__, __LINE__,
5565 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5566 if (gdbarch_debug >= 2)
5567 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5568 gdbarch->dwarf2_build_frame_info (objfile);
5572 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5573 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5575 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5579 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5581 gdb_assert (gdbarch != NULL);
5582 if (gdbarch->elf_make_msymbol_special == 0)
5583 internal_error (__FILE__, __LINE__,
5584 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5585 if (gdbarch_debug >= 2)
5586 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5587 gdbarch->elf_make_msymbol_special (sym, msym);
5591 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5592 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5594 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5598 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5600 gdb_assert (gdbarch != NULL);
5601 if (gdbarch->coff_make_msymbol_special == 0)
5602 internal_error (__FILE__, __LINE__,
5603 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5604 if (gdbarch_debug >= 2)
5605 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5606 gdbarch->coff_make_msymbol_special (val, msym);
5610 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5611 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5613 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5617 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5619 gdb_assert (gdbarch != NULL);
5620 /* Skip verify of name_of_malloc, invalid_p == 0 */
5621 if (gdbarch_debug >= 2)
5622 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5623 return gdbarch->name_of_malloc;
5627 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5628 const char * name_of_malloc)
5630 gdbarch->name_of_malloc = name_of_malloc;
5634 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5636 gdb_assert (gdbarch != NULL);
5637 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5638 if (gdbarch_debug >= 2)
5639 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5640 return gdbarch->cannot_step_breakpoint;
5644 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5645 int cannot_step_breakpoint)
5647 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5651 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5653 gdb_assert (gdbarch != NULL);
5654 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5655 if (gdbarch_debug >= 2)
5656 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5657 return gdbarch->have_nonsteppable_watchpoint;
5661 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5662 int have_nonsteppable_watchpoint)
5664 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5668 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5670 gdb_assert (gdbarch != NULL);
5671 return gdbarch->address_class_type_flags != 0;
5675 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5677 gdb_assert (gdbarch != NULL);
5678 if (gdbarch->address_class_type_flags == 0)
5679 internal_error (__FILE__, __LINE__,
5680 "gdbarch: gdbarch_address_class_type_flags invalid");
5681 if (gdbarch_debug >= 2)
5682 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5683 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5687 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5688 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5690 gdbarch->address_class_type_flags = address_class_type_flags;
5694 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5696 gdb_assert (gdbarch != NULL);
5697 return gdbarch->address_class_type_flags_to_name != 0;
5701 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5703 gdb_assert (gdbarch != NULL);
5704 if (gdbarch->address_class_type_flags_to_name == 0)
5705 internal_error (__FILE__, __LINE__,
5706 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5707 if (gdbarch_debug >= 2)
5708 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5709 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5713 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5714 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5716 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5720 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5722 gdb_assert (gdbarch != NULL);
5723 return gdbarch->address_class_name_to_type_flags != 0;
5727 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5729 gdb_assert (gdbarch != NULL);
5730 if (gdbarch->address_class_name_to_type_flags == 0)
5731 internal_error (__FILE__, __LINE__,
5732 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5733 if (gdbarch_debug >= 2)
5734 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5735 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5739 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5740 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5742 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5746 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5748 gdb_assert (gdbarch != NULL);
5749 if (gdbarch->register_reggroup_p == 0)
5750 internal_error (__FILE__, __LINE__,
5751 "gdbarch: gdbarch_register_reggroup_p invalid");
5752 if (gdbarch_debug >= 2)
5753 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5754 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5758 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5759 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5761 gdbarch->register_reggroup_p = register_reggroup_p;
5765 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5767 gdb_assert (gdbarch != NULL);
5768 return gdbarch->fetch_pointer_argument != 0;
5772 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5774 gdb_assert (gdbarch != NULL);
5775 if (gdbarch->fetch_pointer_argument == 0)
5776 internal_error (__FILE__, __LINE__,
5777 "gdbarch: gdbarch_fetch_pointer_argument invalid");
5778 if (gdbarch_debug >= 2)
5779 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5780 return gdbarch->fetch_pointer_argument (frame, argi, type);
5784 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5785 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5787 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5791 /* Keep a registry of per-architecture data-pointers required by GDB
5798 gdbarch_data_init_ftype *init;
5799 gdbarch_data_free_ftype *free;
5802 struct gdbarch_data_registration
5804 struct gdbarch_data *data;
5805 struct gdbarch_data_registration *next;
5808 struct gdbarch_data_registry
5811 struct gdbarch_data_registration *registrations;
5814 struct gdbarch_data_registry gdbarch_data_registry =
5819 struct gdbarch_data *
5820 register_gdbarch_data (gdbarch_data_init_ftype *init,
5821 gdbarch_data_free_ftype *free)
5823 struct gdbarch_data_registration **curr;
5824 /* Append the new registraration. */
5825 for (curr = &gdbarch_data_registry.registrations;
5827 curr = &(*curr)->next);
5828 (*curr) = XMALLOC (struct gdbarch_data_registration);
5829 (*curr)->next = NULL;
5830 (*curr)->data = XMALLOC (struct gdbarch_data);
5831 (*curr)->data->index = gdbarch_data_registry.nr++;
5832 (*curr)->data->init = init;
5833 (*curr)->data->init_p = 1;
5834 (*curr)->data->free = free;
5835 return (*curr)->data;
5839 /* Create/delete the gdbarch data vector. */
5842 alloc_gdbarch_data (struct gdbarch *gdbarch)
5844 gdb_assert (gdbarch->data == NULL);
5845 gdbarch->nr_data = gdbarch_data_registry.nr;
5846 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5850 free_gdbarch_data (struct gdbarch *gdbarch)
5852 struct gdbarch_data_registration *rego;
5853 gdb_assert (gdbarch->data != NULL);
5854 for (rego = gdbarch_data_registry.registrations;
5858 struct gdbarch_data *data = rego->data;
5859 gdb_assert (data->index < gdbarch->nr_data);
5860 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5862 data->free (gdbarch, gdbarch->data[data->index]);
5863 gdbarch->data[data->index] = NULL;
5866 xfree (gdbarch->data);
5867 gdbarch->data = NULL;
5871 /* Initialize the current value of the specified per-architecture
5875 set_gdbarch_data (struct gdbarch *gdbarch,
5876 struct gdbarch_data *data,
5879 gdb_assert (data->index < gdbarch->nr_data);
5880 if (gdbarch->data[data->index] != NULL)
5882 gdb_assert (data->free != NULL);
5883 data->free (gdbarch, gdbarch->data[data->index]);
5885 gdbarch->data[data->index] = pointer;
5888 /* Return the current value of the specified per-architecture
5892 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5894 gdb_assert (data->index < gdbarch->nr_data);
5895 /* The data-pointer isn't initialized, call init() to get a value but
5896 only if the architecture initializaiton has completed. Otherwise
5897 punt - hope that the caller knows what they are doing. */
5898 if (gdbarch->data[data->index] == NULL
5899 && gdbarch->initialized_p)
5901 /* Be careful to detect an initialization cycle. */
5902 gdb_assert (data->init_p);
5904 gdb_assert (data->init != NULL);
5905 gdbarch->data[data->index] = data->init (gdbarch);
5907 gdb_assert (gdbarch->data[data->index] != NULL);
5909 return gdbarch->data[data->index];
5914 /* Keep a registry of swapped data required by GDB modules. */
5919 struct gdbarch_swap_registration *source;
5920 struct gdbarch_swap *next;
5923 struct gdbarch_swap_registration
5926 unsigned long sizeof_data;
5927 gdbarch_swap_ftype *init;
5928 struct gdbarch_swap_registration *next;
5931 struct gdbarch_swap_registry
5934 struct gdbarch_swap_registration *registrations;
5937 struct gdbarch_swap_registry gdbarch_swap_registry =
5943 register_gdbarch_swap (void *data,
5944 unsigned long sizeof_data,
5945 gdbarch_swap_ftype *init)
5947 struct gdbarch_swap_registration **rego;
5948 for (rego = &gdbarch_swap_registry.registrations;
5950 rego = &(*rego)->next);
5951 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5952 (*rego)->next = NULL;
5953 (*rego)->init = init;
5954 (*rego)->data = data;
5955 (*rego)->sizeof_data = sizeof_data;
5959 clear_gdbarch_swap (struct gdbarch *gdbarch)
5961 struct gdbarch_swap *curr;
5962 for (curr = gdbarch->swap;
5966 memset (curr->source->data, 0, curr->source->sizeof_data);
5971 init_gdbarch_swap (struct gdbarch *gdbarch)
5973 struct gdbarch_swap_registration *rego;
5974 struct gdbarch_swap **curr = &gdbarch->swap;
5975 for (rego = gdbarch_swap_registry.registrations;
5979 if (rego->data != NULL)
5981 (*curr) = XMALLOC (struct gdbarch_swap);
5982 (*curr)->source = rego;
5983 (*curr)->swap = xmalloc (rego->sizeof_data);
5984 (*curr)->next = NULL;
5985 curr = &(*curr)->next;
5987 if (rego->init != NULL)
5993 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5995 struct gdbarch_swap *curr;
5996 for (curr = gdbarch->swap;
5999 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
6003 swapin_gdbarch_swap (struct gdbarch *gdbarch)
6005 struct gdbarch_swap *curr;
6006 for (curr = gdbarch->swap;
6009 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
6013 /* Keep a registry of the architectures known by GDB. */
6015 struct gdbarch_registration
6017 enum bfd_architecture bfd_architecture;
6018 gdbarch_init_ftype *init;
6019 gdbarch_dump_tdep_ftype *dump_tdep;
6020 struct gdbarch_list *arches;
6021 struct gdbarch_registration *next;
6024 static struct gdbarch_registration *gdbarch_registry = NULL;
6027 append_name (const char ***buf, int *nr, const char *name)
6029 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
6035 gdbarch_printable_names (void)
6039 /* Accumulate a list of names based on the registed list of
6041 enum bfd_architecture a;
6043 const char **arches = NULL;
6044 struct gdbarch_registration *rego;
6045 for (rego = gdbarch_registry;
6049 const struct bfd_arch_info *ap;
6050 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
6052 internal_error (__FILE__, __LINE__,
6053 "gdbarch_architecture_names: multi-arch unknown");
6056 append_name (&arches, &nr_arches, ap->printable_name);
6061 append_name (&arches, &nr_arches, NULL);
6065 /* Just return all the architectures that BFD knows. Assume that
6066 the legacy architecture framework supports them. */
6067 return bfd_arch_list ();
6072 gdbarch_register (enum bfd_architecture bfd_architecture,
6073 gdbarch_init_ftype *init,
6074 gdbarch_dump_tdep_ftype *dump_tdep)
6076 struct gdbarch_registration **curr;
6077 const struct bfd_arch_info *bfd_arch_info;
6078 /* Check that BFD recognizes this architecture */
6079 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
6080 if (bfd_arch_info == NULL)
6082 internal_error (__FILE__, __LINE__,
6083 "gdbarch: Attempt to register unknown architecture (%d)",
6086 /* Check that we haven't seen this architecture before */
6087 for (curr = &gdbarch_registry;
6089 curr = &(*curr)->next)
6091 if (bfd_architecture == (*curr)->bfd_architecture)
6092 internal_error (__FILE__, __LINE__,
6093 "gdbarch: Duplicate registraration of architecture (%s)",
6094 bfd_arch_info->printable_name);
6098 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
6099 bfd_arch_info->printable_name,
6102 (*curr) = XMALLOC (struct gdbarch_registration);
6103 (*curr)->bfd_architecture = bfd_architecture;
6104 (*curr)->init = init;
6105 (*curr)->dump_tdep = dump_tdep;
6106 (*curr)->arches = NULL;
6107 (*curr)->next = NULL;
6108 /* When non- multi-arch, install whatever target dump routine we've
6109 been provided - hopefully that routine has been written correctly
6110 and works regardless of multi-arch. */
6111 if (!GDB_MULTI_ARCH && dump_tdep != NULL
6112 && startup_gdbarch.dump_tdep == NULL)
6113 startup_gdbarch.dump_tdep = dump_tdep;
6117 register_gdbarch_init (enum bfd_architecture bfd_architecture,
6118 gdbarch_init_ftype *init)
6120 gdbarch_register (bfd_architecture, init, NULL);
6124 /* Look for an architecture using gdbarch_info. Base search on only
6125 BFD_ARCH_INFO and BYTE_ORDER. */
6127 struct gdbarch_list *
6128 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
6129 const struct gdbarch_info *info)
6131 for (; arches != NULL; arches = arches->next)
6133 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
6135 if (info->byte_order != arches->gdbarch->byte_order)
6137 if (info->osabi != arches->gdbarch->osabi)
6145 /* Update the current architecture. Return ZERO if the update request
6149 gdbarch_update_p (struct gdbarch_info info)
6151 struct gdbarch *new_gdbarch;
6152 struct gdbarch *old_gdbarch;
6153 struct gdbarch_registration *rego;
6155 /* Fill in missing parts of the INFO struct using a number of
6156 sources: ``set ...''; INFOabfd supplied; existing target. */
6158 /* ``(gdb) set architecture ...'' */
6159 if (info.bfd_arch_info == NULL
6160 && !TARGET_ARCHITECTURE_AUTO)
6161 info.bfd_arch_info = TARGET_ARCHITECTURE;
6162 if (info.bfd_arch_info == NULL
6163 && info.abfd != NULL
6164 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6165 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6166 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
6167 if (info.bfd_arch_info == NULL)
6168 info.bfd_arch_info = TARGET_ARCHITECTURE;
6170 /* ``(gdb) set byte-order ...'' */
6171 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6172 && !TARGET_BYTE_ORDER_AUTO)
6173 info.byte_order = TARGET_BYTE_ORDER;
6174 /* From the INFO struct. */
6175 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6176 && info.abfd != NULL)
6177 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
6178 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
6179 : BFD_ENDIAN_UNKNOWN);
6180 /* From the current target. */
6181 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
6182 info.byte_order = TARGET_BYTE_ORDER;
6184 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6185 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6186 info.osabi = gdbarch_lookup_osabi (info.abfd);
6187 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6188 info.osabi = current_gdbarch->osabi;
6190 /* Must have found some sort of architecture. */
6191 gdb_assert (info.bfd_arch_info != NULL);
6195 fprintf_unfiltered (gdb_stdlog,
6196 "gdbarch_update: info.bfd_arch_info %s\n",
6197 (info.bfd_arch_info != NULL
6198 ? info.bfd_arch_info->printable_name
6200 fprintf_unfiltered (gdb_stdlog,
6201 "gdbarch_update: info.byte_order %d (%s)\n",
6203 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6204 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6206 fprintf_unfiltered (gdb_stdlog,
6207 "gdbarch_update: info.osabi %d (%s)\n",
6208 info.osabi, gdbarch_osabi_name (info.osabi));
6209 fprintf_unfiltered (gdb_stdlog,
6210 "gdbarch_update: info.abfd 0x%lx\n",
6212 fprintf_unfiltered (gdb_stdlog,
6213 "gdbarch_update: info.tdep_info 0x%lx\n",
6214 (long) info.tdep_info);
6217 /* Find the target that knows about this architecture. */
6218 for (rego = gdbarch_registry;
6221 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6226 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6230 /* Swap the data belonging to the old target out setting the
6231 installed data to zero. This stops the ->init() function trying
6232 to refer to the previous architecture's global data structures. */
6233 swapout_gdbarch_swap (current_gdbarch);
6234 clear_gdbarch_swap (current_gdbarch);
6236 /* Save the previously selected architecture, setting the global to
6237 NULL. This stops ->init() trying to use the previous
6238 architecture's configuration. The previous architecture may not
6239 even be of the same architecture family. The most recent
6240 architecture of the same family is found at the head of the
6241 rego->arches list. */
6242 old_gdbarch = current_gdbarch;
6243 current_gdbarch = NULL;
6245 /* Ask the target for a replacement architecture. */
6246 new_gdbarch = rego->init (info, rego->arches);
6248 /* Did the target like it? No. Reject the change and revert to the
6249 old architecture. */
6250 if (new_gdbarch == NULL)
6253 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6254 swapin_gdbarch_swap (old_gdbarch);
6255 current_gdbarch = old_gdbarch;
6259 /* Did the architecture change? No. Oops, put the old architecture
6261 if (old_gdbarch == new_gdbarch)
6264 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6266 new_gdbarch->bfd_arch_info->printable_name);
6267 swapin_gdbarch_swap (old_gdbarch);
6268 current_gdbarch = old_gdbarch;
6272 /* Is this a pre-existing architecture? Yes. Move it to the front
6273 of the list of architectures (keeping the list sorted Most
6274 Recently Used) and then copy it in. */
6276 struct gdbarch_list **list;
6277 for (list = ®o->arches;
6279 list = &(*list)->next)
6281 if ((*list)->gdbarch == new_gdbarch)
6283 struct gdbarch_list *this;
6285 fprintf_unfiltered (gdb_stdlog,
6286 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6288 new_gdbarch->bfd_arch_info->printable_name);
6291 (*list) = this->next;
6292 /* Insert in the front. */
6293 this->next = rego->arches;
6294 rego->arches = this;
6295 /* Copy the new architecture in. */
6296 current_gdbarch = new_gdbarch;
6297 swapin_gdbarch_swap (new_gdbarch);
6298 architecture_changed_event ();
6304 /* Prepend this new architecture to the architecture list (keep the
6305 list sorted Most Recently Used). */
6307 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6308 this->next = rego->arches;
6309 this->gdbarch = new_gdbarch;
6310 rego->arches = this;
6313 /* Switch to this new architecture marking it initialized. */
6314 current_gdbarch = new_gdbarch;
6315 current_gdbarch->initialized_p = 1;
6318 fprintf_unfiltered (gdb_stdlog,
6319 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6321 new_gdbarch->bfd_arch_info->printable_name);
6324 /* Check that the newly installed architecture is valid. Plug in
6325 any post init values. */
6326 new_gdbarch->dump_tdep = rego->dump_tdep;
6327 verify_gdbarch (new_gdbarch);
6329 /* Initialize the per-architecture memory (swap) areas.
6330 CURRENT_GDBARCH must be update before these modules are
6332 init_gdbarch_swap (new_gdbarch);
6334 /* Initialize the per-architecture data. CURRENT_GDBARCH
6335 must be updated before these modules are called. */
6336 architecture_changed_event ();
6339 gdbarch_dump (current_gdbarch, gdb_stdlog);
6347 /* Pointer to the target-dependent disassembly function. */
6348 int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6350 extern void _initialize_gdbarch (void);
6353 _initialize_gdbarch (void)
6355 struct cmd_list_element *c;
6357 add_show_from_set (add_set_cmd ("arch",
6360 (char *)&gdbarch_debug,
6361 "Set architecture debugging.\n\
6362 When non-zero, architecture debugging is enabled.", &setdebuglist),
6364 c = add_set_cmd ("archdebug",
6367 (char *)&gdbarch_debug,
6368 "Set architecture debugging.\n\
6369 When non-zero, architecture debugging is enabled.", &setlist);
6371 deprecate_cmd (c, "set debug arch");
6372 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");