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