1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
6 Software Foundation, Inc.
8 This file is part of GDB.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */
25 /* This file was created with the aid of ``gdbarch.sh''.
27 The Bourne shell script ``gdbarch.sh'' creates the files
28 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
29 against the existing ``gdbarch.[hc]''. Any differences found
32 If editing this file, please also run gdbarch.sh and merge any
33 changes into that script. Conversely, when making sweeping changes
34 to this file, modifying gdbarch.sh and using its output may prove
39 #include "arch-utils.h"
42 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
45 #include "floatformat.h"
47 #include "gdb_assert.h"
48 #include "gdb_string.h"
49 #include "gdb-events.h"
50 #include "reggroups.h"
52 #include "gdb_obstack.h"
54 /* Static function declarations */
56 static void alloc_gdbarch_data (struct gdbarch
*);
58 /* Non-zero if we want to trace architecture code. */
61 #define GDBARCH_DEBUG 0
63 int gdbarch_debug
= GDBARCH_DEBUG
;
66 /* Maintain the struct gdbarch object */
70 /* Has this architecture been fully initialized? */
73 /* An obstack bound to the lifetime of the architecture. */
74 struct obstack
*obstack
;
76 /* basic architectural information */
77 const struct bfd_arch_info
* bfd_arch_info
;
81 /* target specific vector. */
82 struct gdbarch_tdep
*tdep
;
83 gdbarch_dump_tdep_ftype
*dump_tdep
;
85 /* per-architecture data-pointers */
89 /* per-architecture swap-regions */
90 struct gdbarch_swap
*swap
;
94 When extending this structure you must:
98 Declare set/get functions and define the corresponding
101 gdbarch_alloc(): If zero/NULL is not a suitable default,
102 initialize the new field.
104 verify_gdbarch(): Confirm that the target updated the field
107 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
110 ``startup_gdbarch()'': Append an initial value to the static
111 variable (base values on the host's c-type system).
113 get_gdbarch(): Implement the set/get functions (probably using
114 the macro's as shortcuts).
129 gdbarch_read_pc_ftype
*read_pc
;
130 gdbarch_write_pc_ftype
*write_pc
;
131 gdbarch_read_sp_ftype
*read_sp
;
132 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
133 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
134 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
141 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
142 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
143 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
144 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
145 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
146 gdbarch_register_name_ftype
*register_name
;
147 gdbarch_register_type_ftype
*register_type
;
148 gdbarch_deprecated_register_byte_ftype
*deprecated_register_byte
;
149 gdbarch_unwind_dummy_id_ftype
*unwind_dummy_id
;
150 int deprecated_fp_regnum
;
151 gdbarch_deprecated_target_read_fp_ftype
*deprecated_target_read_fp
;
152 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
153 gdbarch_deprecated_push_arguments_ftype
*deprecated_push_arguments
;
154 int deprecated_register_size
;
155 int call_dummy_location
;
156 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
157 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
158 gdbarch_print_registers_info_ftype
*print_registers_info
;
159 gdbarch_print_float_info_ftype
*print_float_info
;
160 gdbarch_print_vector_info_ftype
*print_vector_info
;
161 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
162 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
163 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
164 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
165 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
166 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
167 int believe_pcc_promotion
;
168 gdbarch_deprecated_get_saved_register_ftype
*deprecated_get_saved_register
;
169 gdbarch_convert_register_p_ftype
*convert_register_p
;
170 gdbarch_register_to_value_ftype
*register_to_value
;
171 gdbarch_value_to_register_ftype
*value_to_register
;
172 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
173 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
174 gdbarch_integer_to_address_ftype
*integer_to_address
;
175 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
176 gdbarch_deprecated_store_struct_return_ftype
*deprecated_store_struct_return
;
177 gdbarch_return_value_ftype
*return_value
;
178 gdbarch_extract_return_value_ftype
*extract_return_value
;
179 gdbarch_store_return_value_ftype
*store_return_value
;
180 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
181 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
182 gdbarch_deprecated_use_struct_convention_ftype
*deprecated_use_struct_convention
;
183 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
184 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
185 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
186 gdbarch_skip_prologue_ftype
*skip_prologue
;
187 gdbarch_inner_than_ftype
*inner_than
;
188 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
189 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
190 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
191 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
192 CORE_ADDR decr_pc_after_break
;
193 CORE_ADDR deprecated_function_start_offset
;
194 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
195 CORE_ADDR frame_args_skip
;
196 gdbarch_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
197 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
198 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
199 gdbarch_unwind_pc_ftype
*unwind_pc
;
200 gdbarch_unwind_sp_ftype
*unwind_sp
;
201 gdbarch_deprecated_frame_args_address_ftype
*deprecated_frame_args_address
;
202 gdbarch_deprecated_frame_locals_address_ftype
*deprecated_frame_locals_address
;
203 gdbarch_deprecated_saved_pc_after_call_ftype
*deprecated_saved_pc_after_call
;
204 gdbarch_frame_num_args_ftype
*frame_num_args
;
205 gdbarch_deprecated_stack_align_ftype
*deprecated_stack_align
;
206 gdbarch_frame_align_ftype
*frame_align
;
207 gdbarch_deprecated_reg_struct_has_addr_ftype
*deprecated_reg_struct_has_addr
;
208 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
209 int frame_red_zone_size
;
210 const struct floatformat
* float_format
;
211 const struct floatformat
* double_format
;
212 const struct floatformat
* long_double_format
;
213 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
214 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
215 gdbarch_smash_text_address_ftype
*smash_text_address
;
216 gdbarch_software_single_step_ftype
*software_single_step
;
217 gdbarch_print_insn_ftype
*print_insn
;
218 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
219 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
220 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
221 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
222 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
223 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
224 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
225 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
226 const char * name_of_malloc
;
227 int cannot_step_breakpoint
;
228 int have_nonsteppable_watchpoint
;
229 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
230 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
231 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
232 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
233 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
234 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
238 /* The default architecture uses host values (for want of a better
241 extern const struct bfd_arch_info bfd_default_arch_struct
;
243 struct gdbarch startup_gdbarch
=
245 1, /* Always initialized. */
246 NULL
, /* The obstack. */
247 /* basic architecture information */
248 &bfd_default_arch_struct
, /* bfd_arch_info */
249 BFD_ENDIAN_BIG
, /* byte_order */
250 GDB_OSABI_UNKNOWN
, /* osabi */
251 /* target specific vector and its dump routine */
253 /*per-architecture data-pointers and swap regions */
255 /* Multi-arch values */
256 8 * sizeof (short), /* short_bit */
257 8 * sizeof (int), /* int_bit */
258 8 * sizeof (long), /* long_bit */
259 8 * sizeof (LONGEST
), /* long_long_bit */
260 8 * sizeof (float), /* float_bit */
261 8 * sizeof (double), /* double_bit */
262 8 * sizeof (long double), /* long_double_bit */
263 8 * sizeof (void*), /* ptr_bit */
264 8 * sizeof (void*), /* addr_bit */
265 8 * sizeof (void*), /* bfd_vma_bit */
270 0, /* virtual_frame_pointer */
271 0, /* pseudo_register_read */
272 0, /* pseudo_register_write */
274 0, /* num_pseudo_regs */
279 0, /* stab_reg_to_regnum */
280 0, /* ecoff_reg_to_regnum */
281 0, /* dwarf_reg_to_regnum */
282 0, /* sdb_reg_to_regnum */
283 0, /* dwarf2_reg_to_regnum */
284 0, /* register_name */
285 0, /* register_type */
286 generic_register_byte
, /* deprecated_register_byte */
287 0, /* unwind_dummy_id */
288 -1, /* deprecated_fp_regnum */
289 0, /* deprecated_target_read_fp */
290 0, /* push_dummy_call */
291 0, /* deprecated_push_arguments */
292 0, /* deprecated_register_size */
293 0, /* call_dummy_location */
294 0, /* push_dummy_code */
295 0, /* deprecated_do_registers_info */
296 default_print_registers_info
, /* print_registers_info */
297 0, /* print_float_info */
298 0, /* print_vector_info */
299 0, /* register_sim_regno */
300 0, /* register_bytes_ok */
301 0, /* cannot_fetch_register */
302 0, /* cannot_store_register */
303 0, /* get_longjmp_target */
304 0, /* deprecated_init_frame_pc */
305 0, /* believe_pcc_promotion */
306 0, /* deprecated_get_saved_register */
307 0, /* convert_register_p */
308 0, /* register_to_value */
309 0, /* value_to_register */
310 0, /* pointer_to_address */
311 0, /* address_to_pointer */
312 0, /* integer_to_address */
313 0, /* deprecated_pop_frame */
314 0, /* deprecated_store_struct_return */
315 0, /* return_value */
316 0, /* extract_return_value */
317 0, /* store_return_value */
318 0, /* deprecated_extract_return_value */
319 0, /* deprecated_store_return_value */
320 0, /* deprecated_use_struct_convention */
321 0, /* deprecated_extract_struct_value_address */
322 0, /* deprecated_frame_init_saved_regs */
323 0, /* deprecated_init_extra_frame_info */
324 0, /* skip_prologue */
326 0, /* breakpoint_from_pc */
327 0, /* adjust_breakpoint_address */
328 0, /* memory_insert_breakpoint */
329 0, /* memory_remove_breakpoint */
330 0, /* decr_pc_after_break */
331 0, /* deprecated_function_start_offset */
332 generic_remote_translate_xfer_address
, /* remote_translate_xfer_address */
333 0, /* frame_args_skip */
334 0, /* deprecated_frame_chain */
335 0, /* deprecated_frame_chain_valid */
336 0, /* deprecated_frame_saved_pc */
339 get_frame_base
, /* deprecated_frame_args_address */
340 get_frame_base
, /* deprecated_frame_locals_address */
341 0, /* deprecated_saved_pc_after_call */
342 0, /* frame_num_args */
343 0, /* deprecated_stack_align */
345 0, /* deprecated_reg_struct_has_addr */
346 default_stabs_argument_has_addr
, /* stabs_argument_has_addr */
347 0, /* frame_red_zone_size */
348 0, /* float_format */
349 0, /* double_format */
350 0, /* long_double_format */
351 convert_from_func_ptr_addr_identity
, /* convert_from_func_ptr_addr */
352 0, /* addr_bits_remove */
353 0, /* smash_text_address */
354 0, /* software_single_step */
356 0, /* skip_trampoline_code */
357 generic_skip_solib_resolver
, /* skip_solib_resolver */
358 0, /* in_solib_call_trampoline */
359 0, /* in_solib_return_trampoline */
360 generic_in_function_epilogue_p
, /* in_function_epilogue_p */
361 construct_inferior_arguments
, /* construct_inferior_arguments */
362 0, /* elf_make_msymbol_special */
363 0, /* coff_make_msymbol_special */
364 "malloc", /* name_of_malloc */
365 0, /* cannot_step_breakpoint */
366 0, /* have_nonsteppable_watchpoint */
367 0, /* address_class_type_flags */
368 0, /* address_class_type_flags_to_name */
369 0, /* address_class_name_to_type_flags */
370 default_register_reggroup_p
, /* register_reggroup_p */
371 0, /* fetch_pointer_argument */
372 0, /* regset_from_core_section */
373 /* startup_gdbarch() */
376 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
378 /* Create a new ``struct gdbarch'' based on information provided by
379 ``struct gdbarch_info''. */
382 gdbarch_alloc (const struct gdbarch_info
*info
,
383 struct gdbarch_tdep
*tdep
)
385 /* NOTE: The new architecture variable is named ``current_gdbarch''
386 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
387 the current local architecture and not the previous global
388 architecture. This ensures that the new architectures initial
389 values are not influenced by the previous architecture. Once
390 everything is parameterised with gdbarch, this will go away. */
391 struct gdbarch
*current_gdbarch
;
393 /* Create an obstack for allocating all the per-architecture memory,
394 then use that to allocate the architecture vector. */
395 struct obstack
*obstack
= XMALLOC (struct obstack
);
396 obstack_init (obstack
);
397 current_gdbarch
= obstack_alloc (obstack
, sizeof (*current_gdbarch
));
398 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
399 current_gdbarch
->obstack
= obstack
;
401 alloc_gdbarch_data (current_gdbarch
);
403 current_gdbarch
->tdep
= tdep
;
405 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
406 current_gdbarch
->byte_order
= info
->byte_order
;
407 current_gdbarch
->osabi
= info
->osabi
;
409 /* Force the explicit initialization of these. */
410 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
411 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
412 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
413 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
414 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
415 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
416 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
417 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
418 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
419 current_gdbarch
->char_signed
= -1;
420 current_gdbarch
->write_pc
= generic_target_write_pc
;
421 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
422 current_gdbarch
->num_regs
= -1;
423 current_gdbarch
->sp_regnum
= -1;
424 current_gdbarch
->pc_regnum
= -1;
425 current_gdbarch
->ps_regnum
= -1;
426 current_gdbarch
->fp0_regnum
= -1;
427 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
428 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
429 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
430 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
431 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
432 current_gdbarch
->deprecated_register_byte
= generic_register_byte
;
433 current_gdbarch
->deprecated_fp_regnum
= -1;
434 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
435 current_gdbarch
->print_registers_info
= default_print_registers_info
;
436 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
437 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
438 current_gdbarch
->cannot_store_register
= cannot_register_not
;
439 current_gdbarch
->convert_register_p
= generic_convert_register_p
;
440 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
441 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
442 current_gdbarch
->return_value
= legacy_return_value
;
443 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
444 current_gdbarch
->store_return_value
= legacy_store_return_value
;
445 current_gdbarch
->deprecated_use_struct_convention
= generic_use_struct_convention
;
446 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
447 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
448 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
449 current_gdbarch
->deprecated_frame_args_address
= get_frame_base
;
450 current_gdbarch
->deprecated_frame_locals_address
= get_frame_base
;
451 current_gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
452 current_gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
453 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
454 current_gdbarch
->smash_text_address
= core_addr_identity
;
455 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
456 current_gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
457 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
458 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
459 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
460 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
461 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
462 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
463 current_gdbarch
->name_of_malloc
= "malloc";
464 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
465 /* gdbarch_alloc() */
467 return current_gdbarch
;
471 /* Allocate extra space using the per-architecture obstack. */
474 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
476 void *data
= obstack_alloc (arch
->obstack
, size
);
477 memset (data
, 0, size
);
482 /* Free a gdbarch struct. This should never happen in normal
483 operation --- once you've created a gdbarch, you keep it around.
484 However, if an architecture's init function encounters an error
485 building the structure, it may need to clean up a partially
486 constructed gdbarch. */
489 gdbarch_free (struct gdbarch
*arch
)
491 struct obstack
*obstack
;
492 gdb_assert (arch
!= NULL
);
493 gdb_assert (!arch
->initialized_p
);
494 obstack
= arch
->obstack
;
495 obstack_free (obstack
, 0); /* Includes the ARCH. */
500 /* Ensure that all values in a GDBARCH are reasonable. */
502 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
503 just happens to match the global variable ``current_gdbarch''. That
504 way macros refering to that variable get the local and not the global
505 version - ulgh. Once everything is parameterised with gdbarch, this
509 verify_gdbarch (struct gdbarch
*current_gdbarch
)
512 struct cleanup
*cleanups
;
515 log
= mem_fileopen ();
516 cleanups
= make_cleanup_ui_file_delete (log
);
518 if (current_gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
519 fprintf_unfiltered (log
, "\n\tbyte-order");
520 if (current_gdbarch
->bfd_arch_info
== NULL
)
521 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
522 /* Check those that need to be defined for the given multi-arch level. */
523 /* Skip verify of short_bit, invalid_p == 0 */
524 /* Skip verify of int_bit, invalid_p == 0 */
525 /* Skip verify of long_bit, invalid_p == 0 */
526 /* Skip verify of long_long_bit, invalid_p == 0 */
527 /* Skip verify of float_bit, invalid_p == 0 */
528 /* Skip verify of double_bit, invalid_p == 0 */
529 /* Skip verify of long_double_bit, invalid_p == 0 */
530 /* Skip verify of ptr_bit, invalid_p == 0 */
531 if (current_gdbarch
->addr_bit
== 0)
532 current_gdbarch
->addr_bit
= TARGET_PTR_BIT
;
533 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
534 if (current_gdbarch
->char_signed
== -1)
535 current_gdbarch
->char_signed
= 1;
536 /* Skip verify of read_pc, has predicate */
537 /* Skip verify of write_pc, invalid_p == 0 */
538 /* Skip verify of read_sp, has predicate */
539 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
540 /* Skip verify of pseudo_register_read, has predicate */
541 /* Skip verify of pseudo_register_write, has predicate */
542 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
543 && (current_gdbarch
->num_regs
== -1))
544 fprintf_unfiltered (log
, "\n\tnum_regs");
545 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
546 /* Skip verify of sp_regnum, invalid_p == 0 */
547 /* Skip verify of pc_regnum, invalid_p == 0 */
548 /* Skip verify of ps_regnum, invalid_p == 0 */
549 /* Skip verify of fp0_regnum, invalid_p == 0 */
550 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
551 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
552 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
553 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
554 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
555 /* Skip verify of register_type, has predicate */
556 /* Skip verify of deprecated_register_byte, has predicate */
557 /* Skip verify of unwind_dummy_id, has predicate */
558 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
559 /* Skip verify of deprecated_target_read_fp, has predicate */
560 /* Skip verify of push_dummy_call, has predicate */
561 /* Skip verify of deprecated_push_arguments, has predicate */
562 /* Skip verify of call_dummy_location, invalid_p == 0 */
563 /* Skip verify of push_dummy_code, has predicate */
564 /* Skip verify of deprecated_do_registers_info, has predicate */
565 /* Skip verify of print_registers_info, invalid_p == 0 */
566 /* Skip verify of print_float_info, has predicate */
567 /* Skip verify of print_vector_info, has predicate */
568 /* Skip verify of register_sim_regno, invalid_p == 0 */
569 /* Skip verify of register_bytes_ok, has predicate */
570 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
571 /* Skip verify of cannot_store_register, invalid_p == 0 */
572 /* Skip verify of get_longjmp_target, has predicate */
573 /* Skip verify of deprecated_init_frame_pc, has predicate */
574 /* Skip verify of deprecated_get_saved_register, has predicate */
575 /* Skip verify of convert_register_p, invalid_p == 0 */
576 /* Skip verify of pointer_to_address, invalid_p == 0 */
577 /* Skip verify of address_to_pointer, invalid_p == 0 */
578 /* Skip verify of integer_to_address, has predicate */
579 /* Skip verify of deprecated_pop_frame, has predicate */
580 /* Skip verify of deprecated_store_struct_return, has predicate */
581 /* Skip verify of return_value, has predicate */
582 /* Skip verify of extract_return_value, invalid_p == 0 */
583 /* Skip verify of store_return_value, invalid_p == 0 */
584 /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
585 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
586 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
587 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
588 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
589 && (current_gdbarch
->skip_prologue
== 0))
590 fprintf_unfiltered (log
, "\n\tskip_prologue");
591 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
592 && (current_gdbarch
->inner_than
== 0))
593 fprintf_unfiltered (log
, "\n\tinner_than");
594 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
595 && (current_gdbarch
->breakpoint_from_pc
== 0))
596 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
597 /* Skip verify of adjust_breakpoint_address, has predicate */
598 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
599 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
600 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
601 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
602 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
603 /* Skip verify of frame_args_skip, invalid_p == 0 */
604 /* Skip verify of deprecated_frame_chain, has predicate */
605 /* Skip verify of deprecated_frame_chain_valid, has predicate */
606 /* Skip verify of deprecated_frame_saved_pc, has predicate */
607 /* Skip verify of unwind_pc, has predicate */
608 /* Skip verify of unwind_sp, has predicate */
609 /* Skip verify of deprecated_frame_args_address, has predicate */
610 /* Skip verify of deprecated_frame_locals_address, has predicate */
611 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
612 /* Skip verify of frame_num_args, has predicate */
613 /* Skip verify of deprecated_stack_align, has predicate */
614 /* Skip verify of frame_align, has predicate */
615 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
616 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
617 if (current_gdbarch
->float_format
== 0)
618 current_gdbarch
->float_format
= default_float_format (current_gdbarch
);
619 if (current_gdbarch
->double_format
== 0)
620 current_gdbarch
->double_format
= default_double_format (current_gdbarch
);
621 if (current_gdbarch
->long_double_format
== 0)
622 current_gdbarch
->long_double_format
= default_double_format (current_gdbarch
);
623 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
624 /* Skip verify of addr_bits_remove, invalid_p == 0 */
625 /* Skip verify of smash_text_address, invalid_p == 0 */
626 /* Skip verify of software_single_step, has predicate */
627 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
628 && (current_gdbarch
->print_insn
== 0))
629 fprintf_unfiltered (log
, "\n\tprint_insn");
630 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
631 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
632 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
633 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
634 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
635 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
636 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
637 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
638 /* Skip verify of name_of_malloc, invalid_p == 0 */
639 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
640 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
641 /* Skip verify of address_class_type_flags, has predicate */
642 /* Skip verify of address_class_type_flags_to_name, has predicate */
643 /* Skip verify of address_class_name_to_type_flags, has predicate */
644 /* Skip verify of register_reggroup_p, invalid_p == 0 */
645 /* Skip verify of fetch_pointer_argument, has predicate */
646 /* Skip verify of regset_from_core_section, has predicate */
647 buf
= ui_file_xstrdup (log
, &dummy
);
648 make_cleanup (xfree
, buf
);
649 if (strlen (buf
) > 0)
650 internal_error (__FILE__
, __LINE__
,
651 "verify_gdbarch: the following are invalid ...%s",
653 do_cleanups (cleanups
);
657 /* Print out the details of the current architecture. */
659 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
660 just happens to match the global variable ``current_gdbarch''. That
661 way macros refering to that variable get the local and not the global
662 version - ulgh. Once everything is parameterised with gdbarch, this
666 gdbarch_dump (struct gdbarch
*current_gdbarch
, struct ui_file
*file
)
668 fprintf_unfiltered (file
,
669 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
671 #ifdef TARGET_ADDR_BIT
672 fprintf_unfiltered (file
,
673 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
674 XSTRING (TARGET_ADDR_BIT
));
676 fprintf_unfiltered (file
,
677 "gdbarch_dump: addr_bit = %s\n",
678 paddr_d (current_gdbarch
->addr_bit
));
679 #ifdef ADDR_BITS_REMOVE
680 fprintf_unfiltered (file
,
681 "gdbarch_dump: %s # %s\n",
682 "ADDR_BITS_REMOVE(addr)",
683 XSTRING (ADDR_BITS_REMOVE (addr
)));
685 fprintf_unfiltered (file
,
686 "gdbarch_dump: addr_bits_remove = <0x%lx>\n",
687 (long) current_gdbarch
->addr_bits_remove
);
688 fprintf_unfiltered (file
,
689 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
690 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
691 fprintf_unfiltered (file
,
692 "gdbarch_dump: address_class_name_to_type_flags = <0x%lx>\n",
693 (long) current_gdbarch
->address_class_name_to_type_flags
);
694 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
695 fprintf_unfiltered (file
,
696 "gdbarch_dump: %s # %s\n",
697 "ADDRESS_CLASS_TYPE_FLAGS_P()",
698 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
700 fprintf_unfiltered (file
,
701 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
702 gdbarch_address_class_type_flags_p (current_gdbarch
));
703 #ifdef ADDRESS_CLASS_TYPE_FLAGS
704 fprintf_unfiltered (file
,
705 "gdbarch_dump: %s # %s\n",
706 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
707 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
709 fprintf_unfiltered (file
,
710 "gdbarch_dump: address_class_type_flags = <0x%lx>\n",
711 (long) current_gdbarch
->address_class_type_flags
);
712 fprintf_unfiltered (file
,
713 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
714 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
715 fprintf_unfiltered (file
,
716 "gdbarch_dump: address_class_type_flags_to_name = <0x%lx>\n",
717 (long) current_gdbarch
->address_class_type_flags_to_name
);
718 #ifdef ADDRESS_TO_POINTER
719 fprintf_unfiltered (file
,
720 "gdbarch_dump: %s # %s\n",
721 "ADDRESS_TO_POINTER(type, buf, addr)",
722 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
724 fprintf_unfiltered (file
,
725 "gdbarch_dump: address_to_pointer = <0x%lx>\n",
726 (long) current_gdbarch
->address_to_pointer
);
727 fprintf_unfiltered (file
,
728 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
729 gdbarch_adjust_breakpoint_address_p (current_gdbarch
));
730 fprintf_unfiltered (file
,
731 "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
732 (long) current_gdbarch
->adjust_breakpoint_address
);
733 #ifdef BELIEVE_PCC_PROMOTION
734 fprintf_unfiltered (file
,
735 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
736 XSTRING (BELIEVE_PCC_PROMOTION
));
738 fprintf_unfiltered (file
,
739 "gdbarch_dump: believe_pcc_promotion = %s\n",
740 paddr_d (current_gdbarch
->believe_pcc_promotion
));
741 #ifdef TARGET_ARCHITECTURE
742 fprintf_unfiltered (file
,
743 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
744 XSTRING (TARGET_ARCHITECTURE
));
746 fprintf_unfiltered (file
,
747 "gdbarch_dump: bfd_arch_info = %s\n",
748 TARGET_ARCHITECTURE
->printable_name
);
749 #ifdef TARGET_BFD_VMA_BIT
750 fprintf_unfiltered (file
,
751 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
752 XSTRING (TARGET_BFD_VMA_BIT
));
754 fprintf_unfiltered (file
,
755 "gdbarch_dump: bfd_vma_bit = %s\n",
756 paddr_d (current_gdbarch
->bfd_vma_bit
));
757 #ifdef BREAKPOINT_FROM_PC
758 fprintf_unfiltered (file
,
759 "gdbarch_dump: %s # %s\n",
760 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
761 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
763 fprintf_unfiltered (file
,
764 "gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
765 (long) current_gdbarch
->breakpoint_from_pc
);
766 #ifdef TARGET_BYTE_ORDER
767 fprintf_unfiltered (file
,
768 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
769 XSTRING (TARGET_BYTE_ORDER
));
771 fprintf_unfiltered (file
,
772 "gdbarch_dump: byte_order = %s\n",
773 paddr_d (current_gdbarch
->byte_order
));
774 #ifdef CALL_DUMMY_LOCATION
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
777 XSTRING (CALL_DUMMY_LOCATION
));
779 fprintf_unfiltered (file
,
780 "gdbarch_dump: call_dummy_location = %s\n",
781 paddr_d (current_gdbarch
->call_dummy_location
));
782 #ifdef CANNOT_FETCH_REGISTER
783 fprintf_unfiltered (file
,
784 "gdbarch_dump: %s # %s\n",
785 "CANNOT_FETCH_REGISTER(regnum)",
786 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
788 fprintf_unfiltered (file
,
789 "gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
790 (long) current_gdbarch
->cannot_fetch_register
);
791 #ifdef CANNOT_STEP_BREAKPOINT
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
794 XSTRING (CANNOT_STEP_BREAKPOINT
));
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: cannot_step_breakpoint = %s\n",
798 paddr_d (current_gdbarch
->cannot_step_breakpoint
));
799 #ifdef CANNOT_STORE_REGISTER
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: %s # %s\n",
802 "CANNOT_STORE_REGISTER(regnum)",
803 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: cannot_store_register = <0x%lx>\n",
807 (long) current_gdbarch
->cannot_store_register
);
808 #ifdef TARGET_CHAR_SIGNED
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
811 XSTRING (TARGET_CHAR_SIGNED
));
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: char_signed = %s\n",
815 paddr_d (current_gdbarch
->char_signed
));
816 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: %s # %s\n",
819 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
820 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
824 (long) current_gdbarch
->coff_make_msymbol_special
);
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: construct_inferior_arguments = <0x%lx>\n",
827 (long) current_gdbarch
->construct_inferior_arguments
);
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: convert_from_func_ptr_addr = <0x%lx>\n",
830 (long) current_gdbarch
->convert_from_func_ptr_addr
);
831 #ifdef CONVERT_REGISTER_P
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: %s # %s\n",
834 "CONVERT_REGISTER_P(regnum, type)",
835 XSTRING (CONVERT_REGISTER_P (regnum
, type
)));
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: convert_register_p = <0x%lx>\n",
839 (long) current_gdbarch
->convert_register_p
);
840 #ifdef DECR_PC_AFTER_BREAK
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
843 XSTRING (DECR_PC_AFTER_BREAK
));
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: decr_pc_after_break = 0x%s\n",
847 paddr_nz (current_gdbarch
->decr_pc_after_break
));
848 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: %s # %s\n",
851 "DEPRECATED_DO_REGISTERS_INFO_P()",
852 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: gdbarch_deprecated_do_registers_info_p() = %d\n",
856 gdbarch_deprecated_do_registers_info_p (current_gdbarch
));
857 #ifdef DEPRECATED_DO_REGISTERS_INFO
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: %s # %s\n",
860 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
861 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: deprecated_do_registers_info = <0x%lx>\n",
865 (long) current_gdbarch
->deprecated_do_registers_info
);
866 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: %s # %s\n",
869 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
870 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
874 (long) current_gdbarch
->deprecated_extract_return_value
);
875 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
879 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: gdbarch_deprecated_extract_struct_value_address_p() = %d\n",
883 gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch
));
884 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: %s # %s\n",
887 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
888 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: deprecated_extract_struct_value_address = <0x%lx>\n",
892 (long) current_gdbarch
->deprecated_extract_struct_value_address
);
893 #ifdef DEPRECATED_FP_REGNUM
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
896 XSTRING (DEPRECATED_FP_REGNUM
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: deprecated_fp_regnum = %s\n",
900 paddr_d (current_gdbarch
->deprecated_fp_regnum
));
901 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: %s # %s\n",
904 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
905 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: gdbarch_deprecated_frame_args_address_p() = %d\n",
909 gdbarch_deprecated_frame_args_address_p (current_gdbarch
));
910 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: %s # %s\n",
913 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
914 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi
)));
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: deprecated_frame_args_address = <0x%lx>\n",
918 (long) current_gdbarch
->deprecated_frame_args_address
);
919 #ifdef DEPRECATED_FRAME_CHAIN_P
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: %s # %s\n",
922 "DEPRECATED_FRAME_CHAIN_P()",
923 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: gdbarch_deprecated_frame_chain_p() = %d\n",
927 gdbarch_deprecated_frame_chain_p (current_gdbarch
));
928 #ifdef DEPRECATED_FRAME_CHAIN
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: %s # %s\n",
931 "DEPRECATED_FRAME_CHAIN(frame)",
932 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: deprecated_frame_chain = <0x%lx>\n",
936 (long) current_gdbarch
->deprecated_frame_chain
);
937 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: %s # %s\n",
940 "DEPRECATED_FRAME_CHAIN_VALID_P()",
941 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: gdbarch_deprecated_frame_chain_valid_p() = %d\n",
945 gdbarch_deprecated_frame_chain_valid_p (current_gdbarch
));
946 #ifdef DEPRECATED_FRAME_CHAIN_VALID
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
950 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: deprecated_frame_chain_valid = <0x%lx>\n",
954 (long) current_gdbarch
->deprecated_frame_chain_valid
);
955 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: %s # %s\n",
958 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
959 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: gdbarch_deprecated_frame_init_saved_regs_p() = %d\n",
963 gdbarch_deprecated_frame_init_saved_regs_p (current_gdbarch
));
964 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: %s # %s\n",
967 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
968 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: deprecated_frame_init_saved_regs = <0x%lx>\n",
972 (long) current_gdbarch
->deprecated_frame_init_saved_regs
);
973 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: %s # %s\n",
976 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
977 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: gdbarch_deprecated_frame_locals_address_p() = %d\n",
981 gdbarch_deprecated_frame_locals_address_p (current_gdbarch
));
982 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
986 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi
)));
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: deprecated_frame_locals_address = <0x%lx>\n",
990 (long) current_gdbarch
->deprecated_frame_locals_address
);
991 #ifdef DEPRECATED_FRAME_SAVED_PC_P
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: %s # %s\n",
994 "DEPRECATED_FRAME_SAVED_PC_P()",
995 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: gdbarch_deprecated_frame_saved_pc_p() = %d\n",
999 gdbarch_deprecated_frame_saved_pc_p (current_gdbarch
));
1000 #ifdef DEPRECATED_FRAME_SAVED_PC
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "DEPRECATED_FRAME_SAVED_PC(fi)",
1004 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: deprecated_frame_saved_pc = <0x%lx>\n",
1008 (long) current_gdbarch
->deprecated_frame_saved_pc
);
1009 #ifdef DEPRECATED_FUNCTION_START_OFFSET
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
1012 XSTRING (DEPRECATED_FUNCTION_START_OFFSET
));
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
1016 paddr_nz (current_gdbarch
->deprecated_function_start_offset
));
1017 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: %s # %s\n",
1020 "DEPRECATED_GET_SAVED_REGISTER_P()",
1021 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: gdbarch_deprecated_get_saved_register_p() = %d\n",
1025 gdbarch_deprecated_get_saved_register_p (current_gdbarch
));
1026 #ifdef DEPRECATED_GET_SAVED_REGISTER
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: %s # %s\n",
1029 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1030 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: deprecated_get_saved_register = <0x%lx>\n",
1034 (long) current_gdbarch
->deprecated_get_saved_register
);
1035 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: %s # %s\n",
1038 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1039 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1041 fprintf_unfiltered (file
,
1042 "gdbarch_dump: gdbarch_deprecated_init_extra_frame_info_p() = %d\n",
1043 gdbarch_deprecated_init_extra_frame_info_p (current_gdbarch
));
1044 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: %s # %s\n",
1047 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1048 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: deprecated_init_extra_frame_info = <0x%lx>\n",
1052 (long) current_gdbarch
->deprecated_init_extra_frame_info
);
1053 #ifdef DEPRECATED_INIT_FRAME_PC_P
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: %s # %s\n",
1056 "DEPRECATED_INIT_FRAME_PC_P()",
1057 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: gdbarch_deprecated_init_frame_pc_p() = %d\n",
1061 gdbarch_deprecated_init_frame_pc_p (current_gdbarch
));
1062 #ifdef DEPRECATED_INIT_FRAME_PC
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: %s # %s\n",
1065 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1066 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: deprecated_init_frame_pc = <0x%lx>\n",
1070 (long) current_gdbarch
->deprecated_init_frame_pc
);
1071 #ifdef DEPRECATED_POP_FRAME_P
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: %s # %s\n",
1074 "DEPRECATED_POP_FRAME_P()",
1075 XSTRING (DEPRECATED_POP_FRAME_P ()));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: gdbarch_deprecated_pop_frame_p() = %d\n",
1079 gdbarch_deprecated_pop_frame_p (current_gdbarch
));
1080 #ifdef DEPRECATED_POP_FRAME
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: %s # %s\n",
1083 "DEPRECATED_POP_FRAME(-)",
1084 XSTRING (DEPRECATED_POP_FRAME (-)));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: deprecated_pop_frame = <0x%lx>\n",
1088 (long) current_gdbarch
->deprecated_pop_frame
);
1089 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: %s # %s\n",
1092 "DEPRECATED_PUSH_ARGUMENTS_P()",
1093 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: gdbarch_deprecated_push_arguments_p() = %d\n",
1097 gdbarch_deprecated_push_arguments_p (current_gdbarch
));
1098 #ifdef DEPRECATED_PUSH_ARGUMENTS
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: %s # %s\n",
1101 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1102 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: deprecated_push_arguments = <0x%lx>\n",
1106 (long) current_gdbarch
->deprecated_push_arguments
);
1107 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: %s # %s\n",
1110 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1111 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
1115 gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch
));
1116 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: %s # %s\n",
1119 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1120 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
1124 (long) current_gdbarch
->deprecated_reg_struct_has_addr
);
1125 #ifdef DEPRECATED_REGISTER_BYTE_P
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: %s # %s\n",
1128 "DEPRECATED_REGISTER_BYTE_P()",
1129 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: gdbarch_deprecated_register_byte_p() = %d\n",
1133 gdbarch_deprecated_register_byte_p (current_gdbarch
));
1134 #ifdef DEPRECATED_REGISTER_BYTE
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1138 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr
)));
1140 fprintf_unfiltered (file
,
1141 "gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
1142 (long) current_gdbarch
->deprecated_register_byte
);
1143 #ifdef DEPRECATED_REGISTER_SIZE
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1146 XSTRING (DEPRECATED_REGISTER_SIZE
));
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: deprecated_register_size = %s\n",
1150 paddr_d (current_gdbarch
->deprecated_register_size
));
1151 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: %s # %s\n",
1154 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1155 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: gdbarch_deprecated_saved_pc_after_call_p() = %d\n",
1159 gdbarch_deprecated_saved_pc_after_call_p (current_gdbarch
));
1160 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: %s # %s\n",
1163 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1164 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: deprecated_saved_pc_after_call = <0x%lx>\n",
1168 (long) current_gdbarch
->deprecated_saved_pc_after_call
);
1169 #ifdef DEPRECATED_STACK_ALIGN_P
1170 fprintf_unfiltered (file
,
1171 "gdbarch_dump: %s # %s\n",
1172 "DEPRECATED_STACK_ALIGN_P()",
1173 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: gdbarch_deprecated_stack_align_p() = %d\n",
1177 gdbarch_deprecated_stack_align_p (current_gdbarch
));
1178 #ifdef DEPRECATED_STACK_ALIGN
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "DEPRECATED_STACK_ALIGN(sp)",
1182 XSTRING (DEPRECATED_STACK_ALIGN (sp
)));
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
1186 (long) current_gdbarch
->deprecated_stack_align
);
1187 #ifdef DEPRECATED_STORE_RETURN_VALUE
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1191 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
1195 (long) current_gdbarch
->deprecated_store_return_value
);
1196 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: %s # %s\n",
1199 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1200 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: gdbarch_deprecated_store_struct_return_p() = %d\n",
1204 gdbarch_deprecated_store_struct_return_p (current_gdbarch
));
1205 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1209 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: deprecated_store_struct_return = <0x%lx>\n",
1213 (long) current_gdbarch
->deprecated_store_struct_return
);
1214 #ifdef DEPRECATED_TARGET_READ_FP_P
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: %s # %s\n",
1217 "DEPRECATED_TARGET_READ_FP_P()",
1218 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: gdbarch_deprecated_target_read_fp_p() = %d\n",
1222 gdbarch_deprecated_target_read_fp_p (current_gdbarch
));
1223 #ifdef DEPRECATED_TARGET_READ_FP
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "DEPRECATED_TARGET_READ_FP()",
1227 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: deprecated_target_read_fp = <0x%lx>\n",
1231 (long) current_gdbarch
->deprecated_target_read_fp
);
1232 #ifdef DEPRECATED_USE_STRUCT_CONVENTION
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: %s # %s\n",
1235 "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
1236 XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
1240 (long) current_gdbarch
->deprecated_use_struct_convention
);
1241 #ifdef TARGET_DOUBLE_BIT
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1244 XSTRING (TARGET_DOUBLE_BIT
));
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: double_bit = %s\n",
1248 paddr_d (current_gdbarch
->double_bit
));
1249 #ifdef TARGET_DOUBLE_FORMAT
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1252 XSTRING (TARGET_DOUBLE_FORMAT
));
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: double_format = %s\n",
1256 (TARGET_DOUBLE_FORMAT
)->name
);
1257 #ifdef DWARF2_REG_TO_REGNUM
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: %s # %s\n",
1260 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1261 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
1265 (long) current_gdbarch
->dwarf2_reg_to_regnum
);
1266 #ifdef DWARF_REG_TO_REGNUM
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: %s # %s\n",
1269 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1270 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
1274 (long) current_gdbarch
->dwarf_reg_to_regnum
);
1275 #ifdef ECOFF_REG_TO_REGNUM
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: %s # %s\n",
1278 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1279 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
1283 (long) current_gdbarch
->ecoff_reg_to_regnum
);
1284 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1288 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
1292 (long) current_gdbarch
->elf_make_msymbol_special
);
1293 #ifdef EXTRACT_RETURN_VALUE
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1297 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: extract_return_value = <0x%lx>\n",
1301 (long) current_gdbarch
->extract_return_value
);
1302 #ifdef FETCH_POINTER_ARGUMENT_P
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "FETCH_POINTER_ARGUMENT_P()",
1306 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
1310 gdbarch_fetch_pointer_argument_p (current_gdbarch
));
1311 #ifdef FETCH_POINTER_ARGUMENT
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: %s # %s\n",
1314 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1315 XSTRING (FETCH_POINTER_ARGUMENT (frame
, argi
, type
)));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: fetch_pointer_argument = <0x%lx>\n",
1319 (long) current_gdbarch
->fetch_pointer_argument
);
1320 #ifdef TARGET_FLOAT_BIT
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1323 XSTRING (TARGET_FLOAT_BIT
));
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: float_bit = %s\n",
1327 paddr_d (current_gdbarch
->float_bit
));
1328 #ifdef TARGET_FLOAT_FORMAT
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1331 XSTRING (TARGET_FLOAT_FORMAT
));
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: float_format = %s\n",
1335 (TARGET_FLOAT_FORMAT
)->name
);
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: FP0_REGNUM # %s\n",
1339 XSTRING (FP0_REGNUM
));
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: fp0_regnum = %s\n",
1343 paddr_d (current_gdbarch
->fp0_regnum
));
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
1346 gdbarch_frame_align_p (current_gdbarch
));
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: frame_align = <0x%lx>\n",
1349 (long) current_gdbarch
->frame_align
);
1350 #ifdef FRAME_ARGS_SKIP
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1353 XSTRING (FRAME_ARGS_SKIP
));
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: frame_args_skip = 0x%s\n",
1357 paddr_nz (current_gdbarch
->frame_args_skip
));
1358 #ifdef FRAME_NUM_ARGS_P
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: %s # %s\n",
1361 "FRAME_NUM_ARGS_P()",
1362 XSTRING (FRAME_NUM_ARGS_P ()));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
1366 gdbarch_frame_num_args_p (current_gdbarch
));
1367 #ifdef FRAME_NUM_ARGS
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: %s # %s\n",
1370 "FRAME_NUM_ARGS(frame)",
1371 XSTRING (FRAME_NUM_ARGS (frame
)));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: frame_num_args = <0x%lx>\n",
1375 (long) current_gdbarch
->frame_num_args
);
1376 #ifdef FRAME_RED_ZONE_SIZE
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1379 XSTRING (FRAME_RED_ZONE_SIZE
));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: frame_red_zone_size = %s\n",
1383 paddr_d (current_gdbarch
->frame_red_zone_size
));
1384 #ifdef GET_LONGJMP_TARGET_P
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: %s # %s\n",
1387 "GET_LONGJMP_TARGET_P()",
1388 XSTRING (GET_LONGJMP_TARGET_P ()));
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
1392 gdbarch_get_longjmp_target_p (current_gdbarch
));
1393 #ifdef GET_LONGJMP_TARGET
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "GET_LONGJMP_TARGET(pc)",
1397 XSTRING (GET_LONGJMP_TARGET (pc
)));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: get_longjmp_target = <0x%lx>\n",
1401 (long) current_gdbarch
->get_longjmp_target
);
1402 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1405 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
1409 paddr_d (current_gdbarch
->have_nonsteppable_watchpoint
));
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
1412 (long) current_gdbarch
->in_function_epilogue_p
);
1413 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: %s # %s\n",
1416 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1417 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: in_solib_call_trampoline = <0x%lx>\n",
1421 (long) current_gdbarch
->in_solib_call_trampoline
);
1422 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: %s # %s\n",
1425 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1426 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
1430 (long) current_gdbarch
->in_solib_return_trampoline
);
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: %s # %s\n",
1434 "INNER_THAN(lhs, rhs)",
1435 XSTRING (INNER_THAN (lhs
, rhs
)));
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: inner_than = <0x%lx>\n",
1439 (long) current_gdbarch
->inner_than
);
1440 #ifdef TARGET_INT_BIT
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1443 XSTRING (TARGET_INT_BIT
));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: int_bit = %s\n",
1447 paddr_d (current_gdbarch
->int_bit
));
1448 #ifdef INTEGER_TO_ADDRESS_P
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: %s # %s\n",
1451 "INTEGER_TO_ADDRESS_P()",
1452 XSTRING (INTEGER_TO_ADDRESS_P ()));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
1456 gdbarch_integer_to_address_p (current_gdbarch
));
1457 #ifdef INTEGER_TO_ADDRESS
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: %s # %s\n",
1460 "INTEGER_TO_ADDRESS(type, buf)",
1461 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: integer_to_address = <0x%lx>\n",
1465 (long) current_gdbarch
->integer_to_address
);
1466 #ifdef TARGET_LONG_BIT
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1469 XSTRING (TARGET_LONG_BIT
));
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: long_bit = %s\n",
1473 paddr_d (current_gdbarch
->long_bit
));
1474 #ifdef TARGET_LONG_DOUBLE_BIT
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1477 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: long_double_bit = %s\n",
1481 paddr_d (current_gdbarch
->long_double_bit
));
1482 #ifdef TARGET_LONG_DOUBLE_FORMAT
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1485 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: long_double_format = %s\n",
1489 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
1490 #ifdef TARGET_LONG_LONG_BIT
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1493 XSTRING (TARGET_LONG_LONG_BIT
));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: long_long_bit = %s\n",
1497 paddr_d (current_gdbarch
->long_long_bit
));
1498 #ifdef MEMORY_INSERT_BREAKPOINT
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: %s # %s\n",
1501 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1502 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
1506 (long) current_gdbarch
->memory_insert_breakpoint
);
1507 #ifdef MEMORY_REMOVE_BREAKPOINT
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: %s # %s\n",
1510 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1511 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
1515 (long) current_gdbarch
->memory_remove_breakpoint
);
1516 #ifdef NAME_OF_MALLOC
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1519 XSTRING (NAME_OF_MALLOC
));
1521 fprintf_unfiltered (file
,
1522 "gdbarch_dump: name_of_malloc = %s\n",
1524 #ifdef NUM_PSEUDO_REGS
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1527 XSTRING (NUM_PSEUDO_REGS
));
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: num_pseudo_regs = %s\n",
1531 paddr_d (current_gdbarch
->num_pseudo_regs
));
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: NUM_REGS # %s\n",
1535 XSTRING (NUM_REGS
));
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: num_regs = %s\n",
1539 paddr_d (current_gdbarch
->num_regs
));
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: TARGET_OSABI # %s\n",
1543 XSTRING (TARGET_OSABI
));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: osabi = %s\n",
1547 paddr_d (current_gdbarch
->osabi
));
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: PC_REGNUM # %s\n",
1551 XSTRING (PC_REGNUM
));
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: pc_regnum = %s\n",
1555 paddr_d (current_gdbarch
->pc_regnum
));
1556 #ifdef POINTER_TO_ADDRESS
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: %s # %s\n",
1559 "POINTER_TO_ADDRESS(type, buf)",
1560 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: pointer_to_address = <0x%lx>\n",
1564 (long) current_gdbarch
->pointer_to_address
);
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1567 gdbarch_print_float_info_p (current_gdbarch
));
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: print_float_info = <0x%lx>\n",
1570 (long) current_gdbarch
->print_float_info
);
1571 #ifdef TARGET_PRINT_INSN
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: %s # %s\n",
1574 "TARGET_PRINT_INSN(vma, info)",
1575 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: print_insn = <0x%lx>\n",
1579 (long) current_gdbarch
->print_insn
);
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: print_registers_info = <0x%lx>\n",
1582 (long) current_gdbarch
->print_registers_info
);
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1585 gdbarch_print_vector_info_p (current_gdbarch
));
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: print_vector_info = <0x%lx>\n",
1588 (long) current_gdbarch
->print_vector_info
);
1590 fprintf_unfiltered (file
,
1591 "gdbarch_dump: PS_REGNUM # %s\n",
1592 XSTRING (PS_REGNUM
));
1594 fprintf_unfiltered (file
,
1595 "gdbarch_dump: ps_regnum = %s\n",
1596 paddr_d (current_gdbarch
->ps_regnum
));
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1599 gdbarch_pseudo_register_read_p (current_gdbarch
));
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: pseudo_register_read = <0x%lx>\n",
1602 (long) current_gdbarch
->pseudo_register_read
);
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1605 gdbarch_pseudo_register_write_p (current_gdbarch
));
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: pseudo_register_write = <0x%lx>\n",
1608 (long) current_gdbarch
->pseudo_register_write
);
1609 #ifdef TARGET_PTR_BIT
1610 fprintf_unfiltered (file
,
1611 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1612 XSTRING (TARGET_PTR_BIT
));
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: ptr_bit = %s\n",
1616 paddr_d (current_gdbarch
->ptr_bit
));
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1619 gdbarch_push_dummy_call_p (current_gdbarch
));
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: push_dummy_call = <0x%lx>\n",
1622 (long) current_gdbarch
->push_dummy_call
);
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1625 gdbarch_push_dummy_code_p (current_gdbarch
));
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: push_dummy_code = <0x%lx>\n",
1628 (long) current_gdbarch
->push_dummy_code
);
1629 #ifdef TARGET_READ_PC_P
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: %s # %s\n",
1632 "TARGET_READ_PC_P()",
1633 XSTRING (TARGET_READ_PC_P ()));
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1637 gdbarch_read_pc_p (current_gdbarch
));
1638 #ifdef TARGET_READ_PC
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: %s # %s\n",
1641 "TARGET_READ_PC(ptid)",
1642 XSTRING (TARGET_READ_PC (ptid
)));
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: read_pc = <0x%lx>\n",
1646 (long) current_gdbarch
->read_pc
);
1647 #ifdef TARGET_READ_SP_P
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: %s # %s\n",
1650 "TARGET_READ_SP_P()",
1651 XSTRING (TARGET_READ_SP_P ()));
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: gdbarch_read_sp_p() = %d\n",
1655 gdbarch_read_sp_p (current_gdbarch
));
1656 #ifdef TARGET_READ_SP
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: %s # %s\n",
1660 XSTRING (TARGET_READ_SP ()));
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: read_sp = <0x%lx>\n",
1664 (long) current_gdbarch
->read_sp
);
1665 #ifdef REGISTER_BYTES_OK_P
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: %s # %s\n",
1668 "REGISTER_BYTES_OK_P()",
1669 XSTRING (REGISTER_BYTES_OK_P ()));
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
1673 gdbarch_register_bytes_ok_p (current_gdbarch
));
1674 #ifdef REGISTER_BYTES_OK
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: %s # %s\n",
1677 "REGISTER_BYTES_OK(nr_bytes)",
1678 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1680 fprintf_unfiltered (file
,
1681 "gdbarch_dump: register_bytes_ok = <0x%lx>\n",
1682 (long) current_gdbarch
->register_bytes_ok
);
1683 #ifdef REGISTER_NAME
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: %s # %s\n",
1686 "REGISTER_NAME(regnr)",
1687 XSTRING (REGISTER_NAME (regnr
)));
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: register_name = <0x%lx>\n",
1691 (long) current_gdbarch
->register_name
);
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: register_reggroup_p = <0x%lx>\n",
1694 (long) current_gdbarch
->register_reggroup_p
);
1695 #ifdef REGISTER_SIM_REGNO
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: %s # %s\n",
1698 "REGISTER_SIM_REGNO(reg_nr)",
1699 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: register_sim_regno = <0x%lx>\n",
1703 (long) current_gdbarch
->register_sim_regno
);
1704 #ifdef REGISTER_TO_VALUE
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: %s # %s\n",
1707 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1708 XSTRING (REGISTER_TO_VALUE (frame
, regnum
, type
, buf
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: register_to_value = <0x%lx>\n",
1712 (long) current_gdbarch
->register_to_value
);
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1715 gdbarch_register_type_p (current_gdbarch
));
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: register_type = <0x%lx>\n",
1718 (long) current_gdbarch
->register_type
);
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1721 gdbarch_regset_from_core_section_p (current_gdbarch
));
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: regset_from_core_section = <0x%lx>\n",
1724 (long) current_gdbarch
->regset_from_core_section
);
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: remote_translate_xfer_address = <0x%lx>\n",
1727 (long) current_gdbarch
->remote_translate_xfer_address
);
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1730 gdbarch_return_value_p (current_gdbarch
));
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: return_value = <0x%lx>\n",
1733 (long) current_gdbarch
->return_value
);
1734 #ifdef SDB_REG_TO_REGNUM
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "SDB_REG_TO_REGNUM(sdb_regnr)",
1738 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
1742 (long) current_gdbarch
->sdb_reg_to_regnum
);
1743 #ifdef TARGET_SHORT_BIT
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1746 XSTRING (TARGET_SHORT_BIT
));
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: short_bit = %s\n",
1750 paddr_d (current_gdbarch
->short_bit
));
1751 #ifdef SKIP_PROLOGUE
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: %s # %s\n",
1754 "SKIP_PROLOGUE(ip)",
1755 XSTRING (SKIP_PROLOGUE (ip
)));
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: skip_prologue = <0x%lx>\n",
1759 (long) current_gdbarch
->skip_prologue
);
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
1762 (long) current_gdbarch
->skip_solib_resolver
);
1763 #ifdef SKIP_TRAMPOLINE_CODE
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: %s # %s\n",
1766 "SKIP_TRAMPOLINE_CODE(pc)",
1767 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
1771 (long) current_gdbarch
->skip_trampoline_code
);
1772 #ifdef SMASH_TEXT_ADDRESS
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: %s # %s\n",
1775 "SMASH_TEXT_ADDRESS(addr)",
1776 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: smash_text_address = <0x%lx>\n",
1780 (long) current_gdbarch
->smash_text_address
);
1781 #ifdef SOFTWARE_SINGLE_STEP_P
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: %s # %s\n",
1784 "SOFTWARE_SINGLE_STEP_P()",
1785 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1789 gdbarch_software_single_step_p (current_gdbarch
));
1790 #ifdef SOFTWARE_SINGLE_STEP
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: %s # %s\n",
1793 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1794 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: software_single_step = <0x%lx>\n",
1798 (long) current_gdbarch
->software_single_step
);
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: SP_REGNUM # %s\n",
1802 XSTRING (SP_REGNUM
));
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: sp_regnum = %s\n",
1806 paddr_d (current_gdbarch
->sp_regnum
));
1807 #ifdef STAB_REG_TO_REGNUM
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: %s # %s\n",
1810 "STAB_REG_TO_REGNUM(stab_regnr)",
1811 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
1815 (long) current_gdbarch
->stab_reg_to_regnum
);
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
1818 (long) current_gdbarch
->stabs_argument_has_addr
);
1819 #ifdef STORE_RETURN_VALUE
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: %s # %s\n",
1822 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1823 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: store_return_value = <0x%lx>\n",
1827 (long) current_gdbarch
->store_return_value
);
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
1830 gdbarch_unwind_dummy_id_p (current_gdbarch
));
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: unwind_dummy_id = <0x%lx>\n",
1833 (long) current_gdbarch
->unwind_dummy_id
);
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1836 gdbarch_unwind_pc_p (current_gdbarch
));
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: unwind_pc = <0x%lx>\n",
1839 (long) current_gdbarch
->unwind_pc
);
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1842 gdbarch_unwind_sp_p (current_gdbarch
));
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: unwind_sp = <0x%lx>\n",
1845 (long) current_gdbarch
->unwind_sp
);
1846 #ifdef VALUE_TO_REGISTER
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: %s # %s\n",
1849 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
1850 XSTRING (VALUE_TO_REGISTER (frame
, regnum
, type
, buf
)));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: value_to_register = <0x%lx>\n",
1854 (long) current_gdbarch
->value_to_register
);
1855 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: %s # %s\n",
1858 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1859 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
1863 (long) current_gdbarch
->virtual_frame_pointer
);
1864 #ifdef TARGET_WRITE_PC
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: %s # %s\n",
1867 "TARGET_WRITE_PC(val, ptid)",
1868 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: write_pc = <0x%lx>\n",
1872 (long) current_gdbarch
->write_pc
);
1873 if (current_gdbarch
->dump_tdep
!= NULL
)
1874 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
1877 struct gdbarch_tdep
*
1878 gdbarch_tdep (struct gdbarch
*gdbarch
)
1880 if (gdbarch_debug
>= 2)
1881 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1882 return gdbarch
->tdep
;
1886 const struct bfd_arch_info
*
1887 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1889 gdb_assert (gdbarch
!= NULL
);
1890 if (gdbarch_debug
>= 2)
1891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1892 return gdbarch
->bfd_arch_info
;
1896 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1898 gdb_assert (gdbarch
!= NULL
);
1899 if (gdbarch_debug
>= 2)
1900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1901 return gdbarch
->byte_order
;
1905 gdbarch_osabi (struct gdbarch
*gdbarch
)
1907 gdb_assert (gdbarch
!= NULL
);
1908 if (gdbarch_debug
>= 2)
1909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1910 return gdbarch
->osabi
;
1914 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1916 gdb_assert (gdbarch
!= NULL
);
1917 /* Skip verify of short_bit, invalid_p == 0 */
1918 if (gdbarch_debug
>= 2)
1919 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1920 return gdbarch
->short_bit
;
1924 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1927 gdbarch
->short_bit
= short_bit
;
1931 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1933 gdb_assert (gdbarch
!= NULL
);
1934 /* Skip verify of int_bit, invalid_p == 0 */
1935 if (gdbarch_debug
>= 2)
1936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1937 return gdbarch
->int_bit
;
1941 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1944 gdbarch
->int_bit
= int_bit
;
1948 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1950 gdb_assert (gdbarch
!= NULL
);
1951 /* Skip verify of long_bit, invalid_p == 0 */
1952 if (gdbarch_debug
>= 2)
1953 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1954 return gdbarch
->long_bit
;
1958 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1961 gdbarch
->long_bit
= long_bit
;
1965 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1967 gdb_assert (gdbarch
!= NULL
);
1968 /* Skip verify of long_long_bit, invalid_p == 0 */
1969 if (gdbarch_debug
>= 2)
1970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1971 return gdbarch
->long_long_bit
;
1975 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1978 gdbarch
->long_long_bit
= long_long_bit
;
1982 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1984 gdb_assert (gdbarch
!= NULL
);
1985 /* Skip verify of float_bit, invalid_p == 0 */
1986 if (gdbarch_debug
>= 2)
1987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1988 return gdbarch
->float_bit
;
1992 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1995 gdbarch
->float_bit
= float_bit
;
1999 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2001 gdb_assert (gdbarch
!= NULL
);
2002 /* Skip verify of double_bit, invalid_p == 0 */
2003 if (gdbarch_debug
>= 2)
2004 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2005 return gdbarch
->double_bit
;
2009 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2012 gdbarch
->double_bit
= double_bit
;
2016 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2018 gdb_assert (gdbarch
!= NULL
);
2019 /* Skip verify of long_double_bit, invalid_p == 0 */
2020 if (gdbarch_debug
>= 2)
2021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2022 return gdbarch
->long_double_bit
;
2026 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2027 int long_double_bit
)
2029 gdbarch
->long_double_bit
= long_double_bit
;
2033 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2035 gdb_assert (gdbarch
!= NULL
);
2036 /* Skip verify of ptr_bit, invalid_p == 0 */
2037 if (gdbarch_debug
>= 2)
2038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2039 return gdbarch
->ptr_bit
;
2043 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2046 gdbarch
->ptr_bit
= ptr_bit
;
2050 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2052 gdb_assert (gdbarch
!= NULL
);
2053 /* Check variable changed from pre-default. */
2054 gdb_assert (gdbarch
->addr_bit
!= 0);
2055 if (gdbarch_debug
>= 2)
2056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2057 return gdbarch
->addr_bit
;
2061 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2064 gdbarch
->addr_bit
= addr_bit
;
2068 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2070 gdb_assert (gdbarch
!= NULL
);
2071 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2072 if (gdbarch_debug
>= 2)
2073 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2074 return gdbarch
->bfd_vma_bit
;
2078 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2081 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2085 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2087 gdb_assert (gdbarch
!= NULL
);
2088 /* Check variable changed from pre-default. */
2089 gdb_assert (gdbarch
->char_signed
!= -1);
2090 if (gdbarch_debug
>= 2)
2091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2092 return gdbarch
->char_signed
;
2096 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2099 gdbarch
->char_signed
= char_signed
;
2103 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
2105 gdb_assert (gdbarch
!= NULL
);
2106 return gdbarch
->read_pc
!= NULL
;
2110 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2112 gdb_assert (gdbarch
!= NULL
);
2113 gdb_assert (gdbarch
->read_pc
!= NULL
);
2114 if (gdbarch_debug
>= 2)
2115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2116 return gdbarch
->read_pc (ptid
);
2120 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2121 gdbarch_read_pc_ftype read_pc
)
2123 gdbarch
->read_pc
= read_pc
;
2127 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2129 gdb_assert (gdbarch
!= NULL
);
2130 gdb_assert (gdbarch
->write_pc
!= NULL
);
2131 if (gdbarch_debug
>= 2)
2132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2133 gdbarch
->write_pc (val
, ptid
);
2137 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2138 gdbarch_write_pc_ftype write_pc
)
2140 gdbarch
->write_pc
= write_pc
;
2144 gdbarch_read_sp_p (struct gdbarch
*gdbarch
)
2146 gdb_assert (gdbarch
!= NULL
);
2147 return gdbarch
->read_sp
!= NULL
;
2151 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2153 gdb_assert (gdbarch
!= NULL
);
2154 gdb_assert (gdbarch
->read_sp
!= NULL
);
2155 if (gdbarch_debug
>= 2)
2156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2157 return gdbarch
->read_sp ();
2161 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2162 gdbarch_read_sp_ftype read_sp
)
2164 gdbarch
->read_sp
= read_sp
;
2168 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2170 gdb_assert (gdbarch
!= NULL
);
2171 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
2172 if (gdbarch_debug
>= 2)
2173 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2174 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2178 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2179 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2181 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2185 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2187 gdb_assert (gdbarch
!= NULL
);
2188 return gdbarch
->pseudo_register_read
!= NULL
;
2192 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2194 gdb_assert (gdbarch
!= NULL
);
2195 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
2196 if (gdbarch_debug
>= 2)
2197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2198 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2202 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2203 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2205 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2209 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2211 gdb_assert (gdbarch
!= NULL
);
2212 return gdbarch
->pseudo_register_write
!= NULL
;
2216 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2218 gdb_assert (gdbarch
!= NULL
);
2219 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
2220 if (gdbarch_debug
>= 2)
2221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2222 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2226 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2227 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2229 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2233 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2235 gdb_assert (gdbarch
!= NULL
);
2236 /* Check variable changed from pre-default. */
2237 gdb_assert (gdbarch
->num_regs
!= -1);
2238 if (gdbarch_debug
>= 2)
2239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2240 return gdbarch
->num_regs
;
2244 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2247 gdbarch
->num_regs
= num_regs
;
2251 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2253 gdb_assert (gdbarch
!= NULL
);
2254 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2255 if (gdbarch_debug
>= 2)
2256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2257 return gdbarch
->num_pseudo_regs
;
2261 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2262 int num_pseudo_regs
)
2264 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2268 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2270 gdb_assert (gdbarch
!= NULL
);
2271 /* Skip verify of sp_regnum, invalid_p == 0 */
2272 if (gdbarch_debug
>= 2)
2273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2274 return gdbarch
->sp_regnum
;
2278 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2281 gdbarch
->sp_regnum
= sp_regnum
;
2285 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2287 gdb_assert (gdbarch
!= NULL
);
2288 /* Skip verify of pc_regnum, invalid_p == 0 */
2289 if (gdbarch_debug
>= 2)
2290 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2291 return gdbarch
->pc_regnum
;
2295 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2298 gdbarch
->pc_regnum
= pc_regnum
;
2302 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2304 gdb_assert (gdbarch
!= NULL
);
2305 /* Skip verify of ps_regnum, invalid_p == 0 */
2306 if (gdbarch_debug
>= 2)
2307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2308 return gdbarch
->ps_regnum
;
2312 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2315 gdbarch
->ps_regnum
= ps_regnum
;
2319 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2321 gdb_assert (gdbarch
!= NULL
);
2322 /* Skip verify of fp0_regnum, invalid_p == 0 */
2323 if (gdbarch_debug
>= 2)
2324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2325 return gdbarch
->fp0_regnum
;
2329 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2332 gdbarch
->fp0_regnum
= fp0_regnum
;
2336 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2338 gdb_assert (gdbarch
!= NULL
);
2339 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2340 if (gdbarch_debug
>= 2)
2341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2342 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2346 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2347 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2349 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2353 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2355 gdb_assert (gdbarch
!= NULL
);
2356 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2357 if (gdbarch_debug
>= 2)
2358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2359 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2363 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2364 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2366 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2370 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2372 gdb_assert (gdbarch
!= NULL
);
2373 gdb_assert (gdbarch
->dwarf_reg_to_regnum
!= NULL
);
2374 if (gdbarch_debug
>= 2)
2375 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2376 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2380 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2381 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2383 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2387 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2389 gdb_assert (gdbarch
!= NULL
);
2390 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2391 if (gdbarch_debug
>= 2)
2392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2393 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2397 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2398 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2400 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2404 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2406 gdb_assert (gdbarch
!= NULL
);
2407 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2408 if (gdbarch_debug
>= 2)
2409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2410 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2414 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2415 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2417 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2421 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2423 gdb_assert (gdbarch
!= NULL
);
2424 gdb_assert (gdbarch
->register_name
!= NULL
);
2425 if (gdbarch_debug
>= 2)
2426 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2427 return gdbarch
->register_name (regnr
);
2431 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2432 gdbarch_register_name_ftype register_name
)
2434 gdbarch
->register_name
= register_name
;
2438 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2440 gdb_assert (gdbarch
!= NULL
);
2441 return gdbarch
->register_type
!= NULL
;
2445 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2447 gdb_assert (gdbarch
!= NULL
);
2448 gdb_assert (gdbarch
->register_type
!= NULL
);
2449 if (gdbarch_debug
>= 2)
2450 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2451 return gdbarch
->register_type (gdbarch
, reg_nr
);
2455 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2456 gdbarch_register_type_ftype register_type
)
2458 gdbarch
->register_type
= register_type
;
2462 gdbarch_deprecated_register_byte_p (struct gdbarch
*gdbarch
)
2464 gdb_assert (gdbarch
!= NULL
);
2465 return gdbarch
->deprecated_register_byte
!= generic_register_byte
;
2469 gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2471 gdb_assert (gdbarch
!= NULL
);
2472 gdb_assert (gdbarch
->deprecated_register_byte
!= NULL
);
2473 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2474 if (gdbarch_debug
>= 2)
2475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_byte called\n");
2476 return gdbarch
->deprecated_register_byte (reg_nr
);
2480 set_gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
,
2481 gdbarch_deprecated_register_byte_ftype deprecated_register_byte
)
2483 gdbarch
->deprecated_register_byte
= deprecated_register_byte
;
2487 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
2489 gdb_assert (gdbarch
!= NULL
);
2490 return gdbarch
->unwind_dummy_id
!= NULL
;
2494 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
2496 gdb_assert (gdbarch
!= NULL
);
2497 gdb_assert (gdbarch
->unwind_dummy_id
!= NULL
);
2498 if (gdbarch_debug
>= 2)
2499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
2500 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
2504 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
2505 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
2507 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
2511 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
2513 gdb_assert (gdbarch
!= NULL
);
2514 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
2515 if (gdbarch_debug
>= 2)
2516 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
2517 return gdbarch
->deprecated_fp_regnum
;
2521 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
2522 int deprecated_fp_regnum
)
2524 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
2528 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
2530 gdb_assert (gdbarch
!= NULL
);
2531 return gdbarch
->deprecated_target_read_fp
!= NULL
;
2535 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
2537 gdb_assert (gdbarch
!= NULL
);
2538 gdb_assert (gdbarch
->deprecated_target_read_fp
!= NULL
);
2539 if (gdbarch_debug
>= 2)
2540 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
2541 return gdbarch
->deprecated_target_read_fp ();
2545 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
2546 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
2548 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
2552 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
2554 gdb_assert (gdbarch
!= NULL
);
2555 return gdbarch
->push_dummy_call
!= NULL
;
2559 gdbarch_push_dummy_call (struct gdbarch
*gdbarch
, struct value
*function
, struct regcache
*regcache
, CORE_ADDR bp_addr
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
2561 gdb_assert (gdbarch
!= NULL
);
2562 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
2563 if (gdbarch_debug
>= 2)
2564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
2565 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
2569 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
2570 gdbarch_push_dummy_call_ftype push_dummy_call
)
2572 gdbarch
->push_dummy_call
= push_dummy_call
;
2576 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
2578 gdb_assert (gdbarch
!= NULL
);
2579 return gdbarch
->deprecated_push_arguments
!= NULL
;
2583 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
2585 gdb_assert (gdbarch
!= NULL
);
2586 gdb_assert (gdbarch
->deprecated_push_arguments
!= NULL
);
2587 if (gdbarch_debug
>= 2)
2588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
2589 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
2593 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
2594 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
2596 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
2600 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
2602 gdb_assert (gdbarch
!= NULL
);
2603 if (gdbarch_debug
>= 2)
2604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
2605 return gdbarch
->deprecated_register_size
;
2609 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
2610 int deprecated_register_size
)
2612 gdbarch
->deprecated_register_size
= deprecated_register_size
;
2616 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2618 gdb_assert (gdbarch
!= NULL
);
2619 /* Skip verify of call_dummy_location, invalid_p == 0 */
2620 if (gdbarch_debug
>= 2)
2621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2622 return gdbarch
->call_dummy_location
;
2626 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2627 int call_dummy_location
)
2629 gdbarch
->call_dummy_location
= call_dummy_location
;
2633 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
2635 gdb_assert (gdbarch
!= NULL
);
2636 return gdbarch
->push_dummy_code
!= NULL
;
2640 gdbarch_push_dummy_code (struct gdbarch
*gdbarch
, CORE_ADDR sp
, CORE_ADDR funaddr
, int using_gcc
, struct value
**args
, int nargs
, struct type
*value_type
, CORE_ADDR
*real_pc
, CORE_ADDR
*bp_addr
)
2642 gdb_assert (gdbarch
!= NULL
);
2643 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
2644 if (gdbarch_debug
>= 2)
2645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
2646 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
2650 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
2651 gdbarch_push_dummy_code_ftype push_dummy_code
)
2653 gdbarch
->push_dummy_code
= push_dummy_code
;
2657 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
2659 gdb_assert (gdbarch
!= NULL
);
2660 return gdbarch
->deprecated_do_registers_info
!= NULL
;
2664 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2666 gdb_assert (gdbarch
!= NULL
);
2667 gdb_assert (gdbarch
->deprecated_do_registers_info
!= NULL
);
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
2670 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
2674 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
2675 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
2677 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
2681 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
2683 gdb_assert (gdbarch
!= NULL
);
2684 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
2685 if (gdbarch_debug
>= 2)
2686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
2687 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
2691 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
2692 gdbarch_print_registers_info_ftype print_registers_info
)
2694 gdbarch
->print_registers_info
= print_registers_info
;
2698 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
2700 gdb_assert (gdbarch
!= NULL
);
2701 return gdbarch
->print_float_info
!= NULL
;
2705 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2707 gdb_assert (gdbarch
!= NULL
);
2708 gdb_assert (gdbarch
->print_float_info
!= NULL
);
2709 if (gdbarch_debug
>= 2)
2710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2711 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
2715 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2716 gdbarch_print_float_info_ftype print_float_info
)
2718 gdbarch
->print_float_info
= print_float_info
;
2722 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
2724 gdb_assert (gdbarch
!= NULL
);
2725 return gdbarch
->print_vector_info
!= NULL
;
2729 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
2731 gdb_assert (gdbarch
!= NULL
);
2732 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
2733 if (gdbarch_debug
>= 2)
2734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
2735 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
2739 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
2740 gdbarch_print_vector_info_ftype print_vector_info
)
2742 gdbarch
->print_vector_info
= print_vector_info
;
2746 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2748 gdb_assert (gdbarch
!= NULL
);
2749 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2750 if (gdbarch_debug
>= 2)
2751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2752 return gdbarch
->register_sim_regno (reg_nr
);
2756 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2757 gdbarch_register_sim_regno_ftype register_sim_regno
)
2759 gdbarch
->register_sim_regno
= register_sim_regno
;
2763 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2765 gdb_assert (gdbarch
!= NULL
);
2766 return gdbarch
->register_bytes_ok
!= NULL
;
2770 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2772 gdb_assert (gdbarch
!= NULL
);
2773 gdb_assert (gdbarch
->register_bytes_ok
!= NULL
);
2774 if (gdbarch_debug
>= 2)
2775 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2776 return gdbarch
->register_bytes_ok (nr_bytes
);
2780 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2781 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2783 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2787 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2789 gdb_assert (gdbarch
!= NULL
);
2790 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2791 if (gdbarch_debug
>= 2)
2792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2793 return gdbarch
->cannot_fetch_register (regnum
);
2797 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2798 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2800 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2804 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2806 gdb_assert (gdbarch
!= NULL
);
2807 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2808 if (gdbarch_debug
>= 2)
2809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2810 return gdbarch
->cannot_store_register (regnum
);
2814 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2815 gdbarch_cannot_store_register_ftype cannot_store_register
)
2817 gdbarch
->cannot_store_register
= cannot_store_register
;
2821 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2823 gdb_assert (gdbarch
!= NULL
);
2824 return gdbarch
->get_longjmp_target
!= NULL
;
2828 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
2830 gdb_assert (gdbarch
!= NULL
);
2831 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2832 if (gdbarch_debug
>= 2)
2833 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2834 return gdbarch
->get_longjmp_target (pc
);
2838 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2839 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2841 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2845 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
2847 gdb_assert (gdbarch
!= NULL
);
2848 return gdbarch
->deprecated_init_frame_pc
!= NULL
;
2852 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
2854 gdb_assert (gdbarch
!= NULL
);
2855 gdb_assert (gdbarch
->deprecated_init_frame_pc
!= NULL
);
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
2858 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
2862 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
2863 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
2865 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
2869 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2871 gdb_assert (gdbarch
!= NULL
);
2872 if (gdbarch_debug
>= 2)
2873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2874 return gdbarch
->believe_pcc_promotion
;
2878 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2879 int believe_pcc_promotion
)
2881 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2885 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
2887 gdb_assert (gdbarch
!= NULL
);
2888 return gdbarch
->deprecated_get_saved_register
!= NULL
;
2892 gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
, char *raw_buffer
, int *optimized
, CORE_ADDR
*addrp
, struct frame_info
*frame
, int regnum
, enum lval_type
*lval
)
2894 gdb_assert (gdbarch
!= NULL
);
2895 gdb_assert (gdbarch
->deprecated_get_saved_register
!= NULL
);
2896 if (gdbarch_debug
>= 2)
2897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
2898 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
2902 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
2903 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
2905 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
2909 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2911 gdb_assert (gdbarch
!= NULL
);
2912 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2913 if (gdbarch_debug
>= 2)
2914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2915 return gdbarch
->convert_register_p (regnum
, type
);
2919 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2920 gdbarch_convert_register_p_ftype convert_register_p
)
2922 gdbarch
->convert_register_p
= convert_register_p
;
2926 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, void *buf
)
2928 gdb_assert (gdbarch
!= NULL
);
2929 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2930 if (gdbarch_debug
>= 2)
2931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2932 gdbarch
->register_to_value (frame
, regnum
, type
, buf
);
2936 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2937 gdbarch_register_to_value_ftype register_to_value
)
2939 gdbarch
->register_to_value
= register_to_value
;
2943 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const void *buf
)
2945 gdb_assert (gdbarch
!= NULL
);
2946 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2947 if (gdbarch_debug
>= 2)
2948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2949 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2953 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2954 gdbarch_value_to_register_ftype value_to_register
)
2956 gdbarch
->value_to_register
= value_to_register
;
2960 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
2962 gdb_assert (gdbarch
!= NULL
);
2963 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2964 if (gdbarch_debug
>= 2)
2965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2966 return gdbarch
->pointer_to_address (type
, buf
);
2970 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2971 gdbarch_pointer_to_address_ftype pointer_to_address
)
2973 gdbarch
->pointer_to_address
= pointer_to_address
;
2977 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
2979 gdb_assert (gdbarch
!= NULL
);
2980 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2981 if (gdbarch_debug
>= 2)
2982 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2983 gdbarch
->address_to_pointer (type
, buf
, addr
);
2987 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2988 gdbarch_address_to_pointer_ftype address_to_pointer
)
2990 gdbarch
->address_to_pointer
= address_to_pointer
;
2994 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2996 gdb_assert (gdbarch
!= NULL
);
2997 return gdbarch
->integer_to_address
!= NULL
;
3001 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3003 gdb_assert (gdbarch
!= NULL
);
3004 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
3005 if (gdbarch_debug
>= 2)
3006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3007 return gdbarch
->integer_to_address (type
, buf
);
3011 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3012 gdbarch_integer_to_address_ftype integer_to_address
)
3014 gdbarch
->integer_to_address
= integer_to_address
;
3018 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
3020 gdb_assert (gdbarch
!= NULL
);
3021 return gdbarch
->deprecated_pop_frame
!= NULL
;
3025 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
3027 gdb_assert (gdbarch
!= NULL
);
3028 gdb_assert (gdbarch
->deprecated_pop_frame
!= NULL
);
3029 if (gdbarch_debug
>= 2)
3030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
3031 gdbarch
->deprecated_pop_frame ();
3035 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
3036 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
3038 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
3042 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
3044 gdb_assert (gdbarch
!= NULL
);
3045 return gdbarch
->deprecated_store_struct_return
!= NULL
;
3049 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3051 gdb_assert (gdbarch
!= NULL
);
3052 gdb_assert (gdbarch
->deprecated_store_struct_return
!= NULL
);
3053 if (gdbarch_debug
>= 2)
3054 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
3055 gdbarch
->deprecated_store_struct_return (addr
, sp
);
3059 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
3060 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
3062 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
3066 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
3068 gdb_assert (gdbarch
!= NULL
);
3069 return gdbarch
->return_value
!= legacy_return_value
;
3072 enum return_value_convention
3073 gdbarch_return_value (struct gdbarch
*gdbarch
, struct type
*valtype
, struct regcache
*regcache
, void *readbuf
, const void *writebuf
)
3075 gdb_assert (gdbarch
!= NULL
);
3076 gdb_assert (gdbarch
->return_value
!= NULL
);
3077 /* Do not check predicate: gdbarch->return_value != legacy_return_value, allow call. */
3078 if (gdbarch_debug
>= 2)
3079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
3080 return gdbarch
->return_value (gdbarch
, valtype
, regcache
, readbuf
, writebuf
);
3084 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
3085 gdbarch_return_value_ftype return_value
)
3087 gdbarch
->return_value
= return_value
;
3091 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
3093 gdb_assert (gdbarch
!= NULL
);
3094 gdb_assert (gdbarch
->extract_return_value
!= NULL
);
3095 if (gdbarch_debug
>= 2)
3096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3097 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3101 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3102 gdbarch_extract_return_value_ftype extract_return_value
)
3104 gdbarch
->extract_return_value
= extract_return_value
;
3108 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
3110 gdb_assert (gdbarch
!= NULL
);
3111 gdb_assert (gdbarch
->store_return_value
!= NULL
);
3112 if (gdbarch_debug
>= 2)
3113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3114 gdbarch
->store_return_value (type
, regcache
, valbuf
);
3118 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3119 gdbarch_store_return_value_ftype store_return_value
)
3121 gdbarch
->store_return_value
= store_return_value
;
3125 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3127 gdb_assert (gdbarch
!= NULL
);
3128 gdb_assert (gdbarch
->deprecated_extract_return_value
!= NULL
);
3129 if (gdbarch_debug
>= 2)
3130 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3131 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3135 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3136 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3138 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3142 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3144 gdb_assert (gdbarch
!= NULL
);
3145 gdb_assert (gdbarch
->deprecated_store_return_value
!= NULL
);
3146 if (gdbarch_debug
>= 2)
3147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
3148 gdbarch
->deprecated_store_return_value (type
, valbuf
);
3152 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
3153 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
3155 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
3159 gdbarch_deprecated_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3161 gdb_assert (gdbarch
!= NULL
);
3162 gdb_assert (gdbarch
->deprecated_use_struct_convention
!= NULL
);
3163 if (gdbarch_debug
>= 2)
3164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_struct_convention called\n");
3165 return gdbarch
->deprecated_use_struct_convention (gcc_p
, value_type
);
3169 set_gdbarch_deprecated_use_struct_convention (struct gdbarch
*gdbarch
,
3170 gdbarch_deprecated_use_struct_convention_ftype deprecated_use_struct_convention
)
3172 gdbarch
->deprecated_use_struct_convention
= deprecated_use_struct_convention
;
3176 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3178 gdb_assert (gdbarch
!= NULL
);
3179 return gdbarch
->deprecated_extract_struct_value_address
!= NULL
;
3183 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3185 gdb_assert (gdbarch
!= NULL
);
3186 gdb_assert (gdbarch
->deprecated_extract_struct_value_address
!= NULL
);
3187 if (gdbarch_debug
>= 2)
3188 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3189 return gdbarch
->deprecated_extract_struct_value_address (regcache
);
3193 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3194 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3196 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3200 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
3202 gdb_assert (gdbarch
!= NULL
);
3203 return gdbarch
->deprecated_frame_init_saved_regs
!= NULL
;
3207 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3209 gdb_assert (gdbarch
!= NULL
);
3210 gdb_assert (gdbarch
->deprecated_frame_init_saved_regs
!= NULL
);
3211 if (gdbarch_debug
>= 2)
3212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
3213 gdbarch
->deprecated_frame_init_saved_regs (frame
);
3217 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3218 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
3220 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
3224 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3226 gdb_assert (gdbarch
!= NULL
);
3227 return gdbarch
->deprecated_init_extra_frame_info
!= NULL
;
3231 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3233 gdb_assert (gdbarch
!= NULL
);
3234 gdb_assert (gdbarch
->deprecated_init_extra_frame_info
!= NULL
);
3235 if (gdbarch_debug
>= 2)
3236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
3237 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
3241 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
3242 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
3244 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
3248 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3250 gdb_assert (gdbarch
!= NULL
);
3251 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3254 return gdbarch
->skip_prologue (ip
);
3258 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3259 gdbarch_skip_prologue_ftype skip_prologue
)
3261 gdbarch
->skip_prologue
= skip_prologue
;
3265 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3267 gdb_assert (gdbarch
!= NULL
);
3268 gdb_assert (gdbarch
->inner_than
!= NULL
);
3269 if (gdbarch_debug
>= 2)
3270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3271 return gdbarch
->inner_than (lhs
, rhs
);
3275 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3276 gdbarch_inner_than_ftype inner_than
)
3278 gdbarch
->inner_than
= inner_than
;
3281 const unsigned char *
3282 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3284 gdb_assert (gdbarch
!= NULL
);
3285 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
3286 if (gdbarch_debug
>= 2)
3287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3288 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3292 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3293 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3295 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3299 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
3301 gdb_assert (gdbarch
!= NULL
);
3302 return gdbarch
->adjust_breakpoint_address
!= NULL
;
3306 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
3308 gdb_assert (gdbarch
!= NULL
);
3309 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
3310 if (gdbarch_debug
>= 2)
3311 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
3312 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
3316 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
3317 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
3319 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
3323 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3325 gdb_assert (gdbarch
!= NULL
);
3326 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3329 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3333 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3334 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3336 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3340 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3342 gdb_assert (gdbarch
!= NULL
);
3343 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
3344 if (gdbarch_debug
>= 2)
3345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3346 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3350 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3351 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3353 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3357 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3359 gdb_assert (gdbarch
!= NULL
);
3360 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
3361 if (gdbarch_debug
>= 2)
3362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3363 return gdbarch
->decr_pc_after_break
;
3367 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3368 CORE_ADDR decr_pc_after_break
)
3370 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3374 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
3376 gdb_assert (gdbarch
!= NULL
);
3377 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
3378 if (gdbarch_debug
>= 2)
3379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
3380 return gdbarch
->deprecated_function_start_offset
;
3384 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
3385 CORE_ADDR deprecated_function_start_offset
)
3387 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
3391 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3393 gdb_assert (gdbarch
!= NULL
);
3394 gdb_assert (gdbarch
->remote_translate_xfer_address
!= NULL
);
3395 if (gdbarch_debug
>= 2)
3396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3397 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3401 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3402 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3404 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3408 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3410 gdb_assert (gdbarch
!= NULL
);
3411 /* Skip verify of frame_args_skip, invalid_p == 0 */
3412 if (gdbarch_debug
>= 2)
3413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3414 return gdbarch
->frame_args_skip
;
3418 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3419 CORE_ADDR frame_args_skip
)
3421 gdbarch
->frame_args_skip
= frame_args_skip
;
3425 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
3427 gdb_assert (gdbarch
!= NULL
);
3428 return gdbarch
->deprecated_frame_chain
!= NULL
;
3432 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3434 gdb_assert (gdbarch
!= NULL
);
3435 gdb_assert (gdbarch
->deprecated_frame_chain
!= NULL
);
3436 if (gdbarch_debug
>= 2)
3437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
3438 return gdbarch
->deprecated_frame_chain (frame
);
3442 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
3443 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
3445 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
3449 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
3451 gdb_assert (gdbarch
!= NULL
);
3452 return gdbarch
->deprecated_frame_chain_valid
!= NULL
;
3456 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3458 gdb_assert (gdbarch
!= NULL
);
3459 gdb_assert (gdbarch
->deprecated_frame_chain_valid
!= NULL
);
3460 if (gdbarch_debug
>= 2)
3461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
3462 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
3466 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
3467 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
3469 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
3473 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
3475 gdb_assert (gdbarch
!= NULL
);
3476 return gdbarch
->deprecated_frame_saved_pc
!= NULL
;
3480 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3482 gdb_assert (gdbarch
!= NULL
);
3483 gdb_assert (gdbarch
->deprecated_frame_saved_pc
!= NULL
);
3484 if (gdbarch_debug
>= 2)
3485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
3486 return gdbarch
->deprecated_frame_saved_pc (fi
);
3490 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
3491 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
3493 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
3497 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
3499 gdb_assert (gdbarch
!= NULL
);
3500 return gdbarch
->unwind_pc
!= NULL
;
3504 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
3506 gdb_assert (gdbarch
!= NULL
);
3507 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
3508 if (gdbarch_debug
>= 2)
3509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
3510 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
3514 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
3515 gdbarch_unwind_pc_ftype unwind_pc
)
3517 gdbarch
->unwind_pc
= unwind_pc
;
3521 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
3523 gdb_assert (gdbarch
!= NULL
);
3524 return gdbarch
->unwind_sp
!= NULL
;
3528 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
3530 gdb_assert (gdbarch
!= NULL
);
3531 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
3534 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
3538 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
3539 gdbarch_unwind_sp_ftype unwind_sp
)
3541 gdbarch
->unwind_sp
= unwind_sp
;
3545 gdbarch_deprecated_frame_args_address_p (struct gdbarch
*gdbarch
)
3547 gdb_assert (gdbarch
!= NULL
);
3548 return gdbarch
->deprecated_frame_args_address
!= get_frame_base
;
3552 gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3554 gdb_assert (gdbarch
!= NULL
);
3555 gdb_assert (gdbarch
->deprecated_frame_args_address
!= NULL
);
3556 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
3557 if (gdbarch_debug
>= 2)
3558 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_args_address called\n");
3559 return gdbarch
->deprecated_frame_args_address (fi
);
3563 set_gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
,
3564 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address
)
3566 gdbarch
->deprecated_frame_args_address
= deprecated_frame_args_address
;
3570 gdbarch_deprecated_frame_locals_address_p (struct gdbarch
*gdbarch
)
3572 gdb_assert (gdbarch
!= NULL
);
3573 return gdbarch
->deprecated_frame_locals_address
!= get_frame_base
;
3577 gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3579 gdb_assert (gdbarch
!= NULL
);
3580 gdb_assert (gdbarch
->deprecated_frame_locals_address
!= NULL
);
3581 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_locals_address called\n");
3584 return gdbarch
->deprecated_frame_locals_address (fi
);
3588 set_gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
,
3589 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address
)
3591 gdbarch
->deprecated_frame_locals_address
= deprecated_frame_locals_address
;
3595 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
3597 gdb_assert (gdbarch
!= NULL
);
3598 return gdbarch
->deprecated_saved_pc_after_call
!= NULL
;
3602 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3604 gdb_assert (gdbarch
!= NULL
);
3605 gdb_assert (gdbarch
->deprecated_saved_pc_after_call
!= NULL
);
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
3608 return gdbarch
->deprecated_saved_pc_after_call (frame
);
3612 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
3613 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
3615 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
3619 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
3621 gdb_assert (gdbarch
!= NULL
);
3622 return gdbarch
->frame_num_args
!= NULL
;
3626 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3628 gdb_assert (gdbarch
!= NULL
);
3629 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
3630 if (gdbarch_debug
>= 2)
3631 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3632 return gdbarch
->frame_num_args (frame
);
3636 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3637 gdbarch_frame_num_args_ftype frame_num_args
)
3639 gdbarch
->frame_num_args
= frame_num_args
;
3643 gdbarch_deprecated_stack_align_p (struct gdbarch
*gdbarch
)
3645 gdb_assert (gdbarch
!= NULL
);
3646 return gdbarch
->deprecated_stack_align
!= NULL
;
3650 gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3652 gdb_assert (gdbarch
!= NULL
);
3653 gdb_assert (gdbarch
->deprecated_stack_align
!= NULL
);
3654 if (gdbarch_debug
>= 2)
3655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_stack_align called\n");
3656 return gdbarch
->deprecated_stack_align (sp
);
3660 set_gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
,
3661 gdbarch_deprecated_stack_align_ftype deprecated_stack_align
)
3663 gdbarch
->deprecated_stack_align
= deprecated_stack_align
;
3667 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
3669 gdb_assert (gdbarch
!= NULL
);
3670 return gdbarch
->frame_align
!= NULL
;
3674 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
3676 gdb_assert (gdbarch
!= NULL
);
3677 gdb_assert (gdbarch
->frame_align
!= NULL
);
3678 if (gdbarch_debug
>= 2)
3679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
3680 return gdbarch
->frame_align (gdbarch
, address
);
3684 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
3685 gdbarch_frame_align_ftype frame_align
)
3687 gdbarch
->frame_align
= frame_align
;
3691 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
3693 gdb_assert (gdbarch
!= NULL
);
3694 return gdbarch
->deprecated_reg_struct_has_addr
!= NULL
;
3698 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
3700 gdb_assert (gdbarch
!= NULL
);
3701 gdb_assert (gdbarch
->deprecated_reg_struct_has_addr
!= NULL
);
3702 if (gdbarch_debug
>= 2)
3703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_reg_struct_has_addr called\n");
3704 return gdbarch
->deprecated_reg_struct_has_addr (gcc_p
, type
);
3708 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
,
3709 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr
)
3711 gdbarch
->deprecated_reg_struct_has_addr
= deprecated_reg_struct_has_addr
;
3715 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
3717 gdb_assert (gdbarch
!= NULL
);
3718 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
3719 if (gdbarch_debug
>= 2)
3720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
3721 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
3725 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
3726 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
3728 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
3732 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
3734 gdb_assert (gdbarch
!= NULL
);
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
3737 return gdbarch
->frame_red_zone_size
;
3741 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
3742 int frame_red_zone_size
)
3744 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
3747 const struct floatformat
*
3748 gdbarch_float_format (struct gdbarch
*gdbarch
)
3750 gdb_assert (gdbarch
!= NULL
);
3751 if (gdbarch_debug
>= 2)
3752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
3753 return gdbarch
->float_format
;
3757 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
3758 const struct floatformat
* float_format
)
3760 gdbarch
->float_format
= float_format
;
3763 const struct floatformat
*
3764 gdbarch_double_format (struct gdbarch
*gdbarch
)
3766 gdb_assert (gdbarch
!= NULL
);
3767 if (gdbarch_debug
>= 2)
3768 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
3769 return gdbarch
->double_format
;
3773 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
3774 const struct floatformat
* double_format
)
3776 gdbarch
->double_format
= double_format
;
3779 const struct floatformat
*
3780 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
3782 gdb_assert (gdbarch
!= NULL
);
3783 if (gdbarch_debug
>= 2)
3784 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
3785 return gdbarch
->long_double_format
;
3789 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
3790 const struct floatformat
* long_double_format
)
3792 gdbarch
->long_double_format
= long_double_format
;
3796 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
3798 gdb_assert (gdbarch
!= NULL
);
3799 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
3800 if (gdbarch_debug
>= 2)
3801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
3802 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
3806 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
3807 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
3809 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
3813 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3815 gdb_assert (gdbarch
!= NULL
);
3816 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
3817 if (gdbarch_debug
>= 2)
3818 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
3819 return gdbarch
->addr_bits_remove (addr
);
3823 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
3824 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
3826 gdbarch
->addr_bits_remove
= addr_bits_remove
;
3830 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3832 gdb_assert (gdbarch
!= NULL
);
3833 gdb_assert (gdbarch
->smash_text_address
!= NULL
);
3834 if (gdbarch_debug
>= 2)
3835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
3836 return gdbarch
->smash_text_address (addr
);
3840 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
3841 gdbarch_smash_text_address_ftype smash_text_address
)
3843 gdbarch
->smash_text_address
= smash_text_address
;
3847 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
3849 gdb_assert (gdbarch
!= NULL
);
3850 return gdbarch
->software_single_step
!= NULL
;
3854 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
3856 gdb_assert (gdbarch
!= NULL
);
3857 gdb_assert (gdbarch
->software_single_step
!= NULL
);
3858 if (gdbarch_debug
>= 2)
3859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
3860 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
3864 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
3865 gdbarch_software_single_step_ftype software_single_step
)
3867 gdbarch
->software_single_step
= software_single_step
;
3871 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
3873 gdb_assert (gdbarch
!= NULL
);
3874 gdb_assert (gdbarch
->print_insn
!= NULL
);
3875 if (gdbarch_debug
>= 2)
3876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
3877 return gdbarch
->print_insn (vma
, info
);
3881 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
3882 gdbarch_print_insn_ftype print_insn
)
3884 gdbarch
->print_insn
= print_insn
;
3888 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3890 gdb_assert (gdbarch
!= NULL
);
3891 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
3892 if (gdbarch_debug
>= 2)
3893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
3894 return gdbarch
->skip_trampoline_code (pc
);
3898 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
3899 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
3901 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
3905 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
3907 gdb_assert (gdbarch
!= NULL
);
3908 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
3909 if (gdbarch_debug
>= 2)
3910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
3911 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
3915 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
3916 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
3918 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
3922 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
3924 gdb_assert (gdbarch
!= NULL
);
3925 gdb_assert (gdbarch
->in_solib_call_trampoline
!= NULL
);
3926 if (gdbarch_debug
>= 2)
3927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
3928 return gdbarch
->in_solib_call_trampoline (pc
, name
);
3932 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
3933 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
3935 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
3939 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
3941 gdb_assert (gdbarch
!= NULL
);
3942 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
3943 if (gdbarch_debug
>= 2)
3944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
3945 return gdbarch
->in_solib_return_trampoline (pc
, name
);
3949 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
3950 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
3952 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
3956 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
3958 gdb_assert (gdbarch
!= NULL
);
3959 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
3960 if (gdbarch_debug
>= 2)
3961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
3962 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
3966 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
3967 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
3969 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
3973 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
3975 gdb_assert (gdbarch
!= NULL
);
3976 gdb_assert (gdbarch
->construct_inferior_arguments
!= NULL
);
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
3979 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
3983 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
3984 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
3986 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
3990 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
3992 gdb_assert (gdbarch
!= NULL
);
3993 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
3994 if (gdbarch_debug
>= 2)
3995 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
3996 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4000 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4001 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4003 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4007 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4009 gdb_assert (gdbarch
!= NULL
);
4010 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
4011 if (gdbarch_debug
>= 2)
4012 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4013 gdbarch
->coff_make_msymbol_special (val
, msym
);
4017 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4018 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4020 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4024 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
4026 gdb_assert (gdbarch
!= NULL
);
4027 /* Skip verify of name_of_malloc, invalid_p == 0 */
4028 if (gdbarch_debug
>= 2)
4029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
4030 return gdbarch
->name_of_malloc
;
4034 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
4035 const char * name_of_malloc
)
4037 gdbarch
->name_of_malloc
= name_of_malloc
;
4041 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
4043 gdb_assert (gdbarch
!= NULL
);
4044 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4045 if (gdbarch_debug
>= 2)
4046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
4047 return gdbarch
->cannot_step_breakpoint
;
4051 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
4052 int cannot_step_breakpoint
)
4054 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
4058 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
4060 gdb_assert (gdbarch
!= NULL
);
4061 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4062 if (gdbarch_debug
>= 2)
4063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
4064 return gdbarch
->have_nonsteppable_watchpoint
;
4068 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
4069 int have_nonsteppable_watchpoint
)
4071 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
4075 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
4077 gdb_assert (gdbarch
!= NULL
);
4078 return gdbarch
->address_class_type_flags
!= NULL
;
4082 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
4084 gdb_assert (gdbarch
!= NULL
);
4085 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
4086 if (gdbarch_debug
>= 2)
4087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
4088 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
4092 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
4093 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
4095 gdbarch
->address_class_type_flags
= address_class_type_flags
;
4099 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
4101 gdb_assert (gdbarch
!= NULL
);
4102 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
4106 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
4108 gdb_assert (gdbarch
!= NULL
);
4109 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
4110 if (gdbarch_debug
>= 2)
4111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
4112 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
4116 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
4117 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
4119 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
4123 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
4125 gdb_assert (gdbarch
!= NULL
);
4126 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
4130 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
4132 gdb_assert (gdbarch
!= NULL
);
4133 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
4134 if (gdbarch_debug
>= 2)
4135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
4136 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
4140 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
4141 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
4143 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
4147 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
4149 gdb_assert (gdbarch
!= NULL
);
4150 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
4151 if (gdbarch_debug
>= 2)
4152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
4153 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
4157 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
4158 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
4160 gdbarch
->register_reggroup_p
= register_reggroup_p
;
4164 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
4166 gdb_assert (gdbarch
!= NULL
);
4167 return gdbarch
->fetch_pointer_argument
!= NULL
;
4171 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
4173 gdb_assert (gdbarch
!= NULL
);
4174 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
4175 if (gdbarch_debug
>= 2)
4176 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
4177 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
4181 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
4182 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
4184 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
4188 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
4190 gdb_assert (gdbarch
!= NULL
);
4191 return gdbarch
->regset_from_core_section
!= NULL
;
4194 const struct regset
*
4195 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
4197 gdb_assert (gdbarch
!= NULL
);
4198 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
4199 if (gdbarch_debug
>= 2)
4200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
4201 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
4205 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
4206 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
4208 gdbarch
->regset_from_core_section
= regset_from_core_section
;
4212 /* Keep a registry of per-architecture data-pointers required by GDB
4219 gdbarch_data_pre_init_ftype
*pre_init
;
4220 gdbarch_data_post_init_ftype
*post_init
;
4223 struct gdbarch_data_registration
4225 struct gdbarch_data
*data
;
4226 struct gdbarch_data_registration
*next
;
4229 struct gdbarch_data_registry
4232 struct gdbarch_data_registration
*registrations
;
4235 struct gdbarch_data_registry gdbarch_data_registry
=
4240 static struct gdbarch_data
*
4241 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4242 gdbarch_data_post_init_ftype
*post_init
)
4244 struct gdbarch_data_registration
**curr
;
4245 /* Append the new registraration. */
4246 for (curr
= &gdbarch_data_registry
.registrations
;
4248 curr
= &(*curr
)->next
);
4249 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4250 (*curr
)->next
= NULL
;
4251 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4252 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4253 (*curr
)->data
->pre_init
= pre_init
;
4254 (*curr
)->data
->post_init
= post_init
;
4255 (*curr
)->data
->init_p
= 1;
4256 return (*curr
)->data
;
4259 struct gdbarch_data
*
4260 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4262 return gdbarch_data_register (pre_init
, NULL
);
4265 struct gdbarch_data
*
4266 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
4268 return gdbarch_data_register (NULL
, post_init
);
4271 /* Create/delete the gdbarch data vector. */
4274 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4276 gdb_assert (gdbarch
->data
== NULL
);
4277 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4278 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
4281 /* Initialize the current value of the specified per-architecture
4285 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
4286 struct gdbarch_data
*data
,
4289 gdb_assert (data
->index
< gdbarch
->nr_data
);
4290 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
4291 gdb_assert (data
->pre_init
== NULL
);
4292 gdbarch
->data
[data
->index
] = pointer
;
4295 /* Return the current value of the specified per-architecture
4299 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4301 gdb_assert (data
->index
< gdbarch
->nr_data
);
4302 if (gdbarch
->data
[data
->index
] == NULL
)
4304 /* The data-pointer isn't initialized, call init() to get a
4306 if (data
->pre_init
!= NULL
)
4307 /* Mid architecture creation: pass just the obstack, and not
4308 the entire architecture, as that way it isn't possible for
4309 pre-init code to refer to undefined architecture
4311 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
4312 else if (gdbarch
->initialized_p
4313 && data
->post_init
!= NULL
)
4314 /* Post architecture creation: pass the entire architecture
4315 (as all fields are valid), but be careful to also detect
4316 recursive references. */
4318 gdb_assert (data
->init_p
);
4320 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
4324 /* The architecture initialization hasn't completed - punt -
4325 hope that the caller knows what they are doing. Once
4326 deprecated_set_gdbarch_data has been initialized, this can be
4327 changed to an internal error. */
4329 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
4331 return gdbarch
->data
[data
->index
];
4336 /* Keep a registry of swapped data required by GDB modules. */
4341 struct gdbarch_swap_registration
*source
;
4342 struct gdbarch_swap
*next
;
4345 struct gdbarch_swap_registration
4348 unsigned long sizeof_data
;
4349 gdbarch_swap_ftype
*init
;
4350 struct gdbarch_swap_registration
*next
;
4353 struct gdbarch_swap_registry
4356 struct gdbarch_swap_registration
*registrations
;
4359 struct gdbarch_swap_registry gdbarch_swap_registry
=
4365 deprecated_register_gdbarch_swap (void *data
,
4366 unsigned long sizeof_data
,
4367 gdbarch_swap_ftype
*init
)
4369 struct gdbarch_swap_registration
**rego
;
4370 for (rego
= &gdbarch_swap_registry
.registrations
;
4372 rego
= &(*rego
)->next
);
4373 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4374 (*rego
)->next
= NULL
;
4375 (*rego
)->init
= init
;
4376 (*rego
)->data
= data
;
4377 (*rego
)->sizeof_data
= sizeof_data
;
4381 current_gdbarch_swap_init_hack (void)
4383 struct gdbarch_swap_registration
*rego
;
4384 struct gdbarch_swap
**curr
= ¤t_gdbarch
->swap
;
4385 for (rego
= gdbarch_swap_registry
.registrations
;
4389 if (rego
->data
!= NULL
)
4391 (*curr
) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch
,
4392 struct gdbarch_swap
);
4393 (*curr
)->source
= rego
;
4394 (*curr
)->swap
= gdbarch_obstack_zalloc (current_gdbarch
,
4396 (*curr
)->next
= NULL
;
4397 curr
= &(*curr
)->next
;
4399 if (rego
->init
!= NULL
)
4404 static struct gdbarch
*
4405 current_gdbarch_swap_out_hack (void)
4407 struct gdbarch
*old_gdbarch
= current_gdbarch
;
4408 struct gdbarch_swap
*curr
;
4410 gdb_assert (old_gdbarch
!= NULL
);
4411 for (curr
= old_gdbarch
->swap
;
4415 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4416 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
4418 current_gdbarch
= NULL
;
4423 current_gdbarch_swap_in_hack (struct gdbarch
*new_gdbarch
)
4425 struct gdbarch_swap
*curr
;
4427 gdb_assert (current_gdbarch
== NULL
);
4428 for (curr
= new_gdbarch
->swap
;
4431 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4432 current_gdbarch
= new_gdbarch
;
4436 /* Keep a registry of the architectures known by GDB. */
4438 struct gdbarch_registration
4440 enum bfd_architecture bfd_architecture
;
4441 gdbarch_init_ftype
*init
;
4442 gdbarch_dump_tdep_ftype
*dump_tdep
;
4443 struct gdbarch_list
*arches
;
4444 struct gdbarch_registration
*next
;
4447 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4450 append_name (const char ***buf
, int *nr
, const char *name
)
4452 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4458 gdbarch_printable_names (void)
4460 /* Accumulate a list of names based on the registed list of
4462 enum bfd_architecture a
;
4464 const char **arches
= NULL
;
4465 struct gdbarch_registration
*rego
;
4466 for (rego
= gdbarch_registry
;
4470 const struct bfd_arch_info
*ap
;
4471 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4473 internal_error (__FILE__
, __LINE__
,
4474 "gdbarch_architecture_names: multi-arch unknown");
4477 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4482 append_name (&arches
, &nr_arches
, NULL
);
4488 gdbarch_register (enum bfd_architecture bfd_architecture
,
4489 gdbarch_init_ftype
*init
,
4490 gdbarch_dump_tdep_ftype
*dump_tdep
)
4492 struct gdbarch_registration
**curr
;
4493 const struct bfd_arch_info
*bfd_arch_info
;
4494 /* Check that BFD recognizes this architecture */
4495 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4496 if (bfd_arch_info
== NULL
)
4498 internal_error (__FILE__
, __LINE__
,
4499 "gdbarch: Attempt to register unknown architecture (%d)",
4502 /* Check that we haven't seen this architecture before */
4503 for (curr
= &gdbarch_registry
;
4505 curr
= &(*curr
)->next
)
4507 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4508 internal_error (__FILE__
, __LINE__
,
4509 "gdbarch: Duplicate registraration of architecture (%s)",
4510 bfd_arch_info
->printable_name
);
4514 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4515 bfd_arch_info
->printable_name
,
4518 (*curr
) = XMALLOC (struct gdbarch_registration
);
4519 (*curr
)->bfd_architecture
= bfd_architecture
;
4520 (*curr
)->init
= init
;
4521 (*curr
)->dump_tdep
= dump_tdep
;
4522 (*curr
)->arches
= NULL
;
4523 (*curr
)->next
= NULL
;
4527 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4528 gdbarch_init_ftype
*init
)
4530 gdbarch_register (bfd_architecture
, init
, NULL
);
4534 /* Look for an architecture using gdbarch_info. Base search on only
4535 BFD_ARCH_INFO and BYTE_ORDER. */
4537 struct gdbarch_list
*
4538 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4539 const struct gdbarch_info
*info
)
4541 for (; arches
!= NULL
; arches
= arches
->next
)
4543 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4545 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4547 if (info
->osabi
!= arches
->gdbarch
->osabi
)
4555 /* Find an architecture that matches the specified INFO. Create a new
4556 architecture if needed. Return that new architecture. Assumes
4557 that there is no current architecture. */
4559 static struct gdbarch
*
4560 find_arch_by_info (struct gdbarch
*old_gdbarch
, struct gdbarch_info info
)
4562 struct gdbarch
*new_gdbarch
;
4563 struct gdbarch_registration
*rego
;
4565 /* The existing architecture has been swapped out - all this code
4566 works from a clean slate. */
4567 gdb_assert (current_gdbarch
== NULL
);
4569 /* Fill in missing parts of the INFO struct using a number of
4570 sources: "set ..."; INFOabfd supplied; and the existing
4572 gdbarch_info_fill (old_gdbarch
, &info
);
4574 /* Must have found some sort of architecture. */
4575 gdb_assert (info
.bfd_arch_info
!= NULL
);
4579 fprintf_unfiltered (gdb_stdlog
,
4580 "find_arch_by_info: info.bfd_arch_info %s\n",
4581 (info
.bfd_arch_info
!= NULL
4582 ? info
.bfd_arch_info
->printable_name
4584 fprintf_unfiltered (gdb_stdlog
,
4585 "find_arch_by_info: info.byte_order %d (%s)\n",
4587 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4588 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4590 fprintf_unfiltered (gdb_stdlog
,
4591 "find_arch_by_info: info.osabi %d (%s)\n",
4592 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
4593 fprintf_unfiltered (gdb_stdlog
,
4594 "find_arch_by_info: info.abfd 0x%lx\n",
4596 fprintf_unfiltered (gdb_stdlog
,
4597 "find_arch_by_info: info.tdep_info 0x%lx\n",
4598 (long) info
.tdep_info
);
4601 /* Find the tdep code that knows about this architecture. */
4602 for (rego
= gdbarch_registry
;
4605 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4610 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
4611 "No matching architecture\n");
4615 /* Ask the tdep code for an architecture that matches "info". */
4616 new_gdbarch
= rego
->init (info
, rego
->arches
);
4618 /* Did the tdep code like it? No. Reject the change and revert to
4619 the old architecture. */
4620 if (new_gdbarch
== NULL
)
4623 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
4624 "Target rejected architecture\n");
4628 /* Is this a pre-existing architecture (as determined by already
4629 being initialized)? Move it to the front of the architecture
4630 list (keeping the list sorted Most Recently Used). */
4631 if (new_gdbarch
->initialized_p
)
4633 struct gdbarch_list
**list
;
4634 struct gdbarch_list
*this;
4636 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
4637 "Previous architecture 0x%08lx (%s) selected\n",
4639 new_gdbarch
->bfd_arch_info
->printable_name
);
4640 /* Find the existing arch in the list. */
4641 for (list
= ®o
->arches
;
4642 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
4643 list
= &(*list
)->next
);
4644 /* It had better be in the list of architectures. */
4645 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
4648 (*list
) = this->next
;
4649 /* Insert THIS at the front. */
4650 this->next
= rego
->arches
;
4651 rego
->arches
= this;
4656 /* It's a new architecture. */
4658 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
4659 "New architecture 0x%08lx (%s) selected\n",
4661 new_gdbarch
->bfd_arch_info
->printable_name
);
4663 /* Insert the new architecture into the front of the architecture
4664 list (keep the list sorted Most Recently Used). */
4666 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
4667 this->next
= rego
->arches
;
4668 this->gdbarch
= new_gdbarch
;
4669 rego
->arches
= this;
4672 /* Check that the newly installed architecture is valid. Plug in
4673 any post init values. */
4674 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4675 verify_gdbarch (new_gdbarch
);
4676 new_gdbarch
->initialized_p
= 1;
4678 /* Initialize any per-architecture swap areas. This phase requires
4679 a valid global CURRENT_GDBARCH. Set it momentarially, and then
4680 swap the entire architecture out. */
4681 current_gdbarch
= new_gdbarch
;
4682 current_gdbarch_swap_init_hack ();
4683 current_gdbarch_swap_out_hack ();
4686 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
4692 gdbarch_find_by_info (struct gdbarch_info info
)
4694 /* Save the previously selected architecture, setting the global to
4695 NULL. This stops things like gdbarch->init() trying to use the
4696 previous architecture's configuration. The previous architecture
4697 may not even be of the same architecture family. The most recent
4698 architecture of the same family is found at the head of the
4699 rego->arches list. */
4700 struct gdbarch
*old_gdbarch
= current_gdbarch_swap_out_hack ();
4702 /* Find the specified architecture. */
4703 struct gdbarch
*new_gdbarch
= find_arch_by_info (old_gdbarch
, info
);
4705 /* Restore the existing architecture. */
4706 gdb_assert (current_gdbarch
== NULL
);
4707 current_gdbarch_swap_in_hack (old_gdbarch
);
4712 /* Make the specified architecture current, swapping the existing one
4716 deprecated_current_gdbarch_select_hack (struct gdbarch
*new_gdbarch
)
4718 gdb_assert (new_gdbarch
!= NULL
);
4719 gdb_assert (current_gdbarch
!= NULL
);
4720 gdb_assert (new_gdbarch
->initialized_p
);
4721 current_gdbarch_swap_out_hack ();
4722 current_gdbarch_swap_in_hack (new_gdbarch
);
4723 architecture_changed_event ();
4726 extern void _initialize_gdbarch (void);
4729 _initialize_gdbarch (void)
4731 struct cmd_list_element
*c
;
4733 deprecated_add_show_from_set
4734 (add_set_cmd ("arch",
4737 (char *)&gdbarch_debug
,
4738 "Set architecture debugging.\n\
4739 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4741 c
= add_set_cmd ("archdebug",
4744 (char *)&gdbarch_debug
,
4745 "Set architecture debugging.\n\
4746 When non-zero, architecture debugging is enabled.", &setlist
);
4748 deprecate_cmd (c
, "set debug arch");
4749 deprecate_cmd (deprecated_add_show_from_set (c
, &showlist
), "show debug arch");