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