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