2003-06-07 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gdbarch.c
1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
2
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5
6 This file is part of GDB.
7
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.
12
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.
17
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. */
22
23 /* This file was created with the aid of ``gdbarch.sh''.
24
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
28 being reported.
29
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
33 easier. */
34
35
36 #include "defs.h"
37 #include "arch-utils.h"
38
39 #if GDB_MULTI_ARCH
40 #include "gdbcmd.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
42 #else
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
46 #include <ctype.h>
47 #include "symtab.h"
48 #include "frame.h"
49 #include "inferior.h"
50 #include "breakpoint.h"
51 #include "gdb_wait.h"
52 #include "gdbcore.h"
53 #include "gdbcmd.h"
54 #include "target.h"
55 #include "gdbthread.h"
56 #include "annotate.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
59 #endif
60 #include "symcat.h"
61
62 #include "floatformat.h"
63
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
68 #include "osabi.h"
69 #include "symfile.h" /* For entry_point_address. */
70
71 /* Static function declarations */
72
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 *);
80
81 /* Non-zero if we want to trace architecture code. */
82
83 #ifndef GDBARCH_DEBUG
84 #define GDBARCH_DEBUG 0
85 #endif
86 int gdbarch_debug = GDBARCH_DEBUG;
87
88
89 /* Maintain the struct gdbarch object */
90
91 struct gdbarch
92 {
93 /* Has this architecture been fully initialized? */
94 int initialized_p;
95 /* basic architectural information */
96 const struct bfd_arch_info * bfd_arch_info;
97 int byte_order;
98 enum gdb_osabi osabi;
99
100 /* target specific vector. */
101 struct gdbarch_tdep *tdep;
102 gdbarch_dump_tdep_ftype *dump_tdep;
103
104 /* per-architecture data-pointers */
105 unsigned nr_data;
106 void **data;
107
108 /* per-architecture swap-regions */
109 struct gdbarch_swap *swap;
110
111 /* Multi-arch values.
112
113 When extending this structure you must:
114
115 Add the field below.
116
117 Declare set/get functions and define the corresponding
118 macro in gdbarch.h.
119
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
122
123 verify_gdbarch(): Confirm that the target updated the field
124 correctly.
125
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 field is dumped out
128
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
131
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
134
135 */
136
137 int short_bit;
138 int int_bit;
139 int long_bit;
140 int long_long_bit;
141 int float_bit;
142 int double_bit;
143 int long_double_bit;
144 int ptr_bit;
145 int addr_bit;
146 int bfd_vma_bit;
147 int char_signed;
148 gdbarch_read_pc_ftype *read_pc;
149 gdbarch_write_pc_ftype *write_pc;
150 gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
151 gdbarch_read_sp_ftype *read_sp;
152 gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
153 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
154 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
155 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
156 int num_regs;
157 int num_pseudo_regs;
158 int sp_regnum;
159 int deprecated_fp_regnum;
160 int pc_regnum;
161 int ps_regnum;
162 int fp0_regnum;
163 int npc_regnum;
164 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
165 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
166 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
167 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
168 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
169 gdbarch_register_name_ftype *register_name;
170 int deprecated_register_size;
171 int deprecated_register_bytes;
172 gdbarch_register_byte_ftype *register_byte;
173 gdbarch_register_raw_size_ftype *register_raw_size;
174 int deprecated_max_register_raw_size;
175 gdbarch_register_virtual_size_ftype *register_virtual_size;
176 int deprecated_max_register_virtual_size;
177 gdbarch_register_virtual_type_ftype *register_virtual_type;
178 gdbarch_register_type_ftype *register_type;
179 gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
180 gdbarch_print_registers_info_ftype *print_registers_info;
181 gdbarch_print_float_info_ftype *print_float_info;
182 gdbarch_print_vector_info_ftype *print_vector_info;
183 gdbarch_register_sim_regno_ftype *register_sim_regno;
184 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
185 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
186 gdbarch_cannot_store_register_ftype *cannot_store_register;
187 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
188 int deprecated_use_generic_dummy_frames;
189 int call_dummy_location;
190 gdbarch_call_dummy_address_ftype *call_dummy_address;
191 CORE_ADDR deprecated_call_dummy_start_offset;
192 CORE_ADDR deprecated_call_dummy_breakpoint_offset;
193 int deprecated_call_dummy_length;
194 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
195 LONGEST * deprecated_call_dummy_words;
196 int deprecated_sizeof_call_dummy_words;
197 int deprecated_call_dummy_stack_adjust;
198 gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
199 gdbarch_push_dummy_code_ftype *push_dummy_code;
200 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
201 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
202 int believe_pcc_promotion;
203 int believe_pcc_promotion_type;
204 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
205 gdbarch_register_convertible_ftype *register_convertible;
206 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
207 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
208 gdbarch_convert_register_p_ftype *convert_register_p;
209 gdbarch_register_to_value_ftype *register_to_value;
210 gdbarch_value_to_register_ftype *value_to_register;
211 gdbarch_pointer_to_address_ftype *pointer_to_address;
212 gdbarch_address_to_pointer_ftype *address_to_pointer;
213 gdbarch_integer_to_address_ftype *integer_to_address;
214 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
215 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
216 gdbarch_push_dummy_call_ftype *push_dummy_call;
217 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
218 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
219 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
220 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
221 gdbarch_extract_return_value_ftype *extract_return_value;
222 gdbarch_store_return_value_ftype *store_return_value;
223 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
224 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
225 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
226 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
227 gdbarch_use_struct_convention_ftype *use_struct_convention;
228 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
229 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
230 gdbarch_skip_prologue_ftype *skip_prologue;
231 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
232 gdbarch_inner_than_ftype *inner_than;
233 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
234 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
235 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
236 CORE_ADDR decr_pc_after_break;
237 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
238 CORE_ADDR function_start_offset;
239 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
240 CORE_ADDR frame_args_skip;
241 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
242 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
243 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
244 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
245 gdbarch_unwind_pc_ftype *unwind_pc;
246 gdbarch_frame_args_address_ftype *frame_args_address;
247 gdbarch_frame_locals_address_ftype *frame_locals_address;
248 gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
249 gdbarch_frame_num_args_ftype *frame_num_args;
250 gdbarch_stack_align_ftype *stack_align;
251 gdbarch_frame_align_ftype *frame_align;
252 int deprecated_extra_stack_alignment_needed;
253 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
254 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
255 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
256 int parm_boundary;
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;
284 };
285
286
287 /* The default architecture uses host values (for want of a better
288 choice). */
289
290 extern const struct bfd_arch_info bfd_default_arch_struct;
291
292 struct gdbarch startup_gdbarch =
293 {
294 1, /* Always initialized. */
295 /* basic architecture information */
296 &bfd_default_arch_struct,
297 BFD_ENDIAN_BIG,
298 GDB_OSABI_UNKNOWN,
299 /* target specific vector and its dump routine */
300 NULL, NULL,
301 /*per-architecture data-pointers and swap regions */
302 0, NULL, NULL,
303 /* Multi-arch values */
304 8 * sizeof (short),
305 8 * sizeof (int),
306 8 * sizeof (long),
307 8 * sizeof (LONGEST),
308 8 * sizeof (float),
309 8 * sizeof (double),
310 8 * sizeof (long double),
311 8 * sizeof (void*),
312 8 * sizeof (void*),
313 8 * sizeof (void*),
314 1,
315 0,
316 0,
317 0,
318 0,
319 0,
320 0,
321 0,
322 0,
323 0,
324 0,
325 -1,
326 -1,
327 -1,
328 -1,
329 0,
330 0,
331 0,
332 0,
333 0,
334 0,
335 0,
336 0,
337 0,
338 0,
339 generic_register_byte,
340 generic_register_size,
341 0,
342 generic_register_size,
343 0,
344 0,
345 0,
346 0,
347 default_print_registers_info,
348 0,
349 0,
350 0,
351 0,
352 0,
353 0,
354 0,
355 0,
356 0,
357 0,
358 0,
359 0,
360 0,
361 generic_pc_in_call_dummy,
362 0,
363 0,
364 0,
365 0,
366 0,
367 0,
368 0,
369 0,
370 0,
371 0,
372 0,
373 0,
374 0,
375 0,
376 0,
377 0,
378 0,
379 0,
380 0,
381 0,
382 0,
383 0,
384 0,
385 0,
386 0,
387 0,
388 0,
389 0,
390 0,
391 0,
392 0,
393 0,
394 0,
395 0,
396 0,
397 0,
398 0,
399 0,
400 0,
401 0,
402 0,
403 0,
404 0,
405 0,
406 generic_remote_translate_xfer_address,
407 0,
408 0,
409 0,
410 0,
411 0,
412 0,
413 0,
414 0,
415 0,
416 0,
417 0,
418 0,
419 0,
420 0,
421 0,
422 0,
423 0,
424 0,
425 0,
426 0,
427 0,
428 0,
429 0,
430 0,
431 0,
432 0,
433 0,
434 0,
435 0,
436 0,
437 0,
438 generic_in_function_epilogue_p,
439 construct_inferior_arguments,
440 0,
441 0,
442 0,
443 "malloc",
444 0,
445 0,
446 0,
447 0,
448 0,
449 default_register_reggroup_p,
450 0,
451 /* startup_gdbarch() */
452 };
453
454 struct gdbarch *current_gdbarch = &startup_gdbarch;
455
456 /* Do any initialization needed for a non-multiarch configuration
457 after the _initialize_MODULE functions have been run. */
458 void
459 initialize_non_multiarch (void)
460 {
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);
466 }
467
468
469 /* Create a new ``struct gdbarch'' based on information provided by
470 ``struct gdbarch_info''. */
471
472 struct gdbarch *
473 gdbarch_alloc (const struct gdbarch_info *info,
474 struct gdbarch_tdep *tdep)
475 {
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));
484
485 alloc_gdbarch_data (current_gdbarch);
486
487 current_gdbarch->tdep = tdep;
488
489 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
490 current_gdbarch->byte_order = info->byte_order;
491 current_gdbarch->osabi = info->osabi;
492
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->read_sp = generic_target_read_sp;
506 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
507 current_gdbarch->num_regs = -1;
508 current_gdbarch->sp_regnum = -1;
509 current_gdbarch->deprecated_fp_regnum = -1;
510 current_gdbarch->pc_regnum = -1;
511 current_gdbarch->ps_regnum = -1;
512 current_gdbarch->fp0_regnum = -1;
513 current_gdbarch->npc_regnum = -1;
514 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
517 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
518 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
519 current_gdbarch->register_name = legacy_register_name;
520 current_gdbarch->register_byte = generic_register_byte;
521 current_gdbarch->register_raw_size = generic_register_size;
522 current_gdbarch->register_virtual_size = generic_register_size;
523 current_gdbarch->print_registers_info = default_print_registers_info;
524 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
525 current_gdbarch->cannot_fetch_register = cannot_register_not;
526 current_gdbarch->cannot_store_register = cannot_register_not;
527 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
528 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
529 current_gdbarch->call_dummy_address = entry_point_address;
530 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
531 current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
532 current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
533 current_gdbarch->register_convertible = generic_register_convertible_not;
534 current_gdbarch->convert_register_p = legacy_convert_register_p;
535 current_gdbarch->register_to_value = legacy_register_to_value;
536 current_gdbarch->value_to_register = legacy_value_to_register;
537 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
538 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
539 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
540 current_gdbarch->extract_return_value = legacy_extract_return_value;
541 current_gdbarch->store_return_value = legacy_store_return_value;
542 current_gdbarch->use_struct_convention = generic_use_struct_convention;
543 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
544 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
545 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
546 current_gdbarch->decr_pc_after_break = -1;
547 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
548 current_gdbarch->function_start_offset = -1;
549 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
550 current_gdbarch->frame_args_skip = -1;
551 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
552 current_gdbarch->frame_args_address = get_frame_base;
553 current_gdbarch->frame_locals_address = get_frame_base;
554 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
555 current_gdbarch->addr_bits_remove = core_addr_identity;
556 current_gdbarch->smash_text_address = core_addr_identity;
557 current_gdbarch->print_insn = legacy_print_insn;
558 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
559 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
560 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
561 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
562 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
563 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
564 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
565 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
566 current_gdbarch->name_of_malloc = "malloc";
567 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
568 /* gdbarch_alloc() */
569
570 return current_gdbarch;
571 }
572
573
574 /* Free a gdbarch struct. This should never happen in normal
575 operation --- once you've created a gdbarch, you keep it around.
576 However, if an architecture's init function encounters an error
577 building the structure, it may need to clean up a partially
578 constructed gdbarch. */
579
580 void
581 gdbarch_free (struct gdbarch *arch)
582 {
583 gdb_assert (arch != NULL);
584 free_gdbarch_data (arch);
585 xfree (arch);
586 }
587
588
589 /* Ensure that all values in a GDBARCH are reasonable. */
590
591 static void
592 verify_gdbarch (struct gdbarch *gdbarch)
593 {
594 struct ui_file *log;
595 struct cleanup *cleanups;
596 long dummy;
597 char *buf;
598 /* Only perform sanity checks on a multi-arch target. */
599 if (!GDB_MULTI_ARCH)
600 return;
601 log = mem_fileopen ();
602 cleanups = make_cleanup_ui_file_delete (log);
603 /* fundamental */
604 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
605 fprintf_unfiltered (log, "\n\tbyte-order");
606 if (gdbarch->bfd_arch_info == NULL)
607 fprintf_unfiltered (log, "\n\tbfd_arch_info");
608 /* Check those that need to be defined for the given multi-arch level. */
609 /* Skip verify of short_bit, invalid_p == 0 */
610 /* Skip verify of int_bit, invalid_p == 0 */
611 /* Skip verify of long_bit, invalid_p == 0 */
612 /* Skip verify of long_long_bit, invalid_p == 0 */
613 /* Skip verify of float_bit, invalid_p == 0 */
614 /* Skip verify of double_bit, invalid_p == 0 */
615 /* Skip verify of long_double_bit, invalid_p == 0 */
616 /* Skip verify of ptr_bit, invalid_p == 0 */
617 if (gdbarch->addr_bit == 0)
618 gdbarch->addr_bit = TARGET_PTR_BIT;
619 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
620 if (gdbarch->char_signed == -1)
621 gdbarch->char_signed = 1;
622 /* Skip verify of read_pc, has predicate */
623 /* Skip verify of write_pc, invalid_p == 0 */
624 /* Skip verify of deprecated_target_read_fp, has predicate */
625 /* Skip verify of read_sp, invalid_p == 0 */
626 /* Skip verify of deprecated_dummy_write_sp, has predicate */
627 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
628 /* Skip verify of pseudo_register_read, has predicate */
629 /* Skip verify of pseudo_register_write, has predicate */
630 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
631 && (gdbarch->num_regs == -1))
632 fprintf_unfiltered (log, "\n\tnum_regs");
633 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
634 /* Skip verify of sp_regnum, invalid_p == 0 */
635 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
636 /* Skip verify of pc_regnum, invalid_p == 0 */
637 /* Skip verify of ps_regnum, invalid_p == 0 */
638 /* Skip verify of fp0_regnum, invalid_p == 0 */
639 /* Skip verify of npc_regnum, invalid_p == 0 */
640 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
641 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
642 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
643 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
645 /* Skip verify of register_name, invalid_p == 0 */
646 /* Skip verify of register_byte, has predicate */
647 /* Skip verify of register_raw_size, invalid_p == 0 */
648 /* Skip verify of deprecated_max_register_raw_size, has predicate */
649 /* Skip verify of register_virtual_size, invalid_p == 0 */
650 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
651 /* Skip verify of register_virtual_type, has predicate */
652 /* Skip verify of register_type, has predicate */
653 /* Skip verify of deprecated_do_registers_info, has predicate */
654 /* Skip verify of print_registers_info, invalid_p == 0 */
655 /* Skip verify of print_float_info, has predicate */
656 /* Skip verify of print_vector_info, has predicate */
657 /* Skip verify of register_sim_regno, invalid_p == 0 */
658 /* Skip verify of register_bytes_ok, has predicate */
659 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
660 /* Skip verify of cannot_store_register, invalid_p == 0 */
661 /* Skip verify of get_longjmp_target, has predicate */
662 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
663 /* Skip verify of call_dummy_location, invalid_p == 0 */
664 /* Skip verify of call_dummy_address, invalid_p == 0 */
665 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
666 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
667 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
668 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
669 /* Skip verify of deprecated_fix_call_dummy, has predicate */
670 /* Skip verify of push_dummy_code, has predicate */
671 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
672 /* Skip verify of deprecated_init_frame_pc, has predicate */
673 /* Skip verify of deprecated_get_saved_register, has predicate */
674 /* Skip verify of register_convertible, invalid_p == 0 */
675 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
676 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
677 /* Skip verify of convert_register_p, invalid_p == 0 */
678 /* Skip verify of register_to_value, invalid_p == 0 */
679 /* Skip verify of value_to_register, invalid_p == 0 */
680 /* Skip verify of pointer_to_address, invalid_p == 0 */
681 /* Skip verify of address_to_pointer, invalid_p == 0 */
682 /* Skip verify of integer_to_address, has predicate */
683 /* Skip verify of return_value_on_stack, invalid_p == 0 */
684 /* Skip verify of deprecated_push_arguments, has predicate */
685 /* Skip verify of push_dummy_call, has predicate */
686 /* Skip verify of deprecated_push_dummy_frame, has predicate */
687 /* Skip verify of deprecated_push_return_address, has predicate */
688 /* Skip verify of deprecated_pop_frame, has predicate */
689 /* Skip verify of deprecated_store_struct_return, has predicate */
690 /* Skip verify of extract_return_value, invalid_p == 0 */
691 /* Skip verify of store_return_value, invalid_p == 0 */
692 /* Skip verify of extract_struct_value_address, has predicate */
693 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
694 /* Skip verify of use_struct_convention, invalid_p == 0 */
695 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
696 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
697 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
698 && (gdbarch->skip_prologue == 0))
699 fprintf_unfiltered (log, "\n\tskip_prologue");
700 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
701 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
702 && (gdbarch->inner_than == 0))
703 fprintf_unfiltered (log, "\n\tinner_than");
704 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
705 && (gdbarch->breakpoint_from_pc == 0))
706 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
707 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
708 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
710 && (gdbarch->decr_pc_after_break == -1))
711 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
712 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
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 frame_args_address, invalid_p == 0 */
726 /* Skip verify of frame_locals_address, invalid_p == 0 */
727 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
728 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
729 && (gdbarch->frame_num_args == 0))
730 fprintf_unfiltered (log, "\n\tframe_num_args");
731 /* Skip verify of stack_align, has predicate */
732 /* Skip verify of frame_align, has predicate */
733 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
734 /* Skip verify of reg_struct_has_addr, has predicate */
735 /* Skip verify of save_dummy_frame_tos, has predicate */
736 /* Skip verify of unwind_dummy_id, has predicate */
737 if (gdbarch->float_format == 0)
738 gdbarch->float_format = default_float_format (gdbarch);
739 if (gdbarch->double_format == 0)
740 gdbarch->double_format = default_double_format (gdbarch);
741 if (gdbarch->long_double_format == 0)
742 gdbarch->long_double_format = default_double_format (gdbarch);
743 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
744 /* Skip verify of addr_bits_remove, invalid_p == 0 */
745 /* Skip verify of smash_text_address, invalid_p == 0 */
746 /* Skip verify of software_single_step, has predicate */
747 /* Skip verify of print_insn, invalid_p == 0 */
748 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
749 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
750 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
751 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
752 /* Skip verify of sigtramp_start, has predicate */
753 /* Skip verify of sigtramp_end, has predicate */
754 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
755 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
756 /* Skip verify of dwarf2_build_frame_info, has predicate */
757 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
758 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
759 /* Skip verify of name_of_malloc, invalid_p == 0 */
760 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
761 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
762 /* Skip verify of address_class_type_flags, has predicate */
763 /* Skip verify of address_class_type_flags_to_name, has predicate */
764 /* Skip verify of address_class_name_to_type_flags, has predicate */
765 /* Skip verify of register_reggroup_p, invalid_p == 0 */
766 /* Skip verify of fetch_pointer_argument, has predicate */
767 buf = ui_file_xstrdup (log, &dummy);
768 make_cleanup (xfree, buf);
769 if (strlen (buf) > 0)
770 internal_error (__FILE__, __LINE__,
771 "verify_gdbarch: the following are invalid ...%s",
772 buf);
773 do_cleanups (cleanups);
774 }
775
776
777 /* Print out the details of the current architecture. */
778
779 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
780 just happens to match the global variable ``current_gdbarch''. That
781 way macros refering to that variable get the local and not the global
782 version - ulgh. Once everything is parameterised with gdbarch, this
783 will go away. */
784
785 void
786 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
787 {
788 fprintf_unfiltered (file,
789 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
790 GDB_MULTI_ARCH);
791 if (GDB_MULTI_ARCH)
792 fprintf_unfiltered (file,
793 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
794 gdbarch_frame_align_p (current_gdbarch));
795 if (GDB_MULTI_ARCH)
796 fprintf_unfiltered (file,
797 "gdbarch_dump: frame_align = 0x%08lx\n",
798 (long) current_gdbarch->frame_align);
799 if (GDB_MULTI_ARCH)
800 fprintf_unfiltered (file,
801 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
802 (long) current_gdbarch->in_function_epilogue_p);
803 if (GDB_MULTI_ARCH)
804 fprintf_unfiltered (file,
805 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
806 (long) current_gdbarch->register_reggroup_p);
807 if (GDB_MULTI_ARCH)
808 fprintf_unfiltered (file,
809 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
810 gdbarch_pseudo_register_read_p (current_gdbarch));
811 if (GDB_MULTI_ARCH)
812 fprintf_unfiltered (file,
813 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
814 (long) current_gdbarch->pseudo_register_read);
815 if (GDB_MULTI_ARCH)
816 fprintf_unfiltered (file,
817 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
818 gdbarch_pseudo_register_write_p (current_gdbarch));
819 if (GDB_MULTI_ARCH)
820 fprintf_unfiltered (file,
821 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
822 (long) current_gdbarch->pseudo_register_write);
823 if (GDB_MULTI_ARCH)
824 fprintf_unfiltered (file,
825 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
826 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
827 if (GDB_MULTI_ARCH)
828 fprintf_unfiltered (file,
829 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
830 (long) current_gdbarch->address_class_name_to_type_flags);
831 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
832 fprintf_unfiltered (file,
833 "gdbarch_dump: %s # %s\n",
834 "ADDRESS_CLASS_TYPE_FLAGS_P()",
835 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
838 ADDRESS_CLASS_TYPE_FLAGS_P ());
839 #endif
840 #ifdef ADDRESS_CLASS_TYPE_FLAGS
841 fprintf_unfiltered (file,
842 "gdbarch_dump: %s # %s\n",
843 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
844 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
845 if (GDB_MULTI_ARCH)
846 fprintf_unfiltered (file,
847 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
848 (long) current_gdbarch->address_class_type_flags
849 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
850 #endif
851 if (GDB_MULTI_ARCH)
852 fprintf_unfiltered (file,
853 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
854 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
855 if (GDB_MULTI_ARCH)
856 fprintf_unfiltered (file,
857 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
858 (long) current_gdbarch->address_class_type_flags_to_name);
859 #ifdef ADDRESS_TO_POINTER
860 #if GDB_MULTI_ARCH
861 /* Macro might contain `[{}]' when not multi-arch */
862 fprintf_unfiltered (file,
863 "gdbarch_dump: %s # %s\n",
864 "ADDRESS_TO_POINTER(type, buf, addr)",
865 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
866 #endif
867 if (GDB_MULTI_ARCH)
868 fprintf_unfiltered (file,
869 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
870 (long) current_gdbarch->address_to_pointer
871 /*ADDRESS_TO_POINTER ()*/);
872 #endif
873 #ifdef ADDR_BITS_REMOVE
874 fprintf_unfiltered (file,
875 "gdbarch_dump: %s # %s\n",
876 "ADDR_BITS_REMOVE(addr)",
877 XSTRING (ADDR_BITS_REMOVE (addr)));
878 if (GDB_MULTI_ARCH)
879 fprintf_unfiltered (file,
880 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
881 (long) current_gdbarch->addr_bits_remove
882 /*ADDR_BITS_REMOVE ()*/);
883 #endif
884 #ifdef BELIEVE_PCC_PROMOTION
885 fprintf_unfiltered (file,
886 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
887 XSTRING (BELIEVE_PCC_PROMOTION));
888 fprintf_unfiltered (file,
889 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
890 BELIEVE_PCC_PROMOTION);
891 #endif
892 #ifdef BELIEVE_PCC_PROMOTION_TYPE
893 fprintf_unfiltered (file,
894 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
895 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
898 BELIEVE_PCC_PROMOTION_TYPE);
899 #endif
900 #ifdef BREAKPOINT_FROM_PC
901 fprintf_unfiltered (file,
902 "gdbarch_dump: %s # %s\n",
903 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
904 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
905 if (GDB_MULTI_ARCH)
906 fprintf_unfiltered (file,
907 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
908 (long) current_gdbarch->breakpoint_from_pc
909 /*BREAKPOINT_FROM_PC ()*/);
910 #endif
911 #ifdef CALL_DUMMY_ADDRESS
912 fprintf_unfiltered (file,
913 "gdbarch_dump: %s # %s\n",
914 "CALL_DUMMY_ADDRESS()",
915 XSTRING (CALL_DUMMY_ADDRESS ()));
916 if (GDB_MULTI_ARCH)
917 fprintf_unfiltered (file,
918 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
919 (long) current_gdbarch->call_dummy_address
920 /*CALL_DUMMY_ADDRESS ()*/);
921 #endif
922 #ifdef CALL_DUMMY_LOCATION
923 fprintf_unfiltered (file,
924 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
925 XSTRING (CALL_DUMMY_LOCATION));
926 fprintf_unfiltered (file,
927 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
928 CALL_DUMMY_LOCATION);
929 #endif
930 #ifdef CANNOT_FETCH_REGISTER
931 fprintf_unfiltered (file,
932 "gdbarch_dump: %s # %s\n",
933 "CANNOT_FETCH_REGISTER(regnum)",
934 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
935 if (GDB_MULTI_ARCH)
936 fprintf_unfiltered (file,
937 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
938 (long) current_gdbarch->cannot_fetch_register
939 /*CANNOT_FETCH_REGISTER ()*/);
940 #endif
941 #ifdef CANNOT_STEP_BREAKPOINT
942 fprintf_unfiltered (file,
943 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
944 XSTRING (CANNOT_STEP_BREAKPOINT));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
947 CANNOT_STEP_BREAKPOINT);
948 #endif
949 #ifdef CANNOT_STORE_REGISTER
950 fprintf_unfiltered (file,
951 "gdbarch_dump: %s # %s\n",
952 "CANNOT_STORE_REGISTER(regnum)",
953 XSTRING (CANNOT_STORE_REGISTER (regnum)));
954 if (GDB_MULTI_ARCH)
955 fprintf_unfiltered (file,
956 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
957 (long) current_gdbarch->cannot_store_register
958 /*CANNOT_STORE_REGISTER ()*/);
959 #endif
960 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
961 #if GDB_MULTI_ARCH
962 /* Macro might contain `[{}]' when not multi-arch */
963 fprintf_unfiltered (file,
964 "gdbarch_dump: %s # %s\n",
965 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
966 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
967 #endif
968 if (GDB_MULTI_ARCH)
969 fprintf_unfiltered (file,
970 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
971 (long) current_gdbarch->coff_make_msymbol_special
972 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
973 #endif
974 if (GDB_MULTI_ARCH)
975 fprintf_unfiltered (file,
976 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
977 (long) current_gdbarch->construct_inferior_arguments);
978 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
979 fprintf_unfiltered (file,
980 "gdbarch_dump: %s # %s\n",
981 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
982 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
983 if (GDB_MULTI_ARCH)
984 fprintf_unfiltered (file,
985 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
986 (long) current_gdbarch->convert_from_func_ptr_addr
987 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
988 #endif
989 #ifdef CONVERT_REGISTER_P
990 fprintf_unfiltered (file,
991 "gdbarch_dump: %s # %s\n",
992 "CONVERT_REGISTER_P(regnum)",
993 XSTRING (CONVERT_REGISTER_P (regnum)));
994 if (GDB_MULTI_ARCH)
995 fprintf_unfiltered (file,
996 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
997 (long) current_gdbarch->convert_register_p
998 /*CONVERT_REGISTER_P ()*/);
999 #endif
1000 #ifdef DECR_PC_AFTER_BREAK
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1003 XSTRING (DECR_PC_AFTER_BREAK));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1006 (long) DECR_PC_AFTER_BREAK);
1007 #endif
1008 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1011 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET));
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
1014 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET);
1015 #endif
1016 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
1019 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH));
1020 fprintf_unfiltered (file,
1021 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
1022 DEPRECATED_CALL_DUMMY_LENGTH);
1023 #endif
1024 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: %s # %s\n",
1027 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1028 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1031 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1032 #endif
1033 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1036 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1039 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1040 #endif
1041 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
1042 fprintf_unfiltered (file,
1043 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
1044 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET));
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
1047 (long) DEPRECATED_CALL_DUMMY_START_OFFSET);
1048 #endif
1049 #ifdef DEPRECATED_CALL_DUMMY_WORDS
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
1052 XSTRING (DEPRECATED_CALL_DUMMY_WORDS));
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
1055 (long) DEPRECATED_CALL_DUMMY_WORDS);
1056 #endif
1057 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: %s # %s\n",
1060 "DEPRECATED_DO_REGISTERS_INFO_P()",
1061 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1064 DEPRECATED_DO_REGISTERS_INFO_P ());
1065 #endif
1066 #ifdef DEPRECATED_DO_REGISTERS_INFO
1067 #if GDB_MULTI_ARCH
1068 /* Macro might contain `[{}]' when not multi-arch */
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: %s # %s\n",
1071 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1072 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1073 #endif
1074 if (GDB_MULTI_ARCH)
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1077 (long) current_gdbarch->deprecated_do_registers_info
1078 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1079 #endif
1080 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: %s # %s\n",
1083 "DEPRECATED_DUMMY_WRITE_SP_P()",
1084 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1085 fprintf_unfiltered (file,
1086 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1087 DEPRECATED_DUMMY_WRITE_SP_P ());
1088 #endif
1089 #ifdef DEPRECATED_DUMMY_WRITE_SP
1090 #if GDB_MULTI_ARCH
1091 /* Macro might contain `[{}]' when not multi-arch */
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: %s # %s\n",
1094 "DEPRECATED_DUMMY_WRITE_SP(val)",
1095 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1096 #endif
1097 if (GDB_MULTI_ARCH)
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1100 (long) current_gdbarch->deprecated_dummy_write_sp
1101 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1102 #endif
1103 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1104 #if GDB_MULTI_ARCH
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1109 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1110 #endif
1111 if (GDB_MULTI_ARCH)
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1114 (long) current_gdbarch->deprecated_extract_return_value
1115 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1116 #endif
1117 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: %s # %s\n",
1120 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1121 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1124 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1125 #endif
1126 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: %s # %s\n",
1129 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1130 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1131 if (GDB_MULTI_ARCH)
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1134 (long) current_gdbarch->deprecated_extract_struct_value_address
1135 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1136 #endif
1137 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1138 fprintf_unfiltered (file,
1139 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1140 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1143 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1144 #endif
1145 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: %s # %s\n",
1148 "DEPRECATED_FIX_CALL_DUMMY_P()",
1149 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1152 DEPRECATED_FIX_CALL_DUMMY_P ());
1153 #endif
1154 #ifdef DEPRECATED_FIX_CALL_DUMMY
1155 #if GDB_MULTI_ARCH
1156 /* Macro might contain `[{}]' when not multi-arch */
1157 fprintf_unfiltered (file,
1158 "gdbarch_dump: %s # %s\n",
1159 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1160 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1161 #endif
1162 if (GDB_MULTI_ARCH)
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1165 (long) current_gdbarch->deprecated_fix_call_dummy
1166 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1167 #endif
1168 #ifdef DEPRECATED_FP_REGNUM
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1171 XSTRING (DEPRECATED_FP_REGNUM));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1174 DEPRECATED_FP_REGNUM);
1175 #endif
1176 #ifdef DEPRECATED_FRAME_CHAIN_P
1177 fprintf_unfiltered (file,
1178 "gdbarch_dump: %s # %s\n",
1179 "DEPRECATED_FRAME_CHAIN_P()",
1180 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1183 DEPRECATED_FRAME_CHAIN_P ());
1184 #endif
1185 #ifdef DEPRECATED_FRAME_CHAIN
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: %s # %s\n",
1188 "DEPRECATED_FRAME_CHAIN(frame)",
1189 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1190 if (GDB_MULTI_ARCH)
1191 fprintf_unfiltered (file,
1192 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1193 (long) current_gdbarch->deprecated_frame_chain
1194 /*DEPRECATED_FRAME_CHAIN ()*/);
1195 #endif
1196 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: %s # %s\n",
1199 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1200 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1203 DEPRECATED_FRAME_CHAIN_VALID_P ());
1204 #endif
1205 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: %s # %s\n",
1208 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1209 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1210 if (GDB_MULTI_ARCH)
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1213 (long) current_gdbarch->deprecated_frame_chain_valid
1214 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1215 #endif
1216 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: %s # %s\n",
1219 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1220 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1223 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1224 #endif
1225 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1226 #if GDB_MULTI_ARCH
1227 /* Macro might contain `[{}]' when not multi-arch */
1228 fprintf_unfiltered (file,
1229 "gdbarch_dump: %s # %s\n",
1230 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1231 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1232 #endif
1233 if (GDB_MULTI_ARCH)
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1236 (long) current_gdbarch->deprecated_frame_init_saved_regs
1237 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1238 #endif
1239 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: %s # %s\n",
1242 "DEPRECATED_FRAME_SAVED_PC_P()",
1243 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1246 DEPRECATED_FRAME_SAVED_PC_P ());
1247 #endif
1248 #ifdef DEPRECATED_FRAME_SAVED_PC
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: %s # %s\n",
1251 "DEPRECATED_FRAME_SAVED_PC(fi)",
1252 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1253 if (GDB_MULTI_ARCH)
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1256 (long) current_gdbarch->deprecated_frame_saved_pc
1257 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1258 #endif
1259 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: %s # %s\n",
1262 "DEPRECATED_GET_SAVED_REGISTER_P()",
1263 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1264 fprintf_unfiltered (file,
1265 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1266 DEPRECATED_GET_SAVED_REGISTER_P ());
1267 #endif
1268 #ifdef DEPRECATED_GET_SAVED_REGISTER
1269 #if GDB_MULTI_ARCH
1270 /* Macro might contain `[{}]' when not multi-arch */
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: %s # %s\n",
1273 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1274 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1275 #endif
1276 if (GDB_MULTI_ARCH)
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1279 (long) current_gdbarch->deprecated_get_saved_register
1280 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1281 #endif
1282 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: %s # %s\n",
1285 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1286 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1289 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1290 #endif
1291 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1292 #if GDB_MULTI_ARCH
1293 /* Macro might contain `[{}]' when not multi-arch */
1294 fprintf_unfiltered (file,
1295 "gdbarch_dump: %s # %s\n",
1296 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1297 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1298 #endif
1299 if (GDB_MULTI_ARCH)
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1302 (long) current_gdbarch->deprecated_init_extra_frame_info
1303 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1304 #endif
1305 #ifdef DEPRECATED_INIT_FRAME_PC_P
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: %s # %s\n",
1308 "DEPRECATED_INIT_FRAME_PC_P()",
1309 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1310 fprintf_unfiltered (file,
1311 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1312 DEPRECATED_INIT_FRAME_PC_P ());
1313 #endif
1314 #ifdef DEPRECATED_INIT_FRAME_PC
1315 fprintf_unfiltered (file,
1316 "gdbarch_dump: %s # %s\n",
1317 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1318 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1319 if (GDB_MULTI_ARCH)
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1322 (long) current_gdbarch->deprecated_init_frame_pc
1323 /*DEPRECATED_INIT_FRAME_PC ()*/);
1324 #endif
1325 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1326 fprintf_unfiltered (file,
1327 "gdbarch_dump: %s # %s\n",
1328 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1329 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1332 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1333 #endif
1334 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: %s # %s\n",
1337 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1338 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1339 if (GDB_MULTI_ARCH)
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1342 (long) current_gdbarch->deprecated_init_frame_pc_first
1343 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1344 #endif
1345 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: %s # %s\n",
1348 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1349 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1352 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1353 #endif
1354 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1357 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1360 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1361 #endif
1362 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: %s # %s\n",
1365 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1366 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1369 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1370 #endif
1371 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1374 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1375 fprintf_unfiltered (file,
1376 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1377 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1378 #endif
1379 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1380 fprintf_unfiltered (file,
1381 "gdbarch_dump: %s # %s\n",
1382 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1383 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1386 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1387 #endif
1388 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: %s # %s\n",
1391 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1392 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1393 if (GDB_MULTI_ARCH)
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1396 (long) current_gdbarch->deprecated_pc_in_call_dummy
1397 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1398 #endif
1399 #ifdef DEPRECATED_POP_FRAME_P
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: %s # %s\n",
1402 "DEPRECATED_POP_FRAME_P()",
1403 XSTRING (DEPRECATED_POP_FRAME_P ()));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1406 DEPRECATED_POP_FRAME_P ());
1407 #endif
1408 #ifdef DEPRECATED_POP_FRAME
1409 #if GDB_MULTI_ARCH
1410 /* Macro might contain `[{}]' when not multi-arch */
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: %s # %s\n",
1413 "DEPRECATED_POP_FRAME(-)",
1414 XSTRING (DEPRECATED_POP_FRAME (-)));
1415 #endif
1416 if (GDB_MULTI_ARCH)
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1419 (long) current_gdbarch->deprecated_pop_frame
1420 /*DEPRECATED_POP_FRAME ()*/);
1421 #endif
1422 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1423 fprintf_unfiltered (file,
1424 "gdbarch_dump: %s # %s\n",
1425 "DEPRECATED_PUSH_ARGUMENTS_P()",
1426 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1429 DEPRECATED_PUSH_ARGUMENTS_P ());
1430 #endif
1431 #ifdef DEPRECATED_PUSH_ARGUMENTS
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: %s # %s\n",
1434 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1435 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1436 if (GDB_MULTI_ARCH)
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1439 (long) current_gdbarch->deprecated_push_arguments
1440 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1441 #endif
1442 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: %s # %s\n",
1445 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1446 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1449 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1450 #endif
1451 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1452 #if GDB_MULTI_ARCH
1453 /* Macro might contain `[{}]' when not multi-arch */
1454 fprintf_unfiltered (file,
1455 "gdbarch_dump: %s # %s\n",
1456 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1457 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1458 #endif
1459 if (GDB_MULTI_ARCH)
1460 fprintf_unfiltered (file,
1461 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1462 (long) current_gdbarch->deprecated_push_dummy_frame
1463 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1464 #endif
1465 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: %s # %s\n",
1468 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1469 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1472 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1473 #endif
1474 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1475 fprintf_unfiltered (file,
1476 "gdbarch_dump: %s # %s\n",
1477 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1478 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1479 if (GDB_MULTI_ARCH)
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1482 (long) current_gdbarch->deprecated_push_return_address
1483 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1484 #endif
1485 #ifdef DEPRECATED_REGISTER_BYTES
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1488 XSTRING (DEPRECATED_REGISTER_BYTES));
1489 fprintf_unfiltered (file,
1490 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1491 DEPRECATED_REGISTER_BYTES);
1492 #endif
1493 #ifdef DEPRECATED_REGISTER_SIZE
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1496 XSTRING (DEPRECATED_REGISTER_SIZE));
1497 fprintf_unfiltered (file,
1498 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1499 DEPRECATED_REGISTER_SIZE);
1500 #endif
1501 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: %s # %s\n",
1504 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1505 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1508 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1509 #endif
1510 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1511 fprintf_unfiltered (file,
1512 "gdbarch_dump: %s # %s\n",
1513 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1514 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1515 if (GDB_MULTI_ARCH)
1516 fprintf_unfiltered (file,
1517 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1518 (long) current_gdbarch->deprecated_saved_pc_after_call
1519 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1520 #endif
1521 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1522 fprintf_unfiltered (file,
1523 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1524 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS));
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1527 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS);
1528 #endif
1529 #ifdef DEPRECATED_STORE_RETURN_VALUE
1530 #if GDB_MULTI_ARCH
1531 /* Macro might contain `[{}]' when not multi-arch */
1532 fprintf_unfiltered (file,
1533 "gdbarch_dump: %s # %s\n",
1534 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1535 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1536 #endif
1537 if (GDB_MULTI_ARCH)
1538 fprintf_unfiltered (file,
1539 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1540 (long) current_gdbarch->deprecated_store_return_value
1541 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1542 #endif
1543 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1544 fprintf_unfiltered (file,
1545 "gdbarch_dump: %s # %s\n",
1546 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1547 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1550 DEPRECATED_STORE_STRUCT_RETURN_P ());
1551 #endif
1552 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1553 #if GDB_MULTI_ARCH
1554 /* Macro might contain `[{}]' when not multi-arch */
1555 fprintf_unfiltered (file,
1556 "gdbarch_dump: %s # %s\n",
1557 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1558 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1559 #endif
1560 if (GDB_MULTI_ARCH)
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1563 (long) current_gdbarch->deprecated_store_struct_return
1564 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1565 #endif
1566 #ifdef DEPRECATED_TARGET_READ_FP_P
1567 fprintf_unfiltered (file,
1568 "gdbarch_dump: %s # %s\n",
1569 "DEPRECATED_TARGET_READ_FP_P()",
1570 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1571 fprintf_unfiltered (file,
1572 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1573 DEPRECATED_TARGET_READ_FP_P ());
1574 #endif
1575 #ifdef DEPRECATED_TARGET_READ_FP
1576 fprintf_unfiltered (file,
1577 "gdbarch_dump: %s # %s\n",
1578 "DEPRECATED_TARGET_READ_FP()",
1579 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1580 if (GDB_MULTI_ARCH)
1581 fprintf_unfiltered (file,
1582 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1583 (long) current_gdbarch->deprecated_target_read_fp
1584 /*DEPRECATED_TARGET_READ_FP ()*/);
1585 #endif
1586 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1589 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1592 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1593 #endif
1594 #ifdef DWARF2_BUILD_FRAME_INFO_P
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: %s # %s\n",
1597 "DWARF2_BUILD_FRAME_INFO_P()",
1598 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1599 fprintf_unfiltered (file,
1600 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1601 DWARF2_BUILD_FRAME_INFO_P ());
1602 #endif
1603 #ifdef DWARF2_BUILD_FRAME_INFO
1604 #if GDB_MULTI_ARCH
1605 /* Macro might contain `[{}]' when not multi-arch */
1606 fprintf_unfiltered (file,
1607 "gdbarch_dump: %s # %s\n",
1608 "DWARF2_BUILD_FRAME_INFO(objfile)",
1609 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1610 #endif
1611 if (GDB_MULTI_ARCH)
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1614 (long) current_gdbarch->dwarf2_build_frame_info
1615 /*DWARF2_BUILD_FRAME_INFO ()*/);
1616 #endif
1617 #ifdef DWARF2_REG_TO_REGNUM
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: %s # %s\n",
1620 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1621 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1622 if (GDB_MULTI_ARCH)
1623 fprintf_unfiltered (file,
1624 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1625 (long) current_gdbarch->dwarf2_reg_to_regnum
1626 /*DWARF2_REG_TO_REGNUM ()*/);
1627 #endif
1628 #ifdef DWARF_REG_TO_REGNUM
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: %s # %s\n",
1631 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1632 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1633 if (GDB_MULTI_ARCH)
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1636 (long) current_gdbarch->dwarf_reg_to_regnum
1637 /*DWARF_REG_TO_REGNUM ()*/);
1638 #endif
1639 #ifdef ECOFF_REG_TO_REGNUM
1640 fprintf_unfiltered (file,
1641 "gdbarch_dump: %s # %s\n",
1642 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1643 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1644 if (GDB_MULTI_ARCH)
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1647 (long) current_gdbarch->ecoff_reg_to_regnum
1648 /*ECOFF_REG_TO_REGNUM ()*/);
1649 #endif
1650 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1651 #if GDB_MULTI_ARCH
1652 /* Macro might contain `[{}]' when not multi-arch */
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: %s # %s\n",
1655 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1656 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1657 #endif
1658 if (GDB_MULTI_ARCH)
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1661 (long) current_gdbarch->elf_make_msymbol_special
1662 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1663 #endif
1664 #ifdef EXTRACT_RETURN_VALUE
1665 #if GDB_MULTI_ARCH
1666 /* Macro might contain `[{}]' when not multi-arch */
1667 fprintf_unfiltered (file,
1668 "gdbarch_dump: %s # %s\n",
1669 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1670 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1671 #endif
1672 if (GDB_MULTI_ARCH)
1673 fprintf_unfiltered (file,
1674 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1675 (long) current_gdbarch->extract_return_value
1676 /*EXTRACT_RETURN_VALUE ()*/);
1677 #endif
1678 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1679 fprintf_unfiltered (file,
1680 "gdbarch_dump: %s # %s\n",
1681 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1682 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1683 fprintf_unfiltered (file,
1684 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1685 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1686 #endif
1687 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: %s # %s\n",
1690 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1691 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1692 if (GDB_MULTI_ARCH)
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1695 (long) current_gdbarch->extract_struct_value_address
1696 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1697 #endif
1698 #ifdef FETCH_POINTER_ARGUMENT_P
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: %s # %s\n",
1701 "FETCH_POINTER_ARGUMENT_P()",
1702 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1703 fprintf_unfiltered (file,
1704 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1705 FETCH_POINTER_ARGUMENT_P ());
1706 #endif
1707 #ifdef FETCH_POINTER_ARGUMENT
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: %s # %s\n",
1710 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1711 XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
1712 if (GDB_MULTI_ARCH)
1713 fprintf_unfiltered (file,
1714 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1715 (long) current_gdbarch->fetch_pointer_argument
1716 /*FETCH_POINTER_ARGUMENT ()*/);
1717 #endif
1718 #ifdef FP0_REGNUM
1719 fprintf_unfiltered (file,
1720 "gdbarch_dump: FP0_REGNUM # %s\n",
1721 XSTRING (FP0_REGNUM));
1722 fprintf_unfiltered (file,
1723 "gdbarch_dump: FP0_REGNUM = %d\n",
1724 FP0_REGNUM);
1725 #endif
1726 #ifdef FRAMELESS_FUNCTION_INVOCATION
1727 fprintf_unfiltered (file,
1728 "gdbarch_dump: %s # %s\n",
1729 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1730 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1731 if (GDB_MULTI_ARCH)
1732 fprintf_unfiltered (file,
1733 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1734 (long) current_gdbarch->frameless_function_invocation
1735 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1736 #endif
1737 #ifdef FRAME_ARGS_ADDRESS
1738 fprintf_unfiltered (file,
1739 "gdbarch_dump: %s # %s\n",
1740 "FRAME_ARGS_ADDRESS(fi)",
1741 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1742 if (GDB_MULTI_ARCH)
1743 fprintf_unfiltered (file,
1744 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1745 (long) current_gdbarch->frame_args_address
1746 /*FRAME_ARGS_ADDRESS ()*/);
1747 #endif
1748 #ifdef FRAME_ARGS_SKIP
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1751 XSTRING (FRAME_ARGS_SKIP));
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1754 (long) FRAME_ARGS_SKIP);
1755 #endif
1756 #ifdef FRAME_LOCALS_ADDRESS
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: %s # %s\n",
1759 "FRAME_LOCALS_ADDRESS(fi)",
1760 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1761 if (GDB_MULTI_ARCH)
1762 fprintf_unfiltered (file,
1763 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1764 (long) current_gdbarch->frame_locals_address
1765 /*FRAME_LOCALS_ADDRESS ()*/);
1766 #endif
1767 #ifdef FRAME_NUM_ARGS
1768 fprintf_unfiltered (file,
1769 "gdbarch_dump: %s # %s\n",
1770 "FRAME_NUM_ARGS(frame)",
1771 XSTRING (FRAME_NUM_ARGS (frame)));
1772 if (GDB_MULTI_ARCH)
1773 fprintf_unfiltered (file,
1774 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1775 (long) current_gdbarch->frame_num_args
1776 /*FRAME_NUM_ARGS ()*/);
1777 #endif
1778 #ifdef FUNCTION_START_OFFSET
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1781 XSTRING (FUNCTION_START_OFFSET));
1782 fprintf_unfiltered (file,
1783 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1784 (long) FUNCTION_START_OFFSET);
1785 #endif
1786 #ifdef GET_LONGJMP_TARGET_P
1787 fprintf_unfiltered (file,
1788 "gdbarch_dump: %s # %s\n",
1789 "GET_LONGJMP_TARGET_P()",
1790 XSTRING (GET_LONGJMP_TARGET_P ()));
1791 fprintf_unfiltered (file,
1792 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1793 GET_LONGJMP_TARGET_P ());
1794 #endif
1795 #ifdef GET_LONGJMP_TARGET
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "GET_LONGJMP_TARGET(pc)",
1799 XSTRING (GET_LONGJMP_TARGET (pc)));
1800 if (GDB_MULTI_ARCH)
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1803 (long) current_gdbarch->get_longjmp_target
1804 /*GET_LONGJMP_TARGET ()*/);
1805 #endif
1806 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1809 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1810 fprintf_unfiltered (file,
1811 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1812 HAVE_NONSTEPPABLE_WATCHPOINT);
1813 #endif
1814 #ifdef INNER_THAN
1815 fprintf_unfiltered (file,
1816 "gdbarch_dump: %s # %s\n",
1817 "INNER_THAN(lhs, rhs)",
1818 XSTRING (INNER_THAN (lhs, rhs)));
1819 if (GDB_MULTI_ARCH)
1820 fprintf_unfiltered (file,
1821 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1822 (long) current_gdbarch->inner_than
1823 /*INNER_THAN ()*/);
1824 #endif
1825 #ifdef INTEGER_TO_ADDRESS_P
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: %s # %s\n",
1828 "INTEGER_TO_ADDRESS_P()",
1829 XSTRING (INTEGER_TO_ADDRESS_P ()));
1830 fprintf_unfiltered (file,
1831 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1832 INTEGER_TO_ADDRESS_P ());
1833 #endif
1834 #ifdef INTEGER_TO_ADDRESS
1835 fprintf_unfiltered (file,
1836 "gdbarch_dump: %s # %s\n",
1837 "INTEGER_TO_ADDRESS(type, buf)",
1838 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1839 if (GDB_MULTI_ARCH)
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1842 (long) current_gdbarch->integer_to_address
1843 /*INTEGER_TO_ADDRESS ()*/);
1844 #endif
1845 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1846 fprintf_unfiltered (file,
1847 "gdbarch_dump: %s # %s\n",
1848 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1849 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1850 if (GDB_MULTI_ARCH)
1851 fprintf_unfiltered (file,
1852 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1853 (long) current_gdbarch->in_solib_call_trampoline
1854 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1855 #endif
1856 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1857 fprintf_unfiltered (file,
1858 "gdbarch_dump: %s # %s\n",
1859 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1860 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1861 if (GDB_MULTI_ARCH)
1862 fprintf_unfiltered (file,
1863 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1864 (long) current_gdbarch->in_solib_return_trampoline
1865 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1866 #endif
1867 #ifdef MEMORY_INSERT_BREAKPOINT
1868 fprintf_unfiltered (file,
1869 "gdbarch_dump: %s # %s\n",
1870 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1871 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1872 if (GDB_MULTI_ARCH)
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1875 (long) current_gdbarch->memory_insert_breakpoint
1876 /*MEMORY_INSERT_BREAKPOINT ()*/);
1877 #endif
1878 #ifdef MEMORY_REMOVE_BREAKPOINT
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: %s # %s\n",
1881 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1882 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1883 if (GDB_MULTI_ARCH)
1884 fprintf_unfiltered (file,
1885 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1886 (long) current_gdbarch->memory_remove_breakpoint
1887 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1888 #endif
1889 #ifdef NAME_OF_MALLOC
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1892 XSTRING (NAME_OF_MALLOC));
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1895 NAME_OF_MALLOC);
1896 #endif
1897 #ifdef NPC_REGNUM
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: NPC_REGNUM # %s\n",
1900 XSTRING (NPC_REGNUM));
1901 fprintf_unfiltered (file,
1902 "gdbarch_dump: NPC_REGNUM = %d\n",
1903 NPC_REGNUM);
1904 #endif
1905 #ifdef NUM_PSEUDO_REGS
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1908 XSTRING (NUM_PSEUDO_REGS));
1909 fprintf_unfiltered (file,
1910 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1911 NUM_PSEUDO_REGS);
1912 #endif
1913 #ifdef NUM_REGS
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: NUM_REGS # %s\n",
1916 XSTRING (NUM_REGS));
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: NUM_REGS = %d\n",
1919 NUM_REGS);
1920 #endif
1921 #ifdef PARM_BOUNDARY
1922 fprintf_unfiltered (file,
1923 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1924 XSTRING (PARM_BOUNDARY));
1925 fprintf_unfiltered (file,
1926 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1927 PARM_BOUNDARY);
1928 #endif
1929 #ifdef PC_IN_SIGTRAMP
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: %s # %s\n",
1932 "PC_IN_SIGTRAMP(pc, name)",
1933 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1934 if (GDB_MULTI_ARCH)
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1937 (long) current_gdbarch->pc_in_sigtramp
1938 /*PC_IN_SIGTRAMP ()*/);
1939 #endif
1940 #ifdef PC_REGNUM
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: PC_REGNUM # %s\n",
1943 XSTRING (PC_REGNUM));
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: PC_REGNUM = %d\n",
1946 PC_REGNUM);
1947 #endif
1948 #ifdef POINTER_TO_ADDRESS
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: %s # %s\n",
1951 "POINTER_TO_ADDRESS(type, buf)",
1952 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1953 if (GDB_MULTI_ARCH)
1954 fprintf_unfiltered (file,
1955 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1956 (long) current_gdbarch->pointer_to_address
1957 /*POINTER_TO_ADDRESS ()*/);
1958 #endif
1959 #ifdef PREPARE_TO_PROCEED
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: %s # %s\n",
1962 "PREPARE_TO_PROCEED(select_it)",
1963 XSTRING (PREPARE_TO_PROCEED (select_it)));
1964 if (GDB_MULTI_ARCH)
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1967 (long) current_gdbarch->prepare_to_proceed
1968 /*PREPARE_TO_PROCEED ()*/);
1969 #endif
1970 if (GDB_MULTI_ARCH)
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1973 gdbarch_print_float_info_p (current_gdbarch));
1974 if (GDB_MULTI_ARCH)
1975 fprintf_unfiltered (file,
1976 "gdbarch_dump: print_float_info = 0x%08lx\n",
1977 (long) current_gdbarch->print_float_info);
1978 if (GDB_MULTI_ARCH)
1979 fprintf_unfiltered (file,
1980 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1981 (long) current_gdbarch->print_registers_info);
1982 if (GDB_MULTI_ARCH)
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1985 gdbarch_print_vector_info_p (current_gdbarch));
1986 if (GDB_MULTI_ARCH)
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1989 (long) current_gdbarch->print_vector_info);
1990 #ifdef PROLOGUE_FRAMELESS_P
1991 fprintf_unfiltered (file,
1992 "gdbarch_dump: %s # %s\n",
1993 "PROLOGUE_FRAMELESS_P(ip)",
1994 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1995 if (GDB_MULTI_ARCH)
1996 fprintf_unfiltered (file,
1997 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1998 (long) current_gdbarch->prologue_frameless_p
1999 /*PROLOGUE_FRAMELESS_P ()*/);
2000 #endif
2001 #ifdef PS_REGNUM
2002 fprintf_unfiltered (file,
2003 "gdbarch_dump: PS_REGNUM # %s\n",
2004 XSTRING (PS_REGNUM));
2005 fprintf_unfiltered (file,
2006 "gdbarch_dump: PS_REGNUM = %d\n",
2007 PS_REGNUM);
2008 #endif
2009 if (GDB_MULTI_ARCH)
2010 fprintf_unfiltered (file,
2011 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
2012 gdbarch_push_dummy_call_p (current_gdbarch));
2013 if (GDB_MULTI_ARCH)
2014 fprintf_unfiltered (file,
2015 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
2016 (long) current_gdbarch->push_dummy_call);
2017 if (GDB_MULTI_ARCH)
2018 fprintf_unfiltered (file,
2019 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
2020 gdbarch_push_dummy_code_p (current_gdbarch));
2021 if (GDB_MULTI_ARCH)
2022 fprintf_unfiltered (file,
2023 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2024 (long) current_gdbarch->push_dummy_code);
2025 #ifdef REGISTER_BYTE_P
2026 fprintf_unfiltered (file,
2027 "gdbarch_dump: %s # %s\n",
2028 "REGISTER_BYTE_P()",
2029 XSTRING (REGISTER_BYTE_P ()));
2030 fprintf_unfiltered (file,
2031 "gdbarch_dump: REGISTER_BYTE_P() = %d\n",
2032 REGISTER_BYTE_P ());
2033 #endif
2034 #ifdef REGISTER_BYTE
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: %s # %s\n",
2037 "REGISTER_BYTE(reg_nr)",
2038 XSTRING (REGISTER_BYTE (reg_nr)));
2039 if (GDB_MULTI_ARCH)
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
2042 (long) current_gdbarch->register_byte
2043 /*REGISTER_BYTE ()*/);
2044 #endif
2045 #ifdef REGISTER_BYTES_OK_P
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: %s # %s\n",
2048 "REGISTER_BYTES_OK_P()",
2049 XSTRING (REGISTER_BYTES_OK_P ()));
2050 fprintf_unfiltered (file,
2051 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2052 REGISTER_BYTES_OK_P ());
2053 #endif
2054 #ifdef REGISTER_BYTES_OK
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: %s # %s\n",
2057 "REGISTER_BYTES_OK(nr_bytes)",
2058 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
2059 if (GDB_MULTI_ARCH)
2060 fprintf_unfiltered (file,
2061 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2062 (long) current_gdbarch->register_bytes_ok
2063 /*REGISTER_BYTES_OK ()*/);
2064 #endif
2065 #ifdef REGISTER_CONVERTIBLE
2066 fprintf_unfiltered (file,
2067 "gdbarch_dump: %s # %s\n",
2068 "REGISTER_CONVERTIBLE(nr)",
2069 XSTRING (REGISTER_CONVERTIBLE (nr)));
2070 if (GDB_MULTI_ARCH)
2071 fprintf_unfiltered (file,
2072 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2073 (long) current_gdbarch->register_convertible
2074 /*REGISTER_CONVERTIBLE ()*/);
2075 #endif
2076 #ifdef REGISTER_CONVERT_TO_RAW
2077 #if GDB_MULTI_ARCH
2078 /* Macro might contain `[{}]' when not multi-arch */
2079 fprintf_unfiltered (file,
2080 "gdbarch_dump: %s # %s\n",
2081 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2082 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2083 #endif
2084 if (GDB_MULTI_ARCH)
2085 fprintf_unfiltered (file,
2086 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2087 (long) current_gdbarch->register_convert_to_raw
2088 /*REGISTER_CONVERT_TO_RAW ()*/);
2089 #endif
2090 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2091 #if GDB_MULTI_ARCH
2092 /* Macro might contain `[{}]' when not multi-arch */
2093 fprintf_unfiltered (file,
2094 "gdbarch_dump: %s # %s\n",
2095 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2096 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
2097 #endif
2098 if (GDB_MULTI_ARCH)
2099 fprintf_unfiltered (file,
2100 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2101 (long) current_gdbarch->register_convert_to_virtual
2102 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2103 #endif
2104 #ifdef REGISTER_NAME
2105 fprintf_unfiltered (file,
2106 "gdbarch_dump: %s # %s\n",
2107 "REGISTER_NAME(regnr)",
2108 XSTRING (REGISTER_NAME (regnr)));
2109 if (GDB_MULTI_ARCH)
2110 fprintf_unfiltered (file,
2111 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2112 (long) current_gdbarch->register_name
2113 /*REGISTER_NAME ()*/);
2114 #endif
2115 #ifdef REGISTER_RAW_SIZE
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: %s # %s\n",
2118 "REGISTER_RAW_SIZE(reg_nr)",
2119 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2120 if (GDB_MULTI_ARCH)
2121 fprintf_unfiltered (file,
2122 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2123 (long) current_gdbarch->register_raw_size
2124 /*REGISTER_RAW_SIZE ()*/);
2125 #endif
2126 #ifdef REGISTER_SIM_REGNO
2127 fprintf_unfiltered (file,
2128 "gdbarch_dump: %s # %s\n",
2129 "REGISTER_SIM_REGNO(reg_nr)",
2130 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2131 if (GDB_MULTI_ARCH)
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2134 (long) current_gdbarch->register_sim_regno
2135 /*REGISTER_SIM_REGNO ()*/);
2136 #endif
2137 #ifdef REGISTER_TO_VALUE
2138 #if GDB_MULTI_ARCH
2139 /* Macro might contain `[{}]' when not multi-arch */
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: %s # %s\n",
2142 "REGISTER_TO_VALUE(regnum, type, from, to)",
2143 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2144 #endif
2145 if (GDB_MULTI_ARCH)
2146 fprintf_unfiltered (file,
2147 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2148 (long) current_gdbarch->register_to_value
2149 /*REGISTER_TO_VALUE ()*/);
2150 #endif
2151 if (GDB_MULTI_ARCH)
2152 fprintf_unfiltered (file,
2153 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2154 gdbarch_register_type_p (current_gdbarch));
2155 if (GDB_MULTI_ARCH)
2156 fprintf_unfiltered (file,
2157 "gdbarch_dump: register_type = 0x%08lx\n",
2158 (long) current_gdbarch->register_type);
2159 #ifdef REGISTER_VIRTUAL_SIZE
2160 fprintf_unfiltered (file,
2161 "gdbarch_dump: %s # %s\n",
2162 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2163 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2164 if (GDB_MULTI_ARCH)
2165 fprintf_unfiltered (file,
2166 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2167 (long) current_gdbarch->register_virtual_size
2168 /*REGISTER_VIRTUAL_SIZE ()*/);
2169 #endif
2170 #ifdef REGISTER_VIRTUAL_TYPE_P
2171 fprintf_unfiltered (file,
2172 "gdbarch_dump: %s # %s\n",
2173 "REGISTER_VIRTUAL_TYPE_P()",
2174 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2175 fprintf_unfiltered (file,
2176 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2177 REGISTER_VIRTUAL_TYPE_P ());
2178 #endif
2179 #ifdef REGISTER_VIRTUAL_TYPE
2180 fprintf_unfiltered (file,
2181 "gdbarch_dump: %s # %s\n",
2182 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2183 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2184 if (GDB_MULTI_ARCH)
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2187 (long) current_gdbarch->register_virtual_type
2188 /*REGISTER_VIRTUAL_TYPE ()*/);
2189 #endif
2190 #ifdef REG_STRUCT_HAS_ADDR_P
2191 fprintf_unfiltered (file,
2192 "gdbarch_dump: %s # %s\n",
2193 "REG_STRUCT_HAS_ADDR_P()",
2194 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2195 fprintf_unfiltered (file,
2196 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2197 REG_STRUCT_HAS_ADDR_P ());
2198 #endif
2199 #ifdef REG_STRUCT_HAS_ADDR
2200 fprintf_unfiltered (file,
2201 "gdbarch_dump: %s # %s\n",
2202 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2203 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2204 if (GDB_MULTI_ARCH)
2205 fprintf_unfiltered (file,
2206 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2207 (long) current_gdbarch->reg_struct_has_addr
2208 /*REG_STRUCT_HAS_ADDR ()*/);
2209 #endif
2210 if (GDB_MULTI_ARCH)
2211 fprintf_unfiltered (file,
2212 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2213 (long) current_gdbarch->remote_translate_xfer_address);
2214 #ifdef RETURN_VALUE_ON_STACK
2215 fprintf_unfiltered (file,
2216 "gdbarch_dump: %s # %s\n",
2217 "RETURN_VALUE_ON_STACK(type)",
2218 XSTRING (RETURN_VALUE_ON_STACK (type)));
2219 if (GDB_MULTI_ARCH)
2220 fprintf_unfiltered (file,
2221 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2222 (long) current_gdbarch->return_value_on_stack
2223 /*RETURN_VALUE_ON_STACK ()*/);
2224 #endif
2225 #ifdef SAVE_DUMMY_FRAME_TOS_P
2226 fprintf_unfiltered (file,
2227 "gdbarch_dump: %s # %s\n",
2228 "SAVE_DUMMY_FRAME_TOS_P()",
2229 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2230 fprintf_unfiltered (file,
2231 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2232 SAVE_DUMMY_FRAME_TOS_P ());
2233 #endif
2234 #ifdef SAVE_DUMMY_FRAME_TOS
2235 #if GDB_MULTI_ARCH
2236 /* Macro might contain `[{}]' when not multi-arch */
2237 fprintf_unfiltered (file,
2238 "gdbarch_dump: %s # %s\n",
2239 "SAVE_DUMMY_FRAME_TOS(sp)",
2240 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2241 #endif
2242 if (GDB_MULTI_ARCH)
2243 fprintf_unfiltered (file,
2244 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2245 (long) current_gdbarch->save_dummy_frame_tos
2246 /*SAVE_DUMMY_FRAME_TOS ()*/);
2247 #endif
2248 #ifdef SDB_REG_TO_REGNUM
2249 fprintf_unfiltered (file,
2250 "gdbarch_dump: %s # %s\n",
2251 "SDB_REG_TO_REGNUM(sdb_regnr)",
2252 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2253 if (GDB_MULTI_ARCH)
2254 fprintf_unfiltered (file,
2255 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2256 (long) current_gdbarch->sdb_reg_to_regnum
2257 /*SDB_REG_TO_REGNUM ()*/);
2258 #endif
2259 #ifdef SIGTRAMP_END_P
2260 fprintf_unfiltered (file,
2261 "gdbarch_dump: %s # %s\n",
2262 "SIGTRAMP_END_P()",
2263 XSTRING (SIGTRAMP_END_P ()));
2264 fprintf_unfiltered (file,
2265 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2266 SIGTRAMP_END_P ());
2267 #endif
2268 #ifdef SIGTRAMP_END
2269 fprintf_unfiltered (file,
2270 "gdbarch_dump: %s # %s\n",
2271 "SIGTRAMP_END(pc)",
2272 XSTRING (SIGTRAMP_END (pc)));
2273 if (GDB_MULTI_ARCH)
2274 fprintf_unfiltered (file,
2275 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2276 (long) current_gdbarch->sigtramp_end
2277 /*SIGTRAMP_END ()*/);
2278 #endif
2279 #ifdef SIGTRAMP_START_P
2280 fprintf_unfiltered (file,
2281 "gdbarch_dump: %s # %s\n",
2282 "SIGTRAMP_START_P()",
2283 XSTRING (SIGTRAMP_START_P ()));
2284 fprintf_unfiltered (file,
2285 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2286 SIGTRAMP_START_P ());
2287 #endif
2288 #ifdef SIGTRAMP_START
2289 fprintf_unfiltered (file,
2290 "gdbarch_dump: %s # %s\n",
2291 "SIGTRAMP_START(pc)",
2292 XSTRING (SIGTRAMP_START (pc)));
2293 if (GDB_MULTI_ARCH)
2294 fprintf_unfiltered (file,
2295 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2296 (long) current_gdbarch->sigtramp_start
2297 /*SIGTRAMP_START ()*/);
2298 #endif
2299 #ifdef SKIP_PROLOGUE
2300 fprintf_unfiltered (file,
2301 "gdbarch_dump: %s # %s\n",
2302 "SKIP_PROLOGUE(ip)",
2303 XSTRING (SKIP_PROLOGUE (ip)));
2304 if (GDB_MULTI_ARCH)
2305 fprintf_unfiltered (file,
2306 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2307 (long) current_gdbarch->skip_prologue
2308 /*SKIP_PROLOGUE ()*/);
2309 #endif
2310 #ifdef SKIP_TRAMPOLINE_CODE
2311 fprintf_unfiltered (file,
2312 "gdbarch_dump: %s # %s\n",
2313 "SKIP_TRAMPOLINE_CODE(pc)",
2314 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2315 if (GDB_MULTI_ARCH)
2316 fprintf_unfiltered (file,
2317 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2318 (long) current_gdbarch->skip_trampoline_code
2319 /*SKIP_TRAMPOLINE_CODE ()*/);
2320 #endif
2321 #ifdef SMASH_TEXT_ADDRESS
2322 fprintf_unfiltered (file,
2323 "gdbarch_dump: %s # %s\n",
2324 "SMASH_TEXT_ADDRESS(addr)",
2325 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2326 if (GDB_MULTI_ARCH)
2327 fprintf_unfiltered (file,
2328 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2329 (long) current_gdbarch->smash_text_address
2330 /*SMASH_TEXT_ADDRESS ()*/);
2331 #endif
2332 #ifdef SOFTWARE_SINGLE_STEP_P
2333 fprintf_unfiltered (file,
2334 "gdbarch_dump: %s # %s\n",
2335 "SOFTWARE_SINGLE_STEP_P()",
2336 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2337 fprintf_unfiltered (file,
2338 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2339 SOFTWARE_SINGLE_STEP_P ());
2340 #endif
2341 #ifdef SOFTWARE_SINGLE_STEP
2342 #if GDB_MULTI_ARCH
2343 /* Macro might contain `[{}]' when not multi-arch */
2344 fprintf_unfiltered (file,
2345 "gdbarch_dump: %s # %s\n",
2346 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2347 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2348 #endif
2349 if (GDB_MULTI_ARCH)
2350 fprintf_unfiltered (file,
2351 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2352 (long) current_gdbarch->software_single_step
2353 /*SOFTWARE_SINGLE_STEP ()*/);
2354 #endif
2355 #ifdef SP_REGNUM
2356 fprintf_unfiltered (file,
2357 "gdbarch_dump: SP_REGNUM # %s\n",
2358 XSTRING (SP_REGNUM));
2359 fprintf_unfiltered (file,
2360 "gdbarch_dump: SP_REGNUM = %d\n",
2361 SP_REGNUM);
2362 #endif
2363 #ifdef STAB_REG_TO_REGNUM
2364 fprintf_unfiltered (file,
2365 "gdbarch_dump: %s # %s\n",
2366 "STAB_REG_TO_REGNUM(stab_regnr)",
2367 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2368 if (GDB_MULTI_ARCH)
2369 fprintf_unfiltered (file,
2370 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2371 (long) current_gdbarch->stab_reg_to_regnum
2372 /*STAB_REG_TO_REGNUM ()*/);
2373 #endif
2374 #ifdef STACK_ALIGN_P
2375 fprintf_unfiltered (file,
2376 "gdbarch_dump: %s # %s\n",
2377 "STACK_ALIGN_P()",
2378 XSTRING (STACK_ALIGN_P ()));
2379 fprintf_unfiltered (file,
2380 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2381 STACK_ALIGN_P ());
2382 #endif
2383 #ifdef STACK_ALIGN
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: %s # %s\n",
2386 "STACK_ALIGN(sp)",
2387 XSTRING (STACK_ALIGN (sp)));
2388 if (GDB_MULTI_ARCH)
2389 fprintf_unfiltered (file,
2390 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2391 (long) current_gdbarch->stack_align
2392 /*STACK_ALIGN ()*/);
2393 #endif
2394 #ifdef STORE_RETURN_VALUE
2395 #if GDB_MULTI_ARCH
2396 /* Macro might contain `[{}]' when not multi-arch */
2397 fprintf_unfiltered (file,
2398 "gdbarch_dump: %s # %s\n",
2399 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2400 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2401 #endif
2402 if (GDB_MULTI_ARCH)
2403 fprintf_unfiltered (file,
2404 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2405 (long) current_gdbarch->store_return_value
2406 /*STORE_RETURN_VALUE ()*/);
2407 #endif
2408 #ifdef TARGET_ADDR_BIT
2409 fprintf_unfiltered (file,
2410 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2411 XSTRING (TARGET_ADDR_BIT));
2412 fprintf_unfiltered (file,
2413 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2414 TARGET_ADDR_BIT);
2415 #endif
2416 #ifdef TARGET_ARCHITECTURE
2417 fprintf_unfiltered (file,
2418 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2419 XSTRING (TARGET_ARCHITECTURE));
2420 if (TARGET_ARCHITECTURE != NULL)
2421 fprintf_unfiltered (file,
2422 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2423 TARGET_ARCHITECTURE->printable_name);
2424 #endif
2425 #ifdef TARGET_BFD_VMA_BIT
2426 fprintf_unfiltered (file,
2427 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2428 XSTRING (TARGET_BFD_VMA_BIT));
2429 fprintf_unfiltered (file,
2430 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2431 TARGET_BFD_VMA_BIT);
2432 #endif
2433 #ifdef TARGET_BYTE_ORDER
2434 fprintf_unfiltered (file,
2435 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2436 XSTRING (TARGET_BYTE_ORDER));
2437 fprintf_unfiltered (file,
2438 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2439 (long) TARGET_BYTE_ORDER);
2440 #endif
2441 #ifdef TARGET_CHAR_SIGNED
2442 fprintf_unfiltered (file,
2443 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2444 XSTRING (TARGET_CHAR_SIGNED));
2445 fprintf_unfiltered (file,
2446 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2447 TARGET_CHAR_SIGNED);
2448 #endif
2449 #ifdef TARGET_DOUBLE_BIT
2450 fprintf_unfiltered (file,
2451 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2452 XSTRING (TARGET_DOUBLE_BIT));
2453 fprintf_unfiltered (file,
2454 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2455 TARGET_DOUBLE_BIT);
2456 #endif
2457 #ifdef TARGET_DOUBLE_FORMAT
2458 fprintf_unfiltered (file,
2459 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2460 XSTRING (TARGET_DOUBLE_FORMAT));
2461 fprintf_unfiltered (file,
2462 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2463 (TARGET_DOUBLE_FORMAT)->name);
2464 #endif
2465 #ifdef TARGET_FLOAT_BIT
2466 fprintf_unfiltered (file,
2467 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2468 XSTRING (TARGET_FLOAT_BIT));
2469 fprintf_unfiltered (file,
2470 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2471 TARGET_FLOAT_BIT);
2472 #endif
2473 #ifdef TARGET_FLOAT_FORMAT
2474 fprintf_unfiltered (file,
2475 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2476 XSTRING (TARGET_FLOAT_FORMAT));
2477 fprintf_unfiltered (file,
2478 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2479 (TARGET_FLOAT_FORMAT)->name);
2480 #endif
2481 #ifdef TARGET_INT_BIT
2482 fprintf_unfiltered (file,
2483 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2484 XSTRING (TARGET_INT_BIT));
2485 fprintf_unfiltered (file,
2486 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2487 TARGET_INT_BIT);
2488 #endif
2489 #ifdef TARGET_LONG_BIT
2490 fprintf_unfiltered (file,
2491 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2492 XSTRING (TARGET_LONG_BIT));
2493 fprintf_unfiltered (file,
2494 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2495 TARGET_LONG_BIT);
2496 #endif
2497 #ifdef TARGET_LONG_DOUBLE_BIT
2498 fprintf_unfiltered (file,
2499 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2500 XSTRING (TARGET_LONG_DOUBLE_BIT));
2501 fprintf_unfiltered (file,
2502 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2503 TARGET_LONG_DOUBLE_BIT);
2504 #endif
2505 #ifdef TARGET_LONG_DOUBLE_FORMAT
2506 fprintf_unfiltered (file,
2507 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2508 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2509 fprintf_unfiltered (file,
2510 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2511 (TARGET_LONG_DOUBLE_FORMAT)->name);
2512 #endif
2513 #ifdef TARGET_LONG_LONG_BIT
2514 fprintf_unfiltered (file,
2515 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2516 XSTRING (TARGET_LONG_LONG_BIT));
2517 fprintf_unfiltered (file,
2518 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2519 TARGET_LONG_LONG_BIT);
2520 #endif
2521 #ifdef TARGET_OSABI
2522 fprintf_unfiltered (file,
2523 "gdbarch_dump: TARGET_OSABI # %s\n",
2524 XSTRING (TARGET_OSABI));
2525 fprintf_unfiltered (file,
2526 "gdbarch_dump: TARGET_OSABI = %ld\n",
2527 (long) TARGET_OSABI);
2528 #endif
2529 #ifdef TARGET_PRINT_INSN
2530 fprintf_unfiltered (file,
2531 "gdbarch_dump: %s # %s\n",
2532 "TARGET_PRINT_INSN(vma, info)",
2533 XSTRING (TARGET_PRINT_INSN (vma, info)));
2534 if (GDB_MULTI_ARCH)
2535 fprintf_unfiltered (file,
2536 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2537 (long) current_gdbarch->print_insn
2538 /*TARGET_PRINT_INSN ()*/);
2539 #endif
2540 #ifdef TARGET_PTR_BIT
2541 fprintf_unfiltered (file,
2542 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2543 XSTRING (TARGET_PTR_BIT));
2544 fprintf_unfiltered (file,
2545 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2546 TARGET_PTR_BIT);
2547 #endif
2548 #ifdef TARGET_READ_PC_P
2549 fprintf_unfiltered (file,
2550 "gdbarch_dump: %s # %s\n",
2551 "TARGET_READ_PC_P()",
2552 XSTRING (TARGET_READ_PC_P ()));
2553 fprintf_unfiltered (file,
2554 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2555 TARGET_READ_PC_P ());
2556 #endif
2557 #ifdef TARGET_READ_PC
2558 fprintf_unfiltered (file,
2559 "gdbarch_dump: %s # %s\n",
2560 "TARGET_READ_PC(ptid)",
2561 XSTRING (TARGET_READ_PC (ptid)));
2562 if (GDB_MULTI_ARCH)
2563 fprintf_unfiltered (file,
2564 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2565 (long) current_gdbarch->read_pc
2566 /*TARGET_READ_PC ()*/);
2567 #endif
2568 #ifdef TARGET_READ_SP
2569 fprintf_unfiltered (file,
2570 "gdbarch_dump: %s # %s\n",
2571 "TARGET_READ_SP()",
2572 XSTRING (TARGET_READ_SP ()));
2573 if (GDB_MULTI_ARCH)
2574 fprintf_unfiltered (file,
2575 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2576 (long) current_gdbarch->read_sp
2577 /*TARGET_READ_SP ()*/);
2578 #endif
2579 #ifdef TARGET_SHORT_BIT
2580 fprintf_unfiltered (file,
2581 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2582 XSTRING (TARGET_SHORT_BIT));
2583 fprintf_unfiltered (file,
2584 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2585 TARGET_SHORT_BIT);
2586 #endif
2587 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2588 #if GDB_MULTI_ARCH
2589 /* Macro might contain `[{}]' when not multi-arch */
2590 fprintf_unfiltered (file,
2591 "gdbarch_dump: %s # %s\n",
2592 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2593 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2594 #endif
2595 if (GDB_MULTI_ARCH)
2596 fprintf_unfiltered (file,
2597 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2598 (long) current_gdbarch->virtual_frame_pointer
2599 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2600 #endif
2601 #ifdef TARGET_WRITE_PC
2602 #if GDB_MULTI_ARCH
2603 /* Macro might contain `[{}]' when not multi-arch */
2604 fprintf_unfiltered (file,
2605 "gdbarch_dump: %s # %s\n",
2606 "TARGET_WRITE_PC(val, ptid)",
2607 XSTRING (TARGET_WRITE_PC (val, ptid)));
2608 #endif
2609 if (GDB_MULTI_ARCH)
2610 fprintf_unfiltered (file,
2611 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2612 (long) current_gdbarch->write_pc
2613 /*TARGET_WRITE_PC ()*/);
2614 #endif
2615 if (GDB_MULTI_ARCH)
2616 fprintf_unfiltered (file,
2617 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2618 gdbarch_unwind_dummy_id_p (current_gdbarch));
2619 if (GDB_MULTI_ARCH)
2620 fprintf_unfiltered (file,
2621 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2622 (long) current_gdbarch->unwind_dummy_id);
2623 if (GDB_MULTI_ARCH)
2624 fprintf_unfiltered (file,
2625 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2626 gdbarch_unwind_pc_p (current_gdbarch));
2627 if (GDB_MULTI_ARCH)
2628 fprintf_unfiltered (file,
2629 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2630 (long) current_gdbarch->unwind_pc);
2631 #ifdef USE_STRUCT_CONVENTION
2632 fprintf_unfiltered (file,
2633 "gdbarch_dump: %s # %s\n",
2634 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2635 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2636 if (GDB_MULTI_ARCH)
2637 fprintf_unfiltered (file,
2638 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2639 (long) current_gdbarch->use_struct_convention
2640 /*USE_STRUCT_CONVENTION ()*/);
2641 #endif
2642 #ifdef VALUE_TO_REGISTER
2643 #if GDB_MULTI_ARCH
2644 /* Macro might contain `[{}]' when not multi-arch */
2645 fprintf_unfiltered (file,
2646 "gdbarch_dump: %s # %s\n",
2647 "VALUE_TO_REGISTER(type, regnum, from, to)",
2648 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2649 #endif
2650 if (GDB_MULTI_ARCH)
2651 fprintf_unfiltered (file,
2652 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2653 (long) current_gdbarch->value_to_register
2654 /*VALUE_TO_REGISTER ()*/);
2655 #endif
2656 if (current_gdbarch->dump_tdep != NULL)
2657 current_gdbarch->dump_tdep (current_gdbarch, file);
2658 }
2659
2660 struct gdbarch_tdep *
2661 gdbarch_tdep (struct gdbarch *gdbarch)
2662 {
2663 if (gdbarch_debug >= 2)
2664 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2665 return gdbarch->tdep;
2666 }
2667
2668
2669 const struct bfd_arch_info *
2670 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2671 {
2672 gdb_assert (gdbarch != NULL);
2673 if (gdbarch_debug >= 2)
2674 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2675 return gdbarch->bfd_arch_info;
2676 }
2677
2678 int
2679 gdbarch_byte_order (struct gdbarch *gdbarch)
2680 {
2681 gdb_assert (gdbarch != NULL);
2682 if (gdbarch_debug >= 2)
2683 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2684 return gdbarch->byte_order;
2685 }
2686
2687 enum gdb_osabi
2688 gdbarch_osabi (struct gdbarch *gdbarch)
2689 {
2690 gdb_assert (gdbarch != NULL);
2691 if (gdbarch_debug >= 2)
2692 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2693 return gdbarch->osabi;
2694 }
2695
2696 int
2697 gdbarch_short_bit (struct gdbarch *gdbarch)
2698 {
2699 gdb_assert (gdbarch != NULL);
2700 /* Skip verify of short_bit, invalid_p == 0 */
2701 if (gdbarch_debug >= 2)
2702 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2703 return gdbarch->short_bit;
2704 }
2705
2706 void
2707 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2708 int short_bit)
2709 {
2710 gdbarch->short_bit = short_bit;
2711 }
2712
2713 int
2714 gdbarch_int_bit (struct gdbarch *gdbarch)
2715 {
2716 gdb_assert (gdbarch != NULL);
2717 /* Skip verify of int_bit, invalid_p == 0 */
2718 if (gdbarch_debug >= 2)
2719 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2720 return gdbarch->int_bit;
2721 }
2722
2723 void
2724 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2725 int int_bit)
2726 {
2727 gdbarch->int_bit = int_bit;
2728 }
2729
2730 int
2731 gdbarch_long_bit (struct gdbarch *gdbarch)
2732 {
2733 gdb_assert (gdbarch != NULL);
2734 /* Skip verify of long_bit, invalid_p == 0 */
2735 if (gdbarch_debug >= 2)
2736 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2737 return gdbarch->long_bit;
2738 }
2739
2740 void
2741 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2742 int long_bit)
2743 {
2744 gdbarch->long_bit = long_bit;
2745 }
2746
2747 int
2748 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2749 {
2750 gdb_assert (gdbarch != NULL);
2751 /* Skip verify of long_long_bit, invalid_p == 0 */
2752 if (gdbarch_debug >= 2)
2753 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2754 return gdbarch->long_long_bit;
2755 }
2756
2757 void
2758 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2759 int long_long_bit)
2760 {
2761 gdbarch->long_long_bit = long_long_bit;
2762 }
2763
2764 int
2765 gdbarch_float_bit (struct gdbarch *gdbarch)
2766 {
2767 gdb_assert (gdbarch != NULL);
2768 /* Skip verify of float_bit, invalid_p == 0 */
2769 if (gdbarch_debug >= 2)
2770 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2771 return gdbarch->float_bit;
2772 }
2773
2774 void
2775 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2776 int float_bit)
2777 {
2778 gdbarch->float_bit = float_bit;
2779 }
2780
2781 int
2782 gdbarch_double_bit (struct gdbarch *gdbarch)
2783 {
2784 gdb_assert (gdbarch != NULL);
2785 /* Skip verify of double_bit, invalid_p == 0 */
2786 if (gdbarch_debug >= 2)
2787 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2788 return gdbarch->double_bit;
2789 }
2790
2791 void
2792 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2793 int double_bit)
2794 {
2795 gdbarch->double_bit = double_bit;
2796 }
2797
2798 int
2799 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2800 {
2801 gdb_assert (gdbarch != NULL);
2802 /* Skip verify of long_double_bit, invalid_p == 0 */
2803 if (gdbarch_debug >= 2)
2804 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2805 return gdbarch->long_double_bit;
2806 }
2807
2808 void
2809 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2810 int long_double_bit)
2811 {
2812 gdbarch->long_double_bit = long_double_bit;
2813 }
2814
2815 int
2816 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2817 {
2818 gdb_assert (gdbarch != NULL);
2819 /* Skip verify of ptr_bit, invalid_p == 0 */
2820 if (gdbarch_debug >= 2)
2821 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2822 return gdbarch->ptr_bit;
2823 }
2824
2825 void
2826 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2827 int ptr_bit)
2828 {
2829 gdbarch->ptr_bit = ptr_bit;
2830 }
2831
2832 int
2833 gdbarch_addr_bit (struct gdbarch *gdbarch)
2834 {
2835 gdb_assert (gdbarch != NULL);
2836 if (gdbarch->addr_bit == 0)
2837 internal_error (__FILE__, __LINE__,
2838 "gdbarch: gdbarch_addr_bit invalid");
2839 if (gdbarch_debug >= 2)
2840 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2841 return gdbarch->addr_bit;
2842 }
2843
2844 void
2845 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2846 int addr_bit)
2847 {
2848 gdbarch->addr_bit = addr_bit;
2849 }
2850
2851 int
2852 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2853 {
2854 gdb_assert (gdbarch != NULL);
2855 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2856 if (gdbarch_debug >= 2)
2857 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2858 return gdbarch->bfd_vma_bit;
2859 }
2860
2861 void
2862 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2863 int bfd_vma_bit)
2864 {
2865 gdbarch->bfd_vma_bit = bfd_vma_bit;
2866 }
2867
2868 int
2869 gdbarch_char_signed (struct gdbarch *gdbarch)
2870 {
2871 gdb_assert (gdbarch != NULL);
2872 if (gdbarch->char_signed == -1)
2873 internal_error (__FILE__, __LINE__,
2874 "gdbarch: gdbarch_char_signed invalid");
2875 if (gdbarch_debug >= 2)
2876 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2877 return gdbarch->char_signed;
2878 }
2879
2880 void
2881 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2882 int char_signed)
2883 {
2884 gdbarch->char_signed = char_signed;
2885 }
2886
2887 int
2888 gdbarch_read_pc_p (struct gdbarch *gdbarch)
2889 {
2890 gdb_assert (gdbarch != NULL);
2891 return gdbarch->read_pc != 0;
2892 }
2893
2894 CORE_ADDR
2895 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2896 {
2897 gdb_assert (gdbarch != NULL);
2898 if (gdbarch->read_pc == 0)
2899 internal_error (__FILE__, __LINE__,
2900 "gdbarch: gdbarch_read_pc invalid");
2901 if (gdbarch_debug >= 2)
2902 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2903 return gdbarch->read_pc (ptid);
2904 }
2905
2906 void
2907 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2908 gdbarch_read_pc_ftype read_pc)
2909 {
2910 gdbarch->read_pc = read_pc;
2911 }
2912
2913 void
2914 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2915 {
2916 gdb_assert (gdbarch != NULL);
2917 if (gdbarch->write_pc == 0)
2918 internal_error (__FILE__, __LINE__,
2919 "gdbarch: gdbarch_write_pc invalid");
2920 if (gdbarch_debug >= 2)
2921 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2922 gdbarch->write_pc (val, ptid);
2923 }
2924
2925 void
2926 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2927 gdbarch_write_pc_ftype write_pc)
2928 {
2929 gdbarch->write_pc = write_pc;
2930 }
2931
2932 int
2933 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
2934 {
2935 gdb_assert (gdbarch != NULL);
2936 return gdbarch->deprecated_target_read_fp != 0;
2937 }
2938
2939 CORE_ADDR
2940 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
2941 {
2942 gdb_assert (gdbarch != NULL);
2943 if (gdbarch->deprecated_target_read_fp == 0)
2944 internal_error (__FILE__, __LINE__,
2945 "gdbarch: gdbarch_deprecated_target_read_fp invalid");
2946 if (gdbarch_debug >= 2)
2947 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
2948 return gdbarch->deprecated_target_read_fp ();
2949 }
2950
2951 void
2952 set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
2953 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
2954 {
2955 gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
2956 }
2957
2958 CORE_ADDR
2959 gdbarch_read_sp (struct gdbarch *gdbarch)
2960 {
2961 gdb_assert (gdbarch != NULL);
2962 if (gdbarch->read_sp == 0)
2963 internal_error (__FILE__, __LINE__,
2964 "gdbarch: gdbarch_read_sp invalid");
2965 if (gdbarch_debug >= 2)
2966 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2967 return gdbarch->read_sp ();
2968 }
2969
2970 void
2971 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2972 gdbarch_read_sp_ftype read_sp)
2973 {
2974 gdbarch->read_sp = read_sp;
2975 }
2976
2977 int
2978 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2979 {
2980 gdb_assert (gdbarch != NULL);
2981 return gdbarch->deprecated_dummy_write_sp != 0;
2982 }
2983
2984 void
2985 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2986 {
2987 gdb_assert (gdbarch != NULL);
2988 if (gdbarch->deprecated_dummy_write_sp == 0)
2989 internal_error (__FILE__, __LINE__,
2990 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2991 if (gdbarch_debug >= 2)
2992 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2993 gdbarch->deprecated_dummy_write_sp (val);
2994 }
2995
2996 void
2997 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2998 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2999 {
3000 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
3001 }
3002
3003 void
3004 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
3005 {
3006 gdb_assert (gdbarch != NULL);
3007 if (gdbarch->virtual_frame_pointer == 0)
3008 internal_error (__FILE__, __LINE__,
3009 "gdbarch: gdbarch_virtual_frame_pointer invalid");
3010 if (gdbarch_debug >= 2)
3011 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
3012 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
3013 }
3014
3015 void
3016 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
3017 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
3018 {
3019 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
3020 }
3021
3022 int
3023 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
3024 {
3025 gdb_assert (gdbarch != NULL);
3026 return gdbarch->pseudo_register_read != 0;
3027 }
3028
3029 void
3030 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
3031 {
3032 gdb_assert (gdbarch != NULL);
3033 if (gdbarch->pseudo_register_read == 0)
3034 internal_error (__FILE__, __LINE__,
3035 "gdbarch: gdbarch_pseudo_register_read invalid");
3036 if (gdbarch_debug >= 2)
3037 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
3038 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
3039 }
3040
3041 void
3042 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
3043 gdbarch_pseudo_register_read_ftype pseudo_register_read)
3044 {
3045 gdbarch->pseudo_register_read = pseudo_register_read;
3046 }
3047
3048 int
3049 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
3050 {
3051 gdb_assert (gdbarch != NULL);
3052 return gdbarch->pseudo_register_write != 0;
3053 }
3054
3055 void
3056 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3057 {
3058 gdb_assert (gdbarch != NULL);
3059 if (gdbarch->pseudo_register_write == 0)
3060 internal_error (__FILE__, __LINE__,
3061 "gdbarch: gdbarch_pseudo_register_write invalid");
3062 if (gdbarch_debug >= 2)
3063 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3064 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3065 }
3066
3067 void
3068 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3069 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3070 {
3071 gdbarch->pseudo_register_write = pseudo_register_write;
3072 }
3073
3074 int
3075 gdbarch_num_regs (struct gdbarch *gdbarch)
3076 {
3077 gdb_assert (gdbarch != NULL);
3078 if (gdbarch->num_regs == -1)
3079 internal_error (__FILE__, __LINE__,
3080 "gdbarch: gdbarch_num_regs invalid");
3081 if (gdbarch_debug >= 2)
3082 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3083 return gdbarch->num_regs;
3084 }
3085
3086 void
3087 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3088 int num_regs)
3089 {
3090 gdbarch->num_regs = num_regs;
3091 }
3092
3093 int
3094 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3095 {
3096 gdb_assert (gdbarch != NULL);
3097 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3098 if (gdbarch_debug >= 2)
3099 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3100 return gdbarch->num_pseudo_regs;
3101 }
3102
3103 void
3104 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3105 int num_pseudo_regs)
3106 {
3107 gdbarch->num_pseudo_regs = num_pseudo_regs;
3108 }
3109
3110 int
3111 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3112 {
3113 gdb_assert (gdbarch != NULL);
3114 /* Skip verify of sp_regnum, invalid_p == 0 */
3115 if (gdbarch_debug >= 2)
3116 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3117 return gdbarch->sp_regnum;
3118 }
3119
3120 void
3121 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3122 int sp_regnum)
3123 {
3124 gdbarch->sp_regnum = sp_regnum;
3125 }
3126
3127 int
3128 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
3129 {
3130 gdb_assert (gdbarch != NULL);
3131 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3132 if (gdbarch_debug >= 2)
3133 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
3134 return gdbarch->deprecated_fp_regnum;
3135 }
3136
3137 void
3138 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
3139 int deprecated_fp_regnum)
3140 {
3141 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
3142 }
3143
3144 int
3145 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3146 {
3147 gdb_assert (gdbarch != NULL);
3148 /* Skip verify of pc_regnum, invalid_p == 0 */
3149 if (gdbarch_debug >= 2)
3150 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3151 return gdbarch->pc_regnum;
3152 }
3153
3154 void
3155 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3156 int pc_regnum)
3157 {
3158 gdbarch->pc_regnum = pc_regnum;
3159 }
3160
3161 int
3162 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3163 {
3164 gdb_assert (gdbarch != NULL);
3165 /* Skip verify of ps_regnum, invalid_p == 0 */
3166 if (gdbarch_debug >= 2)
3167 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3168 return gdbarch->ps_regnum;
3169 }
3170
3171 void
3172 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3173 int ps_regnum)
3174 {
3175 gdbarch->ps_regnum = ps_regnum;
3176 }
3177
3178 int
3179 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3180 {
3181 gdb_assert (gdbarch != NULL);
3182 /* Skip verify of fp0_regnum, invalid_p == 0 */
3183 if (gdbarch_debug >= 2)
3184 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3185 return gdbarch->fp0_regnum;
3186 }
3187
3188 void
3189 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3190 int fp0_regnum)
3191 {
3192 gdbarch->fp0_regnum = fp0_regnum;
3193 }
3194
3195 int
3196 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3197 {
3198 gdb_assert (gdbarch != NULL);
3199 /* Skip verify of npc_regnum, invalid_p == 0 */
3200 if (gdbarch_debug >= 2)
3201 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3202 return gdbarch->npc_regnum;
3203 }
3204
3205 void
3206 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3207 int npc_regnum)
3208 {
3209 gdbarch->npc_regnum = npc_regnum;
3210 }
3211
3212 int
3213 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3214 {
3215 gdb_assert (gdbarch != NULL);
3216 if (gdbarch->stab_reg_to_regnum == 0)
3217 internal_error (__FILE__, __LINE__,
3218 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3219 if (gdbarch_debug >= 2)
3220 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3221 return gdbarch->stab_reg_to_regnum (stab_regnr);
3222 }
3223
3224 void
3225 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3226 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3227 {
3228 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3229 }
3230
3231 int
3232 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3233 {
3234 gdb_assert (gdbarch != NULL);
3235 if (gdbarch->ecoff_reg_to_regnum == 0)
3236 internal_error (__FILE__, __LINE__,
3237 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3238 if (gdbarch_debug >= 2)
3239 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3240 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3241 }
3242
3243 void
3244 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3245 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3246 {
3247 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3248 }
3249
3250 int
3251 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3252 {
3253 gdb_assert (gdbarch != NULL);
3254 if (gdbarch->dwarf_reg_to_regnum == 0)
3255 internal_error (__FILE__, __LINE__,
3256 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3257 if (gdbarch_debug >= 2)
3258 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3259 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3260 }
3261
3262 void
3263 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3264 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3265 {
3266 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3267 }
3268
3269 int
3270 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3271 {
3272 gdb_assert (gdbarch != NULL);
3273 if (gdbarch->sdb_reg_to_regnum == 0)
3274 internal_error (__FILE__, __LINE__,
3275 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3276 if (gdbarch_debug >= 2)
3277 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3278 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3279 }
3280
3281 void
3282 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3283 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3284 {
3285 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3286 }
3287
3288 int
3289 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3290 {
3291 gdb_assert (gdbarch != NULL);
3292 if (gdbarch->dwarf2_reg_to_regnum == 0)
3293 internal_error (__FILE__, __LINE__,
3294 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3295 if (gdbarch_debug >= 2)
3296 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3297 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3298 }
3299
3300 void
3301 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3302 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3303 {
3304 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3305 }
3306
3307 const char *
3308 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3309 {
3310 gdb_assert (gdbarch != NULL);
3311 if (gdbarch->register_name == 0)
3312 internal_error (__FILE__, __LINE__,
3313 "gdbarch: gdbarch_register_name invalid");
3314 if (gdbarch_debug >= 2)
3315 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3316 return gdbarch->register_name (regnr);
3317 }
3318
3319 void
3320 set_gdbarch_register_name (struct gdbarch *gdbarch,
3321 gdbarch_register_name_ftype register_name)
3322 {
3323 gdbarch->register_name = register_name;
3324 }
3325
3326 int
3327 gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
3328 {
3329 gdb_assert (gdbarch != NULL);
3330 if (gdbarch_debug >= 2)
3331 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
3332 return gdbarch->deprecated_register_size;
3333 }
3334
3335 void
3336 set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
3337 int deprecated_register_size)
3338 {
3339 gdbarch->deprecated_register_size = deprecated_register_size;
3340 }
3341
3342 int
3343 gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
3344 {
3345 gdb_assert (gdbarch != NULL);
3346 if (gdbarch_debug >= 2)
3347 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
3348 return gdbarch->deprecated_register_bytes;
3349 }
3350
3351 void
3352 set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
3353 int deprecated_register_bytes)
3354 {
3355 gdbarch->deprecated_register_bytes = deprecated_register_bytes;
3356 }
3357
3358 int
3359 gdbarch_register_byte_p (struct gdbarch *gdbarch)
3360 {
3361 gdb_assert (gdbarch != NULL);
3362 return gdbarch->register_byte != generic_register_byte;
3363 }
3364
3365 int
3366 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3367 {
3368 gdb_assert (gdbarch != NULL);
3369 if (gdbarch->register_byte == 0)
3370 internal_error (__FILE__, __LINE__,
3371 "gdbarch: gdbarch_register_byte invalid");
3372 /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
3373 if (gdbarch_debug >= 2)
3374 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3375 return gdbarch->register_byte (reg_nr);
3376 }
3377
3378 void
3379 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3380 gdbarch_register_byte_ftype register_byte)
3381 {
3382 gdbarch->register_byte = register_byte;
3383 }
3384
3385 int
3386 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3387 {
3388 gdb_assert (gdbarch != NULL);
3389 if (gdbarch->register_raw_size == 0)
3390 internal_error (__FILE__, __LINE__,
3391 "gdbarch: gdbarch_register_raw_size invalid");
3392 if (gdbarch_debug >= 2)
3393 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3394 return gdbarch->register_raw_size (reg_nr);
3395 }
3396
3397 void
3398 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3399 gdbarch_register_raw_size_ftype register_raw_size)
3400 {
3401 gdbarch->register_raw_size = register_raw_size;
3402 }
3403
3404 int
3405 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3406 {
3407 gdb_assert (gdbarch != NULL);
3408 return gdbarch->deprecated_max_register_raw_size != 0;
3409 }
3410
3411 int
3412 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3413 {
3414 gdb_assert (gdbarch != NULL);
3415 if (gdbarch_debug >= 2)
3416 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3417 return gdbarch->deprecated_max_register_raw_size;
3418 }
3419
3420 void
3421 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3422 int deprecated_max_register_raw_size)
3423 {
3424 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3425 }
3426
3427 int
3428 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3429 {
3430 gdb_assert (gdbarch != NULL);
3431 if (gdbarch->register_virtual_size == 0)
3432 internal_error (__FILE__, __LINE__,
3433 "gdbarch: gdbarch_register_virtual_size invalid");
3434 if (gdbarch_debug >= 2)
3435 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3436 return gdbarch->register_virtual_size (reg_nr);
3437 }
3438
3439 void
3440 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3441 gdbarch_register_virtual_size_ftype register_virtual_size)
3442 {
3443 gdbarch->register_virtual_size = register_virtual_size;
3444 }
3445
3446 int
3447 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3448 {
3449 gdb_assert (gdbarch != NULL);
3450 return gdbarch->deprecated_max_register_virtual_size != 0;
3451 }
3452
3453 int
3454 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3455 {
3456 gdb_assert (gdbarch != NULL);
3457 if (gdbarch_debug >= 2)
3458 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3459 return gdbarch->deprecated_max_register_virtual_size;
3460 }
3461
3462 void
3463 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3464 int deprecated_max_register_virtual_size)
3465 {
3466 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3467 }
3468
3469 int
3470 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3471 {
3472 gdb_assert (gdbarch != NULL);
3473 return gdbarch->register_virtual_type != 0;
3474 }
3475
3476 struct type *
3477 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3478 {
3479 gdb_assert (gdbarch != NULL);
3480 if (gdbarch->register_virtual_type == 0)
3481 internal_error (__FILE__, __LINE__,
3482 "gdbarch: gdbarch_register_virtual_type invalid");
3483 if (gdbarch_debug >= 2)
3484 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3485 return gdbarch->register_virtual_type (reg_nr);
3486 }
3487
3488 void
3489 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3490 gdbarch_register_virtual_type_ftype register_virtual_type)
3491 {
3492 gdbarch->register_virtual_type = register_virtual_type;
3493 }
3494
3495 int
3496 gdbarch_register_type_p (struct gdbarch *gdbarch)
3497 {
3498 gdb_assert (gdbarch != NULL);
3499 return gdbarch->register_type != 0;
3500 }
3501
3502 struct type *
3503 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3504 {
3505 gdb_assert (gdbarch != NULL);
3506 if (gdbarch->register_type == 0)
3507 internal_error (__FILE__, __LINE__,
3508 "gdbarch: gdbarch_register_type invalid");
3509 if (gdbarch_debug >= 2)
3510 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3511 return gdbarch->register_type (gdbarch, reg_nr);
3512 }
3513
3514 void
3515 set_gdbarch_register_type (struct gdbarch *gdbarch,
3516 gdbarch_register_type_ftype register_type)
3517 {
3518 gdbarch->register_type = register_type;
3519 }
3520
3521 int
3522 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3523 {
3524 gdb_assert (gdbarch != NULL);
3525 return gdbarch->deprecated_do_registers_info != 0;
3526 }
3527
3528 void
3529 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3530 {
3531 gdb_assert (gdbarch != NULL);
3532 if (gdbarch->deprecated_do_registers_info == 0)
3533 internal_error (__FILE__, __LINE__,
3534 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3535 if (gdbarch_debug >= 2)
3536 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3537 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3538 }
3539
3540 void
3541 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3542 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3543 {
3544 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3545 }
3546
3547 void
3548 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3549 {
3550 gdb_assert (gdbarch != NULL);
3551 if (gdbarch->print_registers_info == 0)
3552 internal_error (__FILE__, __LINE__,
3553 "gdbarch: gdbarch_print_registers_info invalid");
3554 if (gdbarch_debug >= 2)
3555 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3556 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3557 }
3558
3559 void
3560 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3561 gdbarch_print_registers_info_ftype print_registers_info)
3562 {
3563 gdbarch->print_registers_info = print_registers_info;
3564 }
3565
3566 int
3567 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3568 {
3569 gdb_assert (gdbarch != NULL);
3570 return gdbarch->print_float_info != 0;
3571 }
3572
3573 void
3574 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3575 {
3576 gdb_assert (gdbarch != NULL);
3577 if (gdbarch->print_float_info == 0)
3578 internal_error (__FILE__, __LINE__,
3579 "gdbarch: gdbarch_print_float_info invalid");
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3582 gdbarch->print_float_info (gdbarch, file, frame, args);
3583 }
3584
3585 void
3586 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3587 gdbarch_print_float_info_ftype print_float_info)
3588 {
3589 gdbarch->print_float_info = print_float_info;
3590 }
3591
3592 int
3593 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3594 {
3595 gdb_assert (gdbarch != NULL);
3596 return gdbarch->print_vector_info != 0;
3597 }
3598
3599 void
3600 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3601 {
3602 gdb_assert (gdbarch != NULL);
3603 if (gdbarch->print_vector_info == 0)
3604 internal_error (__FILE__, __LINE__,
3605 "gdbarch: gdbarch_print_vector_info invalid");
3606 if (gdbarch_debug >= 2)
3607 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3608 gdbarch->print_vector_info (gdbarch, file, frame, args);
3609 }
3610
3611 void
3612 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3613 gdbarch_print_vector_info_ftype print_vector_info)
3614 {
3615 gdbarch->print_vector_info = print_vector_info;
3616 }
3617
3618 int
3619 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3620 {
3621 gdb_assert (gdbarch != NULL);
3622 if (gdbarch->register_sim_regno == 0)
3623 internal_error (__FILE__, __LINE__,
3624 "gdbarch: gdbarch_register_sim_regno invalid");
3625 if (gdbarch_debug >= 2)
3626 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3627 return gdbarch->register_sim_regno (reg_nr);
3628 }
3629
3630 void
3631 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3632 gdbarch_register_sim_regno_ftype register_sim_regno)
3633 {
3634 gdbarch->register_sim_regno = register_sim_regno;
3635 }
3636
3637 int
3638 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3639 {
3640 gdb_assert (gdbarch != NULL);
3641 return gdbarch->register_bytes_ok != 0;
3642 }
3643
3644 int
3645 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3646 {
3647 gdb_assert (gdbarch != NULL);
3648 if (gdbarch->register_bytes_ok == 0)
3649 internal_error (__FILE__, __LINE__,
3650 "gdbarch: gdbarch_register_bytes_ok invalid");
3651 if (gdbarch_debug >= 2)
3652 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3653 return gdbarch->register_bytes_ok (nr_bytes);
3654 }
3655
3656 void
3657 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3658 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3659 {
3660 gdbarch->register_bytes_ok = register_bytes_ok;
3661 }
3662
3663 int
3664 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3665 {
3666 gdb_assert (gdbarch != NULL);
3667 if (gdbarch->cannot_fetch_register == 0)
3668 internal_error (__FILE__, __LINE__,
3669 "gdbarch: gdbarch_cannot_fetch_register invalid");
3670 if (gdbarch_debug >= 2)
3671 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3672 return gdbarch->cannot_fetch_register (regnum);
3673 }
3674
3675 void
3676 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3677 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3678 {
3679 gdbarch->cannot_fetch_register = cannot_fetch_register;
3680 }
3681
3682 int
3683 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3684 {
3685 gdb_assert (gdbarch != NULL);
3686 if (gdbarch->cannot_store_register == 0)
3687 internal_error (__FILE__, __LINE__,
3688 "gdbarch: gdbarch_cannot_store_register invalid");
3689 if (gdbarch_debug >= 2)
3690 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3691 return gdbarch->cannot_store_register (regnum);
3692 }
3693
3694 void
3695 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3696 gdbarch_cannot_store_register_ftype cannot_store_register)
3697 {
3698 gdbarch->cannot_store_register = cannot_store_register;
3699 }
3700
3701 int
3702 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3703 {
3704 gdb_assert (gdbarch != NULL);
3705 return gdbarch->get_longjmp_target != 0;
3706 }
3707
3708 int
3709 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3710 {
3711 gdb_assert (gdbarch != NULL);
3712 if (gdbarch->get_longjmp_target == 0)
3713 internal_error (__FILE__, __LINE__,
3714 "gdbarch: gdbarch_get_longjmp_target invalid");
3715 if (gdbarch_debug >= 2)
3716 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3717 return gdbarch->get_longjmp_target (pc);
3718 }
3719
3720 void
3721 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3722 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3723 {
3724 gdbarch->get_longjmp_target = get_longjmp_target;
3725 }
3726
3727 int
3728 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3729 {
3730 gdb_assert (gdbarch != NULL);
3731 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3732 if (gdbarch_debug >= 2)
3733 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3734 return gdbarch->deprecated_use_generic_dummy_frames;
3735 }
3736
3737 void
3738 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3739 int deprecated_use_generic_dummy_frames)
3740 {
3741 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3742 }
3743
3744 int
3745 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3746 {
3747 gdb_assert (gdbarch != NULL);
3748 /* Skip verify of call_dummy_location, invalid_p == 0 */
3749 if (gdbarch_debug >= 2)
3750 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3751 return gdbarch->call_dummy_location;
3752 }
3753
3754 void
3755 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3756 int call_dummy_location)
3757 {
3758 gdbarch->call_dummy_location = call_dummy_location;
3759 }
3760
3761 CORE_ADDR
3762 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3763 {
3764 gdb_assert (gdbarch != NULL);
3765 if (gdbarch->call_dummy_address == 0)
3766 internal_error (__FILE__, __LINE__,
3767 "gdbarch: gdbarch_call_dummy_address invalid");
3768 if (gdbarch_debug >= 2)
3769 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3770 return gdbarch->call_dummy_address ();
3771 }
3772
3773 void
3774 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3775 gdbarch_call_dummy_address_ftype call_dummy_address)
3776 {
3777 gdbarch->call_dummy_address = call_dummy_address;
3778 }
3779
3780 CORE_ADDR
3781 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch)
3782 {
3783 gdb_assert (gdbarch != NULL);
3784 if (gdbarch_debug >= 2)
3785 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n");
3786 return gdbarch->deprecated_call_dummy_start_offset;
3787 }
3788
3789 void
3790 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch,
3791 CORE_ADDR deprecated_call_dummy_start_offset)
3792 {
3793 gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset;
3794 }
3795
3796 CORE_ADDR
3797 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3798 {
3799 gdb_assert (gdbarch != NULL);
3800 if (gdbarch_debug >= 2)
3801 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3802 return gdbarch->deprecated_call_dummy_breakpoint_offset;
3803 }
3804
3805 void
3806 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3807 CORE_ADDR deprecated_call_dummy_breakpoint_offset)
3808 {
3809 gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset;
3810 }
3811
3812 int
3813 gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch)
3814 {
3815 gdb_assert (gdbarch != NULL);
3816 if (gdbarch_debug >= 2)
3817 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n");
3818 return gdbarch->deprecated_call_dummy_length;
3819 }
3820
3821 void
3822 set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
3823 int deprecated_call_dummy_length)
3824 {
3825 gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
3826 }
3827
3828 int
3829 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3830 {
3831 gdb_assert (gdbarch != NULL);
3832 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3833 }
3834
3835 int
3836 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3837 {
3838 gdb_assert (gdbarch != NULL);
3839 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3840 internal_error (__FILE__, __LINE__,
3841 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3842 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3843 if (gdbarch_debug >= 2)
3844 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3845 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3846 }
3847
3848 void
3849 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3850 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3851 {
3852 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3853 }
3854
3855 LONGEST *
3856 gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
3857 {
3858 gdb_assert (gdbarch != NULL);
3859 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3860 if (gdbarch_debug >= 2)
3861 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n");
3862 return gdbarch->deprecated_call_dummy_words;
3863 }
3864
3865 void
3866 set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch,
3867 LONGEST * deprecated_call_dummy_words)
3868 {
3869 gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words;
3870 }
3871
3872 int
3873 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3874 {
3875 gdb_assert (gdbarch != NULL);
3876 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3877 if (gdbarch_debug >= 2)
3878 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3879 return gdbarch->deprecated_sizeof_call_dummy_words;
3880 }
3881
3882 void
3883 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3884 int deprecated_sizeof_call_dummy_words)
3885 {
3886 gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words;
3887 }
3888
3889 int
3890 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3891 {
3892 gdb_assert (gdbarch != NULL);
3893 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3894 }
3895
3896 int
3897 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3898 {
3899 gdb_assert (gdbarch != NULL);
3900 if (gdbarch_debug >= 2)
3901 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3902 return gdbarch->deprecated_call_dummy_stack_adjust;
3903 }
3904
3905 void
3906 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3907 int deprecated_call_dummy_stack_adjust)
3908 {
3909 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3910 }
3911
3912 int
3913 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
3914 {
3915 gdb_assert (gdbarch != NULL);
3916 return gdbarch->deprecated_fix_call_dummy != 0;
3917 }
3918
3919 void
3920 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)
3921 {
3922 gdb_assert (gdbarch != NULL);
3923 if (gdbarch->deprecated_fix_call_dummy == 0)
3924 internal_error (__FILE__, __LINE__,
3925 "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
3926 if (gdbarch_debug >= 2)
3927 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
3928 gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3929 }
3930
3931 void
3932 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch,
3933 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy)
3934 {
3935 gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy;
3936 }
3937
3938 int
3939 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
3940 {
3941 gdb_assert (gdbarch != NULL);
3942 return gdbarch->push_dummy_code != 0;
3943 }
3944
3945 CORE_ADDR
3946 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)
3947 {
3948 gdb_assert (gdbarch != NULL);
3949 if (gdbarch->push_dummy_code == 0)
3950 internal_error (__FILE__, __LINE__,
3951 "gdbarch: gdbarch_push_dummy_code invalid");
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
3954 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
3955 }
3956
3957 void
3958 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
3959 gdbarch_push_dummy_code_ftype push_dummy_code)
3960 {
3961 gdbarch->push_dummy_code = push_dummy_code;
3962 }
3963
3964 int
3965 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3966 {
3967 gdb_assert (gdbarch != NULL);
3968 return gdbarch->deprecated_init_frame_pc_first != 0;
3969 }
3970
3971 CORE_ADDR
3972 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3973 {
3974 gdb_assert (gdbarch != NULL);
3975 if (gdbarch->deprecated_init_frame_pc_first == 0)
3976 internal_error (__FILE__, __LINE__,
3977 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3978 if (gdbarch_debug >= 2)
3979 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3980 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3981 }
3982
3983 void
3984 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3985 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3986 {
3987 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3988 }
3989
3990 int
3991 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3992 {
3993 gdb_assert (gdbarch != NULL);
3994 return gdbarch->deprecated_init_frame_pc != 0;
3995 }
3996
3997 CORE_ADDR
3998 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3999 {
4000 gdb_assert (gdbarch != NULL);
4001 if (gdbarch->deprecated_init_frame_pc == 0)
4002 internal_error (__FILE__, __LINE__,
4003 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
4004 if (gdbarch_debug >= 2)
4005 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
4006 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
4007 }
4008
4009 void
4010 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
4011 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
4012 {
4013 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
4014 }
4015
4016 int
4017 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
4018 {
4019 gdb_assert (gdbarch != NULL);
4020 if (gdbarch_debug >= 2)
4021 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
4022 return gdbarch->believe_pcc_promotion;
4023 }
4024
4025 void
4026 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
4027 int believe_pcc_promotion)
4028 {
4029 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
4030 }
4031
4032 int
4033 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
4034 {
4035 gdb_assert (gdbarch != NULL);
4036 if (gdbarch_debug >= 2)
4037 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
4038 return gdbarch->believe_pcc_promotion_type;
4039 }
4040
4041 void
4042 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
4043 int believe_pcc_promotion_type)
4044 {
4045 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
4046 }
4047
4048 int
4049 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
4050 {
4051 gdb_assert (gdbarch != NULL);
4052 return gdbarch->deprecated_get_saved_register != 0;
4053 }
4054
4055 void
4056 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)
4057 {
4058 gdb_assert (gdbarch != NULL);
4059 if (gdbarch->deprecated_get_saved_register == 0)
4060 internal_error (__FILE__, __LINE__,
4061 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
4064 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
4065 }
4066
4067 void
4068 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
4069 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
4070 {
4071 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
4072 }
4073
4074 int
4075 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
4076 {
4077 gdb_assert (gdbarch != NULL);
4078 if (gdbarch->register_convertible == 0)
4079 internal_error (__FILE__, __LINE__,
4080 "gdbarch: gdbarch_register_convertible invalid");
4081 if (gdbarch_debug >= 2)
4082 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4083 return gdbarch->register_convertible (nr);
4084 }
4085
4086 void
4087 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4088 gdbarch_register_convertible_ftype register_convertible)
4089 {
4090 gdbarch->register_convertible = register_convertible;
4091 }
4092
4093 void
4094 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4095 {
4096 gdb_assert (gdbarch != NULL);
4097 if (gdbarch->register_convert_to_virtual == 0)
4098 internal_error (__FILE__, __LINE__,
4099 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4100 if (gdbarch_debug >= 2)
4101 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4102 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4103 }
4104
4105 void
4106 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4107 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4108 {
4109 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4110 }
4111
4112 void
4113 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4114 {
4115 gdb_assert (gdbarch != NULL);
4116 if (gdbarch->register_convert_to_raw == 0)
4117 internal_error (__FILE__, __LINE__,
4118 "gdbarch: gdbarch_register_convert_to_raw invalid");
4119 if (gdbarch_debug >= 2)
4120 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4121 gdbarch->register_convert_to_raw (type, regnum, from, to);
4122 }
4123
4124 void
4125 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4126 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4127 {
4128 gdbarch->register_convert_to_raw = register_convert_to_raw;
4129 }
4130
4131 int
4132 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4133 {
4134 gdb_assert (gdbarch != NULL);
4135 if (gdbarch->convert_register_p == 0)
4136 internal_error (__FILE__, __LINE__,
4137 "gdbarch: gdbarch_convert_register_p invalid");
4138 if (gdbarch_debug >= 2)
4139 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4140 return gdbarch->convert_register_p (regnum);
4141 }
4142
4143 void
4144 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4145 gdbarch_convert_register_p_ftype convert_register_p)
4146 {
4147 gdbarch->convert_register_p = convert_register_p;
4148 }
4149
4150 void
4151 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4152 {
4153 gdb_assert (gdbarch != NULL);
4154 if (gdbarch->register_to_value == 0)
4155 internal_error (__FILE__, __LINE__,
4156 "gdbarch: gdbarch_register_to_value invalid");
4157 if (gdbarch_debug >= 2)
4158 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4159 gdbarch->register_to_value (regnum, type, from, to);
4160 }
4161
4162 void
4163 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4164 gdbarch_register_to_value_ftype register_to_value)
4165 {
4166 gdbarch->register_to_value = register_to_value;
4167 }
4168
4169 void
4170 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4171 {
4172 gdb_assert (gdbarch != NULL);
4173 if (gdbarch->value_to_register == 0)
4174 internal_error (__FILE__, __LINE__,
4175 "gdbarch: gdbarch_value_to_register invalid");
4176 if (gdbarch_debug >= 2)
4177 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4178 gdbarch->value_to_register (type, regnum, from, to);
4179 }
4180
4181 void
4182 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4183 gdbarch_value_to_register_ftype value_to_register)
4184 {
4185 gdbarch->value_to_register = value_to_register;
4186 }
4187
4188 CORE_ADDR
4189 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4190 {
4191 gdb_assert (gdbarch != NULL);
4192 if (gdbarch->pointer_to_address == 0)
4193 internal_error (__FILE__, __LINE__,
4194 "gdbarch: gdbarch_pointer_to_address invalid");
4195 if (gdbarch_debug >= 2)
4196 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4197 return gdbarch->pointer_to_address (type, buf);
4198 }
4199
4200 void
4201 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4202 gdbarch_pointer_to_address_ftype pointer_to_address)
4203 {
4204 gdbarch->pointer_to_address = pointer_to_address;
4205 }
4206
4207 void
4208 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4209 {
4210 gdb_assert (gdbarch != NULL);
4211 if (gdbarch->address_to_pointer == 0)
4212 internal_error (__FILE__, __LINE__,
4213 "gdbarch: gdbarch_address_to_pointer invalid");
4214 if (gdbarch_debug >= 2)
4215 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4216 gdbarch->address_to_pointer (type, buf, addr);
4217 }
4218
4219 void
4220 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4221 gdbarch_address_to_pointer_ftype address_to_pointer)
4222 {
4223 gdbarch->address_to_pointer = address_to_pointer;
4224 }
4225
4226 int
4227 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4228 {
4229 gdb_assert (gdbarch != NULL);
4230 return gdbarch->integer_to_address != 0;
4231 }
4232
4233 CORE_ADDR
4234 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4235 {
4236 gdb_assert (gdbarch != NULL);
4237 if (gdbarch->integer_to_address == 0)
4238 internal_error (__FILE__, __LINE__,
4239 "gdbarch: gdbarch_integer_to_address invalid");
4240 if (gdbarch_debug >= 2)
4241 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4242 return gdbarch->integer_to_address (type, buf);
4243 }
4244
4245 void
4246 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4247 gdbarch_integer_to_address_ftype integer_to_address)
4248 {
4249 gdbarch->integer_to_address = integer_to_address;
4250 }
4251
4252 int
4253 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4254 {
4255 gdb_assert (gdbarch != NULL);
4256 if (gdbarch->return_value_on_stack == 0)
4257 internal_error (__FILE__, __LINE__,
4258 "gdbarch: gdbarch_return_value_on_stack invalid");
4259 if (gdbarch_debug >= 2)
4260 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4261 return gdbarch->return_value_on_stack (type);
4262 }
4263
4264 void
4265 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4266 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4267 {
4268 gdbarch->return_value_on_stack = return_value_on_stack;
4269 }
4270
4271 int
4272 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4273 {
4274 gdb_assert (gdbarch != NULL);
4275 return gdbarch->deprecated_push_arguments != 0;
4276 }
4277
4278 CORE_ADDR
4279 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4280 {
4281 gdb_assert (gdbarch != NULL);
4282 if (gdbarch->deprecated_push_arguments == 0)
4283 internal_error (__FILE__, __LINE__,
4284 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4285 if (gdbarch_debug >= 2)
4286 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4287 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4288 }
4289
4290 void
4291 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4292 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4293 {
4294 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4295 }
4296
4297 int
4298 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4299 {
4300 gdb_assert (gdbarch != NULL);
4301 return gdbarch->push_dummy_call != 0;
4302 }
4303
4304 CORE_ADDR
4305 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)
4306 {
4307 gdb_assert (gdbarch != NULL);
4308 if (gdbarch->push_dummy_call == 0)
4309 internal_error (__FILE__, __LINE__,
4310 "gdbarch: gdbarch_push_dummy_call invalid");
4311 if (gdbarch_debug >= 2)
4312 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4313 return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
4314 }
4315
4316 void
4317 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4318 gdbarch_push_dummy_call_ftype push_dummy_call)
4319 {
4320 gdbarch->push_dummy_call = push_dummy_call;
4321 }
4322
4323 int
4324 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4325 {
4326 gdb_assert (gdbarch != NULL);
4327 return gdbarch->deprecated_push_dummy_frame != 0;
4328 }
4329
4330 void
4331 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4332 {
4333 gdb_assert (gdbarch != NULL);
4334 if (gdbarch->deprecated_push_dummy_frame == 0)
4335 internal_error (__FILE__, __LINE__,
4336 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4337 if (gdbarch_debug >= 2)
4338 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4339 gdbarch->deprecated_push_dummy_frame ();
4340 }
4341
4342 void
4343 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4344 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4345 {
4346 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4347 }
4348
4349 int
4350 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
4351 {
4352 gdb_assert (gdbarch != NULL);
4353 return gdbarch->deprecated_push_return_address != 0;
4354 }
4355
4356 CORE_ADDR
4357 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4358 {
4359 gdb_assert (gdbarch != NULL);
4360 if (gdbarch->deprecated_push_return_address == 0)
4361 internal_error (__FILE__, __LINE__,
4362 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4363 if (gdbarch_debug >= 2)
4364 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4365 return gdbarch->deprecated_push_return_address (pc, sp);
4366 }
4367
4368 void
4369 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4370 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
4371 {
4372 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
4373 }
4374
4375 int
4376 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4377 {
4378 gdb_assert (gdbarch != NULL);
4379 return gdbarch->deprecated_pop_frame != 0;
4380 }
4381
4382 void
4383 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4384 {
4385 gdb_assert (gdbarch != NULL);
4386 if (gdbarch->deprecated_pop_frame == 0)
4387 internal_error (__FILE__, __LINE__,
4388 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4389 if (gdbarch_debug >= 2)
4390 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4391 gdbarch->deprecated_pop_frame ();
4392 }
4393
4394 void
4395 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4396 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4397 {
4398 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4399 }
4400
4401 int
4402 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4403 {
4404 gdb_assert (gdbarch != NULL);
4405 return gdbarch->deprecated_store_struct_return != 0;
4406 }
4407
4408 void
4409 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4410 {
4411 gdb_assert (gdbarch != NULL);
4412 if (gdbarch->deprecated_store_struct_return == 0)
4413 internal_error (__FILE__, __LINE__,
4414 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4415 if (gdbarch_debug >= 2)
4416 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4417 gdbarch->deprecated_store_struct_return (addr, sp);
4418 }
4419
4420 void
4421 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4422 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4423 {
4424 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4425 }
4426
4427 void
4428 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4429 {
4430 gdb_assert (gdbarch != NULL);
4431 if (gdbarch->extract_return_value == 0)
4432 internal_error (__FILE__, __LINE__,
4433 "gdbarch: gdbarch_extract_return_value invalid");
4434 if (gdbarch_debug >= 2)
4435 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4436 gdbarch->extract_return_value (type, regcache, valbuf);
4437 }
4438
4439 void
4440 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4441 gdbarch_extract_return_value_ftype extract_return_value)
4442 {
4443 gdbarch->extract_return_value = extract_return_value;
4444 }
4445
4446 void
4447 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4448 {
4449 gdb_assert (gdbarch != NULL);
4450 if (gdbarch->store_return_value == 0)
4451 internal_error (__FILE__, __LINE__,
4452 "gdbarch: gdbarch_store_return_value invalid");
4453 if (gdbarch_debug >= 2)
4454 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4455 gdbarch->store_return_value (type, regcache, valbuf);
4456 }
4457
4458 void
4459 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4460 gdbarch_store_return_value_ftype store_return_value)
4461 {
4462 gdbarch->store_return_value = store_return_value;
4463 }
4464
4465 void
4466 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4467 {
4468 gdb_assert (gdbarch != NULL);
4469 if (gdbarch->deprecated_extract_return_value == 0)
4470 internal_error (__FILE__, __LINE__,
4471 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4472 if (gdbarch_debug >= 2)
4473 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4474 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4475 }
4476
4477 void
4478 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4479 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4480 {
4481 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4482 }
4483
4484 void
4485 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4486 {
4487 gdb_assert (gdbarch != NULL);
4488 if (gdbarch->deprecated_store_return_value == 0)
4489 internal_error (__FILE__, __LINE__,
4490 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4491 if (gdbarch_debug >= 2)
4492 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4493 gdbarch->deprecated_store_return_value (type, valbuf);
4494 }
4495
4496 void
4497 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4498 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4499 {
4500 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4501 }
4502
4503 int
4504 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4505 {
4506 gdb_assert (gdbarch != NULL);
4507 return gdbarch->extract_struct_value_address != 0;
4508 }
4509
4510 CORE_ADDR
4511 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4512 {
4513 gdb_assert (gdbarch != NULL);
4514 if (gdbarch->extract_struct_value_address == 0)
4515 internal_error (__FILE__, __LINE__,
4516 "gdbarch: gdbarch_extract_struct_value_address invalid");
4517 if (gdbarch_debug >= 2)
4518 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4519 return gdbarch->extract_struct_value_address (regcache);
4520 }
4521
4522 void
4523 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4524 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4525 {
4526 gdbarch->extract_struct_value_address = extract_struct_value_address;
4527 }
4528
4529 int
4530 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4531 {
4532 gdb_assert (gdbarch != NULL);
4533 return gdbarch->deprecated_extract_struct_value_address != 0;
4534 }
4535
4536 CORE_ADDR
4537 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4538 {
4539 gdb_assert (gdbarch != NULL);
4540 if (gdbarch->deprecated_extract_struct_value_address == 0)
4541 internal_error (__FILE__, __LINE__,
4542 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4543 if (gdbarch_debug >= 2)
4544 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4545 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4546 }
4547
4548 void
4549 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4550 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4551 {
4552 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4553 }
4554
4555 int
4556 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4557 {
4558 gdb_assert (gdbarch != NULL);
4559 if (gdbarch->use_struct_convention == 0)
4560 internal_error (__FILE__, __LINE__,
4561 "gdbarch: gdbarch_use_struct_convention invalid");
4562 if (gdbarch_debug >= 2)
4563 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4564 return gdbarch->use_struct_convention (gcc_p, value_type);
4565 }
4566
4567 void
4568 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4569 gdbarch_use_struct_convention_ftype use_struct_convention)
4570 {
4571 gdbarch->use_struct_convention = use_struct_convention;
4572 }
4573
4574 int
4575 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4576 {
4577 gdb_assert (gdbarch != NULL);
4578 return gdbarch->deprecated_frame_init_saved_regs != 0;
4579 }
4580
4581 void
4582 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4583 {
4584 gdb_assert (gdbarch != NULL);
4585 if (gdbarch->deprecated_frame_init_saved_regs == 0)
4586 internal_error (__FILE__, __LINE__,
4587 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4588 if (gdbarch_debug >= 2)
4589 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4590 gdbarch->deprecated_frame_init_saved_regs (frame);
4591 }
4592
4593 void
4594 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4595 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4596 {
4597 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4598 }
4599
4600 int
4601 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4602 {
4603 gdb_assert (gdbarch != NULL);
4604 return gdbarch->deprecated_init_extra_frame_info != 0;
4605 }
4606
4607 void
4608 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4609 {
4610 gdb_assert (gdbarch != NULL);
4611 if (gdbarch->deprecated_init_extra_frame_info == 0)
4612 internal_error (__FILE__, __LINE__,
4613 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4614 if (gdbarch_debug >= 2)
4615 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4616 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4617 }
4618
4619 void
4620 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4621 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4622 {
4623 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4624 }
4625
4626 CORE_ADDR
4627 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4628 {
4629 gdb_assert (gdbarch != NULL);
4630 if (gdbarch->skip_prologue == 0)
4631 internal_error (__FILE__, __LINE__,
4632 "gdbarch: gdbarch_skip_prologue invalid");
4633 if (gdbarch_debug >= 2)
4634 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4635 return gdbarch->skip_prologue (ip);
4636 }
4637
4638 void
4639 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4640 gdbarch_skip_prologue_ftype skip_prologue)
4641 {
4642 gdbarch->skip_prologue = skip_prologue;
4643 }
4644
4645 int
4646 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4647 {
4648 gdb_assert (gdbarch != NULL);
4649 if (gdbarch->prologue_frameless_p == 0)
4650 internal_error (__FILE__, __LINE__,
4651 "gdbarch: gdbarch_prologue_frameless_p invalid");
4652 if (gdbarch_debug >= 2)
4653 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4654 return gdbarch->prologue_frameless_p (ip);
4655 }
4656
4657 void
4658 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4659 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4660 {
4661 gdbarch->prologue_frameless_p = prologue_frameless_p;
4662 }
4663
4664 int
4665 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4666 {
4667 gdb_assert (gdbarch != NULL);
4668 if (gdbarch->inner_than == 0)
4669 internal_error (__FILE__, __LINE__,
4670 "gdbarch: gdbarch_inner_than invalid");
4671 if (gdbarch_debug >= 2)
4672 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4673 return gdbarch->inner_than (lhs, rhs);
4674 }
4675
4676 void
4677 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4678 gdbarch_inner_than_ftype inner_than)
4679 {
4680 gdbarch->inner_than = inner_than;
4681 }
4682
4683 const unsigned char *
4684 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4685 {
4686 gdb_assert (gdbarch != NULL);
4687 if (gdbarch->breakpoint_from_pc == 0)
4688 internal_error (__FILE__, __LINE__,
4689 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4690 if (gdbarch_debug >= 2)
4691 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4692 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4693 }
4694
4695 void
4696 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4697 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4698 {
4699 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4700 }
4701
4702 int
4703 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4704 {
4705 gdb_assert (gdbarch != NULL);
4706 if (gdbarch->memory_insert_breakpoint == 0)
4707 internal_error (__FILE__, __LINE__,
4708 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4709 if (gdbarch_debug >= 2)
4710 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4711 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4712 }
4713
4714 void
4715 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4716 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4717 {
4718 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4719 }
4720
4721 int
4722 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4723 {
4724 gdb_assert (gdbarch != NULL);
4725 if (gdbarch->memory_remove_breakpoint == 0)
4726 internal_error (__FILE__, __LINE__,
4727 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4728 if (gdbarch_debug >= 2)
4729 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4730 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4731 }
4732
4733 void
4734 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4735 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4736 {
4737 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4738 }
4739
4740 CORE_ADDR
4741 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4742 {
4743 gdb_assert (gdbarch != NULL);
4744 if (gdbarch->decr_pc_after_break == -1)
4745 internal_error (__FILE__, __LINE__,
4746 "gdbarch: gdbarch_decr_pc_after_break invalid");
4747 if (gdbarch_debug >= 2)
4748 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4749 return gdbarch->decr_pc_after_break;
4750 }
4751
4752 void
4753 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4754 CORE_ADDR decr_pc_after_break)
4755 {
4756 gdbarch->decr_pc_after_break = decr_pc_after_break;
4757 }
4758
4759 int
4760 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4761 {
4762 gdb_assert (gdbarch != NULL);
4763 if (gdbarch->prepare_to_proceed == 0)
4764 internal_error (__FILE__, __LINE__,
4765 "gdbarch: gdbarch_prepare_to_proceed invalid");
4766 if (gdbarch_debug >= 2)
4767 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4768 return gdbarch->prepare_to_proceed (select_it);
4769 }
4770
4771 void
4772 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4773 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4774 {
4775 gdbarch->prepare_to_proceed = prepare_to_proceed;
4776 }
4777
4778 CORE_ADDR
4779 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4780 {
4781 gdb_assert (gdbarch != NULL);
4782 if (gdbarch->function_start_offset == -1)
4783 internal_error (__FILE__, __LINE__,
4784 "gdbarch: gdbarch_function_start_offset invalid");
4785 if (gdbarch_debug >= 2)
4786 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4787 return gdbarch->function_start_offset;
4788 }
4789
4790 void
4791 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4792 CORE_ADDR function_start_offset)
4793 {
4794 gdbarch->function_start_offset = function_start_offset;
4795 }
4796
4797 void
4798 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)
4799 {
4800 gdb_assert (gdbarch != NULL);
4801 if (gdbarch->remote_translate_xfer_address == 0)
4802 internal_error (__FILE__, __LINE__,
4803 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4804 if (gdbarch_debug >= 2)
4805 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4806 gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
4807 }
4808
4809 void
4810 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4811 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4812 {
4813 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4814 }
4815
4816 CORE_ADDR
4817 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4818 {
4819 gdb_assert (gdbarch != NULL);
4820 if (gdbarch->frame_args_skip == -1)
4821 internal_error (__FILE__, __LINE__,
4822 "gdbarch: gdbarch_frame_args_skip invalid");
4823 if (gdbarch_debug >= 2)
4824 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4825 return gdbarch->frame_args_skip;
4826 }
4827
4828 void
4829 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4830 CORE_ADDR frame_args_skip)
4831 {
4832 gdbarch->frame_args_skip = frame_args_skip;
4833 }
4834
4835 int
4836 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4837 {
4838 gdb_assert (gdbarch != NULL);
4839 if (gdbarch->frameless_function_invocation == 0)
4840 internal_error (__FILE__, __LINE__,
4841 "gdbarch: gdbarch_frameless_function_invocation invalid");
4842 if (gdbarch_debug >= 2)
4843 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4844 return gdbarch->frameless_function_invocation (fi);
4845 }
4846
4847 void
4848 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4849 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4850 {
4851 gdbarch->frameless_function_invocation = frameless_function_invocation;
4852 }
4853
4854 int
4855 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4856 {
4857 gdb_assert (gdbarch != NULL);
4858 return gdbarch->deprecated_frame_chain != 0;
4859 }
4860
4861 CORE_ADDR
4862 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4863 {
4864 gdb_assert (gdbarch != NULL);
4865 if (gdbarch->deprecated_frame_chain == 0)
4866 internal_error (__FILE__, __LINE__,
4867 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4868 if (gdbarch_debug >= 2)
4869 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4870 return gdbarch->deprecated_frame_chain (frame);
4871 }
4872
4873 void
4874 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4875 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4876 {
4877 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4878 }
4879
4880 int
4881 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4882 {
4883 gdb_assert (gdbarch != NULL);
4884 return gdbarch->deprecated_frame_chain_valid != 0;
4885 }
4886
4887 int
4888 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4889 {
4890 gdb_assert (gdbarch != NULL);
4891 if (gdbarch->deprecated_frame_chain_valid == 0)
4892 internal_error (__FILE__, __LINE__,
4893 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4894 if (gdbarch_debug >= 2)
4895 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4896 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4897 }
4898
4899 void
4900 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4901 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4902 {
4903 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4904 }
4905
4906 int
4907 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4908 {
4909 gdb_assert (gdbarch != NULL);
4910 return gdbarch->deprecated_frame_saved_pc != 0;
4911 }
4912
4913 CORE_ADDR
4914 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4915 {
4916 gdb_assert (gdbarch != NULL);
4917 if (gdbarch->deprecated_frame_saved_pc == 0)
4918 internal_error (__FILE__, __LINE__,
4919 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4920 if (gdbarch_debug >= 2)
4921 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4922 return gdbarch->deprecated_frame_saved_pc (fi);
4923 }
4924
4925 void
4926 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4927 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4928 {
4929 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4930 }
4931
4932 int
4933 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4934 {
4935 gdb_assert (gdbarch != NULL);
4936 return gdbarch->unwind_pc != 0;
4937 }
4938
4939 CORE_ADDR
4940 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4941 {
4942 gdb_assert (gdbarch != NULL);
4943 if (gdbarch->unwind_pc == 0)
4944 internal_error (__FILE__, __LINE__,
4945 "gdbarch: gdbarch_unwind_pc invalid");
4946 if (gdbarch_debug >= 2)
4947 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4948 return gdbarch->unwind_pc (gdbarch, next_frame);
4949 }
4950
4951 void
4952 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4953 gdbarch_unwind_pc_ftype unwind_pc)
4954 {
4955 gdbarch->unwind_pc = unwind_pc;
4956 }
4957
4958 CORE_ADDR
4959 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4960 {
4961 gdb_assert (gdbarch != NULL);
4962 if (gdbarch->frame_args_address == 0)
4963 internal_error (__FILE__, __LINE__,
4964 "gdbarch: gdbarch_frame_args_address invalid");
4965 if (gdbarch_debug >= 2)
4966 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4967 return gdbarch->frame_args_address (fi);
4968 }
4969
4970 void
4971 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4972 gdbarch_frame_args_address_ftype frame_args_address)
4973 {
4974 gdbarch->frame_args_address = frame_args_address;
4975 }
4976
4977 CORE_ADDR
4978 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4979 {
4980 gdb_assert (gdbarch != NULL);
4981 if (gdbarch->frame_locals_address == 0)
4982 internal_error (__FILE__, __LINE__,
4983 "gdbarch: gdbarch_frame_locals_address invalid");
4984 if (gdbarch_debug >= 2)
4985 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4986 return gdbarch->frame_locals_address (fi);
4987 }
4988
4989 void
4990 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4991 gdbarch_frame_locals_address_ftype frame_locals_address)
4992 {
4993 gdbarch->frame_locals_address = frame_locals_address;
4994 }
4995
4996 int
4997 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4998 {
4999 gdb_assert (gdbarch != NULL);
5000 return gdbarch->deprecated_saved_pc_after_call != 0;
5001 }
5002
5003 CORE_ADDR
5004 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
5005 {
5006 gdb_assert (gdbarch != NULL);
5007 if (gdbarch->deprecated_saved_pc_after_call == 0)
5008 internal_error (__FILE__, __LINE__,
5009 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
5010 if (gdbarch_debug >= 2)
5011 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
5012 return gdbarch->deprecated_saved_pc_after_call (frame);
5013 }
5014
5015 void
5016 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
5017 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
5018 {
5019 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
5020 }
5021
5022 int
5023 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
5024 {
5025 gdb_assert (gdbarch != NULL);
5026 if (gdbarch->frame_num_args == 0)
5027 internal_error (__FILE__, __LINE__,
5028 "gdbarch: gdbarch_frame_num_args invalid");
5029 if (gdbarch_debug >= 2)
5030 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
5031 return gdbarch->frame_num_args (frame);
5032 }
5033
5034 void
5035 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
5036 gdbarch_frame_num_args_ftype frame_num_args)
5037 {
5038 gdbarch->frame_num_args = frame_num_args;
5039 }
5040
5041 int
5042 gdbarch_stack_align_p (struct gdbarch *gdbarch)
5043 {
5044 gdb_assert (gdbarch != NULL);
5045 return gdbarch->stack_align != 0;
5046 }
5047
5048 CORE_ADDR
5049 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
5050 {
5051 gdb_assert (gdbarch != NULL);
5052 if (gdbarch->stack_align == 0)
5053 internal_error (__FILE__, __LINE__,
5054 "gdbarch: gdbarch_stack_align invalid");
5055 if (gdbarch_debug >= 2)
5056 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
5057 return gdbarch->stack_align (sp);
5058 }
5059
5060 void
5061 set_gdbarch_stack_align (struct gdbarch *gdbarch,
5062 gdbarch_stack_align_ftype stack_align)
5063 {
5064 gdbarch->stack_align = stack_align;
5065 }
5066
5067 int
5068 gdbarch_frame_align_p (struct gdbarch *gdbarch)
5069 {
5070 gdb_assert (gdbarch != NULL);
5071 return gdbarch->frame_align != 0;
5072 }
5073
5074 CORE_ADDR
5075 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
5076 {
5077 gdb_assert (gdbarch != NULL);
5078 if (gdbarch->frame_align == 0)
5079 internal_error (__FILE__, __LINE__,
5080 "gdbarch: gdbarch_frame_align invalid");
5081 if (gdbarch_debug >= 2)
5082 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5083 return gdbarch->frame_align (gdbarch, address);
5084 }
5085
5086 void
5087 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5088 gdbarch_frame_align_ftype frame_align)
5089 {
5090 gdbarch->frame_align = frame_align;
5091 }
5092
5093 int
5094 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
5095 {
5096 gdb_assert (gdbarch != NULL);
5097 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5098 if (gdbarch_debug >= 2)
5099 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5100 return gdbarch->deprecated_extra_stack_alignment_needed;
5101 }
5102
5103 void
5104 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
5105 int deprecated_extra_stack_alignment_needed)
5106 {
5107 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
5108 }
5109
5110 int
5111 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5112 {
5113 gdb_assert (gdbarch != NULL);
5114 return gdbarch->reg_struct_has_addr != 0;
5115 }
5116
5117 int
5118 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5119 {
5120 gdb_assert (gdbarch != NULL);
5121 if (gdbarch->reg_struct_has_addr == 0)
5122 internal_error (__FILE__, __LINE__,
5123 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5124 if (gdbarch_debug >= 2)
5125 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5126 return gdbarch->reg_struct_has_addr (gcc_p, type);
5127 }
5128
5129 void
5130 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5131 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5132 {
5133 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5134 }
5135
5136 int
5137 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
5138 {
5139 gdb_assert (gdbarch != NULL);
5140 return gdbarch->save_dummy_frame_tos != 0;
5141 }
5142
5143 void
5144 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
5145 {
5146 gdb_assert (gdbarch != NULL);
5147 if (gdbarch->save_dummy_frame_tos == 0)
5148 internal_error (__FILE__, __LINE__,
5149 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5150 if (gdbarch_debug >= 2)
5151 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5152 gdbarch->save_dummy_frame_tos (sp);
5153 }
5154
5155 void
5156 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5157 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5158 {
5159 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5160 }
5161
5162 int
5163 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
5164 {
5165 gdb_assert (gdbarch != NULL);
5166 return gdbarch->unwind_dummy_id != 0;
5167 }
5168
5169 struct frame_id
5170 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
5171 {
5172 gdb_assert (gdbarch != NULL);
5173 if (gdbarch->unwind_dummy_id == 0)
5174 internal_error (__FILE__, __LINE__,
5175 "gdbarch: gdbarch_unwind_dummy_id invalid");
5176 if (gdbarch_debug >= 2)
5177 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
5178 return gdbarch->unwind_dummy_id (gdbarch, info);
5179 }
5180
5181 void
5182 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
5183 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
5184 {
5185 gdbarch->unwind_dummy_id = unwind_dummy_id;
5186 }
5187
5188 int
5189 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5190 {
5191 gdb_assert (gdbarch != NULL);
5192 if (gdbarch_debug >= 2)
5193 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5194 return gdbarch->parm_boundary;
5195 }
5196
5197 void
5198 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5199 int parm_boundary)
5200 {
5201 gdbarch->parm_boundary = parm_boundary;
5202 }
5203
5204 const struct floatformat *
5205 gdbarch_float_format (struct gdbarch *gdbarch)
5206 {
5207 gdb_assert (gdbarch != NULL);
5208 if (gdbarch_debug >= 2)
5209 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5210 return gdbarch->float_format;
5211 }
5212
5213 void
5214 set_gdbarch_float_format (struct gdbarch *gdbarch,
5215 const struct floatformat * float_format)
5216 {
5217 gdbarch->float_format = float_format;
5218 }
5219
5220 const struct floatformat *
5221 gdbarch_double_format (struct gdbarch *gdbarch)
5222 {
5223 gdb_assert (gdbarch != NULL);
5224 if (gdbarch_debug >= 2)
5225 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5226 return gdbarch->double_format;
5227 }
5228
5229 void
5230 set_gdbarch_double_format (struct gdbarch *gdbarch,
5231 const struct floatformat * double_format)
5232 {
5233 gdbarch->double_format = double_format;
5234 }
5235
5236 const struct floatformat *
5237 gdbarch_long_double_format (struct gdbarch *gdbarch)
5238 {
5239 gdb_assert (gdbarch != NULL);
5240 if (gdbarch_debug >= 2)
5241 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5242 return gdbarch->long_double_format;
5243 }
5244
5245 void
5246 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5247 const struct floatformat * long_double_format)
5248 {
5249 gdbarch->long_double_format = long_double_format;
5250 }
5251
5252 CORE_ADDR
5253 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5254 {
5255 gdb_assert (gdbarch != NULL);
5256 if (gdbarch->convert_from_func_ptr_addr == 0)
5257 internal_error (__FILE__, __LINE__,
5258 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5259 if (gdbarch_debug >= 2)
5260 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5261 return gdbarch->convert_from_func_ptr_addr (addr);
5262 }
5263
5264 void
5265 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5266 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5267 {
5268 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5269 }
5270
5271 CORE_ADDR
5272 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5273 {
5274 gdb_assert (gdbarch != NULL);
5275 if (gdbarch->addr_bits_remove == 0)
5276 internal_error (__FILE__, __LINE__,
5277 "gdbarch: gdbarch_addr_bits_remove invalid");
5278 if (gdbarch_debug >= 2)
5279 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5280 return gdbarch->addr_bits_remove (addr);
5281 }
5282
5283 void
5284 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5285 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5286 {
5287 gdbarch->addr_bits_remove = addr_bits_remove;
5288 }
5289
5290 CORE_ADDR
5291 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5292 {
5293 gdb_assert (gdbarch != NULL);
5294 if (gdbarch->smash_text_address == 0)
5295 internal_error (__FILE__, __LINE__,
5296 "gdbarch: gdbarch_smash_text_address invalid");
5297 if (gdbarch_debug >= 2)
5298 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5299 return gdbarch->smash_text_address (addr);
5300 }
5301
5302 void
5303 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5304 gdbarch_smash_text_address_ftype smash_text_address)
5305 {
5306 gdbarch->smash_text_address = smash_text_address;
5307 }
5308
5309 int
5310 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5311 {
5312 gdb_assert (gdbarch != NULL);
5313 return gdbarch->software_single_step != 0;
5314 }
5315
5316 void
5317 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5318 {
5319 gdb_assert (gdbarch != NULL);
5320 if (gdbarch->software_single_step == 0)
5321 internal_error (__FILE__, __LINE__,
5322 "gdbarch: gdbarch_software_single_step invalid");
5323 if (gdbarch_debug >= 2)
5324 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5325 gdbarch->software_single_step (sig, insert_breakpoints_p);
5326 }
5327
5328 void
5329 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5330 gdbarch_software_single_step_ftype software_single_step)
5331 {
5332 gdbarch->software_single_step = software_single_step;
5333 }
5334
5335 int
5336 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5337 {
5338 gdb_assert (gdbarch != NULL);
5339 if (gdbarch->print_insn == 0)
5340 internal_error (__FILE__, __LINE__,
5341 "gdbarch: gdbarch_print_insn invalid");
5342 if (gdbarch_debug >= 2)
5343 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5344 return gdbarch->print_insn (vma, info);
5345 }
5346
5347 void
5348 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5349 gdbarch_print_insn_ftype print_insn)
5350 {
5351 gdbarch->print_insn = print_insn;
5352 }
5353
5354 CORE_ADDR
5355 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5356 {
5357 gdb_assert (gdbarch != NULL);
5358 if (gdbarch->skip_trampoline_code == 0)
5359 internal_error (__FILE__, __LINE__,
5360 "gdbarch: gdbarch_skip_trampoline_code invalid");
5361 if (gdbarch_debug >= 2)
5362 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5363 return gdbarch->skip_trampoline_code (pc);
5364 }
5365
5366 void
5367 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5368 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5369 {
5370 gdbarch->skip_trampoline_code = skip_trampoline_code;
5371 }
5372
5373 int
5374 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5375 {
5376 gdb_assert (gdbarch != NULL);
5377 if (gdbarch->in_solib_call_trampoline == 0)
5378 internal_error (__FILE__, __LINE__,
5379 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5380 if (gdbarch_debug >= 2)
5381 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5382 return gdbarch->in_solib_call_trampoline (pc, name);
5383 }
5384
5385 void
5386 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5387 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5388 {
5389 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5390 }
5391
5392 int
5393 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5394 {
5395 gdb_assert (gdbarch != NULL);
5396 if (gdbarch->in_solib_return_trampoline == 0)
5397 internal_error (__FILE__, __LINE__,
5398 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5399 if (gdbarch_debug >= 2)
5400 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5401 return gdbarch->in_solib_return_trampoline (pc, name);
5402 }
5403
5404 void
5405 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5406 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5407 {
5408 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5409 }
5410
5411 int
5412 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5413 {
5414 gdb_assert (gdbarch != NULL);
5415 if (gdbarch->pc_in_sigtramp == 0)
5416 internal_error (__FILE__, __LINE__,
5417 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5418 if (gdbarch_debug >= 2)
5419 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5420 return gdbarch->pc_in_sigtramp (pc, name);
5421 }
5422
5423 void
5424 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5425 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5426 {
5427 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5428 }
5429
5430 int
5431 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5432 {
5433 gdb_assert (gdbarch != NULL);
5434 return gdbarch->sigtramp_start != 0;
5435 }
5436
5437 CORE_ADDR
5438 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5439 {
5440 gdb_assert (gdbarch != NULL);
5441 if (gdbarch->sigtramp_start == 0)
5442 internal_error (__FILE__, __LINE__,
5443 "gdbarch: gdbarch_sigtramp_start invalid");
5444 if (gdbarch_debug >= 2)
5445 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5446 return gdbarch->sigtramp_start (pc);
5447 }
5448
5449 void
5450 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5451 gdbarch_sigtramp_start_ftype sigtramp_start)
5452 {
5453 gdbarch->sigtramp_start = sigtramp_start;
5454 }
5455
5456 int
5457 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5458 {
5459 gdb_assert (gdbarch != NULL);
5460 return gdbarch->sigtramp_end != 0;
5461 }
5462
5463 CORE_ADDR
5464 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5465 {
5466 gdb_assert (gdbarch != NULL);
5467 if (gdbarch->sigtramp_end == 0)
5468 internal_error (__FILE__, __LINE__,
5469 "gdbarch: gdbarch_sigtramp_end invalid");
5470 if (gdbarch_debug >= 2)
5471 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5472 return gdbarch->sigtramp_end (pc);
5473 }
5474
5475 void
5476 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5477 gdbarch_sigtramp_end_ftype sigtramp_end)
5478 {
5479 gdbarch->sigtramp_end = sigtramp_end;
5480 }
5481
5482 int
5483 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5484 {
5485 gdb_assert (gdbarch != NULL);
5486 if (gdbarch->in_function_epilogue_p == 0)
5487 internal_error (__FILE__, __LINE__,
5488 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5489 if (gdbarch_debug >= 2)
5490 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5491 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5492 }
5493
5494 void
5495 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5496 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5497 {
5498 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5499 }
5500
5501 char *
5502 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5503 {
5504 gdb_assert (gdbarch != NULL);
5505 if (gdbarch->construct_inferior_arguments == 0)
5506 internal_error (__FILE__, __LINE__,
5507 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5508 if (gdbarch_debug >= 2)
5509 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5510 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5511 }
5512
5513 void
5514 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5515 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5516 {
5517 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5518 }
5519
5520 int
5521 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5522 {
5523 gdb_assert (gdbarch != NULL);
5524 return gdbarch->dwarf2_build_frame_info != 0;
5525 }
5526
5527 void
5528 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5529 {
5530 gdb_assert (gdbarch != NULL);
5531 if (gdbarch->dwarf2_build_frame_info == 0)
5532 internal_error (__FILE__, __LINE__,
5533 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5534 if (gdbarch_debug >= 2)
5535 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5536 gdbarch->dwarf2_build_frame_info (objfile);
5537 }
5538
5539 void
5540 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5541 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5542 {
5543 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5544 }
5545
5546 void
5547 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5548 {
5549 gdb_assert (gdbarch != NULL);
5550 if (gdbarch->elf_make_msymbol_special == 0)
5551 internal_error (__FILE__, __LINE__,
5552 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5553 if (gdbarch_debug >= 2)
5554 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5555 gdbarch->elf_make_msymbol_special (sym, msym);
5556 }
5557
5558 void
5559 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5560 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5561 {
5562 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5563 }
5564
5565 void
5566 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5567 {
5568 gdb_assert (gdbarch != NULL);
5569 if (gdbarch->coff_make_msymbol_special == 0)
5570 internal_error (__FILE__, __LINE__,
5571 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5572 if (gdbarch_debug >= 2)
5573 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5574 gdbarch->coff_make_msymbol_special (val, msym);
5575 }
5576
5577 void
5578 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5579 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5580 {
5581 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5582 }
5583
5584 const char *
5585 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5586 {
5587 gdb_assert (gdbarch != NULL);
5588 /* Skip verify of name_of_malloc, invalid_p == 0 */
5589 if (gdbarch_debug >= 2)
5590 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5591 return gdbarch->name_of_malloc;
5592 }
5593
5594 void
5595 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5596 const char * name_of_malloc)
5597 {
5598 gdbarch->name_of_malloc = name_of_malloc;
5599 }
5600
5601 int
5602 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5603 {
5604 gdb_assert (gdbarch != NULL);
5605 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5606 if (gdbarch_debug >= 2)
5607 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5608 return gdbarch->cannot_step_breakpoint;
5609 }
5610
5611 void
5612 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5613 int cannot_step_breakpoint)
5614 {
5615 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5616 }
5617
5618 int
5619 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5620 {
5621 gdb_assert (gdbarch != NULL);
5622 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5623 if (gdbarch_debug >= 2)
5624 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5625 return gdbarch->have_nonsteppable_watchpoint;
5626 }
5627
5628 void
5629 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5630 int have_nonsteppable_watchpoint)
5631 {
5632 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5633 }
5634
5635 int
5636 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5637 {
5638 gdb_assert (gdbarch != NULL);
5639 return gdbarch->address_class_type_flags != 0;
5640 }
5641
5642 int
5643 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5644 {
5645 gdb_assert (gdbarch != NULL);
5646 if (gdbarch->address_class_type_flags == 0)
5647 internal_error (__FILE__, __LINE__,
5648 "gdbarch: gdbarch_address_class_type_flags invalid");
5649 if (gdbarch_debug >= 2)
5650 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5651 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5652 }
5653
5654 void
5655 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5656 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5657 {
5658 gdbarch->address_class_type_flags = address_class_type_flags;
5659 }
5660
5661 int
5662 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5663 {
5664 gdb_assert (gdbarch != NULL);
5665 return gdbarch->address_class_type_flags_to_name != 0;
5666 }
5667
5668 const char *
5669 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5670 {
5671 gdb_assert (gdbarch != NULL);
5672 if (gdbarch->address_class_type_flags_to_name == 0)
5673 internal_error (__FILE__, __LINE__,
5674 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5675 if (gdbarch_debug >= 2)
5676 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5677 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5678 }
5679
5680 void
5681 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5682 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5683 {
5684 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5685 }
5686
5687 int
5688 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5689 {
5690 gdb_assert (gdbarch != NULL);
5691 return gdbarch->address_class_name_to_type_flags != 0;
5692 }
5693
5694 int
5695 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5696 {
5697 gdb_assert (gdbarch != NULL);
5698 if (gdbarch->address_class_name_to_type_flags == 0)
5699 internal_error (__FILE__, __LINE__,
5700 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5701 if (gdbarch_debug >= 2)
5702 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5703 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5704 }
5705
5706 void
5707 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5708 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5709 {
5710 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5711 }
5712
5713 int
5714 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5715 {
5716 gdb_assert (gdbarch != NULL);
5717 if (gdbarch->register_reggroup_p == 0)
5718 internal_error (__FILE__, __LINE__,
5719 "gdbarch: gdbarch_register_reggroup_p invalid");
5720 if (gdbarch_debug >= 2)
5721 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5722 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5723 }
5724
5725 void
5726 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5727 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5728 {
5729 gdbarch->register_reggroup_p = register_reggroup_p;
5730 }
5731
5732 int
5733 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
5734 {
5735 gdb_assert (gdbarch != NULL);
5736 return gdbarch->fetch_pointer_argument != 0;
5737 }
5738
5739 CORE_ADDR
5740 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
5741 {
5742 gdb_assert (gdbarch != NULL);
5743 if (gdbarch->fetch_pointer_argument == 0)
5744 internal_error (__FILE__, __LINE__,
5745 "gdbarch: gdbarch_fetch_pointer_argument invalid");
5746 if (gdbarch_debug >= 2)
5747 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
5748 return gdbarch->fetch_pointer_argument (frame, argi, type);
5749 }
5750
5751 void
5752 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
5753 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
5754 {
5755 gdbarch->fetch_pointer_argument = fetch_pointer_argument;
5756 }
5757
5758
5759 /* Keep a registry of per-architecture data-pointers required by GDB
5760 modules. */
5761
5762 struct gdbarch_data
5763 {
5764 unsigned index;
5765 int init_p;
5766 gdbarch_data_init_ftype *init;
5767 gdbarch_data_free_ftype *free;
5768 };
5769
5770 struct gdbarch_data_registration
5771 {
5772 struct gdbarch_data *data;
5773 struct gdbarch_data_registration *next;
5774 };
5775
5776 struct gdbarch_data_registry
5777 {
5778 unsigned nr;
5779 struct gdbarch_data_registration *registrations;
5780 };
5781
5782 struct gdbarch_data_registry gdbarch_data_registry =
5783 {
5784 0, NULL,
5785 };
5786
5787 struct gdbarch_data *
5788 register_gdbarch_data (gdbarch_data_init_ftype *init,
5789 gdbarch_data_free_ftype *free)
5790 {
5791 struct gdbarch_data_registration **curr;
5792 /* Append the new registraration. */
5793 for (curr = &gdbarch_data_registry.registrations;
5794 (*curr) != NULL;
5795 curr = &(*curr)->next);
5796 (*curr) = XMALLOC (struct gdbarch_data_registration);
5797 (*curr)->next = NULL;
5798 (*curr)->data = XMALLOC (struct gdbarch_data);
5799 (*curr)->data->index = gdbarch_data_registry.nr++;
5800 (*curr)->data->init = init;
5801 (*curr)->data->init_p = 1;
5802 (*curr)->data->free = free;
5803 return (*curr)->data;
5804 }
5805
5806
5807 /* Create/delete the gdbarch data vector. */
5808
5809 static void
5810 alloc_gdbarch_data (struct gdbarch *gdbarch)
5811 {
5812 gdb_assert (gdbarch->data == NULL);
5813 gdbarch->nr_data = gdbarch_data_registry.nr;
5814 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5815 }
5816
5817 static void
5818 free_gdbarch_data (struct gdbarch *gdbarch)
5819 {
5820 struct gdbarch_data_registration *rego;
5821 gdb_assert (gdbarch->data != NULL);
5822 for (rego = gdbarch_data_registry.registrations;
5823 rego != NULL;
5824 rego = rego->next)
5825 {
5826 struct gdbarch_data *data = rego->data;
5827 gdb_assert (data->index < gdbarch->nr_data);
5828 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5829 {
5830 data->free (gdbarch, gdbarch->data[data->index]);
5831 gdbarch->data[data->index] = NULL;
5832 }
5833 }
5834 xfree (gdbarch->data);
5835 gdbarch->data = NULL;
5836 }
5837
5838
5839 /* Initialize the current value of the specified per-architecture
5840 data-pointer. */
5841
5842 void
5843 set_gdbarch_data (struct gdbarch *gdbarch,
5844 struct gdbarch_data *data,
5845 void *pointer)
5846 {
5847 gdb_assert (data->index < gdbarch->nr_data);
5848 if (gdbarch->data[data->index] != NULL)
5849 {
5850 gdb_assert (data->free != NULL);
5851 data->free (gdbarch, gdbarch->data[data->index]);
5852 }
5853 gdbarch->data[data->index] = pointer;
5854 }
5855
5856 /* Return the current value of the specified per-architecture
5857 data-pointer. */
5858
5859 void *
5860 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5861 {
5862 gdb_assert (data->index < gdbarch->nr_data);
5863 /* The data-pointer isn't initialized, call init() to get a value but
5864 only if the architecture initializaiton has completed. Otherwise
5865 punt - hope that the caller knows what they are doing. */
5866 if (gdbarch->data[data->index] == NULL
5867 && gdbarch->initialized_p)
5868 {
5869 /* Be careful to detect an initialization cycle. */
5870 gdb_assert (data->init_p);
5871 data->init_p = 0;
5872 gdb_assert (data->init != NULL);
5873 gdbarch->data[data->index] = data->init (gdbarch);
5874 data->init_p = 1;
5875 gdb_assert (gdbarch->data[data->index] != NULL);
5876 }
5877 return gdbarch->data[data->index];
5878 }
5879
5880
5881
5882 /* Keep a registry of swapped data required by GDB modules. */
5883
5884 struct gdbarch_swap
5885 {
5886 void *swap;
5887 struct gdbarch_swap_registration *source;
5888 struct gdbarch_swap *next;
5889 };
5890
5891 struct gdbarch_swap_registration
5892 {
5893 void *data;
5894 unsigned long sizeof_data;
5895 gdbarch_swap_ftype *init;
5896 struct gdbarch_swap_registration *next;
5897 };
5898
5899 struct gdbarch_swap_registry
5900 {
5901 int nr;
5902 struct gdbarch_swap_registration *registrations;
5903 };
5904
5905 struct gdbarch_swap_registry gdbarch_swap_registry =
5906 {
5907 0, NULL,
5908 };
5909
5910 void
5911 register_gdbarch_swap (void *data,
5912 unsigned long sizeof_data,
5913 gdbarch_swap_ftype *init)
5914 {
5915 struct gdbarch_swap_registration **rego;
5916 for (rego = &gdbarch_swap_registry.registrations;
5917 (*rego) != NULL;
5918 rego = &(*rego)->next);
5919 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5920 (*rego)->next = NULL;
5921 (*rego)->init = init;
5922 (*rego)->data = data;
5923 (*rego)->sizeof_data = sizeof_data;
5924 }
5925
5926 static void
5927 clear_gdbarch_swap (struct gdbarch *gdbarch)
5928 {
5929 struct gdbarch_swap *curr;
5930 for (curr = gdbarch->swap;
5931 curr != NULL;
5932 curr = curr->next)
5933 {
5934 memset (curr->source->data, 0, curr->source->sizeof_data);
5935 }
5936 }
5937
5938 static void
5939 init_gdbarch_swap (struct gdbarch *gdbarch)
5940 {
5941 struct gdbarch_swap_registration *rego;
5942 struct gdbarch_swap **curr = &gdbarch->swap;
5943 for (rego = gdbarch_swap_registry.registrations;
5944 rego != NULL;
5945 rego = rego->next)
5946 {
5947 if (rego->data != NULL)
5948 {
5949 (*curr) = XMALLOC (struct gdbarch_swap);
5950 (*curr)->source = rego;
5951 (*curr)->swap = xmalloc (rego->sizeof_data);
5952 (*curr)->next = NULL;
5953 curr = &(*curr)->next;
5954 }
5955 if (rego->init != NULL)
5956 rego->init ();
5957 }
5958 }
5959
5960 static void
5961 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5962 {
5963 struct gdbarch_swap *curr;
5964 for (curr = gdbarch->swap;
5965 curr != NULL;
5966 curr = curr->next)
5967 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5968 }
5969
5970 static void
5971 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5972 {
5973 struct gdbarch_swap *curr;
5974 for (curr = gdbarch->swap;
5975 curr != NULL;
5976 curr = curr->next)
5977 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5978 }
5979
5980
5981 /* Keep a registry of the architectures known by GDB. */
5982
5983 struct gdbarch_registration
5984 {
5985 enum bfd_architecture bfd_architecture;
5986 gdbarch_init_ftype *init;
5987 gdbarch_dump_tdep_ftype *dump_tdep;
5988 struct gdbarch_list *arches;
5989 struct gdbarch_registration *next;
5990 };
5991
5992 static struct gdbarch_registration *gdbarch_registry = NULL;
5993
5994 static void
5995 append_name (const char ***buf, int *nr, const char *name)
5996 {
5997 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5998 (*buf)[*nr] = name;
5999 *nr += 1;
6000 }
6001
6002 const char **
6003 gdbarch_printable_names (void)
6004 {
6005 if (GDB_MULTI_ARCH)
6006 {
6007 /* Accumulate a list of names based on the registed list of
6008 architectures. */
6009 enum bfd_architecture a;
6010 int nr_arches = 0;
6011 const char **arches = NULL;
6012 struct gdbarch_registration *rego;
6013 for (rego = gdbarch_registry;
6014 rego != NULL;
6015 rego = rego->next)
6016 {
6017 const struct bfd_arch_info *ap;
6018 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
6019 if (ap == NULL)
6020 internal_error (__FILE__, __LINE__,
6021 "gdbarch_architecture_names: multi-arch unknown");
6022 do
6023 {
6024 append_name (&arches, &nr_arches, ap->printable_name);
6025 ap = ap->next;
6026 }
6027 while (ap != NULL);
6028 }
6029 append_name (&arches, &nr_arches, NULL);
6030 return arches;
6031 }
6032 else
6033 /* Just return all the architectures that BFD knows. Assume that
6034 the legacy architecture framework supports them. */
6035 return bfd_arch_list ();
6036 }
6037
6038
6039 void
6040 gdbarch_register (enum bfd_architecture bfd_architecture,
6041 gdbarch_init_ftype *init,
6042 gdbarch_dump_tdep_ftype *dump_tdep)
6043 {
6044 struct gdbarch_registration **curr;
6045 const struct bfd_arch_info *bfd_arch_info;
6046 /* Check that BFD recognizes this architecture */
6047 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
6048 if (bfd_arch_info == NULL)
6049 {
6050 internal_error (__FILE__, __LINE__,
6051 "gdbarch: Attempt to register unknown architecture (%d)",
6052 bfd_architecture);
6053 }
6054 /* Check that we haven't seen this architecture before */
6055 for (curr = &gdbarch_registry;
6056 (*curr) != NULL;
6057 curr = &(*curr)->next)
6058 {
6059 if (bfd_architecture == (*curr)->bfd_architecture)
6060 internal_error (__FILE__, __LINE__,
6061 "gdbarch: Duplicate registraration of architecture (%s)",
6062 bfd_arch_info->printable_name);
6063 }
6064 /* log it */
6065 if (gdbarch_debug)
6066 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
6067 bfd_arch_info->printable_name,
6068 (long) init);
6069 /* Append it */
6070 (*curr) = XMALLOC (struct gdbarch_registration);
6071 (*curr)->bfd_architecture = bfd_architecture;
6072 (*curr)->init = init;
6073 (*curr)->dump_tdep = dump_tdep;
6074 (*curr)->arches = NULL;
6075 (*curr)->next = NULL;
6076 /* When non- multi-arch, install whatever target dump routine we've
6077 been provided - hopefully that routine has been written correctly
6078 and works regardless of multi-arch. */
6079 if (!GDB_MULTI_ARCH && dump_tdep != NULL
6080 && startup_gdbarch.dump_tdep == NULL)
6081 startup_gdbarch.dump_tdep = dump_tdep;
6082 }
6083
6084 void
6085 register_gdbarch_init (enum bfd_architecture bfd_architecture,
6086 gdbarch_init_ftype *init)
6087 {
6088 gdbarch_register (bfd_architecture, init, NULL);
6089 }
6090
6091
6092 /* Look for an architecture using gdbarch_info. Base search on only
6093 BFD_ARCH_INFO and BYTE_ORDER. */
6094
6095 struct gdbarch_list *
6096 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
6097 const struct gdbarch_info *info)
6098 {
6099 for (; arches != NULL; arches = arches->next)
6100 {
6101 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
6102 continue;
6103 if (info->byte_order != arches->gdbarch->byte_order)
6104 continue;
6105 if (info->osabi != arches->gdbarch->osabi)
6106 continue;
6107 return arches;
6108 }
6109 return NULL;
6110 }
6111
6112
6113 /* Update the current architecture. Return ZERO if the update request
6114 failed. */
6115
6116 int
6117 gdbarch_update_p (struct gdbarch_info info)
6118 {
6119 struct gdbarch *new_gdbarch;
6120 struct gdbarch *old_gdbarch;
6121 struct gdbarch_registration *rego;
6122
6123 /* Fill in missing parts of the INFO struct using a number of
6124 sources: ``set ...''; INFOabfd supplied; existing target. */
6125
6126 /* ``(gdb) set architecture ...'' */
6127 if (info.bfd_arch_info == NULL
6128 && !TARGET_ARCHITECTURE_AUTO)
6129 info.bfd_arch_info = TARGET_ARCHITECTURE;
6130 if (info.bfd_arch_info == NULL
6131 && info.abfd != NULL
6132 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6133 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6134 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
6135 if (info.bfd_arch_info == NULL)
6136 info.bfd_arch_info = TARGET_ARCHITECTURE;
6137
6138 /* ``(gdb) set byte-order ...'' */
6139 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6140 && !TARGET_BYTE_ORDER_AUTO)
6141 info.byte_order = TARGET_BYTE_ORDER;
6142 /* From the INFO struct. */
6143 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6144 && info.abfd != NULL)
6145 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
6146 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
6147 : BFD_ENDIAN_UNKNOWN);
6148 /* From the current target. */
6149 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
6150 info.byte_order = TARGET_BYTE_ORDER;
6151
6152 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6153 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6154 info.osabi = gdbarch_lookup_osabi (info.abfd);
6155 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6156 info.osabi = current_gdbarch->osabi;
6157
6158 /* Must have found some sort of architecture. */
6159 gdb_assert (info.bfd_arch_info != NULL);
6160
6161 if (gdbarch_debug)
6162 {
6163 fprintf_unfiltered (gdb_stdlog,
6164 "gdbarch_update: info.bfd_arch_info %s\n",
6165 (info.bfd_arch_info != NULL
6166 ? info.bfd_arch_info->printable_name
6167 : "(null)"));
6168 fprintf_unfiltered (gdb_stdlog,
6169 "gdbarch_update: info.byte_order %d (%s)\n",
6170 info.byte_order,
6171 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6172 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6173 : "default"));
6174 fprintf_unfiltered (gdb_stdlog,
6175 "gdbarch_update: info.osabi %d (%s)\n",
6176 info.osabi, gdbarch_osabi_name (info.osabi));
6177 fprintf_unfiltered (gdb_stdlog,
6178 "gdbarch_update: info.abfd 0x%lx\n",
6179 (long) info.abfd);
6180 fprintf_unfiltered (gdb_stdlog,
6181 "gdbarch_update: info.tdep_info 0x%lx\n",
6182 (long) info.tdep_info);
6183 }
6184
6185 /* Find the target that knows about this architecture. */
6186 for (rego = gdbarch_registry;
6187 rego != NULL;
6188 rego = rego->next)
6189 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6190 break;
6191 if (rego == NULL)
6192 {
6193 if (gdbarch_debug)
6194 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6195 return 0;
6196 }
6197
6198 /* Swap the data belonging to the old target out setting the
6199 installed data to zero. This stops the ->init() function trying
6200 to refer to the previous architecture's global data structures. */
6201 swapout_gdbarch_swap (current_gdbarch);
6202 clear_gdbarch_swap (current_gdbarch);
6203
6204 /* Save the previously selected architecture, setting the global to
6205 NULL. This stops ->init() trying to use the previous
6206 architecture's configuration. The previous architecture may not
6207 even be of the same architecture family. The most recent
6208 architecture of the same family is found at the head of the
6209 rego->arches list. */
6210 old_gdbarch = current_gdbarch;
6211 current_gdbarch = NULL;
6212
6213 /* Ask the target for a replacement architecture. */
6214 new_gdbarch = rego->init (info, rego->arches);
6215
6216 /* Did the target like it? No. Reject the change and revert to the
6217 old architecture. */
6218 if (new_gdbarch == NULL)
6219 {
6220 if (gdbarch_debug)
6221 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6222 swapin_gdbarch_swap (old_gdbarch);
6223 current_gdbarch = old_gdbarch;
6224 return 0;
6225 }
6226
6227 /* Did the architecture change? No. Oops, put the old architecture
6228 back. */
6229 if (old_gdbarch == new_gdbarch)
6230 {
6231 if (gdbarch_debug)
6232 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6233 (long) new_gdbarch,
6234 new_gdbarch->bfd_arch_info->printable_name);
6235 swapin_gdbarch_swap (old_gdbarch);
6236 current_gdbarch = old_gdbarch;
6237 return 1;
6238 }
6239
6240 /* Is this a pre-existing architecture? Yes. Move it to the front
6241 of the list of architectures (keeping the list sorted Most
6242 Recently Used) and then copy it in. */
6243 {
6244 struct gdbarch_list **list;
6245 for (list = &rego->arches;
6246 (*list) != NULL;
6247 list = &(*list)->next)
6248 {
6249 if ((*list)->gdbarch == new_gdbarch)
6250 {
6251 struct gdbarch_list *this;
6252 if (gdbarch_debug)
6253 fprintf_unfiltered (gdb_stdlog,
6254 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6255 (long) new_gdbarch,
6256 new_gdbarch->bfd_arch_info->printable_name);
6257 /* Unlink this. */
6258 this = (*list);
6259 (*list) = this->next;
6260 /* Insert in the front. */
6261 this->next = rego->arches;
6262 rego->arches = this;
6263 /* Copy the new architecture in. */
6264 current_gdbarch = new_gdbarch;
6265 swapin_gdbarch_swap (new_gdbarch);
6266 architecture_changed_event ();
6267 return 1;
6268 }
6269 }
6270 }
6271
6272 /* Prepend this new architecture to the architecture list (keep the
6273 list sorted Most Recently Used). */
6274 {
6275 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6276 this->next = rego->arches;
6277 this->gdbarch = new_gdbarch;
6278 rego->arches = this;
6279 }
6280
6281 /* Switch to this new architecture marking it initialized. */
6282 current_gdbarch = new_gdbarch;
6283 current_gdbarch->initialized_p = 1;
6284 if (gdbarch_debug)
6285 {
6286 fprintf_unfiltered (gdb_stdlog,
6287 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6288 (long) new_gdbarch,
6289 new_gdbarch->bfd_arch_info->printable_name);
6290 }
6291
6292 /* Check that the newly installed architecture is valid. Plug in
6293 any post init values. */
6294 new_gdbarch->dump_tdep = rego->dump_tdep;
6295 verify_gdbarch (new_gdbarch);
6296
6297 /* Initialize the per-architecture memory (swap) areas.
6298 CURRENT_GDBARCH must be update before these modules are
6299 called. */
6300 init_gdbarch_swap (new_gdbarch);
6301
6302 /* Initialize the per-architecture data. CURRENT_GDBARCH
6303 must be updated before these modules are called. */
6304 architecture_changed_event ();
6305
6306 if (gdbarch_debug)
6307 gdbarch_dump (current_gdbarch, gdb_stdlog);
6308
6309 return 1;
6310 }
6311
6312
6313 /* Disassembler */
6314
6315 /* Pointer to the target-dependent disassembly function. */
6316 int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6317
6318 extern void _initialize_gdbarch (void);
6319
6320 void
6321 _initialize_gdbarch (void)
6322 {
6323 struct cmd_list_element *c;
6324
6325 add_show_from_set (add_set_cmd ("arch",
6326 class_maintenance,
6327 var_zinteger,
6328 (char *)&gdbarch_debug,
6329 "Set architecture debugging.\n\
6330 When non-zero, architecture debugging is enabled.", &setdebuglist),
6331 &showdebuglist);
6332 c = add_set_cmd ("archdebug",
6333 class_maintenance,
6334 var_zinteger,
6335 (char *)&gdbarch_debug,
6336 "Set architecture debugging.\n\
6337 When non-zero, architecture debugging is enabled.", &setlist);
6338
6339 deprecate_cmd (c, "set debug arch");
6340 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");
6341 }
This page took 0.199229 seconds and 4 git commands to generate.