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