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_pc_in_sigtramp_ftype
*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 generic_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, /* 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
= generic_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
->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 pc_in_sigtramp, invalid_p == 0 */
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_POP_FRAME_P
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: %s # %s\n",
1346 "DEPRECATED_POP_FRAME_P()",
1347 XSTRING (DEPRECATED_POP_FRAME_P ()));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1350 DEPRECATED_POP_FRAME_P ());
1352 #ifdef DEPRECATED_POP_FRAME
1353 fprintf_unfiltered (file
,
1354 "gdbarch_dump: %s # %s\n",
1355 "DEPRECATED_POP_FRAME(-)",
1356 XSTRING (DEPRECATED_POP_FRAME (-)));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1359 (long) current_gdbarch
->deprecated_pop_frame
1360 /*DEPRECATED_POP_FRAME ()*/);
1362 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "DEPRECATED_PUSH_ARGUMENTS_P()",
1366 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1369 DEPRECATED_PUSH_ARGUMENTS_P ());
1371 #ifdef DEPRECATED_PUSH_ARGUMENTS
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: %s # %s\n",
1374 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1375 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1378 (long) current_gdbarch
->deprecated_push_arguments
1379 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1381 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1382 fprintf_unfiltered (file
,
1383 "gdbarch_dump: %s # %s\n",
1384 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1385 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1388 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1390 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1394 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1397 (long) current_gdbarch
->deprecated_push_dummy_frame
1398 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1400 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: %s # %s\n",
1403 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1404 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1407 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1409 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: %s # %s\n",
1412 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1413 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1416 (long) current_gdbarch
->deprecated_push_return_address
1417 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1419 #ifdef DEPRECATED_REGISTER_BYTE_P
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: %s # %s\n",
1422 "DEPRECATED_REGISTER_BYTE_P()",
1423 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1426 DEPRECATED_REGISTER_BYTE_P ());
1428 #ifdef DEPRECATED_REGISTER_BYTE
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: %s # %s\n",
1431 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1432 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr
)));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1435 (long) current_gdbarch
->deprecated_register_byte
1436 /*DEPRECATED_REGISTER_BYTE ()*/);
1438 #ifdef DEPRECATED_REGISTER_BYTES
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1441 XSTRING (DEPRECATED_REGISTER_BYTES
));
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1444 DEPRECATED_REGISTER_BYTES
);
1446 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: %s # %s\n",
1449 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1450 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1453 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1455 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: %s # %s\n",
1458 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1459 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr
)));
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1462 (long) current_gdbarch
->deprecated_register_convertible
1463 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1465 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: %s # %s\n",
1468 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1469 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1472 (long) current_gdbarch
->deprecated_register_convert_to_raw
1473 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1475 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: %s # %s\n",
1478 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1479 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1482 (long) current_gdbarch
->deprecated_register_convert_to_virtual
1483 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1485 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: %s # %s\n",
1488 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1489 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1492 DEPRECATED_REGISTER_RAW_SIZE_P ());
1494 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: %s # %s\n",
1497 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1498 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr
)));
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1501 (long) current_gdbarch
->deprecated_register_raw_size
1502 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1504 #ifdef DEPRECATED_REGISTER_SIZE
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1507 XSTRING (DEPRECATED_REGISTER_SIZE
));
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1510 DEPRECATED_REGISTER_SIZE
);
1512 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: %s # %s\n",
1515 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1516 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1519 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1521 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: %s # %s\n",
1524 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1525 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr
)));
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1528 (long) current_gdbarch
->deprecated_register_virtual_size
1529 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1531 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: %s # %s\n",
1534 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1535 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1538 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1540 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: %s # %s\n",
1543 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1544 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1547 (long) current_gdbarch
->deprecated_register_virtual_type
1548 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1550 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: %s # %s\n",
1553 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1554 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1557 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1559 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: %s # %s\n",
1562 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1563 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1566 (long) current_gdbarch
->deprecated_reg_struct_has_addr
1567 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1569 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: %s # %s\n",
1572 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1573 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1576 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1578 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: %s # %s\n",
1581 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1582 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1585 (long) current_gdbarch
->deprecated_saved_pc_after_call
1586 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1588 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: %s # %s\n",
1591 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1592 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1595 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1597 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: %s # %s\n",
1600 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1601 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp
)));
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1604 (long) current_gdbarch
->deprecated_save_dummy_frame_tos
1605 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1607 #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
1610 XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n",
1613 DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
);
1615 #ifdef DEPRECATED_STACK_ALIGN_P
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: %s # %s\n",
1618 "DEPRECATED_STACK_ALIGN_P()",
1619 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1622 DEPRECATED_STACK_ALIGN_P ());
1624 #ifdef DEPRECATED_STACK_ALIGN
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: %s # %s\n",
1627 "DEPRECATED_STACK_ALIGN(sp)",
1628 XSTRING (DEPRECATED_STACK_ALIGN (sp
)));
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1631 (long) current_gdbarch
->deprecated_stack_align
1632 /*DEPRECATED_STACK_ALIGN ()*/);
1634 #ifdef DEPRECATED_STORE_RETURN_VALUE
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: %s # %s\n",
1637 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1638 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1641 (long) current_gdbarch
->deprecated_store_return_value
1642 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1644 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: %s # %s\n",
1647 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1648 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1651 DEPRECATED_STORE_STRUCT_RETURN_P ());
1653 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: %s # %s\n",
1656 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1657 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1660 (long) current_gdbarch
->deprecated_store_struct_return
1661 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1663 #ifdef DEPRECATED_TARGET_READ_FP_P
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: %s # %s\n",
1666 "DEPRECATED_TARGET_READ_FP_P()",
1667 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1670 DEPRECATED_TARGET_READ_FP_P ());
1672 #ifdef DEPRECATED_TARGET_READ_FP
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: %s # %s\n",
1675 "DEPRECATED_TARGET_READ_FP()",
1676 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1679 (long) current_gdbarch
->deprecated_target_read_fp
1680 /*DEPRECATED_TARGET_READ_FP ()*/);
1682 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1685 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
));
1686 fprintf_unfiltered (file
,
1687 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1688 DEPRECATED_USE_GENERIC_DUMMY_FRAMES
);
1690 #ifdef DWARF2_REG_TO_REGNUM
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: %s # %s\n",
1693 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1694 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1697 (long) current_gdbarch
->dwarf2_reg_to_regnum
1698 /*DWARF2_REG_TO_REGNUM ()*/);
1700 #ifdef DWARF_REG_TO_REGNUM
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: %s # %s\n",
1703 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1704 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1707 (long) current_gdbarch
->dwarf_reg_to_regnum
1708 /*DWARF_REG_TO_REGNUM ()*/);
1710 #ifdef ECOFF_REG_TO_REGNUM
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: %s # %s\n",
1713 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1714 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1717 (long) current_gdbarch
->ecoff_reg_to_regnum
1718 /*ECOFF_REG_TO_REGNUM ()*/);
1720 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: %s # %s\n",
1723 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1724 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1727 (long) current_gdbarch
->elf_make_msymbol_special
1728 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1730 #ifdef EXTRACT_RETURN_VALUE
1731 fprintf_unfiltered (file
,
1732 "gdbarch_dump: %s # %s\n",
1733 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1734 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1737 (long) current_gdbarch
->extract_return_value
1738 /*EXTRACT_RETURN_VALUE ()*/);
1740 #ifdef FETCH_POINTER_ARGUMENT_P
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: %s # %s\n",
1743 "FETCH_POINTER_ARGUMENT_P()",
1744 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1747 FETCH_POINTER_ARGUMENT_P ());
1749 #ifdef FETCH_POINTER_ARGUMENT
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: %s # %s\n",
1752 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1753 XSTRING (FETCH_POINTER_ARGUMENT (frame
, argi
, type
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1756 (long) current_gdbarch
->fetch_pointer_argument
1757 /*FETCH_POINTER_ARGUMENT ()*/);
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: FP0_REGNUM # %s\n",
1762 XSTRING (FP0_REGNUM
));
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: FP0_REGNUM = %d\n",
1767 #ifdef FRAME_ARGS_SKIP
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1770 XSTRING (FRAME_ARGS_SKIP
));
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1773 (long) FRAME_ARGS_SKIP
);
1775 #ifdef FRAME_NUM_ARGS_P
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: %s # %s\n",
1778 "FRAME_NUM_ARGS_P()",
1779 XSTRING (FRAME_NUM_ARGS_P ()));
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1782 FRAME_NUM_ARGS_P ());
1784 #ifdef FRAME_NUM_ARGS
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: %s # %s\n",
1787 "FRAME_NUM_ARGS(frame)",
1788 XSTRING (FRAME_NUM_ARGS (frame
)));
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1791 (long) current_gdbarch
->frame_num_args
1792 /*FRAME_NUM_ARGS ()*/);
1794 #ifdef FRAME_RED_ZONE_SIZE
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1797 XSTRING (FRAME_RED_ZONE_SIZE
));
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1800 FRAME_RED_ZONE_SIZE
);
1802 #ifdef FUNCTION_START_OFFSET
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1805 XSTRING (FUNCTION_START_OFFSET
));
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1808 (long) FUNCTION_START_OFFSET
);
1810 #ifdef GET_LONGJMP_TARGET_P
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: %s # %s\n",
1813 "GET_LONGJMP_TARGET_P()",
1814 XSTRING (GET_LONGJMP_TARGET_P ()));
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1817 GET_LONGJMP_TARGET_P ());
1819 #ifdef GET_LONGJMP_TARGET
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: %s # %s\n",
1822 "GET_LONGJMP_TARGET(pc)",
1823 XSTRING (GET_LONGJMP_TARGET (pc
)));
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1826 (long) current_gdbarch
->get_longjmp_target
1827 /*GET_LONGJMP_TARGET ()*/);
1829 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1832 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1835 HAVE_NONSTEPPABLE_WATCHPOINT
);
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: %s # %s\n",
1840 "INNER_THAN(lhs, rhs)",
1841 XSTRING (INNER_THAN (lhs
, rhs
)));
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1844 (long) current_gdbarch
->inner_than
1847 #ifdef INTEGER_TO_ADDRESS_P
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: %s # %s\n",
1850 "INTEGER_TO_ADDRESS_P()",
1851 XSTRING (INTEGER_TO_ADDRESS_P ()));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1854 INTEGER_TO_ADDRESS_P ());
1856 #ifdef INTEGER_TO_ADDRESS
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: %s # %s\n",
1859 "INTEGER_TO_ADDRESS(type, buf)",
1860 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1863 (long) current_gdbarch
->integer_to_address
1864 /*INTEGER_TO_ADDRESS ()*/);
1866 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: %s # %s\n",
1869 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1870 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1873 (long) current_gdbarch
->in_solib_call_trampoline
1874 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1876 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1877 fprintf_unfiltered (file
,
1878 "gdbarch_dump: %s # %s\n",
1879 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1880 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1883 (long) current_gdbarch
->in_solib_return_trampoline
1884 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1886 #ifdef MEMORY_INSERT_BREAKPOINT
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: %s # %s\n",
1889 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1890 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1893 (long) current_gdbarch
->memory_insert_breakpoint
1894 /*MEMORY_INSERT_BREAKPOINT ()*/);
1896 #ifdef MEMORY_REMOVE_BREAKPOINT
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: %s # %s\n",
1899 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1900 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1901 fprintf_unfiltered (file
,
1902 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1903 (long) current_gdbarch
->memory_remove_breakpoint
1904 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1906 #ifdef NAME_OF_MALLOC
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1909 XSTRING (NAME_OF_MALLOC
));
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1914 #ifdef NUM_PSEUDO_REGS
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1917 XSTRING (NUM_PSEUDO_REGS
));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: NUM_REGS # %s\n",
1925 XSTRING (NUM_REGS
));
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: NUM_REGS = %d\n",
1930 #ifdef PARM_BOUNDARY
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1933 XSTRING (PARM_BOUNDARY
));
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1938 #ifdef PC_IN_SIGTRAMP
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: %s # %s\n",
1941 "PC_IN_SIGTRAMP(pc, name)",
1942 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1945 (long) current_gdbarch
->pc_in_sigtramp
1946 /*PC_IN_SIGTRAMP ()*/);
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: PC_REGNUM # %s\n",
1951 XSTRING (PC_REGNUM
));
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: PC_REGNUM = %d\n",
1956 #ifdef POINTER_TO_ADDRESS
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: %s # %s\n",
1959 "POINTER_TO_ADDRESS(type, buf)",
1960 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1963 (long) current_gdbarch
->pointer_to_address
1964 /*POINTER_TO_ADDRESS ()*/);
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1968 gdbarch_print_float_info_p (current_gdbarch
));
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: print_float_info = 0x%08lx\n",
1971 (long) current_gdbarch
->print_float_info
);
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1974 (long) current_gdbarch
->print_registers_info
);
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1977 gdbarch_print_vector_info_p (current_gdbarch
));
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1980 (long) current_gdbarch
->print_vector_info
);
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: PS_REGNUM # %s\n",
1984 XSTRING (PS_REGNUM
));
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: PS_REGNUM = %d\n",
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1991 gdbarch_push_dummy_call_p (current_gdbarch
));
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1994 (long) current_gdbarch
->push_dummy_call
);
1995 fprintf_unfiltered (file
,
1996 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1997 gdbarch_push_dummy_code_p (current_gdbarch
));
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
2000 (long) current_gdbarch
->push_dummy_code
);
2001 #ifdef REGISTER_BYTES_OK_P
2002 fprintf_unfiltered (file
,
2003 "gdbarch_dump: %s # %s\n",
2004 "REGISTER_BYTES_OK_P()",
2005 XSTRING (REGISTER_BYTES_OK_P ()));
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
2008 REGISTER_BYTES_OK_P ());
2010 #ifdef REGISTER_BYTES_OK
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "REGISTER_BYTES_OK(nr_bytes)",
2014 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
2017 (long) current_gdbarch
->register_bytes_ok
2018 /*REGISTER_BYTES_OK ()*/);
2020 #ifdef REGISTER_NAME
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: %s # %s\n",
2023 "REGISTER_NAME(regnr)",
2024 XSTRING (REGISTER_NAME (regnr
)));
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2027 (long) current_gdbarch
->register_name
2028 /*REGISTER_NAME ()*/);
2030 #ifdef REGISTER_SIM_REGNO
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: %s # %s\n",
2033 "REGISTER_SIM_REGNO(reg_nr)",
2034 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2037 (long) current_gdbarch
->register_sim_regno
2038 /*REGISTER_SIM_REGNO ()*/);
2040 #ifdef REGISTER_TO_VALUE
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: %s # %s\n",
2043 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
2044 XSTRING (REGISTER_TO_VALUE (frame
, regnum
, type
, buf
)));
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2047 (long) current_gdbarch
->register_to_value
2048 /*REGISTER_TO_VALUE ()*/);
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2052 gdbarch_register_type_p (current_gdbarch
));
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: register_type = 0x%08lx\n",
2055 (long) current_gdbarch
->register_type
);
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
2058 (long) current_gdbarch
->remote_translate_xfer_address
);
2059 #ifdef RETURN_VALUE_ON_STACK
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: %s # %s\n",
2062 "RETURN_VALUE_ON_STACK(type)",
2063 XSTRING (RETURN_VALUE_ON_STACK (type
)));
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2066 (long) current_gdbarch
->return_value_on_stack
2067 /*RETURN_VALUE_ON_STACK ()*/);
2069 #ifdef SDB_REG_TO_REGNUM
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: %s # %s\n",
2072 "SDB_REG_TO_REGNUM(sdb_regnr)",
2073 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2076 (long) current_gdbarch
->sdb_reg_to_regnum
2077 /*SDB_REG_TO_REGNUM ()*/);
2079 #ifdef SIGTRAMP_END_P
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: %s # %s\n",
2083 XSTRING (SIGTRAMP_END_P ()));
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: %s # %s\n",
2092 XSTRING (SIGTRAMP_END (pc
)));
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2095 (long) current_gdbarch
->sigtramp_end
2096 /*SIGTRAMP_END ()*/);
2098 #ifdef SIGTRAMP_START_P
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: %s # %s\n",
2101 "SIGTRAMP_START_P()",
2102 XSTRING (SIGTRAMP_START_P ()));
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2105 SIGTRAMP_START_P ());
2107 #ifdef SIGTRAMP_START
2108 fprintf_unfiltered (file
,
2109 "gdbarch_dump: %s # %s\n",
2110 "SIGTRAMP_START(pc)",
2111 XSTRING (SIGTRAMP_START (pc
)));
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2114 (long) current_gdbarch
->sigtramp_start
2115 /*SIGTRAMP_START ()*/);
2117 #ifdef SKIP_PROLOGUE
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: %s # %s\n",
2120 "SKIP_PROLOGUE(ip)",
2121 XSTRING (SKIP_PROLOGUE (ip
)));
2122 fprintf_unfiltered (file
,
2123 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2124 (long) current_gdbarch
->skip_prologue
2125 /*SKIP_PROLOGUE ()*/);
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
2129 (long) current_gdbarch
->skip_solib_resolver
);
2130 #ifdef SKIP_TRAMPOLINE_CODE
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: %s # %s\n",
2133 "SKIP_TRAMPOLINE_CODE(pc)",
2134 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2137 (long) current_gdbarch
->skip_trampoline_code
2138 /*SKIP_TRAMPOLINE_CODE ()*/);
2140 #ifdef SMASH_TEXT_ADDRESS
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: %s # %s\n",
2143 "SMASH_TEXT_ADDRESS(addr)",
2144 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
2145 fprintf_unfiltered (file
,
2146 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2147 (long) current_gdbarch
->smash_text_address
2148 /*SMASH_TEXT_ADDRESS ()*/);
2150 #ifdef SOFTWARE_SINGLE_STEP_P
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: %s # %s\n",
2153 "SOFTWARE_SINGLE_STEP_P()",
2154 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2157 SOFTWARE_SINGLE_STEP_P ());
2159 #ifdef SOFTWARE_SINGLE_STEP
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: %s # %s\n",
2162 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2163 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
2164 fprintf_unfiltered (file
,
2165 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2166 (long) current_gdbarch
->software_single_step
2167 /*SOFTWARE_SINGLE_STEP ()*/);
2170 fprintf_unfiltered (file
,
2171 "gdbarch_dump: SP_REGNUM # %s\n",
2172 XSTRING (SP_REGNUM
));
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: SP_REGNUM = %d\n",
2177 #ifdef STAB_REG_TO_REGNUM
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: %s # %s\n",
2180 "STAB_REG_TO_REGNUM(stab_regnr)",
2181 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
2182 fprintf_unfiltered (file
,
2183 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2184 (long) current_gdbarch
->stab_reg_to_regnum
2185 /*STAB_REG_TO_REGNUM ()*/);
2187 #ifdef STORE_RETURN_VALUE
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: %s # %s\n",
2190 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2191 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2192 fprintf_unfiltered (file
,
2193 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2194 (long) current_gdbarch
->store_return_value
2195 /*STORE_RETURN_VALUE ()*/);
2197 #ifdef TARGET_ADDR_BIT
2198 fprintf_unfiltered (file
,
2199 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2200 XSTRING (TARGET_ADDR_BIT
));
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2205 #ifdef TARGET_ARCHITECTURE
2206 fprintf_unfiltered (file
,
2207 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2208 XSTRING (TARGET_ARCHITECTURE
));
2209 if (TARGET_ARCHITECTURE
!= NULL
)
2210 fprintf_unfiltered (file
,
2211 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2212 TARGET_ARCHITECTURE
->printable_name
);
2214 #ifdef TARGET_BFD_VMA_BIT
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2217 XSTRING (TARGET_BFD_VMA_BIT
));
2218 fprintf_unfiltered (file
,
2219 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2220 TARGET_BFD_VMA_BIT
);
2222 #ifdef TARGET_BYTE_ORDER
2223 fprintf_unfiltered (file
,
2224 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2225 XSTRING (TARGET_BYTE_ORDER
));
2226 fprintf_unfiltered (file
,
2227 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2228 (long) TARGET_BYTE_ORDER
);
2230 #ifdef TARGET_CHAR_SIGNED
2231 fprintf_unfiltered (file
,
2232 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2233 XSTRING (TARGET_CHAR_SIGNED
));
2234 fprintf_unfiltered (file
,
2235 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2236 TARGET_CHAR_SIGNED
);
2238 #ifdef TARGET_DOUBLE_BIT
2239 fprintf_unfiltered (file
,
2240 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2241 XSTRING (TARGET_DOUBLE_BIT
));
2242 fprintf_unfiltered (file
,
2243 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2246 #ifdef TARGET_DOUBLE_FORMAT
2247 fprintf_unfiltered (file
,
2248 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2249 XSTRING (TARGET_DOUBLE_FORMAT
));
2250 fprintf_unfiltered (file
,
2251 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2252 (TARGET_DOUBLE_FORMAT
)->name
);
2254 #ifdef TARGET_FLOAT_BIT
2255 fprintf_unfiltered (file
,
2256 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2257 XSTRING (TARGET_FLOAT_BIT
));
2258 fprintf_unfiltered (file
,
2259 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2262 #ifdef TARGET_FLOAT_FORMAT
2263 fprintf_unfiltered (file
,
2264 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2265 XSTRING (TARGET_FLOAT_FORMAT
));
2266 fprintf_unfiltered (file
,
2267 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2268 (TARGET_FLOAT_FORMAT
)->name
);
2270 #ifdef TARGET_INT_BIT
2271 fprintf_unfiltered (file
,
2272 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2273 XSTRING (TARGET_INT_BIT
));
2274 fprintf_unfiltered (file
,
2275 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2278 #ifdef TARGET_LONG_BIT
2279 fprintf_unfiltered (file
,
2280 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2281 XSTRING (TARGET_LONG_BIT
));
2282 fprintf_unfiltered (file
,
2283 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2286 #ifdef TARGET_LONG_DOUBLE_BIT
2287 fprintf_unfiltered (file
,
2288 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2289 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2290 fprintf_unfiltered (file
,
2291 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2292 TARGET_LONG_DOUBLE_BIT
);
2294 #ifdef TARGET_LONG_DOUBLE_FORMAT
2295 fprintf_unfiltered (file
,
2296 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2297 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2298 fprintf_unfiltered (file
,
2299 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2300 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2302 #ifdef TARGET_LONG_LONG_BIT
2303 fprintf_unfiltered (file
,
2304 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2305 XSTRING (TARGET_LONG_LONG_BIT
));
2306 fprintf_unfiltered (file
,
2307 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2308 TARGET_LONG_LONG_BIT
);
2311 fprintf_unfiltered (file
,
2312 "gdbarch_dump: TARGET_OSABI # %s\n",
2313 XSTRING (TARGET_OSABI
));
2314 fprintf_unfiltered (file
,
2315 "gdbarch_dump: TARGET_OSABI = %ld\n",
2316 (long) TARGET_OSABI
);
2318 #ifdef TARGET_PRINT_INSN
2319 fprintf_unfiltered (file
,
2320 "gdbarch_dump: %s # %s\n",
2321 "TARGET_PRINT_INSN(vma, info)",
2322 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2323 fprintf_unfiltered (file
,
2324 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2325 (long) current_gdbarch
->print_insn
2326 /*TARGET_PRINT_INSN ()*/);
2328 #ifdef TARGET_PTR_BIT
2329 fprintf_unfiltered (file
,
2330 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2331 XSTRING (TARGET_PTR_BIT
));
2332 fprintf_unfiltered (file
,
2333 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2336 #ifdef TARGET_READ_PC_P
2337 fprintf_unfiltered (file
,
2338 "gdbarch_dump: %s # %s\n",
2339 "TARGET_READ_PC_P()",
2340 XSTRING (TARGET_READ_PC_P ()));
2341 fprintf_unfiltered (file
,
2342 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2343 TARGET_READ_PC_P ());
2345 #ifdef TARGET_READ_PC
2346 fprintf_unfiltered (file
,
2347 "gdbarch_dump: %s # %s\n",
2348 "TARGET_READ_PC(ptid)",
2349 XSTRING (TARGET_READ_PC (ptid
)));
2350 fprintf_unfiltered (file
,
2351 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2352 (long) current_gdbarch
->read_pc
2353 /*TARGET_READ_PC ()*/);
2355 #ifdef TARGET_READ_SP_P
2356 fprintf_unfiltered (file
,
2357 "gdbarch_dump: %s # %s\n",
2358 "TARGET_READ_SP_P()",
2359 XSTRING (TARGET_READ_SP_P ()));
2360 fprintf_unfiltered (file
,
2361 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2362 TARGET_READ_SP_P ());
2364 #ifdef TARGET_READ_SP
2365 fprintf_unfiltered (file
,
2366 "gdbarch_dump: %s # %s\n",
2368 XSTRING (TARGET_READ_SP ()));
2369 fprintf_unfiltered (file
,
2370 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2371 (long) current_gdbarch
->read_sp
2372 /*TARGET_READ_SP ()*/);
2374 #ifdef TARGET_SHORT_BIT
2375 fprintf_unfiltered (file
,
2376 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2377 XSTRING (TARGET_SHORT_BIT
));
2378 fprintf_unfiltered (file
,
2379 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2382 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2383 fprintf_unfiltered (file
,
2384 "gdbarch_dump: %s # %s\n",
2385 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2386 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2387 fprintf_unfiltered (file
,
2388 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2389 (long) current_gdbarch
->virtual_frame_pointer
2390 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2392 #ifdef TARGET_WRITE_PC
2393 fprintf_unfiltered (file
,
2394 "gdbarch_dump: %s # %s\n",
2395 "TARGET_WRITE_PC(val, ptid)",
2396 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2397 fprintf_unfiltered (file
,
2398 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2399 (long) current_gdbarch
->write_pc
2400 /*TARGET_WRITE_PC ()*/);
2402 fprintf_unfiltered (file
,
2403 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2404 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2405 fprintf_unfiltered (file
,
2406 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2407 (long) current_gdbarch
->unwind_dummy_id
);
2408 fprintf_unfiltered (file
,
2409 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2410 gdbarch_unwind_pc_p (current_gdbarch
));
2411 fprintf_unfiltered (file
,
2412 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2413 (long) current_gdbarch
->unwind_pc
);
2414 fprintf_unfiltered (file
,
2415 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2416 gdbarch_unwind_sp_p (current_gdbarch
));
2417 fprintf_unfiltered (file
,
2418 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2419 (long) current_gdbarch
->unwind_sp
);
2420 #ifdef USE_STRUCT_CONVENTION
2421 fprintf_unfiltered (file
,
2422 "gdbarch_dump: %s # %s\n",
2423 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2424 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2425 fprintf_unfiltered (file
,
2426 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2427 (long) current_gdbarch
->use_struct_convention
2428 /*USE_STRUCT_CONVENTION ()*/);
2430 #ifdef VALUE_TO_REGISTER
2431 fprintf_unfiltered (file
,
2432 "gdbarch_dump: %s # %s\n",
2433 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2434 XSTRING (VALUE_TO_REGISTER (frame
, regnum
, type
, buf
)));
2435 fprintf_unfiltered (file
,
2436 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2437 (long) current_gdbarch
->value_to_register
2438 /*VALUE_TO_REGISTER ()*/);
2440 if (current_gdbarch
->dump_tdep
!= NULL
)
2441 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2444 struct gdbarch_tdep
*
2445 gdbarch_tdep (struct gdbarch
*gdbarch
)
2447 if (gdbarch_debug
>= 2)
2448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2449 return gdbarch
->tdep
;
2453 const struct bfd_arch_info
*
2454 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2456 gdb_assert (gdbarch
!= NULL
);
2457 if (gdbarch_debug
>= 2)
2458 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2459 return gdbarch
->bfd_arch_info
;
2463 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2465 gdb_assert (gdbarch
!= NULL
);
2466 if (gdbarch_debug
>= 2)
2467 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2468 return gdbarch
->byte_order
;
2472 gdbarch_osabi (struct gdbarch
*gdbarch
)
2474 gdb_assert (gdbarch
!= NULL
);
2475 if (gdbarch_debug
>= 2)
2476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2477 return gdbarch
->osabi
;
2481 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2483 gdb_assert (gdbarch
!= NULL
);
2484 /* Skip verify of short_bit, invalid_p == 0 */
2485 if (gdbarch_debug
>= 2)
2486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2487 return gdbarch
->short_bit
;
2491 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2494 gdbarch
->short_bit
= short_bit
;
2498 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2500 gdb_assert (gdbarch
!= NULL
);
2501 /* Skip verify of int_bit, invalid_p == 0 */
2502 if (gdbarch_debug
>= 2)
2503 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2504 return gdbarch
->int_bit
;
2508 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2511 gdbarch
->int_bit
= int_bit
;
2515 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2517 gdb_assert (gdbarch
!= NULL
);
2518 /* Skip verify of long_bit, invalid_p == 0 */
2519 if (gdbarch_debug
>= 2)
2520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2521 return gdbarch
->long_bit
;
2525 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2528 gdbarch
->long_bit
= long_bit
;
2532 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2534 gdb_assert (gdbarch
!= NULL
);
2535 /* Skip verify of long_long_bit, invalid_p == 0 */
2536 if (gdbarch_debug
>= 2)
2537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2538 return gdbarch
->long_long_bit
;
2542 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2545 gdbarch
->long_long_bit
= long_long_bit
;
2549 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2551 gdb_assert (gdbarch
!= NULL
);
2552 /* Skip verify of float_bit, invalid_p == 0 */
2553 if (gdbarch_debug
>= 2)
2554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2555 return gdbarch
->float_bit
;
2559 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2562 gdbarch
->float_bit
= float_bit
;
2566 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2568 gdb_assert (gdbarch
!= NULL
);
2569 /* Skip verify of double_bit, invalid_p == 0 */
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2572 return gdbarch
->double_bit
;
2576 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2579 gdbarch
->double_bit
= double_bit
;
2583 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2585 gdb_assert (gdbarch
!= NULL
);
2586 /* Skip verify of long_double_bit, invalid_p == 0 */
2587 if (gdbarch_debug
>= 2)
2588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2589 return gdbarch
->long_double_bit
;
2593 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2594 int long_double_bit
)
2596 gdbarch
->long_double_bit
= long_double_bit
;
2600 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2602 gdb_assert (gdbarch
!= NULL
);
2603 /* Skip verify of ptr_bit, invalid_p == 0 */
2604 if (gdbarch_debug
>= 2)
2605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2606 return gdbarch
->ptr_bit
;
2610 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2613 gdbarch
->ptr_bit
= ptr_bit
;
2617 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2619 gdb_assert (gdbarch
!= NULL
);
2620 /* Check variable changed from pre-default. */
2621 gdb_assert (gdbarch
->addr_bit
!= 0);
2622 if (gdbarch_debug
>= 2)
2623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2624 return gdbarch
->addr_bit
;
2628 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2631 gdbarch
->addr_bit
= addr_bit
;
2635 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2637 gdb_assert (gdbarch
!= NULL
);
2638 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2639 if (gdbarch_debug
>= 2)
2640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2641 return gdbarch
->bfd_vma_bit
;
2645 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2648 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2652 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2654 gdb_assert (gdbarch
!= NULL
);
2655 /* Check variable changed from pre-default. */
2656 gdb_assert (gdbarch
->char_signed
!= -1);
2657 if (gdbarch_debug
>= 2)
2658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2659 return gdbarch
->char_signed
;
2663 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2666 gdbarch
->char_signed
= char_signed
;
2670 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
2672 gdb_assert (gdbarch
!= NULL
);
2673 return gdbarch
->read_pc
!= NULL
;
2677 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2679 gdb_assert (gdbarch
!= NULL
);
2680 gdb_assert (gdbarch
->read_pc
!= NULL
);
2681 if (gdbarch_debug
>= 2)
2682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2683 return gdbarch
->read_pc (ptid
);
2687 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2688 gdbarch_read_pc_ftype read_pc
)
2690 gdbarch
->read_pc
= read_pc
;
2694 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2696 gdb_assert (gdbarch
!= NULL
);
2697 gdb_assert (gdbarch
->write_pc
!= NULL
);
2698 if (gdbarch_debug
>= 2)
2699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2700 gdbarch
->write_pc (val
, ptid
);
2704 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2705 gdbarch_write_pc_ftype write_pc
)
2707 gdbarch
->write_pc
= write_pc
;
2711 gdbarch_read_sp_p (struct gdbarch
*gdbarch
)
2713 gdb_assert (gdbarch
!= NULL
);
2714 return gdbarch
->read_sp
!= NULL
;
2718 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2720 gdb_assert (gdbarch
!= NULL
);
2721 gdb_assert (gdbarch
->read_sp
!= NULL
);
2722 if (gdbarch_debug
>= 2)
2723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2724 return gdbarch
->read_sp ();
2728 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2729 gdbarch_read_sp_ftype read_sp
)
2731 gdbarch
->read_sp
= read_sp
;
2735 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2737 gdb_assert (gdbarch
!= NULL
);
2738 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
2739 if (gdbarch_debug
>= 2)
2740 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2741 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2745 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2746 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2748 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2752 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2754 gdb_assert (gdbarch
!= NULL
);
2755 return gdbarch
->pseudo_register_read
!= NULL
;
2759 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2761 gdb_assert (gdbarch
!= NULL
);
2762 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
2763 if (gdbarch_debug
>= 2)
2764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2765 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2769 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2770 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2772 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2776 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2778 gdb_assert (gdbarch
!= NULL
);
2779 return gdbarch
->pseudo_register_write
!= NULL
;
2783 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2785 gdb_assert (gdbarch
!= NULL
);
2786 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
2787 if (gdbarch_debug
>= 2)
2788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2789 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2793 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2794 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2796 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2800 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2802 gdb_assert (gdbarch
!= NULL
);
2803 /* Check variable changed from pre-default. */
2804 gdb_assert (gdbarch
->num_regs
!= -1);
2805 if (gdbarch_debug
>= 2)
2806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2807 return gdbarch
->num_regs
;
2811 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2814 gdbarch
->num_regs
= num_regs
;
2818 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2820 gdb_assert (gdbarch
!= NULL
);
2821 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2822 if (gdbarch_debug
>= 2)
2823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2824 return gdbarch
->num_pseudo_regs
;
2828 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2829 int num_pseudo_regs
)
2831 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2835 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2837 gdb_assert (gdbarch
!= NULL
);
2838 /* Skip verify of sp_regnum, invalid_p == 0 */
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2841 return gdbarch
->sp_regnum
;
2845 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2848 gdbarch
->sp_regnum
= sp_regnum
;
2852 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2854 gdb_assert (gdbarch
!= NULL
);
2855 /* Skip verify of pc_regnum, invalid_p == 0 */
2856 if (gdbarch_debug
>= 2)
2857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2858 return gdbarch
->pc_regnum
;
2862 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2865 gdbarch
->pc_regnum
= pc_regnum
;
2869 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2871 gdb_assert (gdbarch
!= NULL
);
2872 /* Skip verify of ps_regnum, invalid_p == 0 */
2873 if (gdbarch_debug
>= 2)
2874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2875 return gdbarch
->ps_regnum
;
2879 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2882 gdbarch
->ps_regnum
= ps_regnum
;
2886 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2888 gdb_assert (gdbarch
!= NULL
);
2889 /* Skip verify of fp0_regnum, invalid_p == 0 */
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2892 return gdbarch
->fp0_regnum
;
2896 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2899 gdbarch
->fp0_regnum
= fp0_regnum
;
2903 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2905 gdb_assert (gdbarch
!= NULL
);
2906 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2907 if (gdbarch_debug
>= 2)
2908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2909 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2913 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2914 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2916 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2920 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2922 gdb_assert (gdbarch
!= NULL
);
2923 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2926 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2930 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2931 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2933 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2937 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2939 gdb_assert (gdbarch
!= NULL
);
2940 gdb_assert (gdbarch
->dwarf_reg_to_regnum
!= NULL
);
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2943 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2947 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2948 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2950 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2954 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2956 gdb_assert (gdbarch
!= NULL
);
2957 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2960 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2964 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2965 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2967 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2971 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2973 gdb_assert (gdbarch
!= NULL
);
2974 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2975 if (gdbarch_debug
>= 2)
2976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2977 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2981 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2982 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2984 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2988 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2990 gdb_assert (gdbarch
!= NULL
);
2991 gdb_assert (gdbarch
->register_name
!= NULL
);
2992 if (gdbarch_debug
>= 2)
2993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2994 return gdbarch
->register_name (regnr
);
2998 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2999 gdbarch_register_name_ftype register_name
)
3001 gdbarch
->register_name
= register_name
;
3005 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
3007 gdb_assert (gdbarch
!= NULL
);
3008 return gdbarch
->register_type
!= NULL
;
3012 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
3014 gdb_assert (gdbarch
!= NULL
);
3015 gdb_assert (gdbarch
->register_type
!= NULL
);
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
3018 return gdbarch
->register_type (gdbarch
, reg_nr
);
3022 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
3023 gdbarch_register_type_ftype register_type
)
3025 gdbarch
->register_type
= register_type
;
3029 gdbarch_deprecated_register_virtual_type_p (struct gdbarch
*gdbarch
)
3031 gdb_assert (gdbarch
!= NULL
);
3032 return gdbarch
->deprecated_register_virtual_type
!= NULL
;
3036 gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3038 gdb_assert (gdbarch
!= NULL
);
3039 gdb_assert (gdbarch
->deprecated_register_virtual_type
!= NULL
);
3040 if (gdbarch_debug
>= 2)
3041 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_type called\n");
3042 return gdbarch
->deprecated_register_virtual_type (reg_nr
);
3046 set_gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
,
3047 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type
)
3049 gdbarch
->deprecated_register_virtual_type
= deprecated_register_virtual_type
;
3053 gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
)
3055 gdb_assert (gdbarch
!= NULL
);
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_bytes called\n");
3058 return gdbarch
->deprecated_register_bytes
;
3062 set_gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
,
3063 int deprecated_register_bytes
)
3065 gdbarch
->deprecated_register_bytes
= deprecated_register_bytes
;
3069 gdbarch_deprecated_register_byte_p (struct gdbarch
*gdbarch
)
3071 gdb_assert (gdbarch
!= NULL
);
3072 return gdbarch
->deprecated_register_byte
!= generic_register_byte
;
3076 gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
3078 gdb_assert (gdbarch
!= NULL
);
3079 gdb_assert (gdbarch
->deprecated_register_byte
!= NULL
);
3080 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
3081 if (gdbarch_debug
>= 2)
3082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_byte called\n");
3083 return gdbarch
->deprecated_register_byte (reg_nr
);
3087 set_gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
,
3088 gdbarch_deprecated_register_byte_ftype deprecated_register_byte
)
3090 gdbarch
->deprecated_register_byte
= deprecated_register_byte
;
3094 gdbarch_deprecated_register_raw_size_p (struct gdbarch
*gdbarch
)
3096 gdb_assert (gdbarch
!= NULL
);
3097 return gdbarch
->deprecated_register_raw_size
!= generic_register_size
;
3101 gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
3103 gdb_assert (gdbarch
!= NULL
);
3104 gdb_assert (gdbarch
->deprecated_register_raw_size
!= NULL
);
3105 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
3106 if (gdbarch_debug
>= 2)
3107 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_raw_size called\n");
3108 return gdbarch
->deprecated_register_raw_size (reg_nr
);
3112 set_gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
,
3113 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size
)
3115 gdbarch
->deprecated_register_raw_size
= deprecated_register_raw_size
;
3119 gdbarch_deprecated_register_virtual_size_p (struct gdbarch
*gdbarch
)
3121 gdb_assert (gdbarch
!= NULL
);
3122 return gdbarch
->deprecated_register_virtual_size
!= generic_register_size
;
3126 gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
3128 gdb_assert (gdbarch
!= NULL
);
3129 gdb_assert (gdbarch
->deprecated_register_virtual_size
!= NULL
);
3130 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
3131 if (gdbarch_debug
>= 2)
3132 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_size called\n");
3133 return gdbarch
->deprecated_register_virtual_size (reg_nr
);
3137 set_gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
,
3138 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size
)
3140 gdbarch
->deprecated_register_virtual_size
= deprecated_register_virtual_size
;
3144 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
3146 gdb_assert (gdbarch
!= NULL
);
3147 return gdbarch
->deprecated_max_register_raw_size
!= 0;
3151 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
3153 gdb_assert (gdbarch
!= NULL
);
3154 if (gdbarch_debug
>= 2)
3155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
3156 return gdbarch
->deprecated_max_register_raw_size
;
3160 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
3161 int deprecated_max_register_raw_size
)
3163 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
3167 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
3169 gdb_assert (gdbarch
!= NULL
);
3170 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
3174 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
3176 gdb_assert (gdbarch
!= NULL
);
3177 if (gdbarch_debug
>= 2)
3178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
3179 return gdbarch
->deprecated_max_register_virtual_size
;
3183 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
3184 int deprecated_max_register_virtual_size
)
3186 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3190 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
3192 gdb_assert (gdbarch
!= NULL
);
3193 return gdbarch
->unwind_dummy_id
!= NULL
;
3197 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
3199 gdb_assert (gdbarch
!= NULL
);
3200 gdb_assert (gdbarch
->unwind_dummy_id
!= NULL
);
3201 if (gdbarch_debug
>= 2)
3202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
3203 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
3207 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
3208 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
3210 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
3214 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3216 gdb_assert (gdbarch
!= NULL
);
3217 return gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
;
3221 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3223 gdb_assert (gdbarch
!= NULL
);
3224 gdb_assert (gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
);
3225 if (gdbarch_debug
>= 2)
3226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3227 gdbarch
->deprecated_save_dummy_frame_tos (sp
);
3231 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3232 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos
)
3234 gdbarch
->deprecated_save_dummy_frame_tos
= deprecated_save_dummy_frame_tos
;
3238 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3240 gdb_assert (gdbarch
!= NULL
);
3241 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3242 if (gdbarch_debug
>= 2)
3243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3244 return gdbarch
->deprecated_fp_regnum
;
3248 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3249 int deprecated_fp_regnum
)
3251 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3255 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
3257 gdb_assert (gdbarch
!= NULL
);
3258 return gdbarch
->deprecated_target_read_fp
!= NULL
;
3262 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
3264 gdb_assert (gdbarch
!= NULL
);
3265 gdb_assert (gdbarch
->deprecated_target_read_fp
!= NULL
);
3266 if (gdbarch_debug
>= 2)
3267 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
3268 return gdbarch
->deprecated_target_read_fp ();
3272 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
3273 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
3275 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
3279 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
3281 gdb_assert (gdbarch
!= NULL
);
3282 return gdbarch
->push_dummy_call
!= NULL
;
3286 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
)
3288 gdb_assert (gdbarch
!= NULL
);
3289 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
3290 if (gdbarch_debug
>= 2)
3291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
3292 return gdbarch
->push_dummy_call (gdbarch
, func_addr
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
3296 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
3297 gdbarch_push_dummy_call_ftype push_dummy_call
)
3299 gdbarch
->push_dummy_call
= push_dummy_call
;
3303 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
3305 gdb_assert (gdbarch
!= NULL
);
3306 return gdbarch
->deprecated_push_arguments
!= NULL
;
3310 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3312 gdb_assert (gdbarch
!= NULL
);
3313 gdb_assert (gdbarch
->deprecated_push_arguments
!= NULL
);
3314 if (gdbarch_debug
>= 2)
3315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
3316 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3320 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
3321 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
3323 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
3327 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3329 gdb_assert (gdbarch
!= NULL
);
3330 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3331 if (gdbarch_debug
>= 2)
3332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3333 return gdbarch
->deprecated_use_generic_dummy_frames
;
3337 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3338 int deprecated_use_generic_dummy_frames
)
3340 gdbarch
->deprecated_use_generic_dummy_frames
= deprecated_use_generic_dummy_frames
;
3344 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
3346 gdb_assert (gdbarch
!= NULL
);
3347 return gdbarch
->deprecated_push_return_address
!= NULL
;
3351 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3353 gdb_assert (gdbarch
!= NULL
);
3354 gdb_assert (gdbarch
->deprecated_push_return_address
!= NULL
);
3355 if (gdbarch_debug
>= 2)
3356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
3357 return gdbarch
->deprecated_push_return_address (pc
, sp
);
3361 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
3362 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
3364 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
3368 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
3370 gdb_assert (gdbarch
!= NULL
);
3371 return gdbarch
->deprecated_dummy_write_sp
!= NULL
;
3375 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
3377 gdb_assert (gdbarch
!= NULL
);
3378 gdb_assert (gdbarch
->deprecated_dummy_write_sp
!= NULL
);
3379 if (gdbarch_debug
>= 2)
3380 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
3381 gdbarch
->deprecated_dummy_write_sp (val
);
3385 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
3386 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
3388 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
3392 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
3394 gdb_assert (gdbarch
!= NULL
);
3395 if (gdbarch_debug
>= 2)
3396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
3397 return gdbarch
->deprecated_register_size
;
3401 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
3402 int deprecated_register_size
)
3404 gdbarch
->deprecated_register_size
= deprecated_register_size
;
3408 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3410 gdb_assert (gdbarch
!= NULL
);
3411 /* Skip verify of call_dummy_location, invalid_p == 0 */
3412 if (gdbarch_debug
>= 2)
3413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3414 return gdbarch
->call_dummy_location
;
3418 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3419 int call_dummy_location
)
3421 gdbarch
->call_dummy_location
= call_dummy_location
;
3425 gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3427 gdb_assert (gdbarch
!= NULL
);
3428 if (gdbarch_debug
>= 2)
3429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_start_offset called\n");
3430 return gdbarch
->deprecated_call_dummy_start_offset
;
3434 set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3435 CORE_ADDR deprecated_call_dummy_start_offset
)
3437 gdbarch
->deprecated_call_dummy_start_offset
= deprecated_call_dummy_start_offset
;
3441 gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3443 gdb_assert (gdbarch
!= NULL
);
3444 if (gdbarch_debug
>= 2)
3445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n");
3446 return gdbarch
->deprecated_call_dummy_breakpoint_offset
;
3450 set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3451 CORE_ADDR deprecated_call_dummy_breakpoint_offset
)
3453 gdbarch
->deprecated_call_dummy_breakpoint_offset
= deprecated_call_dummy_breakpoint_offset
;
3457 gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
)
3459 gdb_assert (gdbarch
!= NULL
);
3460 if (gdbarch_debug
>= 2)
3461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_length called\n");
3462 return gdbarch
->deprecated_call_dummy_length
;
3466 set_gdbarch_deprecated_call_dummy_length (struct gdbarch
*gdbarch
,
3467 int deprecated_call_dummy_length
)
3469 gdbarch
->deprecated_call_dummy_length
= deprecated_call_dummy_length
;
3473 gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
)
3475 gdb_assert (gdbarch
!= NULL
);
3476 /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
3477 if (gdbarch_debug
>= 2)
3478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_call_dummy_words called\n");
3479 return gdbarch
->deprecated_call_dummy_words
;
3483 set_gdbarch_deprecated_call_dummy_words (struct gdbarch
*gdbarch
,
3484 LONGEST
* deprecated_call_dummy_words
)
3486 gdbarch
->deprecated_call_dummy_words
= deprecated_call_dummy_words
;
3490 gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3492 gdb_assert (gdbarch
!= NULL
);
3493 /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
3494 if (gdbarch_debug
>= 2)
3495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_sizeof_call_dummy_words called\n");
3496 return gdbarch
->deprecated_sizeof_call_dummy_words
;
3500 set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3501 int deprecated_sizeof_call_dummy_words
)
3503 gdbarch
->deprecated_sizeof_call_dummy_words
= deprecated_sizeof_call_dummy_words
;
3507 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch
*gdbarch
)
3509 gdb_assert (gdbarch
!= NULL
);
3510 return gdbarch
->deprecated_fix_call_dummy
!= NULL
;
3514 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
)
3516 gdb_assert (gdbarch
!= NULL
);
3517 gdb_assert (gdbarch
->deprecated_fix_call_dummy
!= NULL
);
3518 if (gdbarch_debug
>= 2)
3519 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fix_call_dummy called\n");
3520 gdbarch
->deprecated_fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3524 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
,
3525 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy
)
3527 gdbarch
->deprecated_fix_call_dummy
= deprecated_fix_call_dummy
;
3531 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
3533 gdb_assert (gdbarch
!= NULL
);
3534 return gdbarch
->push_dummy_code
!= NULL
;
3538 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
)
3540 gdb_assert (gdbarch
!= NULL
);
3541 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
3542 if (gdbarch_debug
>= 2)
3543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
3544 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
3548 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
3549 gdbarch_push_dummy_code_ftype push_dummy_code
)
3551 gdbarch
->push_dummy_code
= push_dummy_code
;
3555 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch
*gdbarch
)
3557 gdb_assert (gdbarch
!= NULL
);
3558 return gdbarch
->deprecated_push_dummy_frame
!= NULL
;
3562 gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
)
3564 gdb_assert (gdbarch
!= NULL
);
3565 gdb_assert (gdbarch
->deprecated_push_dummy_frame
!= NULL
);
3566 if (gdbarch_debug
>= 2)
3567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_dummy_frame called\n");
3568 gdbarch
->deprecated_push_dummy_frame ();
3572 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch
*gdbarch
,
3573 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame
)
3575 gdbarch
->deprecated_push_dummy_frame
= deprecated_push_dummy_frame
;
3579 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3581 gdb_assert (gdbarch
!= NULL
);
3582 return gdbarch
->deprecated_do_registers_info
!= NULL
;
3586 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3588 gdb_assert (gdbarch
!= NULL
);
3589 gdb_assert (gdbarch
->deprecated_do_registers_info
!= NULL
);
3590 if (gdbarch_debug
>= 2)
3591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3592 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3596 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3597 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3599 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3603 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3605 gdb_assert (gdbarch
!= NULL
);
3606 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
3607 if (gdbarch_debug
>= 2)
3608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3609 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3613 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3614 gdbarch_print_registers_info_ftype print_registers_info
)
3616 gdbarch
->print_registers_info
= print_registers_info
;
3620 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3622 gdb_assert (gdbarch
!= NULL
);
3623 return gdbarch
->print_float_info
!= NULL
;
3627 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3629 gdb_assert (gdbarch
!= NULL
);
3630 gdb_assert (gdbarch
->print_float_info
!= NULL
);
3631 if (gdbarch_debug
>= 2)
3632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3633 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3637 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3638 gdbarch_print_float_info_ftype print_float_info
)
3640 gdbarch
->print_float_info
= print_float_info
;
3644 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3646 gdb_assert (gdbarch
!= NULL
);
3647 return gdbarch
->print_vector_info
!= NULL
;
3651 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3653 gdb_assert (gdbarch
!= NULL
);
3654 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
3655 if (gdbarch_debug
>= 2)
3656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3657 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3661 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3662 gdbarch_print_vector_info_ftype print_vector_info
)
3664 gdbarch
->print_vector_info
= print_vector_info
;
3668 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3670 gdb_assert (gdbarch
!= NULL
);
3671 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3674 return gdbarch
->register_sim_regno (reg_nr
);
3678 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3679 gdbarch_register_sim_regno_ftype register_sim_regno
)
3681 gdbarch
->register_sim_regno
= register_sim_regno
;
3685 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3687 gdb_assert (gdbarch
!= NULL
);
3688 return gdbarch
->register_bytes_ok
!= NULL
;
3692 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3694 gdb_assert (gdbarch
!= NULL
);
3695 gdb_assert (gdbarch
->register_bytes_ok
!= NULL
);
3696 if (gdbarch_debug
>= 2)
3697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3698 return gdbarch
->register_bytes_ok (nr_bytes
);
3702 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3703 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3705 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3709 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3711 gdb_assert (gdbarch
!= NULL
);
3712 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
3713 if (gdbarch_debug
>= 2)
3714 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3715 return gdbarch
->cannot_fetch_register (regnum
);
3719 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3720 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3722 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3726 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3728 gdb_assert (gdbarch
!= NULL
);
3729 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
3730 if (gdbarch_debug
>= 2)
3731 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3732 return gdbarch
->cannot_store_register (regnum
);
3736 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3737 gdbarch_cannot_store_register_ftype cannot_store_register
)
3739 gdbarch
->cannot_store_register
= cannot_store_register
;
3743 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3745 gdb_assert (gdbarch
!= NULL
);
3746 return gdbarch
->get_longjmp_target
!= NULL
;
3750 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3752 gdb_assert (gdbarch
!= NULL
);
3753 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
3754 if (gdbarch_debug
>= 2)
3755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3756 return gdbarch
->get_longjmp_target (pc
);
3760 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3761 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3763 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3767 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3769 gdb_assert (gdbarch
!= NULL
);
3770 return gdbarch
->deprecated_pc_in_call_dummy
!= generic_pc_in_call_dummy
;
3774 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3776 gdb_assert (gdbarch
!= NULL
);
3777 gdb_assert (gdbarch
->deprecated_pc_in_call_dummy
!= NULL
);
3778 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy, allow call. */
3779 if (gdbarch_debug
>= 2)
3780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3781 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3785 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3786 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3788 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3792 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch
*gdbarch
)
3794 gdb_assert (gdbarch
!= NULL
);
3795 return gdbarch
->deprecated_init_frame_pc_first
!= NULL
;
3799 gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3801 gdb_assert (gdbarch
!= NULL
);
3802 gdb_assert (gdbarch
->deprecated_init_frame_pc_first
!= NULL
);
3803 if (gdbarch_debug
>= 2)
3804 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc_first called\n");
3805 return gdbarch
->deprecated_init_frame_pc_first (fromleaf
, prev
);
3809 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch
*gdbarch
,
3810 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first
)
3812 gdbarch
->deprecated_init_frame_pc_first
= deprecated_init_frame_pc_first
;
3816 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3818 gdb_assert (gdbarch
!= NULL
);
3819 return gdbarch
->deprecated_init_frame_pc
!= NULL
;
3823 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3825 gdb_assert (gdbarch
!= NULL
);
3826 gdb_assert (gdbarch
->deprecated_init_frame_pc
!= NULL
);
3827 if (gdbarch_debug
>= 2)
3828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3829 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3833 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3834 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3836 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3840 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3842 gdb_assert (gdbarch
!= NULL
);
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3845 return gdbarch
->believe_pcc_promotion
;
3849 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3850 int believe_pcc_promotion
)
3852 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3856 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3858 gdb_assert (gdbarch
!= NULL
);
3859 if (gdbarch_debug
>= 2)
3860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3861 return gdbarch
->believe_pcc_promotion_type
;
3865 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3866 int believe_pcc_promotion_type
)
3868 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3872 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
3874 gdb_assert (gdbarch
!= NULL
);
3875 return gdbarch
->deprecated_get_saved_register
!= NULL
;
3879 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
)
3881 gdb_assert (gdbarch
!= NULL
);
3882 gdb_assert (gdbarch
->deprecated_get_saved_register
!= NULL
);
3883 if (gdbarch_debug
>= 2)
3884 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
3885 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3889 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
3890 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
3892 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
3896 gdbarch_deprecated_register_convertible_p (struct gdbarch
*gdbarch
)
3898 gdb_assert (gdbarch
!= NULL
);
3899 return gdbarch
->deprecated_register_convertible
!= NULL
;
3903 gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3905 gdb_assert (gdbarch
!= NULL
);
3906 gdb_assert (gdbarch
->deprecated_register_convertible
!= NULL
);
3907 if (gdbarch_debug
>= 2)
3908 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convertible called\n");
3909 return gdbarch
->deprecated_register_convertible (nr
);
3913 set_gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
,
3914 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible
)
3916 gdbarch
->deprecated_register_convertible
= deprecated_register_convertible
;
3920 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3922 gdb_assert (gdbarch
!= NULL
);
3923 gdb_assert (gdbarch
->deprecated_register_convert_to_virtual
!= NULL
);
3924 if (gdbarch_debug
>= 2)
3925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_virtual called\n");
3926 gdbarch
->deprecated_register_convert_to_virtual (regnum
, type
, from
, to
);
3930 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3931 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual
)
3933 gdbarch
->deprecated_register_convert_to_virtual
= deprecated_register_convert_to_virtual
;
3937 gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, const char *from
, char *to
)
3939 gdb_assert (gdbarch
!= NULL
);
3940 gdb_assert (gdbarch
->deprecated_register_convert_to_raw
!= NULL
);
3941 if (gdbarch_debug
>= 2)
3942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_raw called\n");
3943 gdbarch
->deprecated_register_convert_to_raw (type
, regnum
, from
, to
);
3947 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
,
3948 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw
)
3950 gdbarch
->deprecated_register_convert_to_raw
= deprecated_register_convert_to_raw
;
3954 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
3956 gdb_assert (gdbarch
!= NULL
);
3957 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
3958 if (gdbarch_debug
>= 2)
3959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3960 return gdbarch
->convert_register_p (regnum
, type
);
3964 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3965 gdbarch_convert_register_p_ftype convert_register_p
)
3967 gdbarch
->convert_register_p
= convert_register_p
;
3971 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, void *buf
)
3973 gdb_assert (gdbarch
!= NULL
);
3974 gdb_assert (gdbarch
->register_to_value
!= NULL
);
3975 if (gdbarch_debug
>= 2)
3976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3977 gdbarch
->register_to_value (frame
, regnum
, type
, buf
);
3981 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3982 gdbarch_register_to_value_ftype register_to_value
)
3984 gdbarch
->register_to_value
= register_to_value
;
3988 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const void *buf
)
3990 gdb_assert (gdbarch
!= NULL
);
3991 gdb_assert (gdbarch
->value_to_register
!= NULL
);
3992 if (gdbarch_debug
>= 2)
3993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3994 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
3998 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3999 gdbarch_value_to_register_ftype value_to_register
)
4001 gdbarch
->value_to_register
= value_to_register
;
4005 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
4007 gdb_assert (gdbarch
!= NULL
);
4008 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
4009 if (gdbarch_debug
>= 2)
4010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
4011 return gdbarch
->pointer_to_address (type
, buf
);
4015 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
4016 gdbarch_pointer_to_address_ftype pointer_to_address
)
4018 gdbarch
->pointer_to_address
= pointer_to_address
;
4022 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
4024 gdb_assert (gdbarch
!= NULL
);
4025 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
4026 if (gdbarch_debug
>= 2)
4027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
4028 gdbarch
->address_to_pointer (type
, buf
, addr
);
4032 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
4033 gdbarch_address_to_pointer_ftype address_to_pointer
)
4035 gdbarch
->address_to_pointer
= address_to_pointer
;
4039 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
4041 gdb_assert (gdbarch
!= NULL
);
4042 return gdbarch
->integer_to_address
!= NULL
;
4046 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
4048 gdb_assert (gdbarch
!= NULL
);
4049 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
4050 if (gdbarch_debug
>= 2)
4051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
4052 return gdbarch
->integer_to_address (type
, buf
);
4056 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
4057 gdbarch_integer_to_address_ftype integer_to_address
)
4059 gdbarch
->integer_to_address
= integer_to_address
;
4063 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
4065 gdb_assert (gdbarch
!= NULL
);
4066 return gdbarch
->deprecated_pop_frame
!= NULL
;
4070 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
4072 gdb_assert (gdbarch
!= NULL
);
4073 gdb_assert (gdbarch
->deprecated_pop_frame
!= NULL
);
4074 if (gdbarch_debug
>= 2)
4075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
4076 gdbarch
->deprecated_pop_frame ();
4080 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
4081 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
4083 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
4087 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
4089 gdb_assert (gdbarch
!= NULL
);
4090 return gdbarch
->deprecated_store_struct_return
!= NULL
;
4094 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
4096 gdb_assert (gdbarch
!= NULL
);
4097 gdb_assert (gdbarch
->deprecated_store_struct_return
!= NULL
);
4098 if (gdbarch_debug
>= 2)
4099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
4100 gdbarch
->deprecated_store_struct_return (addr
, sp
);
4104 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
4105 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
4107 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
4111 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
4113 gdb_assert (gdbarch
!= NULL
);
4114 return gdbarch
->return_value
!= NULL
;
4117 enum return_value_convention
4118 gdbarch_return_value (struct gdbarch
*gdbarch
, struct type
*valtype
, struct regcache
*regcache
, void *readbuf
, const void *writebuf
)
4120 gdb_assert (gdbarch
!= NULL
);
4121 gdb_assert (gdbarch
->return_value
!= NULL
);
4122 if (gdbarch_debug
>= 2)
4123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
4124 return gdbarch
->return_value (gdbarch
, valtype
, regcache
, readbuf
, writebuf
);
4128 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
4129 gdbarch_return_value_ftype return_value
)
4131 gdbarch
->return_value
= return_value
;
4135 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
4137 gdb_assert (gdbarch
!= NULL
);
4138 gdb_assert (gdbarch
->return_value_on_stack
!= NULL
);
4139 if (gdbarch_debug
>= 2)
4140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
4141 return gdbarch
->return_value_on_stack (type
);
4145 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
4146 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
4148 gdbarch
->return_value_on_stack
= return_value_on_stack
;
4152 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
4154 gdb_assert (gdbarch
!= NULL
);
4155 gdb_assert (gdbarch
->extract_return_value
!= NULL
);
4156 if (gdbarch_debug
>= 2)
4157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
4158 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
4162 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
4163 gdbarch_extract_return_value_ftype extract_return_value
)
4165 gdbarch
->extract_return_value
= extract_return_value
;
4169 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
4171 gdb_assert (gdbarch
!= NULL
);
4172 gdb_assert (gdbarch
->store_return_value
!= NULL
);
4173 if (gdbarch_debug
>= 2)
4174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
4175 gdbarch
->store_return_value (type
, regcache
, valbuf
);
4179 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
4180 gdbarch_store_return_value_ftype store_return_value
)
4182 gdbarch
->store_return_value
= store_return_value
;
4186 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
4188 gdb_assert (gdbarch
!= NULL
);
4189 gdb_assert (gdbarch
->deprecated_extract_return_value
!= NULL
);
4190 if (gdbarch_debug
>= 2)
4191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
4192 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
4196 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
4197 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
4199 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
4203 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
4205 gdb_assert (gdbarch
!= NULL
);
4206 gdb_assert (gdbarch
->deprecated_store_return_value
!= NULL
);
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
4209 gdbarch
->deprecated_store_return_value (type
, valbuf
);
4213 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
4214 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
4216 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
4220 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
4222 gdb_assert (gdbarch
!= NULL
);
4223 gdb_assert (gdbarch
->use_struct_convention
!= NULL
);
4224 if (gdbarch_debug
>= 2)
4225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
4226 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
4230 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
4231 gdbarch_use_struct_convention_ftype use_struct_convention
)
4233 gdbarch
->use_struct_convention
= use_struct_convention
;
4237 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
4239 gdb_assert (gdbarch
!= NULL
);
4240 return gdbarch
->deprecated_extract_struct_value_address
!= NULL
;
4244 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
4246 gdb_assert (gdbarch
!= NULL
);
4247 gdb_assert (gdbarch
->deprecated_extract_struct_value_address
!= NULL
);
4248 if (gdbarch_debug
>= 2)
4249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
4250 return gdbarch
->deprecated_extract_struct_value_address (regcache
);
4254 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
4255 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
4257 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
4261 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
4263 gdb_assert (gdbarch
!= NULL
);
4264 return gdbarch
->deprecated_frame_init_saved_regs
!= NULL
;
4268 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4270 gdb_assert (gdbarch
!= NULL
);
4271 gdb_assert (gdbarch
->deprecated_frame_init_saved_regs
!= NULL
);
4272 if (gdbarch_debug
>= 2)
4273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
4274 gdbarch
->deprecated_frame_init_saved_regs (frame
);
4278 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
4279 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
4281 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
4285 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
4287 gdb_assert (gdbarch
!= NULL
);
4288 return gdbarch
->deprecated_init_extra_frame_info
!= NULL
;
4292 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
4294 gdb_assert (gdbarch
!= NULL
);
4295 gdb_assert (gdbarch
->deprecated_init_extra_frame_info
!= NULL
);
4296 if (gdbarch_debug
>= 2)
4297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
4298 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
4302 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
4303 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
4305 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
4309 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
4311 gdb_assert (gdbarch
!= NULL
);
4312 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
4313 if (gdbarch_debug
>= 2)
4314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
4315 return gdbarch
->skip_prologue (ip
);
4319 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
4320 gdbarch_skip_prologue_ftype skip_prologue
)
4322 gdbarch
->skip_prologue
= skip_prologue
;
4326 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
4328 gdb_assert (gdbarch
!= NULL
);
4329 gdb_assert (gdbarch
->inner_than
!= NULL
);
4330 if (gdbarch_debug
>= 2)
4331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
4332 return gdbarch
->inner_than (lhs
, rhs
);
4336 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
4337 gdbarch_inner_than_ftype inner_than
)
4339 gdbarch
->inner_than
= inner_than
;
4342 const unsigned char *
4343 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
4345 gdb_assert (gdbarch
!= NULL
);
4346 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
4347 if (gdbarch_debug
>= 2)
4348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
4349 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4353 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4354 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4356 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4360 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
4362 gdb_assert (gdbarch
!= NULL
);
4363 return gdbarch
->adjust_breakpoint_address
!= NULL
;
4367 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
4369 gdb_assert (gdbarch
!= NULL
);
4370 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
4371 if (gdbarch_debug
>= 2)
4372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
4373 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
4377 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
4378 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
4380 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
4384 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4386 gdb_assert (gdbarch
!= NULL
);
4387 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
4388 if (gdbarch_debug
>= 2)
4389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4390 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4394 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4395 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4397 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4401 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4403 gdb_assert (gdbarch
!= NULL
);
4404 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
4405 if (gdbarch_debug
>= 2)
4406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4407 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4411 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4412 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4414 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4418 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4420 gdb_assert (gdbarch
!= NULL
);
4421 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4422 if (gdbarch_debug
>= 2)
4423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4424 return gdbarch
->decr_pc_after_break
;
4428 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4429 CORE_ADDR decr_pc_after_break
)
4431 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4435 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4437 gdb_assert (gdbarch
!= NULL
);
4438 /* Skip verify of function_start_offset, invalid_p == 0 */
4439 if (gdbarch_debug
>= 2)
4440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4441 return gdbarch
->function_start_offset
;
4445 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4446 CORE_ADDR function_start_offset
)
4448 gdbarch
->function_start_offset
= function_start_offset
;
4452 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
)
4454 gdb_assert (gdbarch
!= NULL
);
4455 gdb_assert (gdbarch
->remote_translate_xfer_address
!= NULL
);
4456 if (gdbarch_debug
>= 2)
4457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4458 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4462 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4463 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4465 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4469 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4471 gdb_assert (gdbarch
!= NULL
);
4472 /* Skip verify of frame_args_skip, invalid_p == 0 */
4473 if (gdbarch_debug
>= 2)
4474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4475 return gdbarch
->frame_args_skip
;
4479 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4480 CORE_ADDR frame_args_skip
)
4482 gdbarch
->frame_args_skip
= frame_args_skip
;
4486 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch
*gdbarch
)
4488 gdb_assert (gdbarch
!= NULL
);
4489 return gdbarch
->deprecated_frameless_function_invocation
!= NULL
;
4493 gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4495 gdb_assert (gdbarch
!= NULL
);
4496 gdb_assert (gdbarch
->deprecated_frameless_function_invocation
!= NULL
);
4497 if (gdbarch_debug
>= 2)
4498 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frameless_function_invocation called\n");
4499 return gdbarch
->deprecated_frameless_function_invocation (fi
);
4503 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
,
4504 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation
)
4506 gdbarch
->deprecated_frameless_function_invocation
= deprecated_frameless_function_invocation
;
4510 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4512 gdb_assert (gdbarch
!= NULL
);
4513 return gdbarch
->deprecated_frame_chain
!= NULL
;
4517 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4519 gdb_assert (gdbarch
!= NULL
);
4520 gdb_assert (gdbarch
->deprecated_frame_chain
!= NULL
);
4521 if (gdbarch_debug
>= 2)
4522 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4523 return gdbarch
->deprecated_frame_chain (frame
);
4527 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4528 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4530 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4534 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4536 gdb_assert (gdbarch
!= NULL
);
4537 return gdbarch
->deprecated_frame_chain_valid
!= NULL
;
4541 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4543 gdb_assert (gdbarch
!= NULL
);
4544 gdb_assert (gdbarch
->deprecated_frame_chain_valid
!= NULL
);
4545 if (gdbarch_debug
>= 2)
4546 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4547 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4551 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4552 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4554 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4558 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4560 gdb_assert (gdbarch
!= NULL
);
4561 return gdbarch
->deprecated_frame_saved_pc
!= NULL
;
4565 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4567 gdb_assert (gdbarch
!= NULL
);
4568 gdb_assert (gdbarch
->deprecated_frame_saved_pc
!= NULL
);
4569 if (gdbarch_debug
>= 2)
4570 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4571 return gdbarch
->deprecated_frame_saved_pc (fi
);
4575 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4576 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4578 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4582 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4584 gdb_assert (gdbarch
!= NULL
);
4585 return gdbarch
->unwind_pc
!= NULL
;
4589 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4591 gdb_assert (gdbarch
!= NULL
);
4592 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
4593 if (gdbarch_debug
>= 2)
4594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4595 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4599 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4600 gdbarch_unwind_pc_ftype unwind_pc
)
4602 gdbarch
->unwind_pc
= unwind_pc
;
4606 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
4608 gdb_assert (gdbarch
!= NULL
);
4609 return gdbarch
->unwind_sp
!= NULL
;
4613 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4615 gdb_assert (gdbarch
!= NULL
);
4616 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
4617 if (gdbarch_debug
>= 2)
4618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
4619 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
4623 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
4624 gdbarch_unwind_sp_ftype unwind_sp
)
4626 gdbarch
->unwind_sp
= unwind_sp
;
4630 gdbarch_deprecated_frame_args_address_p (struct gdbarch
*gdbarch
)
4632 gdb_assert (gdbarch
!= NULL
);
4633 return gdbarch
->deprecated_frame_args_address
!= get_frame_base
;
4637 gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4639 gdb_assert (gdbarch
!= NULL
);
4640 gdb_assert (gdbarch
->deprecated_frame_args_address
!= NULL
);
4641 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4642 if (gdbarch_debug
>= 2)
4643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_args_address called\n");
4644 return gdbarch
->deprecated_frame_args_address (fi
);
4648 set_gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
,
4649 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address
)
4651 gdbarch
->deprecated_frame_args_address
= deprecated_frame_args_address
;
4655 gdbarch_deprecated_frame_locals_address_p (struct gdbarch
*gdbarch
)
4657 gdb_assert (gdbarch
!= NULL
);
4658 return gdbarch
->deprecated_frame_locals_address
!= get_frame_base
;
4662 gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4664 gdb_assert (gdbarch
!= NULL
);
4665 gdb_assert (gdbarch
->deprecated_frame_locals_address
!= NULL
);
4666 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4667 if (gdbarch_debug
>= 2)
4668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_locals_address called\n");
4669 return gdbarch
->deprecated_frame_locals_address (fi
);
4673 set_gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
,
4674 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address
)
4676 gdbarch
->deprecated_frame_locals_address
= deprecated_frame_locals_address
;
4680 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4682 gdb_assert (gdbarch
!= NULL
);
4683 return gdbarch
->deprecated_saved_pc_after_call
!= NULL
;
4687 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4689 gdb_assert (gdbarch
!= NULL
);
4690 gdb_assert (gdbarch
->deprecated_saved_pc_after_call
!= NULL
);
4691 if (gdbarch_debug
>= 2)
4692 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
4693 return gdbarch
->deprecated_saved_pc_after_call (frame
);
4697 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
4698 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
4700 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
4704 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
4706 gdb_assert (gdbarch
!= NULL
);
4707 return gdbarch
->frame_num_args
!= NULL
;
4711 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4713 gdb_assert (gdbarch
!= NULL
);
4714 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
4715 if (gdbarch_debug
>= 2)
4716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4717 return gdbarch
->frame_num_args (frame
);
4721 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4722 gdbarch_frame_num_args_ftype frame_num_args
)
4724 gdbarch
->frame_num_args
= frame_num_args
;
4728 gdbarch_deprecated_stack_align_p (struct gdbarch
*gdbarch
)
4730 gdb_assert (gdbarch
!= NULL
);
4731 return gdbarch
->deprecated_stack_align
!= NULL
;
4735 gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4737 gdb_assert (gdbarch
!= NULL
);
4738 gdb_assert (gdbarch
->deprecated_stack_align
!= NULL
);
4739 if (gdbarch_debug
>= 2)
4740 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_stack_align called\n");
4741 return gdbarch
->deprecated_stack_align (sp
);
4745 set_gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
,
4746 gdbarch_deprecated_stack_align_ftype deprecated_stack_align
)
4748 gdbarch
->deprecated_stack_align
= deprecated_stack_align
;
4752 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4754 gdb_assert (gdbarch
!= NULL
);
4755 return gdbarch
->frame_align
!= NULL
;
4759 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4761 gdb_assert (gdbarch
!= NULL
);
4762 gdb_assert (gdbarch
->frame_align
!= NULL
);
4763 if (gdbarch_debug
>= 2)
4764 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4765 return gdbarch
->frame_align (gdbarch
, address
);
4769 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4770 gdbarch_frame_align_ftype frame_align
)
4772 gdbarch
->frame_align
= frame_align
;
4776 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4778 gdb_assert (gdbarch
!= NULL
);
4779 return gdbarch
->deprecated_reg_struct_has_addr
!= NULL
;
4783 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4785 gdb_assert (gdbarch
!= NULL
);
4786 gdb_assert (gdbarch
->deprecated_reg_struct_has_addr
!= NULL
);
4787 if (gdbarch_debug
>= 2)
4788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_reg_struct_has_addr called\n");
4789 return gdbarch
->deprecated_reg_struct_has_addr (gcc_p
, type
);
4793 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4794 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr
)
4796 gdbarch
->deprecated_reg_struct_has_addr
= deprecated_reg_struct_has_addr
;
4800 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
4802 gdb_assert (gdbarch
!= NULL
);
4803 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
4804 if (gdbarch_debug
>= 2)
4805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
4806 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
4810 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
4811 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
4813 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
4817 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
4819 gdb_assert (gdbarch
!= NULL
);
4820 if (gdbarch_debug
>= 2)
4821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
4822 return gdbarch
->frame_red_zone_size
;
4826 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
4827 int frame_red_zone_size
)
4829 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
4833 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4835 gdb_assert (gdbarch
!= NULL
);
4836 if (gdbarch_debug
>= 2)
4837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4838 return gdbarch
->parm_boundary
;
4842 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4845 gdbarch
->parm_boundary
= parm_boundary
;
4848 const struct floatformat
*
4849 gdbarch_float_format (struct gdbarch
*gdbarch
)
4851 gdb_assert (gdbarch
!= NULL
);
4852 if (gdbarch_debug
>= 2)
4853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4854 return gdbarch
->float_format
;
4858 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4859 const struct floatformat
* float_format
)
4861 gdbarch
->float_format
= float_format
;
4864 const struct floatformat
*
4865 gdbarch_double_format (struct gdbarch
*gdbarch
)
4867 gdb_assert (gdbarch
!= NULL
);
4868 if (gdbarch_debug
>= 2)
4869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4870 return gdbarch
->double_format
;
4874 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4875 const struct floatformat
* double_format
)
4877 gdbarch
->double_format
= double_format
;
4880 const struct floatformat
*
4881 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4883 gdb_assert (gdbarch
!= NULL
);
4884 if (gdbarch_debug
>= 2)
4885 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4886 return gdbarch
->long_double_format
;
4890 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4891 const struct floatformat
* long_double_format
)
4893 gdbarch
->long_double_format
= long_double_format
;
4897 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
4899 gdb_assert (gdbarch
!= NULL
);
4900 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
4901 if (gdbarch_debug
>= 2)
4902 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4903 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
4907 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4908 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4910 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4914 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4916 gdb_assert (gdbarch
!= NULL
);
4917 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
4918 if (gdbarch_debug
>= 2)
4919 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4920 return gdbarch
->addr_bits_remove (addr
);
4924 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4925 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4927 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4931 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4933 gdb_assert (gdbarch
!= NULL
);
4934 gdb_assert (gdbarch
->smash_text_address
!= NULL
);
4935 if (gdbarch_debug
>= 2)
4936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4937 return gdbarch
->smash_text_address (addr
);
4941 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4942 gdbarch_smash_text_address_ftype smash_text_address
)
4944 gdbarch
->smash_text_address
= smash_text_address
;
4948 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4950 gdb_assert (gdbarch
!= NULL
);
4951 return gdbarch
->software_single_step
!= NULL
;
4955 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4957 gdb_assert (gdbarch
!= NULL
);
4958 gdb_assert (gdbarch
->software_single_step
!= NULL
);
4959 if (gdbarch_debug
>= 2)
4960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4961 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4965 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4966 gdbarch_software_single_step_ftype software_single_step
)
4968 gdbarch
->software_single_step
= software_single_step
;
4972 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
4974 gdb_assert (gdbarch
!= NULL
);
4975 gdb_assert (gdbarch
->print_insn
!= NULL
);
4976 if (gdbarch_debug
>= 2)
4977 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4978 return gdbarch
->print_insn (vma
, info
);
4982 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4983 gdbarch_print_insn_ftype print_insn
)
4985 gdbarch
->print_insn
= print_insn
;
4989 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4991 gdb_assert (gdbarch
!= NULL
);
4992 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
4993 if (gdbarch_debug
>= 2)
4994 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4995 return gdbarch
->skip_trampoline_code (pc
);
4999 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
5000 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
5002 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
5006 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5008 gdb_assert (gdbarch
!= NULL
);
5009 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
5010 if (gdbarch_debug
>= 2)
5011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
5012 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
5016 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
5017 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
5019 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
5023 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5025 gdb_assert (gdbarch
!= NULL
);
5026 gdb_assert (gdbarch
->in_solib_call_trampoline
!= NULL
);
5027 if (gdbarch_debug
>= 2)
5028 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
5029 return gdbarch
->in_solib_call_trampoline (pc
, name
);
5033 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
5034 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
5036 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
5040 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5042 gdb_assert (gdbarch
!= NULL
);
5043 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
5044 if (gdbarch_debug
>= 2)
5045 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
5046 return gdbarch
->in_solib_return_trampoline (pc
, name
);
5050 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
5051 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
5053 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
5057 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
5059 gdb_assert (gdbarch
!= NULL
);
5060 gdb_assert (gdbarch
->pc_in_sigtramp
!= NULL
);
5061 if (gdbarch_debug
>= 2)
5062 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
5063 return gdbarch
->pc_in_sigtramp (pc
, name
);
5067 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
5068 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
5070 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
5074 gdbarch_sigtramp_start_p (struct gdbarch
*gdbarch
)
5076 gdb_assert (gdbarch
!= NULL
);
5077 return gdbarch
->sigtramp_start
!= NULL
;
5081 gdbarch_sigtramp_start (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5083 gdb_assert (gdbarch
!= NULL
);
5084 gdb_assert (gdbarch
->sigtramp_start
!= NULL
);
5085 if (gdbarch_debug
>= 2)
5086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_start called\n");
5087 return gdbarch
->sigtramp_start (pc
);
5091 set_gdbarch_sigtramp_start (struct gdbarch
*gdbarch
,
5092 gdbarch_sigtramp_start_ftype sigtramp_start
)
5094 gdbarch
->sigtramp_start
= sigtramp_start
;
5098 gdbarch_sigtramp_end_p (struct gdbarch
*gdbarch
)
5100 gdb_assert (gdbarch
!= NULL
);
5101 return gdbarch
->sigtramp_end
!= NULL
;
5105 gdbarch_sigtramp_end (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
5107 gdb_assert (gdbarch
!= NULL
);
5108 gdb_assert (gdbarch
->sigtramp_end
!= NULL
);
5109 if (gdbarch_debug
>= 2)
5110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sigtramp_end called\n");
5111 return gdbarch
->sigtramp_end (pc
);
5115 set_gdbarch_sigtramp_end (struct gdbarch
*gdbarch
,
5116 gdbarch_sigtramp_end_ftype sigtramp_end
)
5118 gdbarch
->sigtramp_end
= sigtramp_end
;
5122 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
5124 gdb_assert (gdbarch
!= NULL
);
5125 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
5126 if (gdbarch_debug
>= 2)
5127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
5128 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
5132 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
5133 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
5135 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
5139 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
5141 gdb_assert (gdbarch
!= NULL
);
5142 gdb_assert (gdbarch
->construct_inferior_arguments
!= NULL
);
5143 if (gdbarch_debug
>= 2)
5144 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
5145 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
5149 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
5150 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
5152 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
5156 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
5158 gdb_assert (gdbarch
!= NULL
);
5159 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
5160 if (gdbarch_debug
>= 2)
5161 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
5162 gdbarch
->elf_make_msymbol_special (sym
, msym
);
5166 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
5167 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
5169 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
5173 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
5175 gdb_assert (gdbarch
!= NULL
);
5176 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
5177 if (gdbarch_debug
>= 2)
5178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
5179 gdbarch
->coff_make_msymbol_special (val
, msym
);
5183 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
5184 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
5186 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
5190 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
5192 gdb_assert (gdbarch
!= NULL
);
5193 /* Skip verify of name_of_malloc, invalid_p == 0 */
5194 if (gdbarch_debug
>= 2)
5195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
5196 return gdbarch
->name_of_malloc
;
5200 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
5201 const char * name_of_malloc
)
5203 gdbarch
->name_of_malloc
= name_of_malloc
;
5207 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
5209 gdb_assert (gdbarch
!= NULL
);
5210 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5211 if (gdbarch_debug
>= 2)
5212 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
5213 return gdbarch
->cannot_step_breakpoint
;
5217 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
5218 int cannot_step_breakpoint
)
5220 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
5224 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
5226 gdb_assert (gdbarch
!= NULL
);
5227 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5228 if (gdbarch_debug
>= 2)
5229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
5230 return gdbarch
->have_nonsteppable_watchpoint
;
5234 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
5235 int have_nonsteppable_watchpoint
)
5237 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
5241 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
5243 gdb_assert (gdbarch
!= NULL
);
5244 return gdbarch
->address_class_type_flags
!= NULL
;
5248 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
5250 gdb_assert (gdbarch
!= NULL
);
5251 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
5252 if (gdbarch_debug
>= 2)
5253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
5254 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
5258 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
5259 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
5261 gdbarch
->address_class_type_flags
= address_class_type_flags
;
5265 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
5267 gdb_assert (gdbarch
!= NULL
);
5268 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
5272 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
5274 gdb_assert (gdbarch
!= NULL
);
5275 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
5276 if (gdbarch_debug
>= 2)
5277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
5278 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
5282 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
5283 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
5285 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
5289 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
5291 gdb_assert (gdbarch
!= NULL
);
5292 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
5296 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
5298 gdb_assert (gdbarch
!= NULL
);
5299 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
5300 if (gdbarch_debug
>= 2)
5301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
5302 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
5306 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
5307 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
5309 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
5313 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
5315 gdb_assert (gdbarch
!= NULL
);
5316 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
5317 if (gdbarch_debug
>= 2)
5318 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
5319 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
5323 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
5324 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
5326 gdbarch
->register_reggroup_p
= register_reggroup_p
;
5330 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
5332 gdb_assert (gdbarch
!= NULL
);
5333 return gdbarch
->fetch_pointer_argument
!= NULL
;
5337 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
5339 gdb_assert (gdbarch
!= NULL
);
5340 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
5341 if (gdbarch_debug
>= 2)
5342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
5343 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
5347 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
5348 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
5350 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
5354 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
5356 gdb_assert (gdbarch
!= NULL
);
5357 return gdbarch
->regset_from_core_section
!= NULL
;
5360 const struct regset
*
5361 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
5363 gdb_assert (gdbarch
!= NULL
);
5364 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
5365 if (gdbarch_debug
>= 2)
5366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
5367 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
5371 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
5372 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
5374 gdbarch
->regset_from_core_section
= regset_from_core_section
;
5378 /* Keep a registry of per-architecture data-pointers required by GDB
5385 gdbarch_data_init_ftype
*init
;
5388 struct gdbarch_data_registration
5390 struct gdbarch_data
*data
;
5391 struct gdbarch_data_registration
*next
;
5394 struct gdbarch_data_registry
5397 struct gdbarch_data_registration
*registrations
;
5400 struct gdbarch_data_registry gdbarch_data_registry
=
5405 struct gdbarch_data
*
5406 register_gdbarch_data (gdbarch_data_init_ftype
*init
)
5408 struct gdbarch_data_registration
**curr
;
5409 /* Append the new registraration. */
5410 for (curr
= &gdbarch_data_registry
.registrations
;
5412 curr
= &(*curr
)->next
);
5413 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
5414 (*curr
)->next
= NULL
;
5415 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
5416 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
5417 (*curr
)->data
->init
= init
;
5418 (*curr
)->data
->init_p
= 1;
5419 return (*curr
)->data
;
5423 /* Create/delete the gdbarch data vector. */
5426 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5428 gdb_assert (gdbarch
->data
== NULL
);
5429 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5430 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
5433 /* Initialize the current value of the specified per-architecture
5437 set_gdbarch_data (struct gdbarch
*gdbarch
,
5438 struct gdbarch_data
*data
,
5441 gdb_assert (data
->index
< gdbarch
->nr_data
);
5442 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
5443 gdbarch
->data
[data
->index
] = pointer
;
5446 /* Return the current value of the specified per-architecture
5450 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5452 gdb_assert (data
->index
< gdbarch
->nr_data
);
5453 /* The data-pointer isn't initialized, call init() to get a value but
5454 only if the architecture initializaiton has completed. Otherwise
5455 punt - hope that the caller knows what they are doing. */
5456 if (gdbarch
->data
[data
->index
] == NULL
5457 && gdbarch
->initialized_p
)
5459 /* Be careful to detect an initialization cycle. */
5460 gdb_assert (data
->init_p
);
5462 gdb_assert (data
->init
!= NULL
);
5463 gdbarch
->data
[data
->index
] = data
->init (gdbarch
);
5465 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5467 return gdbarch
->data
[data
->index
];
5472 /* Keep a registry of swapped data required by GDB modules. */
5477 struct gdbarch_swap_registration
*source
;
5478 struct gdbarch_swap
*next
;
5481 struct gdbarch_swap_registration
5484 unsigned long sizeof_data
;
5485 gdbarch_swap_ftype
*init
;
5486 struct gdbarch_swap_registration
*next
;
5489 struct gdbarch_swap_registry
5492 struct gdbarch_swap_registration
*registrations
;
5495 struct gdbarch_swap_registry gdbarch_swap_registry
=
5501 deprecated_register_gdbarch_swap (void *data
,
5502 unsigned long sizeof_data
,
5503 gdbarch_swap_ftype
*init
)
5505 struct gdbarch_swap_registration
**rego
;
5506 for (rego
= &gdbarch_swap_registry
.registrations
;
5508 rego
= &(*rego
)->next
);
5509 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5510 (*rego
)->next
= NULL
;
5511 (*rego
)->init
= init
;
5512 (*rego
)->data
= data
;
5513 (*rego
)->sizeof_data
= sizeof_data
;
5517 current_gdbarch_swap_init_hack (void)
5519 struct gdbarch_swap_registration
*rego
;
5520 struct gdbarch_swap
**curr
= ¤t_gdbarch
->swap
;
5521 for (rego
= gdbarch_swap_registry
.registrations
;
5525 if (rego
->data
!= NULL
)
5527 (*curr
) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch
,
5528 struct gdbarch_swap
);
5529 (*curr
)->source
= rego
;
5530 (*curr
)->swap
= gdbarch_obstack_zalloc (current_gdbarch
,
5532 (*curr
)->next
= NULL
;
5533 curr
= &(*curr
)->next
;
5535 if (rego
->init
!= NULL
)
5540 static struct gdbarch
*
5541 current_gdbarch_swap_out_hack (void)
5543 struct gdbarch
*old_gdbarch
= current_gdbarch
;
5544 struct gdbarch_swap
*curr
;
5546 gdb_assert (old_gdbarch
!= NULL
);
5547 for (curr
= old_gdbarch
->swap
;
5551 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5552 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5554 current_gdbarch
= NULL
;
5559 current_gdbarch_swap_in_hack (struct gdbarch
*new_gdbarch
)
5561 struct gdbarch_swap
*curr
;
5563 gdb_assert (current_gdbarch
== NULL
);
5564 for (curr
= new_gdbarch
->swap
;
5567 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5568 current_gdbarch
= new_gdbarch
;
5572 /* Keep a registry of the architectures known by GDB. */
5574 struct gdbarch_registration
5576 enum bfd_architecture bfd_architecture
;
5577 gdbarch_init_ftype
*init
;
5578 gdbarch_dump_tdep_ftype
*dump_tdep
;
5579 struct gdbarch_list
*arches
;
5580 struct gdbarch_registration
*next
;
5583 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5586 append_name (const char ***buf
, int *nr
, const char *name
)
5588 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5594 gdbarch_printable_names (void)
5596 /* Accumulate a list of names based on the registed list of
5598 enum bfd_architecture a
;
5600 const char **arches
= NULL
;
5601 struct gdbarch_registration
*rego
;
5602 for (rego
= gdbarch_registry
;
5606 const struct bfd_arch_info
*ap
;
5607 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5609 internal_error (__FILE__
, __LINE__
,
5610 "gdbarch_architecture_names: multi-arch unknown");
5613 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5618 append_name (&arches
, &nr_arches
, NULL
);
5624 gdbarch_register (enum bfd_architecture bfd_architecture
,
5625 gdbarch_init_ftype
*init
,
5626 gdbarch_dump_tdep_ftype
*dump_tdep
)
5628 struct gdbarch_registration
**curr
;
5629 const struct bfd_arch_info
*bfd_arch_info
;
5630 /* Check that BFD recognizes this architecture */
5631 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5632 if (bfd_arch_info
== NULL
)
5634 internal_error (__FILE__
, __LINE__
,
5635 "gdbarch: Attempt to register unknown architecture (%d)",
5638 /* Check that we haven't seen this architecture before */
5639 for (curr
= &gdbarch_registry
;
5641 curr
= &(*curr
)->next
)
5643 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5644 internal_error (__FILE__
, __LINE__
,
5645 "gdbarch: Duplicate registraration of architecture (%s)",
5646 bfd_arch_info
->printable_name
);
5650 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5651 bfd_arch_info
->printable_name
,
5654 (*curr
) = XMALLOC (struct gdbarch_registration
);
5655 (*curr
)->bfd_architecture
= bfd_architecture
;
5656 (*curr
)->init
= init
;
5657 (*curr
)->dump_tdep
= dump_tdep
;
5658 (*curr
)->arches
= NULL
;
5659 (*curr
)->next
= NULL
;
5663 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5664 gdbarch_init_ftype
*init
)
5666 gdbarch_register (bfd_architecture
, init
, NULL
);
5670 /* Look for an architecture using gdbarch_info. Base search on only
5671 BFD_ARCH_INFO and BYTE_ORDER. */
5673 struct gdbarch_list
*
5674 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5675 const struct gdbarch_info
*info
)
5677 for (; arches
!= NULL
; arches
= arches
->next
)
5679 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5681 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5683 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5691 /* Find an architecture that matches the specified INFO. Create a new
5692 architecture if needed. Return that new architecture. Assumes
5693 that there is no current architecture. */
5695 static struct gdbarch
*
5696 find_arch_by_info (struct gdbarch
*old_gdbarch
, struct gdbarch_info info
)
5698 struct gdbarch
*new_gdbarch
;
5699 struct gdbarch_registration
*rego
;
5701 /* The existing architecture has been swapped out - all this code
5702 works from a clean slate. */
5703 gdb_assert (current_gdbarch
== NULL
);
5705 /* Fill in missing parts of the INFO struct using a number of
5706 sources: "set ..."; INFOabfd supplied; and the existing
5708 gdbarch_info_fill (old_gdbarch
, &info
);
5710 /* Must have found some sort of architecture. */
5711 gdb_assert (info
.bfd_arch_info
!= NULL
);
5715 fprintf_unfiltered (gdb_stdlog
,
5716 "find_arch_by_info: info.bfd_arch_info %s\n",
5717 (info
.bfd_arch_info
!= NULL
5718 ? info
.bfd_arch_info
->printable_name
5720 fprintf_unfiltered (gdb_stdlog
,
5721 "find_arch_by_info: info.byte_order %d (%s)\n",
5723 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5724 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5726 fprintf_unfiltered (gdb_stdlog
,
5727 "find_arch_by_info: info.osabi %d (%s)\n",
5728 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5729 fprintf_unfiltered (gdb_stdlog
,
5730 "find_arch_by_info: info.abfd 0x%lx\n",
5732 fprintf_unfiltered (gdb_stdlog
,
5733 "find_arch_by_info: info.tdep_info 0x%lx\n",
5734 (long) info
.tdep_info
);
5737 /* Find the tdep code that knows about this architecture. */
5738 for (rego
= gdbarch_registry
;
5741 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5746 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5747 "No matching architecture\n");
5751 /* Ask the tdep code for an architecture that matches "info". */
5752 new_gdbarch
= rego
->init (info
, rego
->arches
);
5754 /* Did the tdep code like it? No. Reject the change and revert to
5755 the old architecture. */
5756 if (new_gdbarch
== NULL
)
5759 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5760 "Target rejected architecture\n");
5764 /* Is this a pre-existing architecture (as determined by already
5765 being initialized)? Move it to the front of the architecture
5766 list (keeping the list sorted Most Recently Used). */
5767 if (new_gdbarch
->initialized_p
)
5769 struct gdbarch_list
**list
;
5770 struct gdbarch_list
*this;
5772 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5773 "Previous architecture 0x%08lx (%s) selected\n",
5775 new_gdbarch
->bfd_arch_info
->printable_name
);
5776 /* Find the existing arch in the list. */
5777 for (list
= ®o
->arches
;
5778 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5779 list
= &(*list
)->next
);
5780 /* It had better be in the list of architectures. */
5781 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5784 (*list
) = this->next
;
5785 /* Insert THIS at the front. */
5786 this->next
= rego
->arches
;
5787 rego
->arches
= this;
5792 /* It's a new architecture. */
5794 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5795 "New architecture 0x%08lx (%s) selected\n",
5797 new_gdbarch
->bfd_arch_info
->printable_name
);
5799 /* Insert the new architecture into the front of the architecture
5800 list (keep the list sorted Most Recently Used). */
5802 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5803 this->next
= rego
->arches
;
5804 this->gdbarch
= new_gdbarch
;
5805 rego
->arches
= this;
5808 /* Check that the newly installed architecture is valid. Plug in
5809 any post init values. */
5810 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5811 verify_gdbarch (new_gdbarch
);
5812 new_gdbarch
->initialized_p
= 1;
5814 /* Initialize any per-architecture swap areas. This phase requires
5815 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5816 swap the entire architecture out. */
5817 current_gdbarch
= new_gdbarch
;
5818 current_gdbarch_swap_init_hack ();
5819 current_gdbarch_swap_out_hack ();
5822 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5828 gdbarch_find_by_info (struct gdbarch_info info
)
5830 /* Save the previously selected architecture, setting the global to
5831 NULL. This stops things like gdbarch->init() trying to use the
5832 previous architecture's configuration. The previous architecture
5833 may not even be of the same architecture family. The most recent
5834 architecture of the same family is found at the head of the
5835 rego->arches list. */
5836 struct gdbarch
*old_gdbarch
= current_gdbarch_swap_out_hack ();
5838 /* Find the specified architecture. */
5839 struct gdbarch
*new_gdbarch
= find_arch_by_info (old_gdbarch
, info
);
5841 /* Restore the existing architecture. */
5842 gdb_assert (current_gdbarch
== NULL
);
5843 current_gdbarch_swap_in_hack (old_gdbarch
);
5848 /* Make the specified architecture current, swapping the existing one
5852 deprecated_current_gdbarch_select_hack (struct gdbarch
*new_gdbarch
)
5854 gdb_assert (new_gdbarch
!= NULL
);
5855 gdb_assert (current_gdbarch
!= NULL
);
5856 gdb_assert (new_gdbarch
->initialized_p
);
5857 current_gdbarch_swap_out_hack ();
5858 current_gdbarch_swap_in_hack (new_gdbarch
);
5859 architecture_changed_event ();
5862 extern void _initialize_gdbarch (void);
5865 _initialize_gdbarch (void)
5867 struct cmd_list_element
*c
;
5869 add_show_from_set (add_set_cmd ("arch",
5872 (char *)&gdbarch_debug
,
5873 "Set architecture debugging.\n\
5874 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5876 c
= add_set_cmd ("archdebug",
5879 (char *)&gdbarch_debug
,
5880 "Set architecture debugging.\n\
5881 When non-zero, architecture debugging is enabled.", &setlist
);
5883 deprecate_cmd (c
, "set debug arch");
5884 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");