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