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