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