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_virtual_type_ftype
*deprecated_register_virtual_type
;
149 int deprecated_register_bytes
;
150 gdbarch_deprecated_register_byte_ftype
*deprecated_register_byte
;
151 gdbarch_deprecated_register_raw_size_ftype
*deprecated_register_raw_size
;
152 gdbarch_deprecated_register_virtual_size_ftype
*deprecated_register_virtual_size
;
153 int deprecated_max_register_raw_size
;
154 int deprecated_max_register_virtual_size
;
155 gdbarch_unwind_dummy_id_ftype
*unwind_dummy_id
;
156 gdbarch_deprecated_save_dummy_frame_tos_ftype
*deprecated_save_dummy_frame_tos
;
157 int deprecated_fp_regnum
;
158 gdbarch_deprecated_target_read_fp_ftype
*deprecated_target_read_fp
;
159 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
160 gdbarch_deprecated_push_arguments_ftype
*deprecated_push_arguments
;
161 int deprecated_use_generic_dummy_frames
;
162 gdbarch_deprecated_push_return_address_ftype
*deprecated_push_return_address
;
163 gdbarch_deprecated_dummy_write_sp_ftype
*deprecated_dummy_write_sp
;
164 int deprecated_register_size
;
165 int call_dummy_location
;
166 CORE_ADDR deprecated_call_dummy_start_offset
;
167 CORE_ADDR deprecated_call_dummy_breakpoint_offset
;
168 int deprecated_call_dummy_length
;
169 LONGEST
* deprecated_call_dummy_words
;
170 int deprecated_sizeof_call_dummy_words
;
171 gdbarch_deprecated_fix_call_dummy_ftype
*deprecated_fix_call_dummy
;
172 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
173 gdbarch_deprecated_push_dummy_frame_ftype
*deprecated_push_dummy_frame
;
174 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
175 gdbarch_print_registers_info_ftype
*print_registers_info
;
176 gdbarch_print_float_info_ftype
*print_float_info
;
177 gdbarch_print_vector_info_ftype
*print_vector_info
;
178 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
179 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
180 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
181 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
182 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
183 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
184 gdbarch_deprecated_init_frame_pc_first_ftype
*deprecated_init_frame_pc_first
;
185 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
186 int believe_pcc_promotion
;
187 int believe_pcc_promotion_type
;
188 gdbarch_deprecated_get_saved_register_ftype
*deprecated_get_saved_register
;
189 gdbarch_deprecated_register_convertible_ftype
*deprecated_register_convertible
;
190 gdbarch_deprecated_register_convert_to_virtual_ftype
*deprecated_register_convert_to_virtual
;
191 gdbarch_deprecated_register_convert_to_raw_ftype
*deprecated_register_convert_to_raw
;
192 gdbarch_convert_register_p_ftype
*convert_register_p
;
193 gdbarch_register_to_value_ftype
*register_to_value
;
194 gdbarch_value_to_register_ftype
*value_to_register
;
195 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
196 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
197 gdbarch_integer_to_address_ftype
*integer_to_address
;
198 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
199 gdbarch_deprecated_store_struct_return_ftype
*deprecated_store_struct_return
;
200 gdbarch_return_value_ftype
*return_value
;
201 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
202 gdbarch_extract_return_value_ftype
*extract_return_value
;
203 gdbarch_store_return_value_ftype
*store_return_value
;
204 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
205 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
206 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
207 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
208 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
209 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
210 gdbarch_skip_prologue_ftype
*skip_prologue
;
211 gdbarch_inner_than_ftype
*inner_than
;
212 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
213 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
214 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
215 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
216 CORE_ADDR decr_pc_after_break
;
217 CORE_ADDR function_start_offset
;
218 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
219 CORE_ADDR frame_args_skip
;
220 gdbarch_deprecated_frameless_function_invocation_ftype
*deprecated_frameless_function_invocation
;
221 gdbarch_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
222 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
223 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
224 gdbarch_unwind_pc_ftype
*unwind_pc
;
225 gdbarch_unwind_sp_ftype
*unwind_sp
;
226 gdbarch_deprecated_frame_args_address_ftype
*deprecated_frame_args_address
;
227 gdbarch_deprecated_frame_locals_address_ftype
*deprecated_frame_locals_address
;
228 gdbarch_deprecated_saved_pc_after_call_ftype
*deprecated_saved_pc_after_call
;
229 gdbarch_frame_num_args_ftype
*frame_num_args
;
230 gdbarch_deprecated_stack_align_ftype
*deprecated_stack_align
;
231 gdbarch_frame_align_ftype
*frame_align
;
232 gdbarch_deprecated_reg_struct_has_addr_ftype
*deprecated_reg_struct_has_addr
;
233 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
234 int frame_red_zone_size
;
236 const struct floatformat
* float_format
;
237 const struct floatformat
* double_format
;
238 const struct floatformat
* long_double_format
;
239 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
240 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
241 gdbarch_smash_text_address_ftype
*smash_text_address
;
242 gdbarch_software_single_step_ftype
*software_single_step
;
243 gdbarch_print_insn_ftype
*print_insn
;
244 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
245 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
246 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
247 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
248 gdbarch_deprecated_pc_in_sigtramp_ftype
*deprecated_pc_in_sigtramp
;
249 gdbarch_sigtramp_start_ftype
*sigtramp_start
;
250 gdbarch_sigtramp_end_ftype
*sigtramp_end
;
251 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
252 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
253 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
254 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
255 const char * name_of_malloc
;
256 int cannot_step_breakpoint
;
257 int have_nonsteppable_watchpoint
;
258 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
259 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
260 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
261 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
262 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
263 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
267 /* The default architecture uses host values (for want of a better
270 extern const struct bfd_arch_info bfd_default_arch_struct
;
272 struct gdbarch startup_gdbarch
=
274 1, /* Always initialized. */
275 NULL
, /* The obstack. */
276 /* basic architecture information */
277 &bfd_default_arch_struct
, /* bfd_arch_info */
278 BFD_ENDIAN_BIG
, /* byte_order */
279 GDB_OSABI_UNKNOWN
, /* osabi */
280 /* target specific vector and its dump routine */
282 /*per-architecture data-pointers and swap regions */
284 /* Multi-arch values */
285 8 * sizeof (short), /* short_bit */
286 8 * sizeof (int), /* int_bit */
287 8 * sizeof (long), /* long_bit */
288 8 * sizeof (LONGEST
), /* long_long_bit */
289 8 * sizeof (float), /* float_bit */
290 8 * sizeof (double), /* double_bit */
291 8 * sizeof (long double), /* long_double_bit */
292 8 * sizeof (void*), /* ptr_bit */
293 8 * sizeof (void*), /* addr_bit */
294 8 * sizeof (void*), /* bfd_vma_bit */
299 0, /* virtual_frame_pointer */
300 0, /* pseudo_register_read */
301 0, /* pseudo_register_write */
303 0, /* num_pseudo_regs */
308 0, /* stab_reg_to_regnum */
309 0, /* ecoff_reg_to_regnum */
310 0, /* dwarf_reg_to_regnum */
311 0, /* sdb_reg_to_regnum */
312 0, /* dwarf2_reg_to_regnum */
313 0, /* register_name */
314 0, /* register_type */
315 0, /* deprecated_register_virtual_type */
316 0, /* deprecated_register_bytes */
317 generic_register_byte
, /* deprecated_register_byte */
318 generic_register_size
, /* deprecated_register_raw_size */
319 generic_register_size
, /* deprecated_register_virtual_size */
320 0, /* deprecated_max_register_raw_size */
321 0, /* deprecated_max_register_virtual_size */
322 0, /* unwind_dummy_id */
323 0, /* deprecated_save_dummy_frame_tos */
324 -1, /* deprecated_fp_regnum */
325 0, /* deprecated_target_read_fp */
326 0, /* push_dummy_call */
327 0, /* deprecated_push_arguments */
328 0, /* deprecated_use_generic_dummy_frames */
329 0, /* deprecated_push_return_address */
330 0, /* deprecated_dummy_write_sp */
331 0, /* deprecated_register_size */
332 0, /* call_dummy_location */
333 0, /* deprecated_call_dummy_start_offset */
334 0, /* deprecated_call_dummy_breakpoint_offset */
335 0, /* deprecated_call_dummy_length */
336 0, /* deprecated_call_dummy_words */
337 0, /* deprecated_sizeof_call_dummy_words */
338 0, /* deprecated_fix_call_dummy */
339 0, /* push_dummy_code */
340 0, /* deprecated_push_dummy_frame */
341 0, /* deprecated_do_registers_info */
342 default_print_registers_info
, /* print_registers_info */
343 0, /* print_float_info */
344 0, /* print_vector_info */
345 0, /* register_sim_regno */
346 0, /* register_bytes_ok */
347 0, /* cannot_fetch_register */
348 0, /* cannot_store_register */
349 0, /* get_longjmp_target */
350 deprecated_pc_in_call_dummy
, /* deprecated_pc_in_call_dummy */
351 0, /* deprecated_init_frame_pc_first */
352 0, /* deprecated_init_frame_pc */
353 0, /* believe_pcc_promotion */
354 0, /* believe_pcc_promotion_type */
355 0, /* deprecated_get_saved_register */
356 0, /* deprecated_register_convertible */
357 0, /* deprecated_register_convert_to_virtual */
358 0, /* deprecated_register_convert_to_raw */
359 0, /* convert_register_p */
360 0, /* register_to_value */
361 0, /* value_to_register */
362 0, /* pointer_to_address */
363 0, /* address_to_pointer */
364 0, /* integer_to_address */
365 0, /* deprecated_pop_frame */
366 0, /* deprecated_store_struct_return */
367 0, /* return_value */
368 0, /* return_value_on_stack */
369 0, /* extract_return_value */
370 0, /* store_return_value */
371 0, /* deprecated_extract_return_value */
372 0, /* deprecated_store_return_value */
373 0, /* use_struct_convention */
374 0, /* deprecated_extract_struct_value_address */
375 0, /* deprecated_frame_init_saved_regs */
376 0, /* deprecated_init_extra_frame_info */
377 0, /* skip_prologue */
379 0, /* breakpoint_from_pc */
380 0, /* adjust_breakpoint_address */
381 0, /* memory_insert_breakpoint */
382 0, /* memory_remove_breakpoint */
383 0, /* decr_pc_after_break */
384 0, /* function_start_offset */
385 generic_remote_translate_xfer_address
, /* remote_translate_xfer_address */
386 0, /* frame_args_skip */
387 0, /* deprecated_frameless_function_invocation */
388 0, /* deprecated_frame_chain */
389 0, /* deprecated_frame_chain_valid */
390 0, /* deprecated_frame_saved_pc */
393 get_frame_base
, /* deprecated_frame_args_address */
394 get_frame_base
, /* deprecated_frame_locals_address */
395 0, /* deprecated_saved_pc_after_call */
396 0, /* frame_num_args */
397 0, /* deprecated_stack_align */
399 0, /* deprecated_reg_struct_has_addr */
400 default_stabs_argument_has_addr
, /* stabs_argument_has_addr */
401 0, /* frame_red_zone_size */
402 0, /* parm_boundary */
403 0, /* float_format */
404 0, /* double_format */
405 0, /* long_double_format */
406 convert_from_func_ptr_addr_identity
, /* convert_from_func_ptr_addr */
407 0, /* addr_bits_remove */
408 0, /* smash_text_address */
409 0, /* software_single_step */
411 0, /* skip_trampoline_code */
412 generic_skip_solib_resolver
, /* skip_solib_resolver */
413 0, /* in_solib_call_trampoline */
414 0, /* in_solib_return_trampoline */
415 0, /* deprecated_pc_in_sigtramp */
416 0, /* sigtramp_start */
417 0, /* sigtramp_end */
418 generic_in_function_epilogue_p
, /* in_function_epilogue_p */
419 construct_inferior_arguments
, /* construct_inferior_arguments */
420 0, /* elf_make_msymbol_special */
421 0, /* coff_make_msymbol_special */
422 "malloc", /* name_of_malloc */
423 0, /* cannot_step_breakpoint */
424 0, /* have_nonsteppable_watchpoint */
425 0, /* address_class_type_flags */
426 0, /* address_class_type_flags_to_name */
427 0, /* address_class_name_to_type_flags */
428 default_register_reggroup_p
, /* register_reggroup_p */
429 0, /* fetch_pointer_argument */
430 0, /* regset_from_core_section */
431 /* startup_gdbarch() */
434 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
436 /* Create a new ``struct gdbarch'' based on information provided by
437 ``struct gdbarch_info''. */
440 gdbarch_alloc (const struct gdbarch_info
*info
,
441 struct gdbarch_tdep
*tdep
)
443 /* NOTE: The new architecture variable is named ``current_gdbarch''
444 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
445 the current local architecture and not the previous global
446 architecture. This ensures that the new architectures initial
447 values are not influenced by the previous architecture. Once
448 everything is parameterised with gdbarch, this will go away. */
449 struct gdbarch
*current_gdbarch
;
451 /* Create an obstack for allocating all the per-architecture memory,
452 then use that to allocate the architecture vector. */
453 struct obstack
*obstack
= XMALLOC (struct obstack
);
454 obstack_init (obstack
);
455 current_gdbarch
= obstack_alloc (obstack
, sizeof (*current_gdbarch
));
456 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
457 current_gdbarch
->obstack
= obstack
;
459 alloc_gdbarch_data (current_gdbarch
);
461 current_gdbarch
->tdep
= tdep
;
463 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
464 current_gdbarch
->byte_order
= info
->byte_order
;
465 current_gdbarch
->osabi
= info
->osabi
;
467 /* Force the explicit initialization of these. */
468 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
469 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
470 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
471 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
472 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
473 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
474 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
475 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
476 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
477 current_gdbarch
->char_signed
= -1;
478 current_gdbarch
->write_pc
= generic_target_write_pc
;
479 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
480 current_gdbarch
->num_regs
= -1;
481 current_gdbarch
->sp_regnum
= -1;
482 current_gdbarch
->pc_regnum
= -1;
483 current_gdbarch
->ps_regnum
= -1;
484 current_gdbarch
->fp0_regnum
= -1;
485 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
486 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
487 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
488 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
489 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
490 current_gdbarch
->deprecated_register_byte
= generic_register_byte
;
491 current_gdbarch
->deprecated_register_raw_size
= generic_register_size
;
492 current_gdbarch
->deprecated_register_virtual_size
= generic_register_size
;
493 current_gdbarch
->deprecated_fp_regnum
= -1;
494 current_gdbarch
->deprecated_use_generic_dummy_frames
= 1;
495 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
496 current_gdbarch
->deprecated_call_dummy_words
= legacy_call_dummy_words
;
497 current_gdbarch
->deprecated_sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
498 current_gdbarch
->print_registers_info
= default_print_registers_info
;
499 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
500 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
501 current_gdbarch
->cannot_store_register
= cannot_register_not
;
502 current_gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
503 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
504 current_gdbarch
->register_to_value
= legacy_register_to_value
;
505 current_gdbarch
->value_to_register
= legacy_value_to_register
;
506 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
507 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
508 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
509 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
510 current_gdbarch
->store_return_value
= legacy_store_return_value
;
511 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
512 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
513 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
514 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
515 current_gdbarch
->deprecated_frame_args_address
= get_frame_base
;
516 current_gdbarch
->deprecated_frame_locals_address
= get_frame_base
;
517 current_gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
518 current_gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
519 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
520 current_gdbarch
->smash_text_address
= core_addr_identity
;
521 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
522 current_gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
523 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
524 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
525 current_gdbarch
->deprecated_pc_in_sigtramp
= legacy_pc_in_sigtramp
;
526 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
527 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
528 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
529 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
530 current_gdbarch
->name_of_malloc
= "malloc";
531 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
532 /* gdbarch_alloc() */
534 return current_gdbarch
;
538 /* Allocate extra space using the per-architecture obstack. */
541 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
543 void *data
= obstack_alloc (arch
->obstack
, size
);
544 memset (data
, 0, size
);
549 /* Free a gdbarch struct. This should never happen in normal
550 operation --- once you've created a gdbarch, you keep it around.
551 However, if an architecture's init function encounters an error
552 building the structure, it may need to clean up a partially
553 constructed gdbarch. */
556 gdbarch_free (struct gdbarch
*arch
)
558 struct obstack
*obstack
;
559 gdb_assert (arch
!= NULL
);
560 gdb_assert (!arch
->initialized_p
);
561 obstack
= arch
->obstack
;
562 obstack_free (obstack
, 0); /* Includes the ARCH. */
567 /* Ensure that all values in a GDBARCH are reasonable. */
569 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
570 just happens to match the global variable ``current_gdbarch''. That
571 way macros refering to that variable get the local and not the global
572 version - ulgh. Once everything is parameterised with gdbarch, this
576 verify_gdbarch (struct gdbarch
*current_gdbarch
)
579 struct cleanup
*cleanups
;
582 log
= mem_fileopen ();
583 cleanups
= make_cleanup_ui_file_delete (log
);
585 if (current_gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
586 fprintf_unfiltered (log
, "\n\tbyte-order");
587 if (current_gdbarch
->bfd_arch_info
== NULL
)
588 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
589 /* Check those that need to be defined for the given multi-arch level. */
590 /* Skip verify of short_bit, invalid_p == 0 */
591 /* Skip verify of int_bit, invalid_p == 0 */
592 /* Skip verify of long_bit, invalid_p == 0 */
593 /* Skip verify of long_long_bit, invalid_p == 0 */
594 /* Skip verify of float_bit, invalid_p == 0 */
595 /* Skip verify of double_bit, invalid_p == 0 */
596 /* Skip verify of long_double_bit, invalid_p == 0 */
597 /* Skip verify of ptr_bit, invalid_p == 0 */
598 if (current_gdbarch
->addr_bit
== 0)
599 current_gdbarch
->addr_bit
= TARGET_PTR_BIT
;
600 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
601 if (current_gdbarch
->char_signed
== -1)
602 current_gdbarch
->char_signed
= 1;
603 /* Skip verify of read_pc, has predicate */
604 /* Skip verify of write_pc, invalid_p == 0 */
605 /* Skip verify of read_sp, has predicate */
606 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
607 /* Skip verify of pseudo_register_read, has predicate */
608 /* Skip verify of pseudo_register_write, has predicate */
609 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
610 && (current_gdbarch
->num_regs
== -1))
611 fprintf_unfiltered (log
, "\n\tnum_regs");
612 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
613 /* Skip verify of sp_regnum, invalid_p == 0 */
614 /* Skip verify of pc_regnum, invalid_p == 0 */
615 /* Skip verify of ps_regnum, invalid_p == 0 */
616 /* Skip verify of fp0_regnum, invalid_p == 0 */
617 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
618 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
619 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
620 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
621 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
622 /* Skip verify of register_type, has predicate */
623 /* Skip verify of deprecated_register_virtual_type, has predicate */
624 /* Skip verify of deprecated_register_byte, has predicate */
625 /* Skip verify of deprecated_register_raw_size, has predicate */
626 /* Skip verify of deprecated_register_virtual_size, has predicate */
627 /* Skip verify of deprecated_max_register_raw_size, has predicate */
628 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
629 /* Skip verify of unwind_dummy_id, has predicate */
630 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
631 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
632 /* Skip verify of deprecated_target_read_fp, has predicate */
633 /* Skip verify of push_dummy_call, has predicate */
634 /* Skip verify of deprecated_push_arguments, has predicate */
635 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
636 /* Skip verify of deprecated_push_return_address, has predicate */
637 /* Skip verify of deprecated_dummy_write_sp, has predicate */
638 /* Skip verify of call_dummy_location, invalid_p == 0 */
639 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
640 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
641 /* Skip verify of deprecated_fix_call_dummy, has predicate */
642 /* Skip verify of push_dummy_code, has predicate */
643 /* Skip verify of deprecated_push_dummy_frame, has predicate */
644 /* Skip verify of deprecated_do_registers_info, has predicate */
645 /* Skip verify of print_registers_info, invalid_p == 0 */
646 /* Skip verify of print_float_info, has predicate */
647 /* Skip verify of print_vector_info, has predicate */
648 /* Skip verify of register_sim_regno, invalid_p == 0 */
649 /* Skip verify of register_bytes_ok, has predicate */
650 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
651 /* Skip verify of cannot_store_register, invalid_p == 0 */
652 /* Skip verify of get_longjmp_target, has predicate */
653 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
654 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
655 /* Skip verify of deprecated_init_frame_pc, has predicate */
656 /* Skip verify of deprecated_get_saved_register, has predicate */
657 /* Skip verify of deprecated_register_convertible, has predicate */
658 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
659 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
660 /* Skip verify of convert_register_p, invalid_p == 0 */
661 /* Skip verify of register_to_value, invalid_p == 0 */
662 /* Skip verify of value_to_register, invalid_p == 0 */
663 /* Skip verify of pointer_to_address, invalid_p == 0 */
664 /* Skip verify of address_to_pointer, invalid_p == 0 */
665 /* Skip verify of integer_to_address, has predicate */
666 /* Skip verify of deprecated_pop_frame, has predicate */
667 /* Skip verify of deprecated_store_struct_return, has predicate */
668 /* Skip verify of return_value, has predicate */
669 /* Skip verify of return_value_on_stack, invalid_p == 0 */
670 /* Skip verify of extract_return_value, invalid_p == 0 */
671 /* Skip verify of store_return_value, invalid_p == 0 */
672 /* Skip verify of use_struct_convention, invalid_p == 0 */
673 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
674 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
675 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
676 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
677 && (current_gdbarch
->skip_prologue
== 0))
678 fprintf_unfiltered (log
, "\n\tskip_prologue");
679 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
680 && (current_gdbarch
->inner_than
== 0))
681 fprintf_unfiltered (log
, "\n\tinner_than");
682 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
683 && (current_gdbarch
->breakpoint_from_pc
== 0))
684 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
685 /* Skip verify of adjust_breakpoint_address, has predicate */
686 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
687 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
688 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
689 /* Skip verify of function_start_offset, invalid_p == 0 */
690 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
691 /* Skip verify of frame_args_skip, invalid_p == 0 */
692 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
693 /* Skip verify of deprecated_frame_chain, has predicate */
694 /* Skip verify of deprecated_frame_chain_valid, has predicate */
695 /* Skip verify of deprecated_frame_saved_pc, has predicate */
696 /* Skip verify of unwind_pc, has predicate */
697 /* Skip verify of unwind_sp, has predicate */
698 /* Skip verify of deprecated_frame_args_address, has predicate */
699 /* Skip verify of deprecated_frame_locals_address, has predicate */
700 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
701 /* Skip verify of frame_num_args, has predicate */
702 /* Skip verify of deprecated_stack_align, has predicate */
703 /* Skip verify of frame_align, has predicate */
704 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
705 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
706 if (current_gdbarch
->float_format
== 0)
707 current_gdbarch
->float_format
= default_float_format (current_gdbarch
);
708 if (current_gdbarch
->double_format
== 0)
709 current_gdbarch
->double_format
= default_double_format (current_gdbarch
);
710 if (current_gdbarch
->long_double_format
== 0)
711 current_gdbarch
->long_double_format
= default_double_format (current_gdbarch
);
712 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
713 /* Skip verify of addr_bits_remove, invalid_p == 0 */
714 /* Skip verify of smash_text_address, invalid_p == 0 */
715 /* Skip verify of software_single_step, has predicate */
716 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
717 && (current_gdbarch
->print_insn
== 0))
718 fprintf_unfiltered (log
, "\n\tprint_insn");
719 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
720 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
721 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
722 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
723 /* Skip verify of deprecated_pc_in_sigtramp, has predicate */
724 /* Skip verify of sigtramp_start, has predicate */
725 /* Skip verify of sigtramp_end, has predicate */
726 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
727 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
728 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
729 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
730 /* Skip verify of name_of_malloc, invalid_p == 0 */
731 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
732 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
733 /* Skip verify of address_class_type_flags, has predicate */
734 /* Skip verify of address_class_type_flags_to_name, has predicate */
735 /* Skip verify of address_class_name_to_type_flags, has predicate */
736 /* Skip verify of register_reggroup_p, invalid_p == 0 */
737 /* Skip verify of fetch_pointer_argument, has predicate */
738 /* Skip verify of regset_from_core_section, has predicate */
739 buf
= ui_file_xstrdup (log
, &dummy
);
740 make_cleanup (xfree
, buf
);
741 if (strlen (buf
) > 0)
742 internal_error (__FILE__
, __LINE__
,
743 "verify_gdbarch: the following are invalid ...%s",
745 do_cleanups (cleanups
);
749 /* Print out the details of the current architecture. */
751 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
752 just happens to match the global variable ``current_gdbarch''. That
753 way macros refering to that variable get the local and not the global
754 version - ulgh. Once everything is parameterised with gdbarch, this
758 gdbarch_dump (struct gdbarch
*current_gdbarch
, struct ui_file
*file
)
760 fprintf_unfiltered (file
,
761 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
763 fprintf_unfiltered (file
,
764 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
765 (long) current_gdbarch
->convert_from_func_ptr_addr
);
766 fprintf_unfiltered (file
,
767 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
768 gdbarch_frame_align_p (current_gdbarch
));
769 fprintf_unfiltered (file
,
770 "gdbarch_dump: frame_align = 0x%08lx\n",
771 (long) current_gdbarch
->frame_align
);
772 fprintf_unfiltered (file
,
773 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
774 gdbarch_regset_from_core_section_p (current_gdbarch
));
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
777 (long) current_gdbarch
->regset_from_core_section
);
778 fprintf_unfiltered (file
,
779 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
780 gdbarch_return_value_p (current_gdbarch
));
781 fprintf_unfiltered (file
,
782 "gdbarch_dump: return_value = 0x%08lx\n",
783 (long) current_gdbarch
->return_value
);
784 fprintf_unfiltered (file
,
785 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
786 (long) current_gdbarch
->in_function_epilogue_p
);
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
789 (long) current_gdbarch
->register_reggroup_p
);
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
792 (long) current_gdbarch
->stabs_argument_has_addr
);
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
795 gdbarch_pseudo_register_read_p (current_gdbarch
));
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
798 (long) current_gdbarch
->pseudo_register_read
);
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
801 gdbarch_pseudo_register_write_p (current_gdbarch
));
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
804 (long) current_gdbarch
->pseudo_register_write
);
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
807 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
810 (long) current_gdbarch
->address_class_name_to_type_flags
);
811 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: %s # %s\n",
814 "ADDRESS_CLASS_TYPE_FLAGS_P()",
815 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
818 ADDRESS_CLASS_TYPE_FLAGS_P ());
820 #ifdef ADDRESS_CLASS_TYPE_FLAGS
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: %s # %s\n",
823 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
824 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
827 (long) current_gdbarch
->address_class_type_flags
828 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
832 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
835 (long) current_gdbarch
->address_class_type_flags_to_name
);
836 #ifdef ADDRESS_TO_POINTER
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: %s # %s\n",
839 "ADDRESS_TO_POINTER(type, buf, addr)",
840 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
843 (long) current_gdbarch
->address_to_pointer
844 /*ADDRESS_TO_POINTER ()*/);
846 #ifdef ADDR_BITS_REMOVE
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: %s # %s\n",
849 "ADDR_BITS_REMOVE(addr)",
850 XSTRING (ADDR_BITS_REMOVE (addr
)));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
853 (long) current_gdbarch
->addr_bits_remove
854 /*ADDR_BITS_REMOVE ()*/);
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
858 gdbarch_adjust_breakpoint_address_p (current_gdbarch
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
861 (long) current_gdbarch
->adjust_breakpoint_address
);
862 #ifdef BELIEVE_PCC_PROMOTION
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
865 XSTRING (BELIEVE_PCC_PROMOTION
));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
868 BELIEVE_PCC_PROMOTION
);
870 #ifdef BELIEVE_PCC_PROMOTION_TYPE
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
873 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
876 BELIEVE_PCC_PROMOTION_TYPE
);
878 #ifdef BREAKPOINT_FROM_PC
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: %s # %s\n",
881 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
882 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
885 (long) current_gdbarch
->breakpoint_from_pc
886 /*BREAKPOINT_FROM_PC ()*/);
888 #ifdef CALL_DUMMY_LOCATION
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
891 XSTRING (CALL_DUMMY_LOCATION
));
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
894 CALL_DUMMY_LOCATION
);
896 #ifdef CANNOT_FETCH_REGISTER
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: %s # %s\n",
899 "CANNOT_FETCH_REGISTER(regnum)",
900 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
903 (long) current_gdbarch
->cannot_fetch_register
904 /*CANNOT_FETCH_REGISTER ()*/);
906 #ifdef CANNOT_STEP_BREAKPOINT
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
909 XSTRING (CANNOT_STEP_BREAKPOINT
));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
912 CANNOT_STEP_BREAKPOINT
);
914 #ifdef CANNOT_STORE_REGISTER
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: %s # %s\n",
917 "CANNOT_STORE_REGISTER(regnum)",
918 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
921 (long) current_gdbarch
->cannot_store_register
922 /*CANNOT_STORE_REGISTER ()*/);
924 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: %s # %s\n",
927 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
928 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
931 (long) current_gdbarch
->coff_make_msymbol_special
932 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
936 (long) current_gdbarch
->construct_inferior_arguments
);
937 #ifdef CONVERT_REGISTER_P
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: %s # %s\n",
940 "CONVERT_REGISTER_P(regnum, type)",
941 XSTRING (CONVERT_REGISTER_P (regnum
, type
)));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
944 (long) current_gdbarch
->convert_register_p
945 /*CONVERT_REGISTER_P ()*/);
947 #ifdef DECR_PC_AFTER_BREAK
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
950 XSTRING (DECR_PC_AFTER_BREAK
));
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
953 (long) DECR_PC_AFTER_BREAK
);
955 #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
958 XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
));
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
961 (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
);
963 #ifdef DEPRECATED_CALL_DUMMY_LENGTH
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n",
966 XSTRING (DEPRECATED_CALL_DUMMY_LENGTH
));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n",
969 DEPRECATED_CALL_DUMMY_LENGTH
);
971 #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n",
974 XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET
));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n",
977 (long) DEPRECATED_CALL_DUMMY_START_OFFSET
);
979 #ifdef DEPRECATED_CALL_DUMMY_WORDS
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n",
982 XSTRING (DEPRECATED_CALL_DUMMY_WORDS
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n",
985 (long) DEPRECATED_CALL_DUMMY_WORDS
);
987 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: %s # %s\n",
990 "DEPRECATED_DO_REGISTERS_INFO_P()",
991 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
994 DEPRECATED_DO_REGISTERS_INFO_P ());
996 #ifdef DEPRECATED_DO_REGISTERS_INFO
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: %s # %s\n",
999 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1000 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1003 (long) current_gdbarch
->deprecated_do_registers_info
1004 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1006 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: %s # %s\n",
1009 "DEPRECATED_DUMMY_WRITE_SP_P()",
1010 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1013 DEPRECATED_DUMMY_WRITE_SP_P ());
1015 #ifdef DEPRECATED_DUMMY_WRITE_SP
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: %s # %s\n",
1018 "DEPRECATED_DUMMY_WRITE_SP(val)",
1019 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val
)));
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1022 (long) current_gdbarch
->deprecated_dummy_write_sp
1023 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1025 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: %s # %s\n",
1028 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1029 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1032 (long) current_gdbarch
->deprecated_extract_return_value
1033 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1035 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: %s # %s\n",
1038 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1039 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1042 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1044 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: %s # %s\n",
1047 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1048 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1051 (long) current_gdbarch
->deprecated_extract_struct_value_address
1052 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1054 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: %s # %s\n",
1057 "DEPRECATED_FIX_CALL_DUMMY_P()",
1058 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
1061 DEPRECATED_FIX_CALL_DUMMY_P ());
1063 #ifdef DEPRECATED_FIX_CALL_DUMMY
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: %s # %s\n",
1066 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1067 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
1070 (long) current_gdbarch
->deprecated_fix_call_dummy
1071 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
1073 #ifdef DEPRECATED_FP_REGNUM
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
1076 XSTRING (DEPRECATED_FP_REGNUM
));
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1079 DEPRECATED_FP_REGNUM
);
1081 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: %s # %s\n",
1084 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
1085 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
1088 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
1090 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: %s # %s\n",
1093 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
1094 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi
)));
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1097 (long) current_gdbarch
->deprecated_frameless_function_invocation
1098 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
1100 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: %s # %s\n",
1103 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1104 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1107 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1109 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: %s # %s\n",
1112 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1113 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi
)));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1116 (long) current_gdbarch
->deprecated_frame_args_address
1117 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1119 #ifdef DEPRECATED_FRAME_CHAIN_P
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: %s # %s\n",
1122 "DEPRECATED_FRAME_CHAIN_P()",
1123 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1126 DEPRECATED_FRAME_CHAIN_P ());
1128 #ifdef DEPRECATED_FRAME_CHAIN
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: %s # %s\n",
1131 "DEPRECATED_FRAME_CHAIN(frame)",
1132 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1135 (long) current_gdbarch
->deprecated_frame_chain
1136 /*DEPRECATED_FRAME_CHAIN ()*/);
1138 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1142 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1145 DEPRECATED_FRAME_CHAIN_VALID_P ());
1147 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1151 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1154 (long) current_gdbarch
->deprecated_frame_chain_valid
1155 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1157 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: %s # %s\n",
1160 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1161 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1164 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1166 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: %s # %s\n",
1169 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1170 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1173 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1174 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1176 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: %s # %s\n",
1179 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1180 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1183 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1185 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: %s # %s\n",
1188 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1189 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi
)));
1190 fprintf_unfiltered (file
,
1191 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1192 (long) current_gdbarch
->deprecated_frame_locals_address
1193 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1195 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: %s # %s\n",
1198 "DEPRECATED_FRAME_SAVED_PC_P()",
1199 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1202 DEPRECATED_FRAME_SAVED_PC_P ());
1204 #ifdef DEPRECATED_FRAME_SAVED_PC
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1207 "DEPRECATED_FRAME_SAVED_PC(fi)",
1208 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1211 (long) current_gdbarch
->deprecated_frame_saved_pc
1212 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1214 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: %s # %s\n",
1217 "DEPRECATED_GET_SAVED_REGISTER_P()",
1218 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1221 DEPRECATED_GET_SAVED_REGISTER_P ());
1223 #ifdef DEPRECATED_GET_SAVED_REGISTER
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1227 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1230 (long) current_gdbarch
->deprecated_get_saved_register
1231 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1233 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: %s # %s\n",
1236 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1237 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1240 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1242 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1246 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1249 (long) current_gdbarch
->deprecated_init_extra_frame_info
1250 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1252 #ifdef DEPRECATED_INIT_FRAME_PC_P
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: %s # %s\n",
1255 "DEPRECATED_INIT_FRAME_PC_P()",
1256 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1259 DEPRECATED_INIT_FRAME_PC_P ());
1261 #ifdef DEPRECATED_INIT_FRAME_PC
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: %s # %s\n",
1264 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1265 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1268 (long) current_gdbarch
->deprecated_init_frame_pc
1269 /*DEPRECATED_INIT_FRAME_PC ()*/);
1271 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: %s # %s\n",
1274 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1275 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1278 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1280 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1283 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1284 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1287 (long) current_gdbarch
->deprecated_init_frame_pc_first
1288 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1290 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1294 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1297 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1299 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1302 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1305 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1307 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: %s # %s\n",
1310 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1311 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1312 fprintf_unfiltered (file
,
1313 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1314 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1316 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1319 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1322 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1324 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: %s # %s\n",
1327 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1328 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1331 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1333 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: %s # %s\n",
1336 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1337 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1340 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1341 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1343 #ifdef DEPRECATED_PC_IN_SIGTRAMP_P
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: %s # %s\n",
1346 "DEPRECATED_PC_IN_SIGTRAMP_P()",
1347 XSTRING (DEPRECATED_PC_IN_SIGTRAMP_P ()));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP_P() = %d\n",
1350 DEPRECATED_PC_IN_SIGTRAMP_P ());
1352 #ifdef DEPRECATED_PC_IN_SIGTRAMP
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: %s # %s\n",
1355 "DEPRECATED_PC_IN_SIGTRAMP(pc, name)",
1356 XSTRING (DEPRECATED_PC_IN_SIGTRAMP (pc
, name
)));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP = <0x%08lx>\n",
1359 (long) current_gdbarch
->deprecated_pc_in_sigtramp
1360 /*DEPRECATED_PC_IN_SIGTRAMP ()*/);
1362 #ifdef DEPRECATED_POP_FRAME_P
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "DEPRECATED_POP_FRAME_P()",
1366 XSTRING (DEPRECATED_POP_FRAME_P ()));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1369 DEPRECATED_POP_FRAME_P ());
1371 #ifdef DEPRECATED_POP_FRAME
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: %s # %s\n",
1374 "DEPRECATED_POP_FRAME(-)",
1375 XSTRING (DEPRECATED_POP_FRAME (-)));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1378 (long) current_gdbarch
->deprecated_pop_frame
1379 /*DEPRECATED_POP_FRAME ()*/);
1381 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: %s # %s\n",
1384 "DEPRECATED_PUSH_ARGUMENTS_P()",
1385 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1388 DEPRECATED_PUSH_ARGUMENTS_P ());
1390 #ifdef DEPRECATED_PUSH_ARGUMENTS
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1394 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1397 (long) current_gdbarch
->deprecated_push_arguments
1398 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1400 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: %s # %s\n",
1403 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1404 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1407 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1409 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: %s # %s\n",
1412 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1413 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1416 (long) current_gdbarch
->deprecated_push_dummy_frame
1417 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1419 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: %s # %s\n",
1422 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1423 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1426 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1428 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: %s # %s\n",
1431 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1432 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1435 (long) current_gdbarch
->deprecated_push_return_address
1436 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1438 #ifdef DEPRECATED_REGISTER_BYTE_P
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: %s # %s\n",
1441 "DEPRECATED_REGISTER_BYTE_P()",
1442 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1445 DEPRECATED_REGISTER_BYTE_P ());
1447 #ifdef DEPRECATED_REGISTER_BYTE
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: %s # %s\n",
1450 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1451 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr
)));
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1454 (long) current_gdbarch
->deprecated_register_byte
1455 /*DEPRECATED_REGISTER_BYTE ()*/);
1457 #ifdef DEPRECATED_REGISTER_BYTES
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1460 XSTRING (DEPRECATED_REGISTER_BYTES
));
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1463 DEPRECATED_REGISTER_BYTES
);
1465 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: %s # %s\n",
1468 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1469 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1472 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1474 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: %s # %s\n",
1477 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1478 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr
)));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1481 (long) current_gdbarch
->deprecated_register_convertible
1482 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1484 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: %s # %s\n",
1487 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1488 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1491 (long) current_gdbarch
->deprecated_register_convert_to_raw
1492 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1494 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: %s # %s\n",
1497 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1498 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1501 (long) current_gdbarch
->deprecated_register_convert_to_virtual
1502 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1504 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: %s # %s\n",
1507 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1508 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1509 fprintf_unfiltered (file
,
1510 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1511 DEPRECATED_REGISTER_RAW_SIZE_P ());
1513 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: %s # %s\n",
1516 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1517 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr
)));
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1520 (long) current_gdbarch
->deprecated_register_raw_size
1521 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1523 #ifdef DEPRECATED_REGISTER_SIZE
1524 fprintf_unfiltered (file
,
1525 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1526 XSTRING (DEPRECATED_REGISTER_SIZE
));
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1529 DEPRECATED_REGISTER_SIZE
);
1531 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: %s # %s\n",
1534 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1535 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1538 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1540 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: %s # %s\n",
1543 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1544 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1547 (long) current_gdbarch
->deprecated_register_virtual_size
1548 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1550 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: %s # %s\n",
1553 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1554 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1557 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1559 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: %s # %s\n",
1562 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1563 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr
)));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1566 (long) current_gdbarch
->deprecated_register_virtual_type
1567 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1569 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: %s # %s\n",
1572 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1573 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1576 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1578 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: %s # %s\n",
1581 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1582 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1585 (long) current_gdbarch
->deprecated_reg_struct_has_addr
1586 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1588 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: %s # %s\n",
1591 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1592 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1595 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1597 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: %s # %s\n",
1600 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1601 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1604 (long) current_gdbarch
->deprecated_saved_pc_after_call
1605 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1607 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: %s # %s\n",
1610 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1611 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1614 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1616 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: %s # %s\n",
1619 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1620 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp
)));
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1623 (long) current_gdbarch
->deprecated_save_dummy_frame_tos
1624 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1626 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1627 fprintf_unfiltered (file
,
1628 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1629 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
));
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1632 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
);
1634 #ifdef DEPRECATED_STACK_ALIGN_P
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: %s # %s\n",
1637 "DEPRECATED_STACK_ALIGN_P()",
1638 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1641 DEPRECATED_STACK_ALIGN_P ());
1643 #ifdef DEPRECATED_STACK_ALIGN
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: %s # %s\n",
1646 "DEPRECATED_STACK_ALIGN(sp)",
1647 XSTRING (DEPRECATED_STACK_ALIGN (sp
)));
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1650 (long) current_gdbarch
->deprecated_stack_align
1651 /*DEPRECATED_STACK_ALIGN ()*/);
1653 #ifdef DEPRECATED_STORE_RETURN_VALUE
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: %s # %s\n",
1656 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1657 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1660 (long) current_gdbarch
->deprecated_store_return_value
1661 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1663 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: %s # %s\n",
1666 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1667 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1670 DEPRECATED_STORE_STRUCT_RETURN_P ());
1672 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: %s # %s\n",
1675 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1676 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1679 (long) current_gdbarch
->deprecated_store_struct_return
1680 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1682 #ifdef DEPRECATED_TARGET_READ_FP_P
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: %s # %s\n",
1685 "DEPRECATED_TARGET_READ_FP_P()",
1686 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1689 DEPRECATED_TARGET_READ_FP_P ());
1691 #ifdef DEPRECATED_TARGET_READ_FP
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: %s # %s\n",
1694 "DEPRECATED_TARGET_READ_FP()",
1695 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1698 (long) current_gdbarch
->deprecated_target_read_fp
1699 /*DEPRECATED_TARGET_READ_FP ()*/);
1701 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1704 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1707 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1709 #ifdef DWARF2_REG_TO_REGNUM
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: %s # %s\n",
1712 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1713 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1716 (long) current_gdbarch
->dwarf2_reg_to_regnum
1717 /*DWARF2_REG_TO_REGNUM ()*/);
1719 #ifdef DWARF_REG_TO_REGNUM
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: %s # %s\n",
1722 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1723 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1726 (long) current_gdbarch
->dwarf_reg_to_regnum
1727 /*DWARF_REG_TO_REGNUM ()*/);
1729 #ifdef ECOFF_REG_TO_REGNUM
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: %s # %s\n",
1732 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1733 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1736 (long) current_gdbarch
->ecoff_reg_to_regnum
1737 /*ECOFF_REG_TO_REGNUM ()*/);
1739 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: %s # %s\n",
1742 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1743 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1746 (long) current_gdbarch
->elf_make_msymbol_special
1747 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1749 #ifdef EXTRACT_RETURN_VALUE
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: %s # %s\n",
1752 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1753 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1756 (long) current_gdbarch
->extract_return_value
1757 /*EXTRACT_RETURN_VALUE ()*/);
1759 #ifdef FETCH_POINTER_ARGUMENT_P
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: %s # %s\n",
1762 "FETCH_POINTER_ARGUMENT_P()",
1763 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1766 FETCH_POINTER_ARGUMENT_P ());
1768 #ifdef FETCH_POINTER_ARGUMENT
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: %s # %s\n",
1771 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1772 XSTRING (FETCH_POINTER_ARGUMENT (frame
, argi
, type
)));
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1775 (long) current_gdbarch
->fetch_pointer_argument
1776 /*FETCH_POINTER_ARGUMENT ()*/);
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: FP0_REGNUM # %s\n",
1781 XSTRING (FP0_REGNUM
));
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: FP0_REGNUM = %d\n",
1786 #ifdef FRAME_ARGS_SKIP
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1789 XSTRING (FRAME_ARGS_SKIP
));
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1792 (long) FRAME_ARGS_SKIP
);
1794 #ifdef FRAME_NUM_ARGS_P
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: %s # %s\n",
1797 "FRAME_NUM_ARGS_P()",
1798 XSTRING (FRAME_NUM_ARGS_P ()));
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1801 FRAME_NUM_ARGS_P ());
1803 #ifdef FRAME_NUM_ARGS
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: %s # %s\n",
1806 "FRAME_NUM_ARGS(frame)",
1807 XSTRING (FRAME_NUM_ARGS (frame
)));
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1810 (long) current_gdbarch
->frame_num_args
1811 /*FRAME_NUM_ARGS ()*/);
1813 #ifdef FRAME_RED_ZONE_SIZE
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1816 XSTRING (FRAME_RED_ZONE_SIZE
));
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1819 FRAME_RED_ZONE_SIZE
);
1821 #ifdef FUNCTION_START_OFFSET
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1824 XSTRING (FUNCTION_START_OFFSET
));
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1827 (long) FUNCTION_START_OFFSET
);
1829 #ifdef GET_LONGJMP_TARGET_P
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: %s # %s\n",
1832 "GET_LONGJMP_TARGET_P()",
1833 XSTRING (GET_LONGJMP_TARGET_P ()));
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1836 GET_LONGJMP_TARGET_P ());
1838 #ifdef GET_LONGJMP_TARGET
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: %s # %s\n",
1841 "GET_LONGJMP_TARGET(pc)",
1842 XSTRING (GET_LONGJMP_TARGET (pc
)));
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1845 (long) current_gdbarch
->get_longjmp_target
1846 /*GET_LONGJMP_TARGET ()*/);
1848 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1851 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1854 HAVE_NONSTEPPABLE_WATCHPOINT
);
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: %s # %s\n",
1859 "INNER_THAN(lhs, rhs)",
1860 XSTRING (INNER_THAN (lhs
, rhs
)));
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1863 (long) current_gdbarch
->inner_than
1866 #ifdef INTEGER_TO_ADDRESS_P
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: %s # %s\n",
1869 "INTEGER_TO_ADDRESS_P()",
1870 XSTRING (INTEGER_TO_ADDRESS_P ()));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1873 INTEGER_TO_ADDRESS_P ());
1875 #ifdef INTEGER_TO_ADDRESS
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: %s # %s\n",
1878 "INTEGER_TO_ADDRESS(type, buf)",
1879 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1882 (long) current_gdbarch
->integer_to_address
1883 /*INTEGER_TO_ADDRESS ()*/);
1885 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1886 fprintf_unfiltered (file
,
1887 "gdbarch_dump: %s # %s\n",
1888 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1889 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1892 (long) current_gdbarch
->in_solib_call_trampoline
1893 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1895 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: %s # %s\n",
1898 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1899 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1902 (long) current_gdbarch
->in_solib_return_trampoline
1903 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1905 #ifdef MEMORY_INSERT_BREAKPOINT
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: %s # %s\n",
1908 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1909 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1912 (long) current_gdbarch
->memory_insert_breakpoint
1913 /*MEMORY_INSERT_BREAKPOINT ()*/);
1915 #ifdef MEMORY_REMOVE_BREAKPOINT
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: %s # %s\n",
1918 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1919 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1922 (long) current_gdbarch
->memory_remove_breakpoint
1923 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1925 #ifdef NAME_OF_MALLOC
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1928 XSTRING (NAME_OF_MALLOC
));
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1933 #ifdef NUM_PSEUDO_REGS
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1936 XSTRING (NUM_PSEUDO_REGS
));
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1942 fprintf_unfiltered (file
,
1943 "gdbarch_dump: NUM_REGS # %s\n",
1944 XSTRING (NUM_REGS
));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: NUM_REGS = %d\n",
1949 #ifdef PARM_BOUNDARY
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1952 XSTRING (PARM_BOUNDARY
));
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1958 fprintf_unfiltered (file
,
1959 "gdbarch_dump: PC_REGNUM # %s\n",
1960 XSTRING (PC_REGNUM
));
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: PC_REGNUM = %d\n",
1965 #ifdef POINTER_TO_ADDRESS
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: %s # %s\n",
1968 "POINTER_TO_ADDRESS(type, buf)",
1969 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1972 (long) current_gdbarch
->pointer_to_address
1973 /*POINTER_TO_ADDRESS ()*/);
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1977 gdbarch_print_float_info_p (current_gdbarch
));
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: print_float_info = 0x%08lx\n",
1980 (long) current_gdbarch
->print_float_info
);
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1983 (long) current_gdbarch
->print_registers_info
);
1984 fprintf_unfiltered (file
,
1985 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1986 gdbarch_print_vector_info_p (current_gdbarch
));
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1989 (long) current_gdbarch
->print_vector_info
);
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: PS_REGNUM # %s\n",
1993 XSTRING (PS_REGNUM
));
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: PS_REGNUM = %d\n",
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
2000 gdbarch_push_dummy_call_p (current_gdbarch
));
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
2003 (long) current_gdbarch
->push_dummy_call
);
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
2006 gdbarch_push_dummy_code_p (current_gdbarch
));
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2009 (long) current_gdbarch
->push_dummy_code
);
2010 #ifdef REGISTER_BYTES_OK_P
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "REGISTER_BYTES_OK_P()",
2014 XSTRING (REGISTER_BYTES_OK_P ()));
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2017 REGISTER_BYTES_OK_P ());
2019 #ifdef REGISTER_BYTES_OK
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: %s # %s\n",
2022 "REGISTER_BYTES_OK(nr_bytes)",
2023 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2026 (long) current_gdbarch
->register_bytes_ok
2027 /*REGISTER_BYTES_OK ()*/);
2029 #ifdef REGISTER_NAME
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: %s # %s\n",
2032 "REGISTER_NAME(regnr)",
2033 XSTRING (REGISTER_NAME (regnr
)));
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2036 (long) current_gdbarch
->register_name
2037 /*REGISTER_NAME ()*/);
2039 #ifdef REGISTER_SIM_REGNO
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: %s # %s\n",
2042 "REGISTER_SIM_REGNO(reg_nr)",
2043 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2046 (long) current_gdbarch
->register_sim_regno
2047 /*REGISTER_SIM_REGNO ()*/);
2049 #ifdef REGISTER_TO_VALUE
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: %s # %s\n",
2052 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
2053 XSTRING (REGISTER_TO_VALUE (frame
, regnum
, type
, buf
)));
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2056 (long) current_gdbarch
->register_to_value
2057 /*REGISTER_TO_VALUE ()*/);
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2061 gdbarch_register_type_p (current_gdbarch
));
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: register_type = 0x%08lx\n",
2064 (long) current_gdbarch
->register_type
);
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2067 (long) current_gdbarch
->remote_translate_xfer_address
);
2068 #ifdef RETURN_VALUE_ON_STACK
2069 fprintf_unfiltered (file
,
2070 "gdbarch_dump: %s # %s\n",
2071 "RETURN_VALUE_ON_STACK(type)",
2072 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2075 (long) current_gdbarch
->return_value_on_stack
2076 /*RETURN_VALUE_ON_STACK ()*/);
2078 #ifdef SDB_REG_TO_REGNUM
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: %s # %s\n",
2081 "SDB_REG_TO_REGNUM(sdb_regnr)",
2082 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2083 fprintf_unfiltered (file
,
2084 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2085 (long) current_gdbarch
->sdb_reg_to_regnum
2086 /*SDB_REG_TO_REGNUM ()*/);
2088 #ifdef SIGTRAMP_END_P
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: %s # %s\n",
2092 XSTRING (SIGTRAMP_END_P ()));
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2098 fprintf_unfiltered (file
,
2099 "gdbarch_dump: %s # %s\n",
2101 XSTRING (SIGTRAMP_END (pc
)));
2102 fprintf_unfiltered (file
,
2103 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2104 (long) current_gdbarch
->sigtramp_end
2105 /*SIGTRAMP_END ()*/);
2107 #ifdef SIGTRAMP_START_P
2108 fprintf_unfiltered (file
,
2109 "gdbarch_dump: %s # %s\n",
2110 "SIGTRAMP_START_P()",
2111 XSTRING (SIGTRAMP_START_P ()));
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2114 SIGTRAMP_START_P ());
2116 #ifdef SIGTRAMP_START
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: %s # %s\n",
2119 "SIGTRAMP_START(pc)",
2120 XSTRING (SIGTRAMP_START (pc
)));
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2123 (long) current_gdbarch
->sigtramp_start
2124 /*SIGTRAMP_START ()*/);
2126 #ifdef SKIP_PROLOGUE
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2129 "SKIP_PROLOGUE(ip)",
2130 XSTRING (SKIP_PROLOGUE (ip
)));
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2133 (long) current_gdbarch
->skip_prologue
2134 /*SKIP_PROLOGUE ()*/);
2136 fprintf_unfiltered (file
,
2137 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
2138 (long) current_gdbarch
->skip_solib_resolver
);
2139 #ifdef SKIP_TRAMPOLINE_CODE
2140 fprintf_unfiltered (file
,
2141 "gdbarch_dump: %s # %s\n",
2142 "SKIP_TRAMPOLINE_CODE(pc)",
2143 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2146 (long) current_gdbarch
->skip_trampoline_code
2147 /*SKIP_TRAMPOLINE_CODE ()*/);
2149 #ifdef SMASH_TEXT_ADDRESS
2150 fprintf_unfiltered (file
,
2151 "gdbarch_dump: %s # %s\n",
2152 "SMASH_TEXT_ADDRESS(addr)",
2153 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2156 (long) current_gdbarch
->smash_text_address
2157 /*SMASH_TEXT_ADDRESS ()*/);
2159 #ifdef SOFTWARE_SINGLE_STEP_P
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: %s # %s\n",
2162 "SOFTWARE_SINGLE_STEP_P()",
2163 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2164 fprintf_unfiltered (file
,
2165 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2166 SOFTWARE_SINGLE_STEP_P ());
2168 #ifdef SOFTWARE_SINGLE_STEP
2169 fprintf_unfiltered (file
,
2170 "gdbarch_dump: %s # %s\n",
2171 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2172 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2175 (long) current_gdbarch
->software_single_step
2176 /*SOFTWARE_SINGLE_STEP ()*/);
2179 fprintf_unfiltered (file
,
2180 "gdbarch_dump: SP_REGNUM # %s\n",
2181 XSTRING (SP_REGNUM
));
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: SP_REGNUM = %d\n",
2186 #ifdef STAB_REG_TO_REGNUM
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: %s # %s\n",
2189 "STAB_REG_TO_REGNUM(stab_regnr)",
2190 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2193 (long) current_gdbarch
->stab_reg_to_regnum
2194 /*STAB_REG_TO_REGNUM ()*/);
2196 #ifdef STORE_RETURN_VALUE
2197 fprintf_unfiltered (file
,
2198 "gdbarch_dump: %s # %s\n",
2199 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2200 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2203 (long) current_gdbarch
->store_return_value
2204 /*STORE_RETURN_VALUE ()*/);
2206 #ifdef TARGET_ADDR_BIT
2207 fprintf_unfiltered (file
,
2208 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2209 XSTRING (TARGET_ADDR_BIT
));
2210 fprintf_unfiltered (file
,
2211 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2214 #ifdef TARGET_ARCHITECTURE
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2217 XSTRING (TARGET_ARCHITECTURE
));
2218 if (TARGET_ARCHITECTURE
!= NULL
)
2219 fprintf_unfiltered (file
,
2220 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2221 TARGET_ARCHITECTURE
->printable_name
);
2223 #ifdef TARGET_BFD_VMA_BIT
2224 fprintf_unfiltered (file
,
2225 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2226 XSTRING (TARGET_BFD_VMA_BIT
));
2227 fprintf_unfiltered (file
,
2228 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2229 TARGET_BFD_VMA_BIT
);
2231 #ifdef TARGET_BYTE_ORDER
2232 fprintf_unfiltered (file
,
2233 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2234 XSTRING (TARGET_BYTE_ORDER
));
2235 fprintf_unfiltered (file
,
2236 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2237 (long) TARGET_BYTE_ORDER
);
2239 #ifdef TARGET_CHAR_SIGNED
2240 fprintf_unfiltered (file
,
2241 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2242 XSTRING (TARGET_CHAR_SIGNED
));
2243 fprintf_unfiltered (file
,
2244 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2245 TARGET_CHAR_SIGNED
);
2247 #ifdef TARGET_DOUBLE_BIT
2248 fprintf_unfiltered (file
,
2249 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2250 XSTRING (TARGET_DOUBLE_BIT
));
2251 fprintf_unfiltered (file
,
2252 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2255 #ifdef TARGET_DOUBLE_FORMAT
2256 fprintf_unfiltered (file
,
2257 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2258 XSTRING (TARGET_DOUBLE_FORMAT
));
2259 fprintf_unfiltered (file
,
2260 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2261 (TARGET_DOUBLE_FORMAT
)->name
);
2263 #ifdef TARGET_FLOAT_BIT
2264 fprintf_unfiltered (file
,
2265 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2266 XSTRING (TARGET_FLOAT_BIT
));
2267 fprintf_unfiltered (file
,
2268 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2271 #ifdef TARGET_FLOAT_FORMAT
2272 fprintf_unfiltered (file
,
2273 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2274 XSTRING (TARGET_FLOAT_FORMAT
));
2275 fprintf_unfiltered (file
,
2276 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2277 (TARGET_FLOAT_FORMAT
)->name
);
2279 #ifdef TARGET_INT_BIT
2280 fprintf_unfiltered (file
,
2281 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2282 XSTRING (TARGET_INT_BIT
));
2283 fprintf_unfiltered (file
,
2284 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2287 #ifdef TARGET_LONG_BIT
2288 fprintf_unfiltered (file
,
2289 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2290 XSTRING (TARGET_LONG_BIT
));
2291 fprintf_unfiltered (file
,
2292 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2295 #ifdef TARGET_LONG_DOUBLE_BIT
2296 fprintf_unfiltered (file
,
2297 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2298 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2299 fprintf_unfiltered (file
,
2300 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2301 TARGET_LONG_DOUBLE_BIT
);
2303 #ifdef TARGET_LONG_DOUBLE_FORMAT
2304 fprintf_unfiltered (file
,
2305 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2306 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2307 fprintf_unfiltered (file
,
2308 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2309 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2311 #ifdef TARGET_LONG_LONG_BIT
2312 fprintf_unfiltered (file
,
2313 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2314 XSTRING (TARGET_LONG_LONG_BIT
));
2315 fprintf_unfiltered (file
,
2316 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2317 TARGET_LONG_LONG_BIT
);
2320 fprintf_unfiltered (file
,
2321 "gdbarch_dump: TARGET_OSABI # %s\n",
2322 XSTRING (TARGET_OSABI
));
2323 fprintf_unfiltered (file
,
2324 "gdbarch_dump: TARGET_OSABI = %ld\n",
2325 (long) TARGET_OSABI
);
2327 #ifdef TARGET_PRINT_INSN
2328 fprintf_unfiltered (file
,
2329 "gdbarch_dump: %s # %s\n",
2330 "TARGET_PRINT_INSN(vma, info)",
2331 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2332 fprintf_unfiltered (file
,
2333 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2334 (long) current_gdbarch
->print_insn
2335 /*TARGET_PRINT_INSN ()*/);
2337 #ifdef TARGET_PTR_BIT
2338 fprintf_unfiltered (file
,
2339 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2340 XSTRING (TARGET_PTR_BIT
));
2341 fprintf_unfiltered (file
,
2342 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2345 #ifdef TARGET_READ_PC_P
2346 fprintf_unfiltered (file
,
2347 "gdbarch_dump: %s # %s\n",
2348 "TARGET_READ_PC_P()",
2349 XSTRING (TARGET_READ_PC_P ()));
2350 fprintf_unfiltered (file
,
2351 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2352 TARGET_READ_PC_P ());
2354 #ifdef TARGET_READ_PC
2355 fprintf_unfiltered (file
,
2356 "gdbarch_dump: %s # %s\n",
2357 "TARGET_READ_PC(ptid)",
2358 XSTRING (TARGET_READ_PC (ptid
)));
2359 fprintf_unfiltered (file
,
2360 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2361 (long) current_gdbarch
->read_pc
2362 /*TARGET_READ_PC ()*/);
2364 #ifdef TARGET_READ_SP_P
2365 fprintf_unfiltered (file
,
2366 "gdbarch_dump: %s # %s\n",
2367 "TARGET_READ_SP_P()",
2368 XSTRING (TARGET_READ_SP_P ()));
2369 fprintf_unfiltered (file
,
2370 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2371 TARGET_READ_SP_P ());
2373 #ifdef TARGET_READ_SP
2374 fprintf_unfiltered (file
,
2375 "gdbarch_dump: %s # %s\n",
2377 XSTRING (TARGET_READ_SP ()));
2378 fprintf_unfiltered (file
,
2379 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2380 (long) current_gdbarch
->read_sp
2381 /*TARGET_READ_SP ()*/);
2383 #ifdef TARGET_SHORT_BIT
2384 fprintf_unfiltered (file
,
2385 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2386 XSTRING (TARGET_SHORT_BIT
));
2387 fprintf_unfiltered (file
,
2388 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2391 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2392 fprintf_unfiltered (file
,
2393 "gdbarch_dump: %s # %s\n",
2394 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2395 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2396 fprintf_unfiltered (file
,
2397 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2398 (long) current_gdbarch
->virtual_frame_pointer
2399 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2401 #ifdef TARGET_WRITE_PC
2402 fprintf_unfiltered (file
,
2403 "gdbarch_dump: %s # %s\n",
2404 "TARGET_WRITE_PC(val, ptid)",
2405 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2406 fprintf_unfiltered (file
,
2407 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2408 (long) current_gdbarch
->write_pc
2409 /*TARGET_WRITE_PC ()*/);
2411 fprintf_unfiltered (file
,
2412 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2413 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2414 fprintf_unfiltered (file
,
2415 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2416 (long) current_gdbarch
->unwind_dummy_id
);
2417 fprintf_unfiltered (file
,
2418 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2419 gdbarch_unwind_pc_p (current_gdbarch
));
2420 fprintf_unfiltered (file
,
2421 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2422 (long) current_gdbarch
->unwind_pc
);
2423 fprintf_unfiltered (file
,
2424 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2425 gdbarch_unwind_sp_p (current_gdbarch
));
2426 fprintf_unfiltered (file
,
2427 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2428 (long) current_gdbarch
->unwind_sp
);
2429 #ifdef USE_STRUCT_CONVENTION
2430 fprintf_unfiltered (file
,
2431 "gdbarch_dump: %s # %s\n",
2432 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2433 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2434 fprintf_unfiltered (file
,
2435 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2436 (long) current_gdbarch
->use_struct_convention
2437 /*USE_STRUCT_CONVENTION ()*/);
2439 #ifdef VALUE_TO_REGISTER
2440 fprintf_unfiltered (file
,
2441 "gdbarch_dump: %s # %s\n",
2442 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2443 XSTRING (VALUE_TO_REGISTER (frame
, regnum
, type
, buf
)));
2444 fprintf_unfiltered (file
,
2445 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2446 (long) current_gdbarch
->value_to_register
2447 /*VALUE_TO_REGISTER ()*/);
2449 if (current_gdbarch
->dump_tdep
!= NULL
)
2450 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2453 struct gdbarch_tdep
*
2454 gdbarch_tdep (struct gdbarch
*gdbarch
)
2456 if (gdbarch_debug
>= 2)
2457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2458 return gdbarch
->tdep
;
2462 const struct bfd_arch_info
*
2463 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2465 gdb_assert (gdbarch
!= NULL
);
2466 if (gdbarch_debug
>= 2)
2467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2468 return gdbarch
->bfd_arch_info
;
2472 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2474 gdb_assert (gdbarch
!= NULL
);
2475 if (gdbarch_debug
>= 2)
2476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2477 return gdbarch
->byte_order
;
2481 gdbarch_osabi (struct gdbarch
*gdbarch
)
2483 gdb_assert (gdbarch
!= NULL
);
2484 if (gdbarch_debug
>= 2)
2485 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2486 return gdbarch
->osabi
;
2490 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2492 gdb_assert (gdbarch
!= NULL
);
2493 /* Skip verify of short_bit, invalid_p == 0 */
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2496 return gdbarch
->short_bit
;
2500 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2503 gdbarch
->short_bit
= short_bit
;
2507 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2509 gdb_assert (gdbarch
!= NULL
);
2510 /* Skip verify of int_bit, invalid_p == 0 */
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2513 return gdbarch
->int_bit
;
2517 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2520 gdbarch
->int_bit
= int_bit
;
2524 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2526 gdb_assert (gdbarch
!= NULL
);
2527 /* Skip verify of long_bit, invalid_p == 0 */
2528 if (gdbarch_debug
>= 2)
2529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2530 return gdbarch
->long_bit
;
2534 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2537 gdbarch
->long_bit
= long_bit
;
2541 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2543 gdb_assert (gdbarch
!= NULL
);
2544 /* Skip verify of long_long_bit, invalid_p == 0 */
2545 if (gdbarch_debug
>= 2)
2546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2547 return gdbarch
->long_long_bit
;
2551 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2554 gdbarch
->long_long_bit
= long_long_bit
;
2558 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2560 gdb_assert (gdbarch
!= NULL
);
2561 /* Skip verify of float_bit, invalid_p == 0 */
2562 if (gdbarch_debug
>= 2)
2563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2564 return gdbarch
->float_bit
;
2568 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2571 gdbarch
->float_bit
= float_bit
;
2575 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2577 gdb_assert (gdbarch
!= NULL
);
2578 /* Skip verify of double_bit, invalid_p == 0 */
2579 if (gdbarch_debug
>= 2)
2580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2581 return gdbarch
->double_bit
;
2585 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2588 gdbarch
->double_bit
= double_bit
;
2592 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2594 gdb_assert (gdbarch
!= NULL
);
2595 /* Skip verify of long_double_bit, invalid_p == 0 */
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2598 return gdbarch
->long_double_bit
;
2602 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2603 int long_double_bit
)
2605 gdbarch
->long_double_bit
= long_double_bit
;
2609 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2611 gdb_assert (gdbarch
!= NULL
);
2612 /* Skip verify of ptr_bit, invalid_p == 0 */
2613 if (gdbarch_debug
>= 2)
2614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2615 return gdbarch
->ptr_bit
;
2619 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2622 gdbarch
->ptr_bit
= ptr_bit
;
2626 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2628 gdb_assert (gdbarch
!= NULL
);
2629 /* Check variable changed from pre-default. */
2630 gdb_assert (gdbarch
->addr_bit
!= 0);
2631 if (gdbarch_debug
>= 2)
2632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2633 return gdbarch
->addr_bit
;
2637 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2640 gdbarch
->addr_bit
= addr_bit
;
2644 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2646 gdb_assert (gdbarch
!= NULL
);
2647 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2648 if (gdbarch_debug
>= 2)
2649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2650 return gdbarch
->bfd_vma_bit
;
2654 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2657 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2661 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2663 gdb_assert (gdbarch
!= NULL
);
2664 /* Check variable changed from pre-default. */
2665 gdb_assert (gdbarch
->char_signed
!= -1);
2666 if (gdbarch_debug
>= 2)
2667 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2668 return gdbarch
->char_signed
;
2672 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2675 gdbarch
->char_signed
= char_signed
;
2679 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
2681 gdb_assert (gdbarch
!= NULL
);
2682 return gdbarch
->read_pc
!= NULL
;
2686 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2688 gdb_assert (gdbarch
!= NULL
);
2689 gdb_assert (gdbarch
->read_pc
!= NULL
);
2690 if (gdbarch_debug
>= 2)
2691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2692 return gdbarch
->read_pc (ptid
);
2696 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2697 gdbarch_read_pc_ftype read_pc
)
2699 gdbarch
->read_pc
= read_pc
;
2703 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2705 gdb_assert (gdbarch
!= NULL
);
2706 gdb_assert (gdbarch
->write_pc
!= NULL
);
2707 if (gdbarch_debug
>= 2)
2708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2709 gdbarch
->write_pc (val
, ptid
);
2713 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2714 gdbarch_write_pc_ftype write_pc
)
2716 gdbarch
->write_pc
= write_pc
;
2720 gdbarch_read_sp_p (struct gdbarch
*gdbarch
)
2722 gdb_assert (gdbarch
!= NULL
);
2723 return gdbarch
->read_sp
!= NULL
;
2727 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2729 gdb_assert (gdbarch
!= NULL
);
2730 gdb_assert (gdbarch
->read_sp
!= NULL
);
2731 if (gdbarch_debug
>= 2)
2732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2733 return gdbarch
->read_sp ();
2737 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2738 gdbarch_read_sp_ftype read_sp
)
2740 gdbarch
->read_sp
= read_sp
;
2744 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2746 gdb_assert (gdbarch
!= NULL
);
2747 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
2748 if (gdbarch_debug
>= 2)
2749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2750 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2754 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2755 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2757 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2761 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2763 gdb_assert (gdbarch
!= NULL
);
2764 return gdbarch
->pseudo_register_read
!= NULL
;
2768 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2770 gdb_assert (gdbarch
!= NULL
);
2771 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
2772 if (gdbarch_debug
>= 2)
2773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2774 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2778 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2779 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2781 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2785 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2787 gdb_assert (gdbarch
!= NULL
);
2788 return gdbarch
->pseudo_register_write
!= NULL
;
2792 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2794 gdb_assert (gdbarch
!= NULL
);
2795 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
2796 if (gdbarch_debug
>= 2)
2797 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2798 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2802 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2803 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2805 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2809 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2811 gdb_assert (gdbarch
!= NULL
);
2812 /* Check variable changed from pre-default. */
2813 gdb_assert (gdbarch
->num_regs
!= -1);
2814 if (gdbarch_debug
>= 2)
2815 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2816 return gdbarch
->num_regs
;
2820 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2823 gdbarch
->num_regs
= num_regs
;
2827 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2829 gdb_assert (gdbarch
!= NULL
);
2830 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2831 if (gdbarch_debug
>= 2)
2832 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2833 return gdbarch
->num_pseudo_regs
;
2837 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2838 int num_pseudo_regs
)
2840 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2844 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2846 gdb_assert (gdbarch
!= NULL
);
2847 /* Skip verify of sp_regnum, invalid_p == 0 */
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2850 return gdbarch
->sp_regnum
;
2854 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2857 gdbarch
->sp_regnum
= sp_regnum
;
2861 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2863 gdb_assert (gdbarch
!= NULL
);
2864 /* Skip verify of pc_regnum, invalid_p == 0 */
2865 if (gdbarch_debug
>= 2)
2866 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2867 return gdbarch
->pc_regnum
;
2871 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2874 gdbarch
->pc_regnum
= pc_regnum
;
2878 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2880 gdb_assert (gdbarch
!= NULL
);
2881 /* Skip verify of ps_regnum, invalid_p == 0 */
2882 if (gdbarch_debug
>= 2)
2883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2884 return gdbarch
->ps_regnum
;
2888 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2891 gdbarch
->ps_regnum
= ps_regnum
;
2895 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2897 gdb_assert (gdbarch
!= NULL
);
2898 /* Skip verify of fp0_regnum, invalid_p == 0 */
2899 if (gdbarch_debug
>= 2)
2900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2901 return gdbarch
->fp0_regnum
;
2905 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2908 gdbarch
->fp0_regnum
= fp0_regnum
;
2912 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2914 gdb_assert (gdbarch
!= NULL
);
2915 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2916 if (gdbarch_debug
>= 2)
2917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2918 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2922 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2923 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2925 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2929 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2931 gdb_assert (gdbarch
!= NULL
);
2932 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2933 if (gdbarch_debug
>= 2)
2934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2935 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2939 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2940 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2942 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2946 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2948 gdb_assert (gdbarch
!= NULL
);
2949 gdb_assert (gdbarch
->dwarf_reg_to_regnum
!= NULL
);
2950 if (gdbarch_debug
>= 2)
2951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2952 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2956 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2957 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2959 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2963 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2965 gdb_assert (gdbarch
!= NULL
);
2966 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2967 if (gdbarch_debug
>= 2)
2968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2969 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2973 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2974 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2976 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2980 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2982 gdb_assert (gdbarch
!= NULL
);
2983 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2984 if (gdbarch_debug
>= 2)
2985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2986 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2990 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2991 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2993 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2997 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2999 gdb_assert (gdbarch
!= NULL
);
3000 gdb_assert (gdbarch
->register_name
!= NULL
);
3001 if (gdbarch_debug
>= 2)
3002 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
3003 return gdbarch
->register_name (regnr
);
3007 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
3008 gdbarch_register_name_ftype register_name
)
3010 gdbarch
->register_name
= register_name
;
3014 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3016 gdb_assert (gdbarch
!= NULL
);
3017 return gdbarch
->register_type
!= NULL
;
3021 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3023 gdb_assert (gdbarch
!= NULL
);
3024 gdb_assert (gdbarch
->register_type
!= NULL
);
3025 if (gdbarch_debug
>= 2)
3026 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3027 return gdbarch
->register_type (gdbarch
, reg_nr
);
3031 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3032 gdbarch_register_type_ftype register_type
)
3034 gdbarch
->register_type
= register_type
;
3038 gdbarch_deprecated_register_virtual_type_p (struct gdbarch
*gdbarch
)
3040 gdb_assert (gdbarch
!= NULL
);
3041 return gdbarch
->deprecated_register_virtual_type
!= NULL
;
3045 gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3047 gdb_assert (gdbarch
!= NULL
);
3048 gdb_assert (gdbarch
->deprecated_register_virtual_type
!= NULL
);
3049 if (gdbarch_debug
>= 2)
3050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_type called\n");
3051 return gdbarch
->deprecated_register_virtual_type (reg_nr
);
3055 set_gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
,
3056 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type
)
3058 gdbarch
->deprecated_register_virtual_type
= deprecated_register_virtual_type
;
3062 gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
)
3064 gdb_assert (gdbarch
!= NULL
);
3065 if (gdbarch_debug
>= 2)
3066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_bytes called\n");
3067 return gdbarch
->deprecated_register_bytes
;
3071 set_gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
,
3072 int deprecated_register_bytes
)
3074 gdbarch
->deprecated_register_bytes
= deprecated_register_bytes
;
3078 gdbarch_deprecated_register_byte_p (struct gdbarch
*gdbarch
)
3080 gdb_assert (gdbarch
!= NULL
);
3081 return gdbarch
->deprecated_register_byte
!= generic_register_byte
;
3085 gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3087 gdb_assert (gdbarch
!= NULL
);
3088 gdb_assert (gdbarch
->deprecated_register_byte
!= NULL
);
3089 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
3090 if (gdbarch_debug
>= 2)
3091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_byte called\n");
3092 return gdbarch
->deprecated_register_byte (reg_nr
);
3096 set_gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
,
3097 gdbarch_deprecated_register_byte_ftype deprecated_register_byte
)
3099 gdbarch
->deprecated_register_byte
= deprecated_register_byte
;
3103 gdbarch_deprecated_register_raw_size_p (struct gdbarch
*gdbarch
)
3105 gdb_assert (gdbarch
!= NULL
);
3106 return gdbarch
->deprecated_register_raw_size
!= generic_register_size
;
3110 gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3112 gdb_assert (gdbarch
!= NULL
);
3113 gdb_assert (gdbarch
->deprecated_register_raw_size
!= NULL
);
3114 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
3115 if (gdbarch_debug
>= 2)
3116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_raw_size called\n");
3117 return gdbarch
->deprecated_register_raw_size (reg_nr
);
3121 set_gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
,
3122 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size
)
3124 gdbarch
->deprecated_register_raw_size
= deprecated_register_raw_size
;
3128 gdbarch_deprecated_register_virtual_size_p (struct gdbarch
*gdbarch
)
3130 gdb_assert (gdbarch
!= NULL
);
3131 return gdbarch
->deprecated_register_virtual_size
!= generic_register_size
;
3135 gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3137 gdb_assert (gdbarch
!= NULL
);
3138 gdb_assert (gdbarch
->deprecated_register_virtual_size
!= NULL
);
3139 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
3140 if (gdbarch_debug
>= 2)
3141 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_size called\n");
3142 return gdbarch
->deprecated_register_virtual_size (reg_nr
);
3146 set_gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
,
3147 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size
)
3149 gdbarch
->deprecated_register_virtual_size
= deprecated_register_virtual_size
;
3153 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3155 gdb_assert (gdbarch
!= NULL
);
3156 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3160 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3162 gdb_assert (gdbarch
!= NULL
);
3163 if (gdbarch_debug
>= 2)
3164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3165 return gdbarch
->deprecated_max_register_raw_size
;
3169 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3170 int deprecated_max_register_raw_size
)
3172 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3176 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3178 gdb_assert (gdbarch
!= NULL
);
3179 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3183 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3185 gdb_assert (gdbarch
!= NULL
);
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3188 return gdbarch
->deprecated_max_register_virtual_size
;
3192 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3193 int deprecated_max_register_virtual_size
)
3195 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3199 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
3201 gdb_assert (gdbarch
!= NULL
);
3202 return gdbarch
->unwind_dummy_id
!= NULL
;
3206 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
3208 gdb_assert (gdbarch
!= NULL
);
3209 gdb_assert (gdbarch
->unwind_dummy_id
!= NULL
);
3210 if (gdbarch_debug
>= 2)
3211 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
3212 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
3216 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
3217 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
3219 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
3223 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3225 gdb_assert (gdbarch
!= NULL
);
3226 return gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
;
3230 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3232 gdb_assert (gdbarch
!= NULL
);
3233 gdb_assert (gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
);
3234 if (gdbarch_debug
>= 2)
3235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3236 gdbarch
->deprecated_save_dummy_frame_tos (sp
);
3240 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3241 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos
)
3243 gdbarch
->deprecated_save_dummy_frame_tos
= deprecated_save_dummy_frame_tos
;
3247 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3249 gdb_assert (gdbarch
!= NULL
);
3250 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3251 if (gdbarch_debug
>= 2)
3252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3253 return gdbarch
->deprecated_fp_regnum
;
3257 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3258 int deprecated_fp_regnum
)
3260 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3264 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
3266 gdb_assert (gdbarch
!= NULL
);
3267 return gdbarch
->deprecated_target_read_fp
!= NULL
;
3271 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
3273 gdb_assert (gdbarch
!= NULL
);
3274 gdb_assert (gdbarch
->deprecated_target_read_fp
!= NULL
);
3275 if (gdbarch_debug
>= 2)
3276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
3277 return gdbarch
->deprecated_target_read_fp ();
3281 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
3282 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
3284 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
3288 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
3290 gdb_assert (gdbarch
!= NULL
);
3291 return gdbarch
->push_dummy_call
!= NULL
;
3295 gdbarch_push_dummy_call (struct gdbarch
*gdbarch
, CORE_ADDR func_addr
, struct regcache
*regcache
, CORE_ADDR bp_addr
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3297 gdb_assert (gdbarch
!= NULL
);
3298 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
3299 if (gdbarch_debug
>= 2)
3300 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
3301 return gdbarch
->push_dummy_call (gdbarch
, func_addr
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
3305 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
3306 gdbarch_push_dummy_call_ftype push_dummy_call
)
3308 gdbarch
->push_dummy_call
= push_dummy_call
;
3312 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
3314 gdb_assert (gdbarch
!= NULL
);
3315 return gdbarch
->deprecated_push_arguments
!= NULL
;
3319 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3321 gdb_assert (gdbarch
!= NULL
);
3322 gdb_assert (gdbarch
->deprecated_push_arguments
!= NULL
);
3323 if (gdbarch_debug
>= 2)
3324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
3325 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3329 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
3330 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
3332 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
3336 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3338 gdb_assert (gdbarch
!= NULL
);
3339 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3340 if (gdbarch_debug
>= 2)
3341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3342 return gdbarch
->deprecated_use_generic_dummy_frames
;
3346 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3347 int deprecated_use_generic_dummy_frames
)
3349 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3353 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
3355 gdb_assert (gdbarch
!= NULL
);
3356 return gdbarch
->deprecated_push_return_address
!= NULL
;
3360 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3362 gdb_assert (gdbarch
!= NULL
);
3363 gdb_assert (gdbarch
->deprecated_push_return_address
!= NULL
);
3364 if (gdbarch_debug
>= 2)
3365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
3366 return gdbarch
->deprecated_push_return_address (pc
, sp
);
3370 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
3371 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
3373 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
3377 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
3379 gdb_assert (gdbarch
!= NULL
);
3380 return gdbarch
->deprecated_dummy_write_sp
!= NULL
;
3384 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
3386 gdb_assert (gdbarch
!= NULL
);
3387 gdb_assert (gdbarch
->deprecated_dummy_write_sp
!= NULL
);
3388 if (gdbarch_debug
>= 2)
3389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
3390 gdbarch
->deprecated_dummy_write_sp (val
);
3394 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
3395 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
3397 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
3401 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
3403 gdb_assert (gdbarch
!= NULL
);
3404 if (gdbarch_debug
>= 2)
3405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
3406 return gdbarch
->deprecated_register_size
;
3410 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
3411 int deprecated_register_size
)
3413 gdbarch
->deprecated_register_size
= deprecated_register_size
;
3417 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3419 gdb_assert (gdbarch
!= NULL
);
3420 /* Skip verify of call_dummy_location, invalid_p == 0 */
3421 if (gdbarch_debug
>= 2)
3422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3423 return gdbarch
->call_dummy_location
;
3427 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3428 int call_dummy_location
)
3430 gdbarch
->call_dummy_location
= call_dummy_location
;
3434 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3436 gdb_assert (gdbarch
!= NULL
);
3437 if (gdbarch_debug
>= 2)
3438 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_start_offset called\n");
3439 return gdbarch
->deprecated_call_dummy_start_offset
;
3443 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3444 CORE_ADDR deprecated_call_dummy_start_offset
)
3446 gdbarch
->deprecated_call_dummy_start_offset
= deprecated_call_dummy_start_offset
;
3450 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3452 gdb_assert (gdbarch
!= NULL
);
3453 if (gdbarch_debug
>= 2)
3454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3455 return gdbarch
->deprecated_call_dummy_breakpoint_offset
;
3459 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3460 CORE_ADDR deprecated_call_dummy_breakpoint_offset
)
3462 gdbarch
->deprecated_call_dummy_breakpoint_offset
= deprecated_call_dummy_breakpoint_offset
;
3466 gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
)
3468 gdb_assert (gdbarch
!= NULL
);
3469 if (gdbarch_debug
>= 2)
3470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_length called\n");
3471 return gdbarch
->deprecated_call_dummy_length
;
3475 set_gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
,
3476 int deprecated_call_dummy_length
)
3478 gdbarch
->deprecated_call_dummy_length
= deprecated_call_dummy_length
;
3482 gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
)
3484 gdb_assert (gdbarch
!= NULL
);
3485 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_words called\n");
3488 return gdbarch
->deprecated_call_dummy_words
;
3492 set_gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
,
3493 LONGEST
* deprecated_call_dummy_words
)
3495 gdbarch
->deprecated_call_dummy_words
= deprecated_call_dummy_words
;
3499 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3501 gdb_assert (gdbarch
!= NULL
);
3502 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3503 if (gdbarch_debug
>= 2)
3504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3505 return gdbarch
->deprecated_sizeof_call_dummy_words
;
3509 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3510 int deprecated_sizeof_call_dummy_words
)
3512 gdbarch
->deprecated_sizeof_call_dummy_words
= deprecated_sizeof_call_dummy_words
;
3516 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch
*gdbarch
)
3518 gdb_assert (gdbarch
!= NULL
);
3519 return gdbarch
->deprecated_fix_call_dummy
!= NULL
;
3523 gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
, char *dummy
, CORE_ADDR pc
, CORE_ADDR fun
, int nargs
, struct value
**args
, struct type
*type
, int gcc_p
)
3525 gdb_assert (gdbarch
!= NULL
);
3526 gdb_assert (gdbarch
->deprecated_fix_call_dummy
!= NULL
);
3527 if (gdbarch_debug
>= 2)
3528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fix_call_dummy called\n");
3529 gdbarch
->deprecated_fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3533 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
,
3534 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy
)
3536 gdbarch
->deprecated_fix_call_dummy
= deprecated_fix_call_dummy
;
3540 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
3542 gdb_assert (gdbarch
!= NULL
);
3543 return gdbarch
->push_dummy_code
!= NULL
;
3547 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
)
3549 gdb_assert (gdbarch
!= NULL
);
3550 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
3551 if (gdbarch_debug
>= 2)
3552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
3553 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
3557 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
3558 gdbarch_push_dummy_code_ftype push_dummy_code
)
3560 gdbarch
->push_dummy_code
= push_dummy_code
;
3564 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
3566 gdb_assert (gdbarch
!= NULL
);
3567 return gdbarch
->deprecated_push_dummy_frame
!= NULL
;
3571 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
3573 gdb_assert (gdbarch
!= NULL
);
3574 gdb_assert (gdbarch
->deprecated_push_dummy_frame
!= NULL
);
3575 if (gdbarch_debug
>= 2)
3576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
3577 gdbarch
->deprecated_push_dummy_frame ();
3581 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
3582 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
3584 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
3588 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3590 gdb_assert (gdbarch
!= NULL
);
3591 return gdbarch
->deprecated_do_registers_info
!= NULL
;
3595 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3597 gdb_assert (gdbarch
!= NULL
);
3598 gdb_assert (gdbarch
->deprecated_do_registers_info
!= NULL
);
3599 if (gdbarch_debug
>= 2)
3600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3601 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3605 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3606 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3608 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3612 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3614 gdb_assert (gdbarch
!= NULL
);
3615 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
3616 if (gdbarch_debug
>= 2)
3617 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3618 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3622 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3623 gdbarch_print_registers_info_ftype print_registers_info
)
3625 gdbarch
->print_registers_info
= print_registers_info
;
3629 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3631 gdb_assert (gdbarch
!= NULL
);
3632 return gdbarch
->print_float_info
!= NULL
;
3636 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3638 gdb_assert (gdbarch
!= NULL
);
3639 gdb_assert (gdbarch
->print_float_info
!= NULL
);
3640 if (gdbarch_debug
>= 2)
3641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3642 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3646 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3647 gdbarch_print_float_info_ftype print_float_info
)
3649 gdbarch
->print_float_info
= print_float_info
;
3653 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3655 gdb_assert (gdbarch
!= NULL
);
3656 return gdbarch
->print_vector_info
!= NULL
;
3660 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3662 gdb_assert (gdbarch
!= NULL
);
3663 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
3664 if (gdbarch_debug
>= 2)
3665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3666 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3670 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3671 gdbarch_print_vector_info_ftype print_vector_info
)
3673 gdbarch
->print_vector_info
= print_vector_info
;
3677 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3679 gdb_assert (gdbarch
!= NULL
);
3680 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
3681 if (gdbarch_debug
>= 2)
3682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3683 return gdbarch
->register_sim_regno (reg_nr
);
3687 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3688 gdbarch_register_sim_regno_ftype register_sim_regno
)
3690 gdbarch
->register_sim_regno
= register_sim_regno
;
3694 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3696 gdb_assert (gdbarch
!= NULL
);
3697 return gdbarch
->register_bytes_ok
!= NULL
;
3701 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3703 gdb_assert (gdbarch
!= NULL
);
3704 gdb_assert (gdbarch
->register_bytes_ok
!= NULL
);
3705 if (gdbarch_debug
>= 2)
3706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3707 return gdbarch
->register_bytes_ok (nr_bytes
);
3711 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3712 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3714 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3718 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3720 gdb_assert (gdbarch
!= NULL
);
3721 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
3722 if (gdbarch_debug
>= 2)
3723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3724 return gdbarch
->cannot_fetch_register (regnum
);
3728 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3729 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3731 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3735 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3737 gdb_assert (gdbarch
!= NULL
);
3738 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
3739 if (gdbarch_debug
>= 2)
3740 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3741 return gdbarch
->cannot_store_register (regnum
);
3745 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3746 gdbarch_cannot_store_register_ftype cannot_store_register
)
3748 gdbarch
->cannot_store_register
= cannot_store_register
;
3752 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3754 gdb_assert (gdbarch
!= NULL
);
3755 return gdbarch
->get_longjmp_target
!= NULL
;
3759 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3761 gdb_assert (gdbarch
!= NULL
);
3762 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
3763 if (gdbarch_debug
>= 2)
3764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3765 return gdbarch
->get_longjmp_target (pc
);
3769 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3770 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3772 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3776 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3778 gdb_assert (gdbarch
!= NULL
);
3779 return gdbarch
->deprecated_pc_in_call_dummy
!= deprecated_pc_in_call_dummy
;
3783 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3785 gdb_assert (gdbarch
!= NULL
);
3786 gdb_assert (gdbarch
->deprecated_pc_in_call_dummy
!= NULL
);
3787 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3790 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3794 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3795 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3797 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3801 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3803 gdb_assert (gdbarch
!= NULL
);
3804 return gdbarch
->deprecated_init_frame_pc_first
!= NULL
;
3808 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3810 gdb_assert (gdbarch
!= NULL
);
3811 gdb_assert (gdbarch
->deprecated_init_frame_pc_first
!= NULL
);
3812 if (gdbarch_debug
>= 2)
3813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3814 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3818 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3819 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3821 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3825 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3827 gdb_assert (gdbarch
!= NULL
);
3828 return gdbarch
->deprecated_init_frame_pc
!= NULL
;
3832 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3834 gdb_assert (gdbarch
!= NULL
);
3835 gdb_assert (gdbarch
->deprecated_init_frame_pc
!= NULL
);
3836 if (gdbarch_debug
>= 2)
3837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3838 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3842 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3843 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3845 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3849 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3851 gdb_assert (gdbarch
!= NULL
);
3852 if (gdbarch_debug
>= 2)
3853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3854 return gdbarch
->believe_pcc_promotion
;
3858 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3859 int believe_pcc_promotion
)
3861 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3865 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3867 gdb_assert (gdbarch
!= NULL
);
3868 if (gdbarch_debug
>= 2)
3869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3870 return gdbarch
->believe_pcc_promotion_type
;
3874 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3875 int believe_pcc_promotion_type
)
3877 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3881 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
3883 gdb_assert (gdbarch
!= NULL
);
3884 return gdbarch
->deprecated_get_saved_register
!= NULL
;
3888 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
)
3890 gdb_assert (gdbarch
!= NULL
);
3891 gdb_assert (gdbarch
->deprecated_get_saved_register
!= NULL
);
3892 if (gdbarch_debug
>= 2)
3893 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
3894 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3898 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
3899 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
3901 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
3905 gdbarch_deprecated_register_convertible_p (struct gdbarch
*gdbarch
)
3907 gdb_assert (gdbarch
!= NULL
);
3908 return gdbarch
->deprecated_register_convertible
!= NULL
;
3912 gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3914 gdb_assert (gdbarch
!= NULL
);
3915 gdb_assert (gdbarch
->deprecated_register_convertible
!= NULL
);
3916 if (gdbarch_debug
>= 2)
3917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convertible called\n");
3918 return gdbarch
->deprecated_register_convertible (nr
);
3922 set_gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
,
3923 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible
)
3925 gdbarch
->deprecated_register_convertible
= deprecated_register_convertible
;
3929 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3931 gdb_assert (gdbarch
!= NULL
);
3932 gdb_assert (gdbarch
->deprecated_register_convert_to_virtual
!= NULL
);
3933 if (gdbarch_debug
>= 2)
3934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_virtual called\n");
3935 gdbarch
->deprecated_register_convert_to_virtual (regnum
, type
, from
, to
);
3939 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3940 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual
)
3942 gdbarch
->deprecated_register_convert_to_virtual
= deprecated_register_convert_to_virtual
;
3946 gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, const char *from
, char *to
)
3948 gdb_assert (gdbarch
!= NULL
);
3949 gdb_assert (gdbarch
->deprecated_register_convert_to_raw
!= NULL
);
3950 if (gdbarch_debug
>= 2)
3951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_raw called\n");
3952 gdbarch
->deprecated_register_convert_to_raw (type
, regnum
, from
, to
);
3956 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
,
3957 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw
)
3959 gdbarch
->deprecated_register_convert_to_raw
= deprecated_register_convert_to_raw
;
3963 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
3965 gdb_assert (gdbarch
!= NULL
);
3966 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
3967 if (gdbarch_debug
>= 2)
3968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3969 return gdbarch
->convert_register_p (regnum
, type
);
3973 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3974 gdbarch_convert_register_p_ftype convert_register_p
)
3976 gdbarch
->convert_register_p
= convert_register_p
;
3980 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, void *buf
)
3982 gdb_assert (gdbarch
!= NULL
);
3983 gdb_assert (gdbarch
->register_to_value
!= NULL
);
3984 if (gdbarch_debug
>= 2)
3985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3986 gdbarch
->register_to_value (frame
, regnum
, type
, buf
);
3990 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3991 gdbarch_register_to_value_ftype register_to_value
)
3993 gdbarch
->register_to_value
= register_to_value
;
3997 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const void *buf
)
3999 gdb_assert (gdbarch
!= NULL
);
4000 gdb_assert (gdbarch
->value_to_register
!= NULL
);
4001 if (gdbarch_debug
>= 2)
4002 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
4003 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
4007 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
4008 gdbarch_value_to_register_ftype value_to_register
)
4010 gdbarch
->value_to_register
= value_to_register
;
4014 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4016 gdb_assert (gdbarch
!= NULL
);
4017 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
4018 if (gdbarch_debug
>= 2)
4019 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4020 return gdbarch
->pointer_to_address (type
, buf
);
4024 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4025 gdbarch_pointer_to_address_ftype pointer_to_address
)
4027 gdbarch
->pointer_to_address
= pointer_to_address
;
4031 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4033 gdb_assert (gdbarch
!= NULL
);
4034 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
4035 if (gdbarch_debug
>= 2)
4036 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4037 gdbarch
->address_to_pointer (type
, buf
, addr
);
4041 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4042 gdbarch_address_to_pointer_ftype address_to_pointer
)
4044 gdbarch
->address_to_pointer
= address_to_pointer
;
4048 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4050 gdb_assert (gdbarch
!= NULL
);
4051 return gdbarch
->integer_to_address
!= NULL
;
4055 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4057 gdb_assert (gdbarch
!= NULL
);
4058 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
4059 if (gdbarch_debug
>= 2)
4060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4061 return gdbarch
->integer_to_address (type
, buf
);
4065 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4066 gdbarch_integer_to_address_ftype integer_to_address
)
4068 gdbarch
->integer_to_address
= integer_to_address
;
4072 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4074 gdb_assert (gdbarch
!= NULL
);
4075 return gdbarch
->deprecated_pop_frame
!= NULL
;
4079 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4081 gdb_assert (gdbarch
!= NULL
);
4082 gdb_assert (gdbarch
->deprecated_pop_frame
!= NULL
);
4083 if (gdbarch_debug
>= 2)
4084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4085 gdbarch
->deprecated_pop_frame ();
4089 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4090 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4092 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4096 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4098 gdb_assert (gdbarch
!= NULL
);
4099 return gdbarch
->deprecated_store_struct_return
!= NULL
;
4103 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4105 gdb_assert (gdbarch
!= NULL
);
4106 gdb_assert (gdbarch
->deprecated_store_struct_return
!= NULL
);
4107 if (gdbarch_debug
>= 2)
4108 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4109 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4113 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4114 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4116 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4120 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
4122 gdb_assert (gdbarch
!= NULL
);
4123 return gdbarch
->return_value
!= NULL
;
4126 enum return_value_convention
4127 gdbarch_return_value (struct gdbarch
*gdbarch
, struct type
*valtype
, struct regcache
*regcache
, void *readbuf
, const void *writebuf
)
4129 gdb_assert (gdbarch
!= NULL
);
4130 gdb_assert (gdbarch
->return_value
!= NULL
);
4131 if (gdbarch_debug
>= 2)
4132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
4133 return gdbarch
->return_value (gdbarch
, valtype
, regcache
, readbuf
, writebuf
);
4137 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
4138 gdbarch_return_value_ftype return_value
)
4140 gdbarch
->return_value
= return_value
;
4144 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4146 gdb_assert (gdbarch
!= NULL
);
4147 gdb_assert (gdbarch
->return_value_on_stack
!= NULL
);
4148 if (gdbarch_debug
>= 2)
4149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4150 return gdbarch
->return_value_on_stack (type
);
4154 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4155 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4157 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4161 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4163 gdb_assert (gdbarch
!= NULL
);
4164 gdb_assert (gdbarch
->extract_return_value
!= NULL
);
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4167 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4171 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4172 gdbarch_extract_return_value_ftype extract_return_value
)
4174 gdbarch
->extract_return_value
= extract_return_value
;
4178 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4180 gdb_assert (gdbarch
!= NULL
);
4181 gdb_assert (gdbarch
->store_return_value
!= NULL
);
4182 if (gdbarch_debug
>= 2)
4183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4184 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4188 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4189 gdbarch_store_return_value_ftype store_return_value
)
4191 gdbarch
->store_return_value
= store_return_value
;
4195 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4197 gdb_assert (gdbarch
!= NULL
);
4198 gdb_assert (gdbarch
->deprecated_extract_return_value
!= NULL
);
4199 if (gdbarch_debug
>= 2)
4200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4201 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4205 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4206 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4208 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4212 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4214 gdb_assert (gdbarch
!= NULL
);
4215 gdb_assert (gdbarch
->deprecated_store_return_value
!= NULL
);
4216 if (gdbarch_debug
>= 2)
4217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4218 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4222 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4223 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4225 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4229 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4231 gdb_assert (gdbarch
!= NULL
);
4232 gdb_assert (gdbarch
->use_struct_convention
!= NULL
);
4233 if (gdbarch_debug
>= 2)
4234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4235 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4239 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4240 gdbarch_use_struct_convention_ftype use_struct_convention
)
4242 gdbarch
->use_struct_convention
= use_struct_convention
;
4246 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4248 gdb_assert (gdbarch
!= NULL
);
4249 return gdbarch
->deprecated_extract_struct_value_address
!= NULL
;
4253 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4255 gdb_assert (gdbarch
!= NULL
);
4256 gdb_assert (gdbarch
->deprecated_extract_struct_value_address
!= NULL
);
4257 if (gdbarch_debug
>= 2)
4258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4259 return gdbarch
->deprecated_extract_struct_value_address (regcache
);
4263 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4264 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4266 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4270 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4272 gdb_assert (gdbarch
!= NULL
);
4273 return gdbarch
->deprecated_frame_init_saved_regs
!= NULL
;
4277 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4279 gdb_assert (gdbarch
!= NULL
);
4280 gdb_assert (gdbarch
->deprecated_frame_init_saved_regs
!= NULL
);
4281 if (gdbarch_debug
>= 2)
4282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4283 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4287 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4288 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4290 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4294 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4296 gdb_assert (gdbarch
!= NULL
);
4297 return gdbarch
->deprecated_init_extra_frame_info
!= NULL
;
4301 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4303 gdb_assert (gdbarch
!= NULL
);
4304 gdb_assert (gdbarch
->deprecated_init_extra_frame_info
!= NULL
);
4305 if (gdbarch_debug
>= 2)
4306 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4307 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4311 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4312 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4314 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4318 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4320 gdb_assert (gdbarch
!= NULL
);
4321 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
4322 if (gdbarch_debug
>= 2)
4323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4324 return gdbarch
->skip_prologue (ip
);
4328 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4329 gdbarch_skip_prologue_ftype skip_prologue
)
4331 gdbarch
->skip_prologue
= skip_prologue
;
4335 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4337 gdb_assert (gdbarch
!= NULL
);
4338 gdb_assert (gdbarch
->inner_than
!= NULL
);
4339 if (gdbarch_debug
>= 2)
4340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4341 return gdbarch
->inner_than (lhs
, rhs
);
4345 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4346 gdbarch_inner_than_ftype inner_than
)
4348 gdbarch
->inner_than
= inner_than
;
4351 const unsigned char *
4352 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4354 gdb_assert (gdbarch
!= NULL
);
4355 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
4356 if (gdbarch_debug
>= 2)
4357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4358 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4362 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4363 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4365 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4369 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
4371 gdb_assert (gdbarch
!= NULL
);
4372 return gdbarch
->adjust_breakpoint_address
!= NULL
;
4376 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
4378 gdb_assert (gdbarch
!= NULL
);
4379 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
4380 if (gdbarch_debug
>= 2)
4381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
4382 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
4386 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
4387 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
4389 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
4393 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4395 gdb_assert (gdbarch
!= NULL
);
4396 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
4397 if (gdbarch_debug
>= 2)
4398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4399 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4403 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4404 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4406 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4410 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4412 gdb_assert (gdbarch
!= NULL
);
4413 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
4414 if (gdbarch_debug
>= 2)
4415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4416 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4420 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4421 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4423 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4427 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4429 gdb_assert (gdbarch
!= NULL
);
4430 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4431 if (gdbarch_debug
>= 2)
4432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4433 return gdbarch
->decr_pc_after_break
;
4437 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4438 CORE_ADDR decr_pc_after_break
)
4440 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4444 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4446 gdb_assert (gdbarch
!= NULL
);
4447 /* Skip verify of function_start_offset, invalid_p == 0 */
4448 if (gdbarch_debug
>= 2)
4449 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4450 return gdbarch
->function_start_offset
;
4454 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4455 CORE_ADDR function_start_offset
)
4457 gdbarch
->function_start_offset
= function_start_offset
;
4461 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
)
4463 gdb_assert (gdbarch
!= NULL
);
4464 gdb_assert (gdbarch
->remote_translate_xfer_address
!= NULL
);
4465 if (gdbarch_debug
>= 2)
4466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4467 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4471 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4472 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4474 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4478 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4480 gdb_assert (gdbarch
!= NULL
);
4481 /* Skip verify of frame_args_skip, invalid_p == 0 */
4482 if (gdbarch_debug
>= 2)
4483 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4484 return gdbarch
->frame_args_skip
;
4488 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4489 CORE_ADDR frame_args_skip
)
4491 gdbarch
->frame_args_skip
= frame_args_skip
;
4495 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch
*gdbarch
)
4497 gdb_assert (gdbarch
!= NULL
);
4498 return gdbarch
->deprecated_frameless_function_invocation
!= NULL
;
4502 gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4504 gdb_assert (gdbarch
!= NULL
);
4505 gdb_assert (gdbarch
->deprecated_frameless_function_invocation
!= NULL
);
4506 if (gdbarch_debug
>= 2)
4507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frameless_function_invocation called\n");
4508 return gdbarch
->deprecated_frameless_function_invocation (fi
);
4512 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
,
4513 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation
)
4515 gdbarch
->deprecated_frameless_function_invocation
= deprecated_frameless_function_invocation
;
4519 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4521 gdb_assert (gdbarch
!= NULL
);
4522 return gdbarch
->deprecated_frame_chain
!= NULL
;
4526 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4528 gdb_assert (gdbarch
!= NULL
);
4529 gdb_assert (gdbarch
->deprecated_frame_chain
!= NULL
);
4530 if (gdbarch_debug
>= 2)
4531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4532 return gdbarch
->deprecated_frame_chain (frame
);
4536 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4537 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4539 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4543 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4545 gdb_assert (gdbarch
!= NULL
);
4546 return gdbarch
->deprecated_frame_chain_valid
!= NULL
;
4550 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4552 gdb_assert (gdbarch
!= NULL
);
4553 gdb_assert (gdbarch
->deprecated_frame_chain_valid
!= NULL
);
4554 if (gdbarch_debug
>= 2)
4555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4556 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4560 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4561 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4563 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4567 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4569 gdb_assert (gdbarch
!= NULL
);
4570 return gdbarch
->deprecated_frame_saved_pc
!= NULL
;
4574 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4576 gdb_assert (gdbarch
!= NULL
);
4577 gdb_assert (gdbarch
->deprecated_frame_saved_pc
!= NULL
);
4578 if (gdbarch_debug
>= 2)
4579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4580 return gdbarch
->deprecated_frame_saved_pc (fi
);
4584 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4585 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4587 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4591 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4593 gdb_assert (gdbarch
!= NULL
);
4594 return gdbarch
->unwind_pc
!= NULL
;
4598 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4600 gdb_assert (gdbarch
!= NULL
);
4601 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
4602 if (gdbarch_debug
>= 2)
4603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4604 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4608 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4609 gdbarch_unwind_pc_ftype unwind_pc
)
4611 gdbarch
->unwind_pc
= unwind_pc
;
4615 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
4617 gdb_assert (gdbarch
!= NULL
);
4618 return gdbarch
->unwind_sp
!= NULL
;
4622 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4624 gdb_assert (gdbarch
!= NULL
);
4625 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
4626 if (gdbarch_debug
>= 2)
4627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
4628 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
4632 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
4633 gdbarch_unwind_sp_ftype unwind_sp
)
4635 gdbarch
->unwind_sp
= unwind_sp
;
4639 gdbarch_deprecated_frame_args_address_p (struct gdbarch
*gdbarch
)
4641 gdb_assert (gdbarch
!= NULL
);
4642 return gdbarch
->deprecated_frame_args_address
!= get_frame_base
;
4646 gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4648 gdb_assert (gdbarch
!= NULL
);
4649 gdb_assert (gdbarch
->deprecated_frame_args_address
!= NULL
);
4650 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4651 if (gdbarch_debug
>= 2)
4652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_args_address called\n");
4653 return gdbarch
->deprecated_frame_args_address (fi
);
4657 set_gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
,
4658 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address
)
4660 gdbarch
->deprecated_frame_args_address
= deprecated_frame_args_address
;
4664 gdbarch_deprecated_frame_locals_address_p (struct gdbarch
*gdbarch
)
4666 gdb_assert (gdbarch
!= NULL
);
4667 return gdbarch
->deprecated_frame_locals_address
!= get_frame_base
;
4671 gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4673 gdb_assert (gdbarch
!= NULL
);
4674 gdb_assert (gdbarch
->deprecated_frame_locals_address
!= NULL
);
4675 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4676 if (gdbarch_debug
>= 2)
4677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_locals_address called\n");
4678 return gdbarch
->deprecated_frame_locals_address (fi
);
4682 set_gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
,
4683 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address
)
4685 gdbarch
->deprecated_frame_locals_address
= deprecated_frame_locals_address
;
4689 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4691 gdb_assert (gdbarch
!= NULL
);
4692 return gdbarch
->deprecated_saved_pc_after_call
!= NULL
;
4696 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4698 gdb_assert (gdbarch
!= NULL
);
4699 gdb_assert (gdbarch
->deprecated_saved_pc_after_call
!= NULL
);
4700 if (gdbarch_debug
>= 2)
4701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
4702 return gdbarch
->deprecated_saved_pc_after_call (frame
);
4706 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
4707 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
4709 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
4713 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
4715 gdb_assert (gdbarch
!= NULL
);
4716 return gdbarch
->frame_num_args
!= NULL
;
4720 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4722 gdb_assert (gdbarch
!= NULL
);
4723 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
4724 if (gdbarch_debug
>= 2)
4725 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4726 return gdbarch
->frame_num_args (frame
);
4730 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4731 gdbarch_frame_num_args_ftype frame_num_args
)
4733 gdbarch
->frame_num_args
= frame_num_args
;
4737 gdbarch_deprecated_stack_align_p (struct gdbarch
*gdbarch
)
4739 gdb_assert (gdbarch
!= NULL
);
4740 return gdbarch
->deprecated_stack_align
!= NULL
;
4744 gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4746 gdb_assert (gdbarch
!= NULL
);
4747 gdb_assert (gdbarch
->deprecated_stack_align
!= NULL
);
4748 if (gdbarch_debug
>= 2)
4749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_stack_align called\n");
4750 return gdbarch
->deprecated_stack_align (sp
);
4754 set_gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
,
4755 gdbarch_deprecated_stack_align_ftype deprecated_stack_align
)
4757 gdbarch
->deprecated_stack_align
= deprecated_stack_align
;
4761 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4763 gdb_assert (gdbarch
!= NULL
);
4764 return gdbarch
->frame_align
!= NULL
;
4768 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4770 gdb_assert (gdbarch
!= NULL
);
4771 gdb_assert (gdbarch
->frame_align
!= NULL
);
4772 if (gdbarch_debug
>= 2)
4773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4774 return gdbarch
->frame_align (gdbarch
, address
);
4778 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4779 gdbarch_frame_align_ftype frame_align
)
4781 gdbarch
->frame_align
= frame_align
;
4785 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4787 gdb_assert (gdbarch
!= NULL
);
4788 return gdbarch
->deprecated_reg_struct_has_addr
!= NULL
;
4792 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4794 gdb_assert (gdbarch
!= NULL
);
4795 gdb_assert (gdbarch
->deprecated_reg_struct_has_addr
!= NULL
);
4796 if (gdbarch_debug
>= 2)
4797 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_reg_struct_has_addr called\n");
4798 return gdbarch
->deprecated_reg_struct_has_addr (gcc_p
, type
);
4802 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4803 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr
)
4805 gdbarch
->deprecated_reg_struct_has_addr
= deprecated_reg_struct_has_addr
;
4809 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
4811 gdb_assert (gdbarch
!= NULL
);
4812 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
4813 if (gdbarch_debug
>= 2)
4814 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
4815 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
4819 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
4820 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
4822 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
4826 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
4828 gdb_assert (gdbarch
!= NULL
);
4829 if (gdbarch_debug
>= 2)
4830 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
4831 return gdbarch
->frame_red_zone_size
;
4835 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
4836 int frame_red_zone_size
)
4838 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
4842 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4844 gdb_assert (gdbarch
!= NULL
);
4845 if (gdbarch_debug
>= 2)
4846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4847 return gdbarch
->parm_boundary
;
4851 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4854 gdbarch
->parm_boundary
= parm_boundary
;
4857 const struct floatformat
*
4858 gdbarch_float_format (struct gdbarch
*gdbarch
)
4860 gdb_assert (gdbarch
!= NULL
);
4861 if (gdbarch_debug
>= 2)
4862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4863 return gdbarch
->float_format
;
4867 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4868 const struct floatformat
* float_format
)
4870 gdbarch
->float_format
= float_format
;
4873 const struct floatformat
*
4874 gdbarch_double_format (struct gdbarch
*gdbarch
)
4876 gdb_assert (gdbarch
!= NULL
);
4877 if (gdbarch_debug
>= 2)
4878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4879 return gdbarch
->double_format
;
4883 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4884 const struct floatformat
* double_format
)
4886 gdbarch
->double_format
= double_format
;
4889 const struct floatformat
*
4890 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4892 gdb_assert (gdbarch
!= NULL
);
4893 if (gdbarch_debug
>= 2)
4894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4895 return gdbarch
->long_double_format
;
4899 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4900 const struct floatformat
* long_double_format
)
4902 gdbarch
->long_double_format
= long_double_format
;
4906 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
4908 gdb_assert (gdbarch
!= NULL
);
4909 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
4910 if (gdbarch_debug
>= 2)
4911 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4912 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
4916 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4917 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4919 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4923 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4925 gdb_assert (gdbarch
!= NULL
);
4926 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
4927 if (gdbarch_debug
>= 2)
4928 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4929 return gdbarch
->addr_bits_remove (addr
);
4933 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4934 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4936 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4940 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4942 gdb_assert (gdbarch
!= NULL
);
4943 gdb_assert (gdbarch
->smash_text_address
!= NULL
);
4944 if (gdbarch_debug
>= 2)
4945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4946 return gdbarch
->smash_text_address (addr
);
4950 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4951 gdbarch_smash_text_address_ftype smash_text_address
)
4953 gdbarch
->smash_text_address
= smash_text_address
;
4957 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4959 gdb_assert (gdbarch
!= NULL
);
4960 return gdbarch
->software_single_step
!= NULL
;
4964 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4966 gdb_assert (gdbarch
!= NULL
);
4967 gdb_assert (gdbarch
->software_single_step
!= NULL
);
4968 if (gdbarch_debug
>= 2)
4969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4970 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4974 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4975 gdbarch_software_single_step_ftype software_single_step
)
4977 gdbarch
->software_single_step
= software_single_step
;
4981 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
4983 gdb_assert (gdbarch
!= NULL
);
4984 gdb_assert (gdbarch
->print_insn
!= NULL
);
4985 if (gdbarch_debug
>= 2)
4986 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4987 return gdbarch
->print_insn (vma
, info
);
4991 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4992 gdbarch_print_insn_ftype print_insn
)
4994 gdbarch
->print_insn
= print_insn
;
4998 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5000 gdb_assert (gdbarch
!= NULL
);
5001 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
5002 if (gdbarch_debug
>= 2)
5003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
5004 return gdbarch
->skip_trampoline_code (pc
);
5008 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5009 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5011 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5015 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5017 gdb_assert (gdbarch
!= NULL
);
5018 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
5019 if (gdbarch_debug
>= 2)
5020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
5021 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
5025 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
5026 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
5028 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
5032 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5034 gdb_assert (gdbarch
!= NULL
);
5035 gdb_assert (gdbarch
->in_solib_call_trampoline
!= NULL
);
5036 if (gdbarch_debug
>= 2)
5037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5038 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5042 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5043 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5045 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5049 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5051 gdb_assert (gdbarch
!= NULL
);
5052 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
5053 if (gdbarch_debug
>= 2)
5054 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5055 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5059 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5060 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5062 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5066 gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch
*gdbarch
)
5068 gdb_assert (gdbarch
!= NULL
);
5069 return gdbarch
->deprecated_pc_in_sigtramp
!= legacy_pc_in_sigtramp
;
5073 gdbarch_deprecated_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5075 gdb_assert (gdbarch
!= NULL
);
5076 gdb_assert (gdbarch
->deprecated_pc_in_sigtramp
!= NULL
);
5077 /* Do not check predicate: gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp, allow call. */
5078 if (gdbarch_debug
>= 2)
5079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_sigtramp called\n");
5080 return gdbarch
->deprecated_pc_in_sigtramp (pc
, name
);
5084 set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5085 gdbarch_deprecated_pc_in_sigtramp_ftype deprecated_pc_in_sigtramp
)
5087 gdbarch
->deprecated_pc_in_sigtramp
= deprecated_pc_in_sigtramp
;
5091 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5093 gdb_assert (gdbarch
!= NULL
);
5094 return gdbarch
->sigtramp_start
!= NULL
;
5098 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5100 gdb_assert (gdbarch
!= NULL
);
5101 gdb_assert (gdbarch
->sigtramp_start
!= NULL
);
5102 if (gdbarch_debug
>= 2)
5103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5104 return gdbarch
->sigtramp_start (pc
);
5108 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5109 gdbarch_sigtramp_start_ftype sigtramp_start
)
5111 gdbarch
->sigtramp_start
= sigtramp_start
;
5115 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5117 gdb_assert (gdbarch
!= NULL
);
5118 return gdbarch
->sigtramp_end
!= NULL
;
5122 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5124 gdb_assert (gdbarch
!= NULL
);
5125 gdb_assert (gdbarch
->sigtramp_end
!= NULL
);
5126 if (gdbarch_debug
>= 2)
5127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5128 return gdbarch
->sigtramp_end (pc
);
5132 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5133 gdbarch_sigtramp_end_ftype sigtramp_end
)
5135 gdbarch
->sigtramp_end
= sigtramp_end
;
5139 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5141 gdb_assert (gdbarch
!= NULL
);
5142 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
5143 if (gdbarch_debug
>= 2)
5144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5145 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5149 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5150 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5152 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5156 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5158 gdb_assert (gdbarch
!= NULL
);
5159 gdb_assert (gdbarch
->construct_inferior_arguments
!= NULL
);
5160 if (gdbarch_debug
>= 2)
5161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5162 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5166 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5167 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5169 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5173 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5175 gdb_assert (gdbarch
!= NULL
);
5176 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
5177 if (gdbarch_debug
>= 2)
5178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5179 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5183 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5184 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5186 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5190 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5192 gdb_assert (gdbarch
!= NULL
);
5193 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
5194 if (gdbarch_debug
>= 2)
5195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5196 gdbarch
->coff_make_msymbol_special (val
, msym
);
5200 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5201 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5203 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5207 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5209 gdb_assert (gdbarch
!= NULL
);
5210 /* Skip verify of name_of_malloc, invalid_p == 0 */
5211 if (gdbarch_debug
>= 2)
5212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5213 return gdbarch
->name_of_malloc
;
5217 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5218 const char * name_of_malloc
)
5220 gdbarch
->name_of_malloc
= name_of_malloc
;
5224 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5226 gdb_assert (gdbarch
!= NULL
);
5227 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5228 if (gdbarch_debug
>= 2)
5229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5230 return gdbarch
->cannot_step_breakpoint
;
5234 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5235 int cannot_step_breakpoint
)
5237 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5241 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5243 gdb_assert (gdbarch
!= NULL
);
5244 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5245 if (gdbarch_debug
>= 2)
5246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5247 return gdbarch
->have_nonsteppable_watchpoint
;
5251 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5252 int have_nonsteppable_watchpoint
)
5254 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5258 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5260 gdb_assert (gdbarch
!= NULL
);
5261 return gdbarch
->address_class_type_flags
!= NULL
;
5265 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5267 gdb_assert (gdbarch
!= NULL
);
5268 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
5269 if (gdbarch_debug
>= 2)
5270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5271 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5275 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5276 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5278 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5282 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5284 gdb_assert (gdbarch
!= NULL
);
5285 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
5289 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5291 gdb_assert (gdbarch
!= NULL
);
5292 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
5293 if (gdbarch_debug
>= 2)
5294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5295 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5299 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5300 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5302 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5306 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5308 gdb_assert (gdbarch
!= NULL
);
5309 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
5313 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5315 gdb_assert (gdbarch
!= NULL
);
5316 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
5317 if (gdbarch_debug
>= 2)
5318 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5319 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5323 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5324 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5326 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5330 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5332 gdb_assert (gdbarch
!= NULL
);
5333 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
5334 if (gdbarch_debug
>= 2)
5335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5336 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5340 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5341 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5343 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5347 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
5349 gdb_assert (gdbarch
!= NULL
);
5350 return gdbarch
->fetch_pointer_argument
!= NULL
;
5354 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
5356 gdb_assert (gdbarch
!= NULL
);
5357 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
5358 if (gdbarch_debug
>= 2)
5359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
5360 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
5364 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
5365 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
5367 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
5371 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
5373 gdb_assert (gdbarch
!= NULL
);
5374 return gdbarch
->regset_from_core_section
!= NULL
;
5377 const struct regset
*
5378 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
5380 gdb_assert (gdbarch
!= NULL
);
5381 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
5382 if (gdbarch_debug
>= 2)
5383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
5384 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
5388 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
5389 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
5391 gdbarch
->regset_from_core_section
= regset_from_core_section
;
5395 /* Keep a registry of per-architecture data-pointers required by GDB
5402 gdbarch_data_pre_init_ftype
*pre_init
;
5403 gdbarch_data_post_init_ftype
*post_init
;
5406 struct gdbarch_data_registration
5408 struct gdbarch_data
*data
;
5409 struct gdbarch_data_registration
*next
;
5412 struct gdbarch_data_registry
5415 struct gdbarch_data_registration
*registrations
;
5418 struct gdbarch_data_registry gdbarch_data_registry
=
5423 static struct gdbarch_data
*
5424 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
5425 gdbarch_data_post_init_ftype
*post_init
)
5427 struct gdbarch_data_registration
**curr
;
5428 /* Append the new registraration. */
5429 for (curr
= &gdbarch_data_registry
.registrations
;
5431 curr
= &(*curr
)->next
);
5432 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5433 (*curr
)->next
= NULL
;
5434 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5435 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5436 (*curr
)->data
->pre_init
= pre_init
;
5437 (*curr
)->data
->post_init
= post_init
;
5438 (*curr
)->data
->init_p
= 1;
5439 return (*curr
)->data
;
5442 struct gdbarch_data
*
5443 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
5445 return gdbarch_data_register (pre_init
, NULL
);
5448 struct gdbarch_data
*
5449 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
5451 return gdbarch_data_register (NULL
, post_init
);
5454 /* Create/delete the gdbarch data vector. */
5457 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5459 gdb_assert (gdbarch
->data
== NULL
);
5460 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5461 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
5464 /* Initialize the current value of the specified per-architecture
5468 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
5469 struct gdbarch_data
*data
,
5472 gdb_assert (data
->index
< gdbarch
->nr_data
);
5473 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
5474 gdb_assert (data
->pre_init
== NULL
);
5475 gdbarch
->data
[data
->index
] = pointer
;
5478 /* Return the current value of the specified per-architecture
5482 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5484 gdb_assert (data
->index
< gdbarch
->nr_data
);
5485 if (gdbarch
->data
[data
->index
] == NULL
)
5487 /* The data-pointer isn't initialized, call init() to get a
5489 if (data
->pre_init
!= NULL
)
5490 /* Mid architecture creation: pass just the obstack, and not
5491 the entire architecture, as that way it isn't possible for
5492 pre-init code to refer to undefined architecture
5494 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
5495 else if (gdbarch
->initialized_p
5496 && data
->post_init
!= NULL
)
5497 /* Post architecture creation: pass the entire architecture
5498 (as all fields are valid), but be careful to also detect
5499 recursive references. */
5501 gdb_assert (data
->init_p
);
5503 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
5507 /* The architecture initialization hasn't completed - punt -
5508 hope that the caller knows what they are doing. Once
5509 deprecated_set_gdbarch_data has been initialized, this can be
5510 changed to an internal error. */
5512 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5514 return gdbarch
->data
[data
->index
];
5519 /* Keep a registry of swapped data required by GDB modules. */
5524 struct gdbarch_swap_registration
*source
;
5525 struct gdbarch_swap
*next
;
5528 struct gdbarch_swap_registration
5531 unsigned long sizeof_data
;
5532 gdbarch_swap_ftype
*init
;
5533 struct gdbarch_swap_registration
*next
;
5536 struct gdbarch_swap_registry
5539 struct gdbarch_swap_registration
*registrations
;
5542 struct gdbarch_swap_registry gdbarch_swap_registry
=
5548 deprecated_register_gdbarch_swap (void *data
,
5549 unsigned long sizeof_data
,
5550 gdbarch_swap_ftype
*init
)
5552 struct gdbarch_swap_registration
**rego
;
5553 for (rego
= &gdbarch_swap_registry
.registrations
;
5555 rego
= &(*rego
)->next
);
5556 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5557 (*rego
)->next
= NULL
;
5558 (*rego
)->init
= init
;
5559 (*rego
)->data
= data
;
5560 (*rego
)->sizeof_data
= sizeof_data
;
5564 current_gdbarch_swap_init_hack (void)
5566 struct gdbarch_swap_registration
*rego
;
5567 struct gdbarch_swap
**curr
= ¤t_gdbarch
->swap
;
5568 for (rego
= gdbarch_swap_registry
.registrations
;
5572 if (rego
->data
!= NULL
)
5574 (*curr
) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch
,
5575 struct gdbarch_swap
);
5576 (*curr
)->source
= rego
;
5577 (*curr
)->swap
= gdbarch_obstack_zalloc (current_gdbarch
,
5579 (*curr
)->next
= NULL
;
5580 curr
= &(*curr
)->next
;
5582 if (rego
->init
!= NULL
)
5587 static struct gdbarch
*
5588 current_gdbarch_swap_out_hack (void)
5590 struct gdbarch
*old_gdbarch
= current_gdbarch
;
5591 struct gdbarch_swap
*curr
;
5593 gdb_assert (old_gdbarch
!= NULL
);
5594 for (curr
= old_gdbarch
->swap
;
5598 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5599 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5601 current_gdbarch
= NULL
;
5606 current_gdbarch_swap_in_hack (struct gdbarch
*new_gdbarch
)
5608 struct gdbarch_swap
*curr
;
5610 gdb_assert (current_gdbarch
== NULL
);
5611 for (curr
= new_gdbarch
->swap
;
5614 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5615 current_gdbarch
= new_gdbarch
;
5619 /* Keep a registry of the architectures known by GDB. */
5621 struct gdbarch_registration
5623 enum bfd_architecture bfd_architecture
;
5624 gdbarch_init_ftype
*init
;
5625 gdbarch_dump_tdep_ftype
*dump_tdep
;
5626 struct gdbarch_list
*arches
;
5627 struct gdbarch_registration
*next
;
5630 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5633 append_name (const char ***buf
, int *nr
, const char *name
)
5635 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5641 gdbarch_printable_names (void)
5643 /* Accumulate a list of names based on the registed list of
5645 enum bfd_architecture a
;
5647 const char **arches
= NULL
;
5648 struct gdbarch_registration
*rego
;
5649 for (rego
= gdbarch_registry
;
5653 const struct bfd_arch_info
*ap
;
5654 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5656 internal_error (__FILE__
, __LINE__
,
5657 "gdbarch_architecture_names: multi-arch unknown");
5660 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5665 append_name (&arches
, &nr_arches
, NULL
);
5671 gdbarch_register (enum bfd_architecture bfd_architecture
,
5672 gdbarch_init_ftype
*init
,
5673 gdbarch_dump_tdep_ftype
*dump_tdep
)
5675 struct gdbarch_registration
**curr
;
5676 const struct bfd_arch_info
*bfd_arch_info
;
5677 /* Check that BFD recognizes this architecture */
5678 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5679 if (bfd_arch_info
== NULL
)
5681 internal_error (__FILE__
, __LINE__
,
5682 "gdbarch: Attempt to register unknown architecture (%d)",
5685 /* Check that we haven't seen this architecture before */
5686 for (curr
= &gdbarch_registry
;
5688 curr
= &(*curr
)->next
)
5690 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5691 internal_error (__FILE__
, __LINE__
,
5692 "gdbarch: Duplicate registraration of architecture (%s)",
5693 bfd_arch_info
->printable_name
);
5697 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5698 bfd_arch_info
->printable_name
,
5701 (*curr
) = XMALLOC (struct gdbarch_registration
);
5702 (*curr
)->bfd_architecture
= bfd_architecture
;
5703 (*curr
)->init
= init
;
5704 (*curr
)->dump_tdep
= dump_tdep
;
5705 (*curr
)->arches
= NULL
;
5706 (*curr
)->next
= NULL
;
5710 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5711 gdbarch_init_ftype
*init
)
5713 gdbarch_register (bfd_architecture
, init
, NULL
);
5717 /* Look for an architecture using gdbarch_info. Base search on only
5718 BFD_ARCH_INFO and BYTE_ORDER. */
5720 struct gdbarch_list
*
5721 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5722 const struct gdbarch_info
*info
)
5724 for (; arches
!= NULL
; arches
= arches
->next
)
5726 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5728 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5730 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5738 /* Find an architecture that matches the specified INFO. Create a new
5739 architecture if needed. Return that new architecture. Assumes
5740 that there is no current architecture. */
5742 static struct gdbarch
*
5743 find_arch_by_info (struct gdbarch
*old_gdbarch
, struct gdbarch_info info
)
5745 struct gdbarch
*new_gdbarch
;
5746 struct gdbarch_registration
*rego
;
5748 /* The existing architecture has been swapped out - all this code
5749 works from a clean slate. */
5750 gdb_assert (current_gdbarch
== NULL
);
5752 /* Fill in missing parts of the INFO struct using a number of
5753 sources: "set ..."; INFOabfd supplied; and the existing
5755 gdbarch_info_fill (old_gdbarch
, &info
);
5757 /* Must have found some sort of architecture. */
5758 gdb_assert (info
.bfd_arch_info
!= NULL
);
5762 fprintf_unfiltered (gdb_stdlog
,
5763 "find_arch_by_info: info.bfd_arch_info %s\n",
5764 (info
.bfd_arch_info
!= NULL
5765 ? info
.bfd_arch_info
->printable_name
5767 fprintf_unfiltered (gdb_stdlog
,
5768 "find_arch_by_info: info.byte_order %d (%s)\n",
5770 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5771 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5773 fprintf_unfiltered (gdb_stdlog
,
5774 "find_arch_by_info: info.osabi %d (%s)\n",
5775 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5776 fprintf_unfiltered (gdb_stdlog
,
5777 "find_arch_by_info: info.abfd 0x%lx\n",
5779 fprintf_unfiltered (gdb_stdlog
,
5780 "find_arch_by_info: info.tdep_info 0x%lx\n",
5781 (long) info
.tdep_info
);
5784 /* Find the tdep code that knows about this architecture. */
5785 for (rego
= gdbarch_registry
;
5788 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5793 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5794 "No matching architecture\n");
5798 /* Ask the tdep code for an architecture that matches "info". */
5799 new_gdbarch
= rego
->init (info
, rego
->arches
);
5801 /* Did the tdep code like it? No. Reject the change and revert to
5802 the old architecture. */
5803 if (new_gdbarch
== NULL
)
5806 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5807 "Target rejected architecture\n");
5811 /* Is this a pre-existing architecture (as determined by already
5812 being initialized)? Move it to the front of the architecture
5813 list (keeping the list sorted Most Recently Used). */
5814 if (new_gdbarch
->initialized_p
)
5816 struct gdbarch_list
**list
;
5817 struct gdbarch_list
*this;
5819 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5820 "Previous architecture 0x%08lx (%s) selected\n",
5822 new_gdbarch
->bfd_arch_info
->printable_name
);
5823 /* Find the existing arch in the list. */
5824 for (list
= ®o
->arches
;
5825 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5826 list
= &(*list
)->next
);
5827 /* It had better be in the list of architectures. */
5828 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5831 (*list
) = this->next
;
5832 /* Insert THIS at the front. */
5833 this->next
= rego
->arches
;
5834 rego
->arches
= this;
5839 /* It's a new architecture. */
5841 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5842 "New architecture 0x%08lx (%s) selected\n",
5844 new_gdbarch
->bfd_arch_info
->printable_name
);
5846 /* Insert the new architecture into the front of the architecture
5847 list (keep the list sorted Most Recently Used). */
5849 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5850 this->next
= rego
->arches
;
5851 this->gdbarch
= new_gdbarch
;
5852 rego
->arches
= this;
5855 /* Check that the newly installed architecture is valid. Plug in
5856 any post init values. */
5857 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5858 verify_gdbarch (new_gdbarch
);
5859 new_gdbarch
->initialized_p
= 1;
5861 /* Initialize any per-architecture swap areas. This phase requires
5862 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5863 swap the entire architecture out. */
5864 current_gdbarch
= new_gdbarch
;
5865 current_gdbarch_swap_init_hack ();
5866 current_gdbarch_swap_out_hack ();
5869 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5875 gdbarch_find_by_info (struct gdbarch_info info
)
5877 /* Save the previously selected architecture, setting the global to
5878 NULL. This stops things like gdbarch->init() trying to use the
5879 previous architecture's configuration. The previous architecture
5880 may not even be of the same architecture family. The most recent
5881 architecture of the same family is found at the head of the
5882 rego->arches list. */
5883 struct gdbarch
*old_gdbarch
= current_gdbarch_swap_out_hack ();
5885 /* Find the specified architecture. */
5886 struct gdbarch
*new_gdbarch
= find_arch_by_info (old_gdbarch
, info
);
5888 /* Restore the existing architecture. */
5889 gdb_assert (current_gdbarch
== NULL
);
5890 current_gdbarch_swap_in_hack (old_gdbarch
);
5895 /* Make the specified architecture current, swapping the existing one
5899 deprecated_current_gdbarch_select_hack (struct gdbarch
*new_gdbarch
)
5901 gdb_assert (new_gdbarch
!= NULL
);
5902 gdb_assert (current_gdbarch
!= NULL
);
5903 gdb_assert (new_gdbarch
->initialized_p
);
5904 current_gdbarch_swap_out_hack ();
5905 current_gdbarch_swap_in_hack (new_gdbarch
);
5906 architecture_changed_event ();
5909 extern void _initialize_gdbarch (void);
5912 _initialize_gdbarch (void)
5914 struct cmd_list_element
*c
;
5916 add_show_from_set (add_set_cmd ("arch",
5919 (char *)&gdbarch_debug
,
5920 "Set architecture debugging.\n\
5921 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5923 c
= add_set_cmd ("archdebug",
5926 (char *)&gdbarch_debug
,
5927 "Set architecture debugging.\n\
5928 When non-zero, architecture debugging is enabled.", &setlist
);
5930 deprecate_cmd (c
, "set debug arch");
5931 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");