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 gdbarch_deprecated_push_return_address_ftype
*deprecated_push_return_address
;
162 gdbarch_deprecated_dummy_write_sp_ftype
*deprecated_dummy_write_sp
;
163 int deprecated_register_size
;
164 int call_dummy_location
;
165 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
166 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
167 gdbarch_print_registers_info_ftype
*print_registers_info
;
168 gdbarch_print_float_info_ftype
*print_float_info
;
169 gdbarch_print_vector_info_ftype
*print_vector_info
;
170 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
171 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
172 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
173 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
174 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
175 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
176 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
177 int believe_pcc_promotion
;
178 gdbarch_deprecated_get_saved_register_ftype
*deprecated_get_saved_register
;
179 gdbarch_deprecated_register_convertible_ftype
*deprecated_register_convertible
;
180 gdbarch_deprecated_register_convert_to_virtual_ftype
*deprecated_register_convert_to_virtual
;
181 gdbarch_deprecated_register_convert_to_raw_ftype
*deprecated_register_convert_to_raw
;
182 gdbarch_convert_register_p_ftype
*convert_register_p
;
183 gdbarch_register_to_value_ftype
*register_to_value
;
184 gdbarch_value_to_register_ftype
*value_to_register
;
185 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
186 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
187 gdbarch_integer_to_address_ftype
*integer_to_address
;
188 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
189 gdbarch_deprecated_store_struct_return_ftype
*deprecated_store_struct_return
;
190 gdbarch_return_value_ftype
*return_value
;
191 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
192 gdbarch_extract_return_value_ftype
*extract_return_value
;
193 gdbarch_store_return_value_ftype
*store_return_value
;
194 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
195 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
196 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
197 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
198 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
199 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
200 gdbarch_skip_prologue_ftype
*skip_prologue
;
201 gdbarch_inner_than_ftype
*inner_than
;
202 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
203 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
204 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
205 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
206 CORE_ADDR decr_pc_after_break
;
207 CORE_ADDR function_start_offset
;
208 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
209 CORE_ADDR frame_args_skip
;
210 gdbarch_deprecated_frameless_function_invocation_ftype
*deprecated_frameless_function_invocation
;
211 gdbarch_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
212 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
213 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
214 gdbarch_unwind_pc_ftype
*unwind_pc
;
215 gdbarch_unwind_sp_ftype
*unwind_sp
;
216 gdbarch_deprecated_frame_args_address_ftype
*deprecated_frame_args_address
;
217 gdbarch_deprecated_frame_locals_address_ftype
*deprecated_frame_locals_address
;
218 gdbarch_deprecated_saved_pc_after_call_ftype
*deprecated_saved_pc_after_call
;
219 gdbarch_frame_num_args_ftype
*frame_num_args
;
220 gdbarch_deprecated_stack_align_ftype
*deprecated_stack_align
;
221 gdbarch_frame_align_ftype
*frame_align
;
222 gdbarch_deprecated_reg_struct_has_addr_ftype
*deprecated_reg_struct_has_addr
;
223 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
224 int frame_red_zone_size
;
225 const struct floatformat
* float_format
;
226 const struct floatformat
* double_format
;
227 const struct floatformat
* long_double_format
;
228 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
229 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
230 gdbarch_smash_text_address_ftype
*smash_text_address
;
231 gdbarch_software_single_step_ftype
*software_single_step
;
232 gdbarch_print_insn_ftype
*print_insn
;
233 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
234 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
235 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
236 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
237 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
238 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
239 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
240 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
241 const char * name_of_malloc
;
242 int cannot_step_breakpoint
;
243 int have_nonsteppable_watchpoint
;
244 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
245 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
246 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
247 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
248 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
249 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
253 /* The default architecture uses host values (for want of a better
256 extern const struct bfd_arch_info bfd_default_arch_struct
;
258 struct gdbarch startup_gdbarch
=
260 1, /* Always initialized. */
261 NULL
, /* The obstack. */
262 /* basic architecture information */
263 &bfd_default_arch_struct
, /* bfd_arch_info */
264 BFD_ENDIAN_BIG
, /* byte_order */
265 GDB_OSABI_UNKNOWN
, /* osabi */
266 /* target specific vector and its dump routine */
268 /*per-architecture data-pointers and swap regions */
270 /* Multi-arch values */
271 8 * sizeof (short), /* short_bit */
272 8 * sizeof (int), /* int_bit */
273 8 * sizeof (long), /* long_bit */
274 8 * sizeof (LONGEST
), /* long_long_bit */
275 8 * sizeof (float), /* float_bit */
276 8 * sizeof (double), /* double_bit */
277 8 * sizeof (long double), /* long_double_bit */
278 8 * sizeof (void*), /* ptr_bit */
279 8 * sizeof (void*), /* addr_bit */
280 8 * sizeof (void*), /* bfd_vma_bit */
285 0, /* virtual_frame_pointer */
286 0, /* pseudo_register_read */
287 0, /* pseudo_register_write */
289 0, /* num_pseudo_regs */
294 0, /* stab_reg_to_regnum */
295 0, /* ecoff_reg_to_regnum */
296 0, /* dwarf_reg_to_regnum */
297 0, /* sdb_reg_to_regnum */
298 0, /* dwarf2_reg_to_regnum */
299 0, /* register_name */
300 0, /* register_type */
301 0, /* deprecated_register_virtual_type */
302 0, /* deprecated_register_bytes */
303 generic_register_byte
, /* deprecated_register_byte */
304 generic_register_size
, /* deprecated_register_raw_size */
305 generic_register_size
, /* deprecated_register_virtual_size */
306 0, /* deprecated_max_register_raw_size */
307 0, /* deprecated_max_register_virtual_size */
308 0, /* unwind_dummy_id */
309 0, /* deprecated_save_dummy_frame_tos */
310 -1, /* deprecated_fp_regnum */
311 0, /* deprecated_target_read_fp */
312 0, /* push_dummy_call */
313 0, /* deprecated_push_arguments */
314 0, /* deprecated_push_return_address */
315 0, /* deprecated_dummy_write_sp */
316 0, /* deprecated_register_size */
317 0, /* call_dummy_location */
318 0, /* push_dummy_code */
319 0, /* deprecated_do_registers_info */
320 default_print_registers_info
, /* print_registers_info */
321 0, /* print_float_info */
322 0, /* print_vector_info */
323 0, /* register_sim_regno */
324 0, /* register_bytes_ok */
325 0, /* cannot_fetch_register */
326 0, /* cannot_store_register */
327 0, /* get_longjmp_target */
328 deprecated_pc_in_call_dummy
, /* deprecated_pc_in_call_dummy */
329 0, /* deprecated_init_frame_pc */
330 0, /* believe_pcc_promotion */
331 0, /* deprecated_get_saved_register */
332 0, /* deprecated_register_convertible */
333 0, /* deprecated_register_convert_to_virtual */
334 0, /* deprecated_register_convert_to_raw */
335 0, /* convert_register_p */
336 0, /* register_to_value */
337 0, /* value_to_register */
338 0, /* pointer_to_address */
339 0, /* address_to_pointer */
340 0, /* integer_to_address */
341 0, /* deprecated_pop_frame */
342 0, /* deprecated_store_struct_return */
343 0, /* return_value */
344 0, /* return_value_on_stack */
345 0, /* extract_return_value */
346 0, /* store_return_value */
347 0, /* deprecated_extract_return_value */
348 0, /* deprecated_store_return_value */
349 0, /* use_struct_convention */
350 0, /* deprecated_extract_struct_value_address */
351 0, /* deprecated_frame_init_saved_regs */
352 0, /* deprecated_init_extra_frame_info */
353 0, /* skip_prologue */
355 0, /* breakpoint_from_pc */
356 0, /* adjust_breakpoint_address */
357 0, /* memory_insert_breakpoint */
358 0, /* memory_remove_breakpoint */
359 0, /* decr_pc_after_break */
360 0, /* function_start_offset */
361 generic_remote_translate_xfer_address
, /* remote_translate_xfer_address */
362 0, /* frame_args_skip */
363 0, /* deprecated_frameless_function_invocation */
364 0, /* deprecated_frame_chain */
365 0, /* deprecated_frame_chain_valid */
366 0, /* deprecated_frame_saved_pc */
369 get_frame_base
, /* deprecated_frame_args_address */
370 get_frame_base
, /* deprecated_frame_locals_address */
371 0, /* deprecated_saved_pc_after_call */
372 0, /* frame_num_args */
373 0, /* deprecated_stack_align */
375 0, /* deprecated_reg_struct_has_addr */
376 default_stabs_argument_has_addr
, /* stabs_argument_has_addr */
377 0, /* frame_red_zone_size */
378 0, /* float_format */
379 0, /* double_format */
380 0, /* long_double_format */
381 convert_from_func_ptr_addr_identity
, /* convert_from_func_ptr_addr */
382 0, /* addr_bits_remove */
383 0, /* smash_text_address */
384 0, /* software_single_step */
386 0, /* skip_trampoline_code */
387 generic_skip_solib_resolver
, /* skip_solib_resolver */
388 0, /* in_solib_call_trampoline */
389 0, /* in_solib_return_trampoline */
390 generic_in_function_epilogue_p
, /* in_function_epilogue_p */
391 construct_inferior_arguments
, /* construct_inferior_arguments */
392 0, /* elf_make_msymbol_special */
393 0, /* coff_make_msymbol_special */
394 "malloc", /* name_of_malloc */
395 0, /* cannot_step_breakpoint */
396 0, /* have_nonsteppable_watchpoint */
397 0, /* address_class_type_flags */
398 0, /* address_class_type_flags_to_name */
399 0, /* address_class_name_to_type_flags */
400 default_register_reggroup_p
, /* register_reggroup_p */
401 0, /* fetch_pointer_argument */
402 0, /* regset_from_core_section */
403 /* startup_gdbarch() */
406 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
408 /* Create a new ``struct gdbarch'' based on information provided by
409 ``struct gdbarch_info''. */
412 gdbarch_alloc (const struct gdbarch_info
*info
,
413 struct gdbarch_tdep
*tdep
)
415 /* NOTE: The new architecture variable is named ``current_gdbarch''
416 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
417 the current local architecture and not the previous global
418 architecture. This ensures that the new architectures initial
419 values are not influenced by the previous architecture. Once
420 everything is parameterised with gdbarch, this will go away. */
421 struct gdbarch
*current_gdbarch
;
423 /* Create an obstack for allocating all the per-architecture memory,
424 then use that to allocate the architecture vector. */
425 struct obstack
*obstack
= XMALLOC (struct obstack
);
426 obstack_init (obstack
);
427 current_gdbarch
= obstack_alloc (obstack
, sizeof (*current_gdbarch
));
428 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
429 current_gdbarch
->obstack
= obstack
;
431 alloc_gdbarch_data (current_gdbarch
);
433 current_gdbarch
->tdep
= tdep
;
435 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
436 current_gdbarch
->byte_order
= info
->byte_order
;
437 current_gdbarch
->osabi
= info
->osabi
;
439 /* Force the explicit initialization of these. */
440 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
441 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
442 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
443 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
444 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
445 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
446 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
447 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
448 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
449 current_gdbarch
->char_signed
= -1;
450 current_gdbarch
->write_pc
= generic_target_write_pc
;
451 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
452 current_gdbarch
->num_regs
= -1;
453 current_gdbarch
->sp_regnum
= -1;
454 current_gdbarch
->pc_regnum
= -1;
455 current_gdbarch
->ps_regnum
= -1;
456 current_gdbarch
->fp0_regnum
= -1;
457 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
458 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
459 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
460 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
461 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
462 current_gdbarch
->deprecated_register_byte
= generic_register_byte
;
463 current_gdbarch
->deprecated_register_raw_size
= generic_register_size
;
464 current_gdbarch
->deprecated_register_virtual_size
= generic_register_size
;
465 current_gdbarch
->deprecated_fp_regnum
= -1;
466 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
467 current_gdbarch
->print_registers_info
= default_print_registers_info
;
468 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
469 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
470 current_gdbarch
->cannot_store_register
= cannot_register_not
;
471 current_gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
472 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
473 current_gdbarch
->register_to_value
= legacy_register_to_value
;
474 current_gdbarch
->value_to_register
= legacy_value_to_register
;
475 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
476 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
477 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
478 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
479 current_gdbarch
->store_return_value
= legacy_store_return_value
;
480 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
481 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
482 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
483 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
484 current_gdbarch
->deprecated_frame_args_address
= get_frame_base
;
485 current_gdbarch
->deprecated_frame_locals_address
= get_frame_base
;
486 current_gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
487 current_gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
488 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
489 current_gdbarch
->smash_text_address
= core_addr_identity
;
490 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
491 current_gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
492 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
493 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
494 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
495 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
496 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
497 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
498 current_gdbarch
->name_of_malloc
= "malloc";
499 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
500 /* gdbarch_alloc() */
502 return current_gdbarch
;
506 /* Allocate extra space using the per-architecture obstack. */
509 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
511 void *data
= obstack_alloc (arch
->obstack
, size
);
512 memset (data
, 0, size
);
517 /* Free a gdbarch struct. This should never happen in normal
518 operation --- once you've created a gdbarch, you keep it around.
519 However, if an architecture's init function encounters an error
520 building the structure, it may need to clean up a partially
521 constructed gdbarch. */
524 gdbarch_free (struct gdbarch
*arch
)
526 struct obstack
*obstack
;
527 gdb_assert (arch
!= NULL
);
528 gdb_assert (!arch
->initialized_p
);
529 obstack
= arch
->obstack
;
530 obstack_free (obstack
, 0); /* Includes the ARCH. */
535 /* Ensure that all values in a GDBARCH are reasonable. */
537 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
538 just happens to match the global variable ``current_gdbarch''. That
539 way macros refering to that variable get the local and not the global
540 version - ulgh. Once everything is parameterised with gdbarch, this
544 verify_gdbarch (struct gdbarch
*current_gdbarch
)
547 struct cleanup
*cleanups
;
550 log
= mem_fileopen ();
551 cleanups
= make_cleanup_ui_file_delete (log
);
553 if (current_gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
554 fprintf_unfiltered (log
, "\n\tbyte-order");
555 if (current_gdbarch
->bfd_arch_info
== NULL
)
556 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
557 /* Check those that need to be defined for the given multi-arch level. */
558 /* Skip verify of short_bit, invalid_p == 0 */
559 /* Skip verify of int_bit, invalid_p == 0 */
560 /* Skip verify of long_bit, invalid_p == 0 */
561 /* Skip verify of long_long_bit, invalid_p == 0 */
562 /* Skip verify of float_bit, invalid_p == 0 */
563 /* Skip verify of double_bit, invalid_p == 0 */
564 /* Skip verify of long_double_bit, invalid_p == 0 */
565 /* Skip verify of ptr_bit, invalid_p == 0 */
566 if (current_gdbarch
->addr_bit
== 0)
567 current_gdbarch
->addr_bit
= TARGET_PTR_BIT
;
568 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
569 if (current_gdbarch
->char_signed
== -1)
570 current_gdbarch
->char_signed
= 1;
571 /* Skip verify of read_pc, has predicate */
572 /* Skip verify of write_pc, invalid_p == 0 */
573 /* Skip verify of read_sp, has predicate */
574 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
575 /* Skip verify of pseudo_register_read, has predicate */
576 /* Skip verify of pseudo_register_write, has predicate */
577 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
578 && (current_gdbarch
->num_regs
== -1))
579 fprintf_unfiltered (log
, "\n\tnum_regs");
580 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
581 /* Skip verify of sp_regnum, invalid_p == 0 */
582 /* Skip verify of pc_regnum, invalid_p == 0 */
583 /* Skip verify of ps_regnum, invalid_p == 0 */
584 /* Skip verify of fp0_regnum, invalid_p == 0 */
585 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
586 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
587 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
588 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
589 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
590 /* Skip verify of register_type, has predicate */
591 /* Skip verify of deprecated_register_virtual_type, has predicate */
592 /* Skip verify of deprecated_register_byte, has predicate */
593 /* Skip verify of deprecated_register_raw_size, has predicate */
594 /* Skip verify of deprecated_register_virtual_size, has predicate */
595 /* Skip verify of deprecated_max_register_raw_size, has predicate */
596 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
597 /* Skip verify of unwind_dummy_id, has predicate */
598 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
599 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
600 /* Skip verify of deprecated_target_read_fp, has predicate */
601 /* Skip verify of push_dummy_call, has predicate */
602 /* Skip verify of deprecated_push_arguments, has predicate */
603 /* Skip verify of deprecated_push_return_address, has predicate */
604 /* Skip verify of deprecated_dummy_write_sp, has predicate */
605 /* Skip verify of call_dummy_location, invalid_p == 0 */
606 /* Skip verify of push_dummy_code, has predicate */
607 /* Skip verify of deprecated_do_registers_info, has predicate */
608 /* Skip verify of print_registers_info, invalid_p == 0 */
609 /* Skip verify of print_float_info, has predicate */
610 /* Skip verify of print_vector_info, has predicate */
611 /* Skip verify of register_sim_regno, invalid_p == 0 */
612 /* Skip verify of register_bytes_ok, has predicate */
613 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
614 /* Skip verify of cannot_store_register, invalid_p == 0 */
615 /* Skip verify of get_longjmp_target, has predicate */
616 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
617 /* Skip verify of deprecated_init_frame_pc, has predicate */
618 /* Skip verify of deprecated_get_saved_register, has predicate */
619 /* Skip verify of deprecated_register_convertible, has predicate */
620 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
621 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
622 /* Skip verify of convert_register_p, invalid_p == 0 */
623 /* Skip verify of register_to_value, invalid_p == 0 */
624 /* Skip verify of value_to_register, invalid_p == 0 */
625 /* Skip verify of pointer_to_address, invalid_p == 0 */
626 /* Skip verify of address_to_pointer, invalid_p == 0 */
627 /* Skip verify of integer_to_address, has predicate */
628 /* Skip verify of deprecated_pop_frame, has predicate */
629 /* Skip verify of deprecated_store_struct_return, has predicate */
630 /* Skip verify of return_value, has predicate */
631 /* Skip verify of return_value_on_stack, invalid_p == 0 */
632 /* Skip verify of extract_return_value, invalid_p == 0 */
633 /* Skip verify of store_return_value, invalid_p == 0 */
634 /* Skip verify of use_struct_convention, invalid_p == 0 */
635 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
636 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
637 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
638 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
639 && (current_gdbarch
->skip_prologue
== 0))
640 fprintf_unfiltered (log
, "\n\tskip_prologue");
641 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
642 && (current_gdbarch
->inner_than
== 0))
643 fprintf_unfiltered (log
, "\n\tinner_than");
644 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
645 && (current_gdbarch
->breakpoint_from_pc
== 0))
646 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
647 /* Skip verify of adjust_breakpoint_address, has predicate */
648 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
649 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
650 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
651 /* Skip verify of function_start_offset, invalid_p == 0 */
652 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
653 /* Skip verify of frame_args_skip, invalid_p == 0 */
654 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
655 /* Skip verify of deprecated_frame_chain, has predicate */
656 /* Skip verify of deprecated_frame_chain_valid, has predicate */
657 /* Skip verify of deprecated_frame_saved_pc, has predicate */
658 /* Skip verify of unwind_pc, has predicate */
659 /* Skip verify of unwind_sp, has predicate */
660 /* Skip verify of deprecated_frame_args_address, has predicate */
661 /* Skip verify of deprecated_frame_locals_address, has predicate */
662 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
663 /* Skip verify of frame_num_args, has predicate */
664 /* Skip verify of deprecated_stack_align, has predicate */
665 /* Skip verify of frame_align, has predicate */
666 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
667 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
668 if (current_gdbarch
->float_format
== 0)
669 current_gdbarch
->float_format
= default_float_format (current_gdbarch
);
670 if (current_gdbarch
->double_format
== 0)
671 current_gdbarch
->double_format
= default_double_format (current_gdbarch
);
672 if (current_gdbarch
->long_double_format
== 0)
673 current_gdbarch
->long_double_format
= default_double_format (current_gdbarch
);
674 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
675 /* Skip verify of addr_bits_remove, invalid_p == 0 */
676 /* Skip verify of smash_text_address, invalid_p == 0 */
677 /* Skip verify of software_single_step, has predicate */
678 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
679 && (current_gdbarch
->print_insn
== 0))
680 fprintf_unfiltered (log
, "\n\tprint_insn");
681 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
682 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
683 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
684 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
685 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
686 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
687 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
688 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
689 /* Skip verify of name_of_malloc, invalid_p == 0 */
690 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
691 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
692 /* Skip verify of address_class_type_flags, has predicate */
693 /* Skip verify of address_class_type_flags_to_name, has predicate */
694 /* Skip verify of address_class_name_to_type_flags, has predicate */
695 /* Skip verify of register_reggroup_p, invalid_p == 0 */
696 /* Skip verify of fetch_pointer_argument, has predicate */
697 /* Skip verify of regset_from_core_section, has predicate */
698 buf
= ui_file_xstrdup (log
, &dummy
);
699 make_cleanup (xfree
, buf
);
700 if (strlen (buf
) > 0)
701 internal_error (__FILE__
, __LINE__
,
702 "verify_gdbarch: the following are invalid ...%s",
704 do_cleanups (cleanups
);
708 /* Print out the details of the current architecture. */
710 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
711 just happens to match the global variable ``current_gdbarch''. That
712 way macros refering to that variable get the local and not the global
713 version - ulgh. Once everything is parameterised with gdbarch, this
717 gdbarch_dump (struct gdbarch
*current_gdbarch
, struct ui_file
*file
)
719 fprintf_unfiltered (file
,
720 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
722 fprintf_unfiltered (file
,
723 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
724 (long) current_gdbarch
->convert_from_func_ptr_addr
);
725 fprintf_unfiltered (file
,
726 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
727 gdbarch_frame_align_p (current_gdbarch
));
728 fprintf_unfiltered (file
,
729 "gdbarch_dump: frame_align = 0x%08lx\n",
730 (long) current_gdbarch
->frame_align
);
731 fprintf_unfiltered (file
,
732 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
733 gdbarch_regset_from_core_section_p (current_gdbarch
));
734 fprintf_unfiltered (file
,
735 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
736 (long) current_gdbarch
->regset_from_core_section
);
737 fprintf_unfiltered (file
,
738 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
739 gdbarch_return_value_p (current_gdbarch
));
740 fprintf_unfiltered (file
,
741 "gdbarch_dump: return_value = 0x%08lx\n",
742 (long) current_gdbarch
->return_value
);
743 fprintf_unfiltered (file
,
744 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
745 (long) current_gdbarch
->in_function_epilogue_p
);
746 fprintf_unfiltered (file
,
747 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
748 (long) current_gdbarch
->register_reggroup_p
);
749 fprintf_unfiltered (file
,
750 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
751 (long) current_gdbarch
->stabs_argument_has_addr
);
752 fprintf_unfiltered (file
,
753 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
754 gdbarch_pseudo_register_read_p (current_gdbarch
));
755 fprintf_unfiltered (file
,
756 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
757 (long) current_gdbarch
->pseudo_register_read
);
758 fprintf_unfiltered (file
,
759 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
760 gdbarch_pseudo_register_write_p (current_gdbarch
));
761 fprintf_unfiltered (file
,
762 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
763 (long) current_gdbarch
->pseudo_register_write
);
764 fprintf_unfiltered (file
,
765 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
766 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
767 fprintf_unfiltered (file
,
768 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
769 (long) current_gdbarch
->address_class_name_to_type_flags
);
770 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
771 fprintf_unfiltered (file
,
772 "gdbarch_dump: %s # %s\n",
773 "ADDRESS_CLASS_TYPE_FLAGS_P()",
774 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
777 ADDRESS_CLASS_TYPE_FLAGS_P ());
779 #ifdef ADDRESS_CLASS_TYPE_FLAGS
780 fprintf_unfiltered (file
,
781 "gdbarch_dump: %s # %s\n",
782 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
783 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
784 fprintf_unfiltered (file
,
785 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
786 (long) current_gdbarch
->address_class_type_flags
787 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
789 fprintf_unfiltered (file
,
790 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
791 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
794 (long) current_gdbarch
->address_class_type_flags_to_name
);
795 #ifdef ADDRESS_TO_POINTER
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: %s # %s\n",
798 "ADDRESS_TO_POINTER(type, buf, addr)",
799 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
802 (long) current_gdbarch
->address_to_pointer
803 /*ADDRESS_TO_POINTER ()*/);
805 #ifdef ADDR_BITS_REMOVE
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: %s # %s\n",
808 "ADDR_BITS_REMOVE(addr)",
809 XSTRING (ADDR_BITS_REMOVE (addr
)));
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
812 (long) current_gdbarch
->addr_bits_remove
813 /*ADDR_BITS_REMOVE ()*/);
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
817 gdbarch_adjust_breakpoint_address_p (current_gdbarch
));
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
820 (long) current_gdbarch
->adjust_breakpoint_address
);
821 #ifdef BELIEVE_PCC_PROMOTION
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
824 XSTRING (BELIEVE_PCC_PROMOTION
));
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
827 BELIEVE_PCC_PROMOTION
);
829 #ifdef BREAKPOINT_FROM_PC
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: %s # %s\n",
832 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
833 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
836 (long) current_gdbarch
->breakpoint_from_pc
837 /*BREAKPOINT_FROM_PC ()*/);
839 #ifdef CALL_DUMMY_LOCATION
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
842 XSTRING (CALL_DUMMY_LOCATION
));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
845 CALL_DUMMY_LOCATION
);
847 #ifdef CANNOT_FETCH_REGISTER
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: %s # %s\n",
850 "CANNOT_FETCH_REGISTER(regnum)",
851 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
854 (long) current_gdbarch
->cannot_fetch_register
855 /*CANNOT_FETCH_REGISTER ()*/);
857 #ifdef CANNOT_STEP_BREAKPOINT
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
860 XSTRING (CANNOT_STEP_BREAKPOINT
));
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
863 CANNOT_STEP_BREAKPOINT
);
865 #ifdef CANNOT_STORE_REGISTER
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "CANNOT_STORE_REGISTER(regnum)",
869 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
872 (long) current_gdbarch
->cannot_store_register
873 /*CANNOT_STORE_REGISTER ()*/);
875 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
879 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
882 (long) current_gdbarch
->coff_make_msymbol_special
883 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
887 (long) current_gdbarch
->construct_inferior_arguments
);
888 #ifdef CONVERT_REGISTER_P
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: %s # %s\n",
891 "CONVERT_REGISTER_P(regnum, type)",
892 XSTRING (CONVERT_REGISTER_P (regnum
, type
)));
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
895 (long) current_gdbarch
->convert_register_p
896 /*CONVERT_REGISTER_P ()*/);
898 #ifdef DECR_PC_AFTER_BREAK
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
901 XSTRING (DECR_PC_AFTER_BREAK
));
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
904 (long) DECR_PC_AFTER_BREAK
);
906 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: %s # %s\n",
909 "DEPRECATED_DO_REGISTERS_INFO_P()",
910 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
913 DEPRECATED_DO_REGISTERS_INFO_P ());
915 #ifdef DEPRECATED_DO_REGISTERS_INFO
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: %s # %s\n",
918 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
919 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
922 (long) current_gdbarch
->deprecated_do_registers_info
923 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
925 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
926 fprintf_unfiltered (file
,
927 "gdbarch_dump: %s # %s\n",
928 "DEPRECATED_DUMMY_WRITE_SP_P()",
929 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
932 DEPRECATED_DUMMY_WRITE_SP_P ());
934 #ifdef DEPRECATED_DUMMY_WRITE_SP
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: %s # %s\n",
937 "DEPRECATED_DUMMY_WRITE_SP(val)",
938 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val
)));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
941 (long) current_gdbarch
->deprecated_dummy_write_sp
942 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
944 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: %s # %s\n",
947 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
948 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
951 (long) current_gdbarch
->deprecated_extract_return_value
952 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
954 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: %s # %s\n",
957 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
958 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
961 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
963 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: %s # %s\n",
966 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
967 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
970 (long) current_gdbarch
->deprecated_extract_struct_value_address
971 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
973 #ifdef DEPRECATED_FP_REGNUM
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
976 XSTRING (DEPRECATED_FP_REGNUM
));
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
979 DEPRECATED_FP_REGNUM
);
981 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: %s # %s\n",
984 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
985 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
988 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
990 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: %s # %s\n",
993 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
994 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi
)));
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
997 (long) current_gdbarch
->deprecated_frameless_function_invocation
998 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
1000 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1004 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1007 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1009 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: %s # %s\n",
1012 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1013 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi
)));
1014 fprintf_unfiltered (file
,
1015 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1016 (long) current_gdbarch
->deprecated_frame_args_address
1017 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1019 #ifdef DEPRECATED_FRAME_CHAIN_P
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: %s # %s\n",
1022 "DEPRECATED_FRAME_CHAIN_P()",
1023 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1026 DEPRECATED_FRAME_CHAIN_P ());
1028 #ifdef DEPRECATED_FRAME_CHAIN
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: %s # %s\n",
1031 "DEPRECATED_FRAME_CHAIN(frame)",
1032 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1035 (long) current_gdbarch
->deprecated_frame_chain
1036 /*DEPRECATED_FRAME_CHAIN ()*/);
1038 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: %s # %s\n",
1041 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1042 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1045 DEPRECATED_FRAME_CHAIN_VALID_P ());
1047 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: %s # %s\n",
1050 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1051 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1054 (long) current_gdbarch
->deprecated_frame_chain_valid
1055 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1057 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1061 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1064 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1066 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: %s # %s\n",
1069 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1070 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1073 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1074 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1076 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1077 fprintf_unfiltered (file
,
1078 "gdbarch_dump: %s # %s\n",
1079 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1080 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1083 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1085 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: %s # %s\n",
1088 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1089 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi
)));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1092 (long) current_gdbarch
->deprecated_frame_locals_address
1093 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1095 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "DEPRECATED_FRAME_SAVED_PC_P()",
1099 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1102 DEPRECATED_FRAME_SAVED_PC_P ());
1104 #ifdef DEPRECATED_FRAME_SAVED_PC
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: %s # %s\n",
1107 "DEPRECATED_FRAME_SAVED_PC(fi)",
1108 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1111 (long) current_gdbarch
->deprecated_frame_saved_pc
1112 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1114 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: %s # %s\n",
1117 "DEPRECATED_GET_SAVED_REGISTER_P()",
1118 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1119 fprintf_unfiltered (file
,
1120 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1121 DEPRECATED_GET_SAVED_REGISTER_P ());
1123 #ifdef DEPRECATED_GET_SAVED_REGISTER
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1126 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1127 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1130 (long) current_gdbarch
->deprecated_get_saved_register
1131 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1133 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: %s # %s\n",
1136 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1137 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1140 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1142 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: %s # %s\n",
1145 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1146 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1149 (long) current_gdbarch
->deprecated_init_extra_frame_info
1150 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1152 #ifdef DEPRECATED_INIT_FRAME_PC_P
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "DEPRECATED_INIT_FRAME_PC_P()",
1156 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1159 DEPRECATED_INIT_FRAME_PC_P ());
1161 #ifdef DEPRECATED_INIT_FRAME_PC
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: %s # %s\n",
1164 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1165 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1168 (long) current_gdbarch
->deprecated_init_frame_pc
1169 /*DEPRECATED_INIT_FRAME_PC ()*/);
1171 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1175 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1178 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1180 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1183 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1186 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1188 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: %s # %s\n",
1191 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1192 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1195 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1197 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1200 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1203 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1205 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1209 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1212 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1214 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: %s # %s\n",
1217 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1218 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1221 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1222 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1224 #ifdef DEPRECATED_POP_FRAME_P
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: %s # %s\n",
1227 "DEPRECATED_POP_FRAME_P()",
1228 XSTRING (DEPRECATED_POP_FRAME_P ()));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1231 DEPRECATED_POP_FRAME_P ());
1233 #ifdef DEPRECATED_POP_FRAME
1234 fprintf_unfiltered (file
,
1235 "gdbarch_dump: %s # %s\n",
1236 "DEPRECATED_POP_FRAME(-)",
1237 XSTRING (DEPRECATED_POP_FRAME (-)));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1240 (long) current_gdbarch
->deprecated_pop_frame
1241 /*DEPRECATED_POP_FRAME ()*/);
1243 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: %s # %s\n",
1246 "DEPRECATED_PUSH_ARGUMENTS_P()",
1247 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1250 DEPRECATED_PUSH_ARGUMENTS_P ());
1252 #ifdef DEPRECATED_PUSH_ARGUMENTS
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: %s # %s\n",
1255 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1256 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1259 (long) current_gdbarch
->deprecated_push_arguments
1260 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1262 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: %s # %s\n",
1265 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1266 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1269 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1271 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: %s # %s\n",
1274 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1275 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1278 (long) current_gdbarch
->deprecated_push_return_address
1279 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1281 #ifdef DEPRECATED_REGISTER_BYTE_P
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: %s # %s\n",
1284 "DEPRECATED_REGISTER_BYTE_P()",
1285 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1288 DEPRECATED_REGISTER_BYTE_P ());
1290 #ifdef DEPRECATED_REGISTER_BYTE
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1294 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr
)));
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1297 (long) current_gdbarch
->deprecated_register_byte
1298 /*DEPRECATED_REGISTER_BYTE ()*/);
1300 #ifdef DEPRECATED_REGISTER_BYTES
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1303 XSTRING (DEPRECATED_REGISTER_BYTES
));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1306 DEPRECATED_REGISTER_BYTES
);
1308 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1312 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1315 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1317 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: %s # %s\n",
1320 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1321 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr
)));
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1324 (long) current_gdbarch
->deprecated_register_convertible
1325 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1327 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1328 fprintf_unfiltered (file
,
1329 "gdbarch_dump: %s # %s\n",
1330 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1331 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1334 (long) current_gdbarch
->deprecated_register_convert_to_raw
1335 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1337 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: %s # %s\n",
1340 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1341 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1344 (long) current_gdbarch
->deprecated_register_convert_to_virtual
1345 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1347 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: %s # %s\n",
1350 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1351 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1354 DEPRECATED_REGISTER_RAW_SIZE_P ());
1356 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1360 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr
)));
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1363 (long) current_gdbarch
->deprecated_register_raw_size
1364 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1366 #ifdef DEPRECATED_REGISTER_SIZE
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1369 XSTRING (DEPRECATED_REGISTER_SIZE
));
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1372 DEPRECATED_REGISTER_SIZE
);
1374 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: %s # %s\n",
1377 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1378 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1381 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1383 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: %s # %s\n",
1386 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1387 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr
)));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1390 (long) current_gdbarch
->deprecated_register_virtual_size
1391 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1393 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1397 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1400 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1402 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: %s # %s\n",
1405 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1406 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr
)));
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1409 (long) current_gdbarch
->deprecated_register_virtual_type
1410 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1412 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: %s # %s\n",
1415 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1416 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1419 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1421 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: %s # %s\n",
1424 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1425 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1428 (long) current_gdbarch
->deprecated_reg_struct_has_addr
1429 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1431 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: %s # %s\n",
1434 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1435 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1438 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1440 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: %s # %s\n",
1443 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1444 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1447 (long) current_gdbarch
->deprecated_saved_pc_after_call
1448 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1450 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: %s # %s\n",
1453 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1454 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1455 fprintf_unfiltered (file
,
1456 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1457 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1459 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: %s # %s\n",
1462 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1463 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp
)));
1464 fprintf_unfiltered (file
,
1465 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1466 (long) current_gdbarch
->deprecated_save_dummy_frame_tos
1467 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1469 #ifdef DEPRECATED_STACK_ALIGN_P
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: %s # %s\n",
1472 "DEPRECATED_STACK_ALIGN_P()",
1473 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1476 DEPRECATED_STACK_ALIGN_P ());
1478 #ifdef DEPRECATED_STACK_ALIGN
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: %s # %s\n",
1481 "DEPRECATED_STACK_ALIGN(sp)",
1482 XSTRING (DEPRECATED_STACK_ALIGN (sp
)));
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1485 (long) current_gdbarch
->deprecated_stack_align
1486 /*DEPRECATED_STACK_ALIGN ()*/);
1488 #ifdef DEPRECATED_STORE_RETURN_VALUE
1489 fprintf_unfiltered (file
,
1490 "gdbarch_dump: %s # %s\n",
1491 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1492 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1495 (long) current_gdbarch
->deprecated_store_return_value
1496 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1498 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: %s # %s\n",
1501 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1502 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1505 DEPRECATED_STORE_STRUCT_RETURN_P ());
1507 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: %s # %s\n",
1510 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1511 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1514 (long) current_gdbarch
->deprecated_store_struct_return
1515 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1517 #ifdef DEPRECATED_TARGET_READ_FP_P
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: %s # %s\n",
1520 "DEPRECATED_TARGET_READ_FP_P()",
1521 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1524 DEPRECATED_TARGET_READ_FP_P ());
1526 #ifdef DEPRECATED_TARGET_READ_FP
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: %s # %s\n",
1529 "DEPRECATED_TARGET_READ_FP()",
1530 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1533 (long) current_gdbarch
->deprecated_target_read_fp
1534 /*DEPRECATED_TARGET_READ_FP ()*/);
1536 #ifdef DWARF2_REG_TO_REGNUM
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: %s # %s\n",
1539 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1540 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1543 (long) current_gdbarch
->dwarf2_reg_to_regnum
1544 /*DWARF2_REG_TO_REGNUM ()*/);
1546 #ifdef DWARF_REG_TO_REGNUM
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: %s # %s\n",
1549 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1550 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1551 fprintf_unfiltered (file
,
1552 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1553 (long) current_gdbarch
->dwarf_reg_to_regnum
1554 /*DWARF_REG_TO_REGNUM ()*/);
1556 #ifdef ECOFF_REG_TO_REGNUM
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: %s # %s\n",
1559 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1560 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1563 (long) current_gdbarch
->ecoff_reg_to_regnum
1564 /*ECOFF_REG_TO_REGNUM ()*/);
1566 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: %s # %s\n",
1569 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1570 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1571 fprintf_unfiltered (file
,
1572 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1573 (long) current_gdbarch
->elf_make_msymbol_special
1574 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1576 #ifdef EXTRACT_RETURN_VALUE
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: %s # %s\n",
1579 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1580 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1583 (long) current_gdbarch
->extract_return_value
1584 /*EXTRACT_RETURN_VALUE ()*/);
1586 #ifdef FETCH_POINTER_ARGUMENT_P
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: %s # %s\n",
1589 "FETCH_POINTER_ARGUMENT_P()",
1590 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1593 FETCH_POINTER_ARGUMENT_P ());
1595 #ifdef FETCH_POINTER_ARGUMENT
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: %s # %s\n",
1598 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1599 XSTRING (FETCH_POINTER_ARGUMENT (frame
, argi
, type
)));
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1602 (long) current_gdbarch
->fetch_pointer_argument
1603 /*FETCH_POINTER_ARGUMENT ()*/);
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: FP0_REGNUM # %s\n",
1608 XSTRING (FP0_REGNUM
));
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: FP0_REGNUM = %d\n",
1613 #ifdef FRAME_ARGS_SKIP
1614 fprintf_unfiltered (file
,
1615 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1616 XSTRING (FRAME_ARGS_SKIP
));
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1619 (long) FRAME_ARGS_SKIP
);
1621 #ifdef FRAME_NUM_ARGS_P
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: %s # %s\n",
1624 "FRAME_NUM_ARGS_P()",
1625 XSTRING (FRAME_NUM_ARGS_P ()));
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1628 FRAME_NUM_ARGS_P ());
1630 #ifdef FRAME_NUM_ARGS
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: %s # %s\n",
1633 "FRAME_NUM_ARGS(frame)",
1634 XSTRING (FRAME_NUM_ARGS (frame
)));
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1637 (long) current_gdbarch
->frame_num_args
1638 /*FRAME_NUM_ARGS ()*/);
1640 #ifdef FRAME_RED_ZONE_SIZE
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1643 XSTRING (FRAME_RED_ZONE_SIZE
));
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1646 FRAME_RED_ZONE_SIZE
);
1648 #ifdef FUNCTION_START_OFFSET
1649 fprintf_unfiltered (file
,
1650 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1651 XSTRING (FUNCTION_START_OFFSET
));
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1654 (long) FUNCTION_START_OFFSET
);
1656 #ifdef GET_LONGJMP_TARGET_P
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: %s # %s\n",
1659 "GET_LONGJMP_TARGET_P()",
1660 XSTRING (GET_LONGJMP_TARGET_P ()));
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1663 GET_LONGJMP_TARGET_P ());
1665 #ifdef GET_LONGJMP_TARGET
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: %s # %s\n",
1668 "GET_LONGJMP_TARGET(pc)",
1669 XSTRING (GET_LONGJMP_TARGET (pc
)));
1670 fprintf_unfiltered (file
,
1671 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1672 (long) current_gdbarch
->get_longjmp_target
1673 /*GET_LONGJMP_TARGET ()*/);
1675 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1678 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1681 HAVE_NONSTEPPABLE_WATCHPOINT
);
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: %s # %s\n",
1686 "INNER_THAN(lhs, rhs)",
1687 XSTRING (INNER_THAN (lhs
, rhs
)));
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1690 (long) current_gdbarch
->inner_than
1693 #ifdef INTEGER_TO_ADDRESS_P
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: %s # %s\n",
1696 "INTEGER_TO_ADDRESS_P()",
1697 XSTRING (INTEGER_TO_ADDRESS_P ()));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1700 INTEGER_TO_ADDRESS_P ());
1702 #ifdef INTEGER_TO_ADDRESS
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: %s # %s\n",
1705 "INTEGER_TO_ADDRESS(type, buf)",
1706 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1709 (long) current_gdbarch
->integer_to_address
1710 /*INTEGER_TO_ADDRESS ()*/);
1712 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: %s # %s\n",
1715 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1716 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1719 (long) current_gdbarch
->in_solib_call_trampoline
1720 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1722 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: %s # %s\n",
1725 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1726 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1729 (long) current_gdbarch
->in_solib_return_trampoline
1730 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1732 #ifdef MEMORY_INSERT_BREAKPOINT
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: %s # %s\n",
1735 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1736 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1737 fprintf_unfiltered (file
,
1738 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1739 (long) current_gdbarch
->memory_insert_breakpoint
1740 /*MEMORY_INSERT_BREAKPOINT ()*/);
1742 #ifdef MEMORY_REMOVE_BREAKPOINT
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: %s # %s\n",
1745 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1746 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1749 (long) current_gdbarch
->memory_remove_breakpoint
1750 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1752 #ifdef NAME_OF_MALLOC
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1755 XSTRING (NAME_OF_MALLOC
));
1756 fprintf_unfiltered (file
,
1757 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1760 #ifdef NUM_PSEUDO_REGS
1761 fprintf_unfiltered (file
,
1762 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1763 XSTRING (NUM_PSEUDO_REGS
));
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: NUM_REGS # %s\n",
1771 XSTRING (NUM_REGS
));
1772 fprintf_unfiltered (file
,
1773 "gdbarch_dump: NUM_REGS = %d\n",
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: PC_REGNUM # %s\n",
1779 XSTRING (PC_REGNUM
));
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: PC_REGNUM = %d\n",
1784 #ifdef POINTER_TO_ADDRESS
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: %s # %s\n",
1787 "POINTER_TO_ADDRESS(type, buf)",
1788 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1791 (long) current_gdbarch
->pointer_to_address
1792 /*POINTER_TO_ADDRESS ()*/);
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1796 gdbarch_print_float_info_p (current_gdbarch
));
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: print_float_info = 0x%08lx\n",
1799 (long) current_gdbarch
->print_float_info
);
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1802 (long) current_gdbarch
->print_registers_info
);
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1805 gdbarch_print_vector_info_p (current_gdbarch
));
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1808 (long) current_gdbarch
->print_vector_info
);
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: PS_REGNUM # %s\n",
1812 XSTRING (PS_REGNUM
));
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: PS_REGNUM = %d\n",
1817 fprintf_unfiltered (file
,
1818 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1819 gdbarch_push_dummy_call_p (current_gdbarch
));
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1822 (long) current_gdbarch
->push_dummy_call
);
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1825 gdbarch_push_dummy_code_p (current_gdbarch
));
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1828 (long) current_gdbarch
->push_dummy_code
);
1829 #ifdef REGISTER_BYTES_OK_P
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: %s # %s\n",
1832 "REGISTER_BYTES_OK_P()",
1833 XSTRING (REGISTER_BYTES_OK_P ()));
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1836 REGISTER_BYTES_OK_P ());
1838 #ifdef REGISTER_BYTES_OK
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: %s # %s\n",
1841 "REGISTER_BYTES_OK(nr_bytes)",
1842 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1845 (long) current_gdbarch
->register_bytes_ok
1846 /*REGISTER_BYTES_OK ()*/);
1848 #ifdef REGISTER_NAME
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: %s # %s\n",
1851 "REGISTER_NAME(regnr)",
1852 XSTRING (REGISTER_NAME (regnr
)));
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1855 (long) current_gdbarch
->register_name
1856 /*REGISTER_NAME ()*/);
1858 #ifdef REGISTER_SIM_REGNO
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: %s # %s\n",
1861 "REGISTER_SIM_REGNO(reg_nr)",
1862 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1865 (long) current_gdbarch
->register_sim_regno
1866 /*REGISTER_SIM_REGNO ()*/);
1868 #ifdef REGISTER_TO_VALUE
1869 fprintf_unfiltered (file
,
1870 "gdbarch_dump: %s # %s\n",
1871 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1872 XSTRING (REGISTER_TO_VALUE (frame
, regnum
, type
, buf
)));
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1875 (long) current_gdbarch
->register_to_value
1876 /*REGISTER_TO_VALUE ()*/);
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1880 gdbarch_register_type_p (current_gdbarch
));
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: register_type = 0x%08lx\n",
1883 (long) current_gdbarch
->register_type
);
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1886 (long) current_gdbarch
->remote_translate_xfer_address
);
1887 #ifdef RETURN_VALUE_ON_STACK
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: %s # %s\n",
1890 "RETURN_VALUE_ON_STACK(type)",
1891 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1894 (long) current_gdbarch
->return_value_on_stack
1895 /*RETURN_VALUE_ON_STACK ()*/);
1897 #ifdef SDB_REG_TO_REGNUM
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: %s # %s\n",
1900 "SDB_REG_TO_REGNUM(sdb_regnr)",
1901 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1904 (long) current_gdbarch
->sdb_reg_to_regnum
1905 /*SDB_REG_TO_REGNUM ()*/);
1907 #ifdef SKIP_PROLOGUE
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: %s # %s\n",
1910 "SKIP_PROLOGUE(ip)",
1911 XSTRING (SKIP_PROLOGUE (ip
)));
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1914 (long) current_gdbarch
->skip_prologue
1915 /*SKIP_PROLOGUE ()*/);
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1919 (long) current_gdbarch
->skip_solib_resolver
);
1920 #ifdef SKIP_TRAMPOLINE_CODE
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: %s # %s\n",
1923 "SKIP_TRAMPOLINE_CODE(pc)",
1924 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1925 fprintf_unfiltered (file
,
1926 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1927 (long) current_gdbarch
->skip_trampoline_code
1928 /*SKIP_TRAMPOLINE_CODE ()*/);
1930 #ifdef SMASH_TEXT_ADDRESS
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: %s # %s\n",
1933 "SMASH_TEXT_ADDRESS(addr)",
1934 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1937 (long) current_gdbarch
->smash_text_address
1938 /*SMASH_TEXT_ADDRESS ()*/);
1940 #ifdef SOFTWARE_SINGLE_STEP_P
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: %s # %s\n",
1943 "SOFTWARE_SINGLE_STEP_P()",
1944 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1947 SOFTWARE_SINGLE_STEP_P ());
1949 #ifdef SOFTWARE_SINGLE_STEP
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: %s # %s\n",
1952 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1953 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1956 (long) current_gdbarch
->software_single_step
1957 /*SOFTWARE_SINGLE_STEP ()*/);
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: SP_REGNUM # %s\n",
1962 XSTRING (SP_REGNUM
));
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: SP_REGNUM = %d\n",
1967 #ifdef STAB_REG_TO_REGNUM
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: %s # %s\n",
1970 "STAB_REG_TO_REGNUM(stab_regnr)",
1971 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1974 (long) current_gdbarch
->stab_reg_to_regnum
1975 /*STAB_REG_TO_REGNUM ()*/);
1977 #ifdef STORE_RETURN_VALUE
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: %s # %s\n",
1980 "STORE_RETURN_VALUE(type, regcache, valbuf)",
1981 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
1984 (long) current_gdbarch
->store_return_value
1985 /*STORE_RETURN_VALUE ()*/);
1987 #ifdef TARGET_ADDR_BIT
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1990 XSTRING (TARGET_ADDR_BIT
));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1995 #ifdef TARGET_ARCHITECTURE
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1998 XSTRING (TARGET_ARCHITECTURE
));
1999 if (TARGET_ARCHITECTURE
!= NULL
)
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2002 TARGET_ARCHITECTURE
->printable_name
);
2004 #ifdef TARGET_BFD_VMA_BIT
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2007 XSTRING (TARGET_BFD_VMA_BIT
));
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2010 TARGET_BFD_VMA_BIT
);
2012 #ifdef TARGET_BYTE_ORDER
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2015 XSTRING (TARGET_BYTE_ORDER
));
2016 fprintf_unfiltered (file
,
2017 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2018 (long) TARGET_BYTE_ORDER
);
2020 #ifdef TARGET_CHAR_SIGNED
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2023 XSTRING (TARGET_CHAR_SIGNED
));
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2026 TARGET_CHAR_SIGNED
);
2028 #ifdef TARGET_DOUBLE_BIT
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2031 XSTRING (TARGET_DOUBLE_BIT
));
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2036 #ifdef TARGET_DOUBLE_FORMAT
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2039 XSTRING (TARGET_DOUBLE_FORMAT
));
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2042 (TARGET_DOUBLE_FORMAT
)->name
);
2044 #ifdef TARGET_FLOAT_BIT
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2047 XSTRING (TARGET_FLOAT_BIT
));
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2052 #ifdef TARGET_FLOAT_FORMAT
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2055 XSTRING (TARGET_FLOAT_FORMAT
));
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2058 (TARGET_FLOAT_FORMAT
)->name
);
2060 #ifdef TARGET_INT_BIT
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2063 XSTRING (TARGET_INT_BIT
));
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2068 #ifdef TARGET_LONG_BIT
2069 fprintf_unfiltered (file
,
2070 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2071 XSTRING (TARGET_LONG_BIT
));
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2076 #ifdef TARGET_LONG_DOUBLE_BIT
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2079 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2082 TARGET_LONG_DOUBLE_BIT
);
2084 #ifdef TARGET_LONG_DOUBLE_FORMAT
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2087 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2088 fprintf_unfiltered (file
,
2089 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2090 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2092 #ifdef TARGET_LONG_LONG_BIT
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2095 XSTRING (TARGET_LONG_LONG_BIT
));
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2098 TARGET_LONG_LONG_BIT
);
2101 fprintf_unfiltered (file
,
2102 "gdbarch_dump: TARGET_OSABI # %s\n",
2103 XSTRING (TARGET_OSABI
));
2104 fprintf_unfiltered (file
,
2105 "gdbarch_dump: TARGET_OSABI = %ld\n",
2106 (long) TARGET_OSABI
);
2108 #ifdef TARGET_PRINT_INSN
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: %s # %s\n",
2111 "TARGET_PRINT_INSN(vma, info)",
2112 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2115 (long) current_gdbarch
->print_insn
2116 /*TARGET_PRINT_INSN ()*/);
2118 #ifdef TARGET_PTR_BIT
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2121 XSTRING (TARGET_PTR_BIT
));
2122 fprintf_unfiltered (file
,
2123 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2126 #ifdef TARGET_READ_PC_P
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2129 "TARGET_READ_PC_P()",
2130 XSTRING (TARGET_READ_PC_P ()));
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2133 TARGET_READ_PC_P ());
2135 #ifdef TARGET_READ_PC
2136 fprintf_unfiltered (file
,
2137 "gdbarch_dump: %s # %s\n",
2138 "TARGET_READ_PC(ptid)",
2139 XSTRING (TARGET_READ_PC (ptid
)));
2140 fprintf_unfiltered (file
,
2141 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2142 (long) current_gdbarch
->read_pc
2143 /*TARGET_READ_PC ()*/);
2145 #ifdef TARGET_READ_SP_P
2146 fprintf_unfiltered (file
,
2147 "gdbarch_dump: %s # %s\n",
2148 "TARGET_READ_SP_P()",
2149 XSTRING (TARGET_READ_SP_P ()));
2150 fprintf_unfiltered (file
,
2151 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2152 TARGET_READ_SP_P ());
2154 #ifdef TARGET_READ_SP
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: %s # %s\n",
2158 XSTRING (TARGET_READ_SP ()));
2159 fprintf_unfiltered (file
,
2160 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2161 (long) current_gdbarch
->read_sp
2162 /*TARGET_READ_SP ()*/);
2164 #ifdef TARGET_SHORT_BIT
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2167 XSTRING (TARGET_SHORT_BIT
));
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2172 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: %s # %s\n",
2175 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2176 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2177 fprintf_unfiltered (file
,
2178 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2179 (long) current_gdbarch
->virtual_frame_pointer
2180 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2182 #ifdef TARGET_WRITE_PC
2183 fprintf_unfiltered (file
,
2184 "gdbarch_dump: %s # %s\n",
2185 "TARGET_WRITE_PC(val, ptid)",
2186 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2189 (long) current_gdbarch
->write_pc
2190 /*TARGET_WRITE_PC ()*/);
2192 fprintf_unfiltered (file
,
2193 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2194 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2195 fprintf_unfiltered (file
,
2196 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2197 (long) current_gdbarch
->unwind_dummy_id
);
2198 fprintf_unfiltered (file
,
2199 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2200 gdbarch_unwind_pc_p (current_gdbarch
));
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2203 (long) current_gdbarch
->unwind_pc
);
2204 fprintf_unfiltered (file
,
2205 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2206 gdbarch_unwind_sp_p (current_gdbarch
));
2207 fprintf_unfiltered (file
,
2208 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2209 (long) current_gdbarch
->unwind_sp
);
2210 #ifdef USE_STRUCT_CONVENTION
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: %s # %s\n",
2213 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2214 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2217 (long) current_gdbarch
->use_struct_convention
2218 /*USE_STRUCT_CONVENTION ()*/);
2220 #ifdef VALUE_TO_REGISTER
2221 fprintf_unfiltered (file
,
2222 "gdbarch_dump: %s # %s\n",
2223 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2224 XSTRING (VALUE_TO_REGISTER (frame
, regnum
, type
, buf
)));
2225 fprintf_unfiltered (file
,
2226 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2227 (long) current_gdbarch
->value_to_register
2228 /*VALUE_TO_REGISTER ()*/);
2230 if (current_gdbarch
->dump_tdep
!= NULL
)
2231 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2234 struct gdbarch_tdep
*
2235 gdbarch_tdep (struct gdbarch
*gdbarch
)
2237 if (gdbarch_debug
>= 2)
2238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2239 return gdbarch
->tdep
;
2243 const struct bfd_arch_info
*
2244 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2246 gdb_assert (gdbarch
!= NULL
);
2247 if (gdbarch_debug
>= 2)
2248 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2249 return gdbarch
->bfd_arch_info
;
2253 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2255 gdb_assert (gdbarch
!= NULL
);
2256 if (gdbarch_debug
>= 2)
2257 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2258 return gdbarch
->byte_order
;
2262 gdbarch_osabi (struct gdbarch
*gdbarch
)
2264 gdb_assert (gdbarch
!= NULL
);
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2267 return gdbarch
->osabi
;
2271 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2273 gdb_assert (gdbarch
!= NULL
);
2274 /* Skip verify of short_bit, invalid_p == 0 */
2275 if (gdbarch_debug
>= 2)
2276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2277 return gdbarch
->short_bit
;
2281 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2284 gdbarch
->short_bit
= short_bit
;
2288 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2290 gdb_assert (gdbarch
!= NULL
);
2291 /* Skip verify of int_bit, invalid_p == 0 */
2292 if (gdbarch_debug
>= 2)
2293 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2294 return gdbarch
->int_bit
;
2298 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2301 gdbarch
->int_bit
= int_bit
;
2305 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2307 gdb_assert (gdbarch
!= NULL
);
2308 /* Skip verify of long_bit, invalid_p == 0 */
2309 if (gdbarch_debug
>= 2)
2310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2311 return gdbarch
->long_bit
;
2315 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2318 gdbarch
->long_bit
= long_bit
;
2322 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2324 gdb_assert (gdbarch
!= NULL
);
2325 /* Skip verify of long_long_bit, invalid_p == 0 */
2326 if (gdbarch_debug
>= 2)
2327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2328 return gdbarch
->long_long_bit
;
2332 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2335 gdbarch
->long_long_bit
= long_long_bit
;
2339 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2341 gdb_assert (gdbarch
!= NULL
);
2342 /* Skip verify of float_bit, invalid_p == 0 */
2343 if (gdbarch_debug
>= 2)
2344 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2345 return gdbarch
->float_bit
;
2349 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2352 gdbarch
->float_bit
= float_bit
;
2356 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2358 gdb_assert (gdbarch
!= NULL
);
2359 /* Skip verify of double_bit, invalid_p == 0 */
2360 if (gdbarch_debug
>= 2)
2361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2362 return gdbarch
->double_bit
;
2366 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2369 gdbarch
->double_bit
= double_bit
;
2373 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2375 gdb_assert (gdbarch
!= NULL
);
2376 /* Skip verify of long_double_bit, invalid_p == 0 */
2377 if (gdbarch_debug
>= 2)
2378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2379 return gdbarch
->long_double_bit
;
2383 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2384 int long_double_bit
)
2386 gdbarch
->long_double_bit
= long_double_bit
;
2390 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2392 gdb_assert (gdbarch
!= NULL
);
2393 /* Skip verify of ptr_bit, invalid_p == 0 */
2394 if (gdbarch_debug
>= 2)
2395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2396 return gdbarch
->ptr_bit
;
2400 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2403 gdbarch
->ptr_bit
= ptr_bit
;
2407 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2409 gdb_assert (gdbarch
!= NULL
);
2410 /* Check variable changed from pre-default. */
2411 gdb_assert (gdbarch
->addr_bit
!= 0);
2412 if (gdbarch_debug
>= 2)
2413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2414 return gdbarch
->addr_bit
;
2418 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2421 gdbarch
->addr_bit
= addr_bit
;
2425 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2427 gdb_assert (gdbarch
!= NULL
);
2428 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2429 if (gdbarch_debug
>= 2)
2430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2431 return gdbarch
->bfd_vma_bit
;
2435 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2438 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2442 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2444 gdb_assert (gdbarch
!= NULL
);
2445 /* Check variable changed from pre-default. */
2446 gdb_assert (gdbarch
->char_signed
!= -1);
2447 if (gdbarch_debug
>= 2)
2448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2449 return gdbarch
->char_signed
;
2453 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2456 gdbarch
->char_signed
= char_signed
;
2460 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
2462 gdb_assert (gdbarch
!= NULL
);
2463 return gdbarch
->read_pc
!= NULL
;
2467 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2469 gdb_assert (gdbarch
!= NULL
);
2470 gdb_assert (gdbarch
->read_pc
!= NULL
);
2471 if (gdbarch_debug
>= 2)
2472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2473 return gdbarch
->read_pc (ptid
);
2477 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2478 gdbarch_read_pc_ftype read_pc
)
2480 gdbarch
->read_pc
= read_pc
;
2484 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2486 gdb_assert (gdbarch
!= NULL
);
2487 gdb_assert (gdbarch
->write_pc
!= NULL
);
2488 if (gdbarch_debug
>= 2)
2489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2490 gdbarch
->write_pc (val
, ptid
);
2494 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2495 gdbarch_write_pc_ftype write_pc
)
2497 gdbarch
->write_pc
= write_pc
;
2501 gdbarch_read_sp_p (struct gdbarch
*gdbarch
)
2503 gdb_assert (gdbarch
!= NULL
);
2504 return gdbarch
->read_sp
!= NULL
;
2508 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2510 gdb_assert (gdbarch
!= NULL
);
2511 gdb_assert (gdbarch
->read_sp
!= NULL
);
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2514 return gdbarch
->read_sp ();
2518 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2519 gdbarch_read_sp_ftype read_sp
)
2521 gdbarch
->read_sp
= read_sp
;
2525 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2527 gdb_assert (gdbarch
!= NULL
);
2528 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
2529 if (gdbarch_debug
>= 2)
2530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2531 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2535 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2536 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2538 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2542 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2544 gdb_assert (gdbarch
!= NULL
);
2545 return gdbarch
->pseudo_register_read
!= NULL
;
2549 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2551 gdb_assert (gdbarch
!= NULL
);
2552 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
2553 if (gdbarch_debug
>= 2)
2554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2555 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2559 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2560 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2562 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2566 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2568 gdb_assert (gdbarch
!= NULL
);
2569 return gdbarch
->pseudo_register_write
!= NULL
;
2573 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2575 gdb_assert (gdbarch
!= NULL
);
2576 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
2577 if (gdbarch_debug
>= 2)
2578 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2579 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2583 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2584 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2586 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2590 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2592 gdb_assert (gdbarch
!= NULL
);
2593 /* Check variable changed from pre-default. */
2594 gdb_assert (gdbarch
->num_regs
!= -1);
2595 if (gdbarch_debug
>= 2)
2596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2597 return gdbarch
->num_regs
;
2601 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2604 gdbarch
->num_regs
= num_regs
;
2608 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2610 gdb_assert (gdbarch
!= NULL
);
2611 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2612 if (gdbarch_debug
>= 2)
2613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2614 return gdbarch
->num_pseudo_regs
;
2618 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2619 int num_pseudo_regs
)
2621 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2625 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2627 gdb_assert (gdbarch
!= NULL
);
2628 /* Skip verify of sp_regnum, invalid_p == 0 */
2629 if (gdbarch_debug
>= 2)
2630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2631 return gdbarch
->sp_regnum
;
2635 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2638 gdbarch
->sp_regnum
= sp_regnum
;
2642 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2644 gdb_assert (gdbarch
!= NULL
);
2645 /* Skip verify of pc_regnum, invalid_p == 0 */
2646 if (gdbarch_debug
>= 2)
2647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2648 return gdbarch
->pc_regnum
;
2652 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2655 gdbarch
->pc_regnum
= pc_regnum
;
2659 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2661 gdb_assert (gdbarch
!= NULL
);
2662 /* Skip verify of ps_regnum, invalid_p == 0 */
2663 if (gdbarch_debug
>= 2)
2664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2665 return gdbarch
->ps_regnum
;
2669 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2672 gdbarch
->ps_regnum
= ps_regnum
;
2676 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2678 gdb_assert (gdbarch
!= NULL
);
2679 /* Skip verify of fp0_regnum, invalid_p == 0 */
2680 if (gdbarch_debug
>= 2)
2681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2682 return gdbarch
->fp0_regnum
;
2686 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2689 gdbarch
->fp0_regnum
= fp0_regnum
;
2693 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2695 gdb_assert (gdbarch
!= NULL
);
2696 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2697 if (gdbarch_debug
>= 2)
2698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2699 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2703 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2704 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2706 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2710 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2712 gdb_assert (gdbarch
!= NULL
);
2713 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2714 if (gdbarch_debug
>= 2)
2715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2716 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2720 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2721 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2723 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2727 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2729 gdb_assert (gdbarch
!= NULL
);
2730 gdb_assert (gdbarch
->dwarf_reg_to_regnum
!= NULL
);
2731 if (gdbarch_debug
>= 2)
2732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2733 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2737 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2738 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2740 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2744 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2746 gdb_assert (gdbarch
!= NULL
);
2747 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2748 if (gdbarch_debug
>= 2)
2749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2750 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2754 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2755 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2757 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2761 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2763 gdb_assert (gdbarch
!= NULL
);
2764 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2765 if (gdbarch_debug
>= 2)
2766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2767 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2771 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2772 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2774 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2778 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2780 gdb_assert (gdbarch
!= NULL
);
2781 gdb_assert (gdbarch
->register_name
!= NULL
);
2782 if (gdbarch_debug
>= 2)
2783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2784 return gdbarch
->register_name (regnr
);
2788 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2789 gdbarch_register_name_ftype register_name
)
2791 gdbarch
->register_name
= register_name
;
2795 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2797 gdb_assert (gdbarch
!= NULL
);
2798 return gdbarch
->register_type
!= NULL
;
2802 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2804 gdb_assert (gdbarch
!= NULL
);
2805 gdb_assert (gdbarch
->register_type
!= NULL
);
2806 if (gdbarch_debug
>= 2)
2807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2808 return gdbarch
->register_type (gdbarch
, reg_nr
);
2812 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2813 gdbarch_register_type_ftype register_type
)
2815 gdbarch
->register_type
= register_type
;
2819 gdbarch_deprecated_register_virtual_type_p (struct gdbarch
*gdbarch
)
2821 gdb_assert (gdbarch
!= NULL
);
2822 return gdbarch
->deprecated_register_virtual_type
!= NULL
;
2826 gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2828 gdb_assert (gdbarch
!= NULL
);
2829 gdb_assert (gdbarch
->deprecated_register_virtual_type
!= NULL
);
2830 if (gdbarch_debug
>= 2)
2831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_type called\n");
2832 return gdbarch
->deprecated_register_virtual_type (reg_nr
);
2836 set_gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
,
2837 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type
)
2839 gdbarch
->deprecated_register_virtual_type
= deprecated_register_virtual_type
;
2843 gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
)
2845 gdb_assert (gdbarch
!= NULL
);
2846 if (gdbarch_debug
>= 2)
2847 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_bytes called\n");
2848 return gdbarch
->deprecated_register_bytes
;
2852 set_gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
,
2853 int deprecated_register_bytes
)
2855 gdbarch
->deprecated_register_bytes
= deprecated_register_bytes
;
2859 gdbarch_deprecated_register_byte_p (struct gdbarch
*gdbarch
)
2861 gdb_assert (gdbarch
!= NULL
);
2862 return gdbarch
->deprecated_register_byte
!= generic_register_byte
;
2866 gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2868 gdb_assert (gdbarch
!= NULL
);
2869 gdb_assert (gdbarch
->deprecated_register_byte
!= NULL
);
2870 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2871 if (gdbarch_debug
>= 2)
2872 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_byte called\n");
2873 return gdbarch
->deprecated_register_byte (reg_nr
);
2877 set_gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
,
2878 gdbarch_deprecated_register_byte_ftype deprecated_register_byte
)
2880 gdbarch
->deprecated_register_byte
= deprecated_register_byte
;
2884 gdbarch_deprecated_register_raw_size_p (struct gdbarch
*gdbarch
)
2886 gdb_assert (gdbarch
!= NULL
);
2887 return gdbarch
->deprecated_register_raw_size
!= generic_register_size
;
2891 gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2893 gdb_assert (gdbarch
!= NULL
);
2894 gdb_assert (gdbarch
->deprecated_register_raw_size
!= NULL
);
2895 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2896 if (gdbarch_debug
>= 2)
2897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_raw_size called\n");
2898 return gdbarch
->deprecated_register_raw_size (reg_nr
);
2902 set_gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
,
2903 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size
)
2905 gdbarch
->deprecated_register_raw_size
= deprecated_register_raw_size
;
2909 gdbarch_deprecated_register_virtual_size_p (struct gdbarch
*gdbarch
)
2911 gdb_assert (gdbarch
!= NULL
);
2912 return gdbarch
->deprecated_register_virtual_size
!= generic_register_size
;
2916 gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2918 gdb_assert (gdbarch
!= NULL
);
2919 gdb_assert (gdbarch
->deprecated_register_virtual_size
!= NULL
);
2920 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2921 if (gdbarch_debug
>= 2)
2922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_size called\n");
2923 return gdbarch
->deprecated_register_virtual_size (reg_nr
);
2927 set_gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
,
2928 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size
)
2930 gdbarch
->deprecated_register_virtual_size
= deprecated_register_virtual_size
;
2934 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
2936 gdb_assert (gdbarch
!= NULL
);
2937 return gdbarch
->deprecated_max_register_raw_size
!= 0;
2941 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
2943 gdb_assert (gdbarch
!= NULL
);
2944 if (gdbarch_debug
>= 2)
2945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
2946 return gdbarch
->deprecated_max_register_raw_size
;
2950 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
2951 int deprecated_max_register_raw_size
)
2953 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
2957 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
2959 gdb_assert (gdbarch
!= NULL
);
2960 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
2964 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
2966 gdb_assert (gdbarch
!= NULL
);
2967 if (gdbarch_debug
>= 2)
2968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
2969 return gdbarch
->deprecated_max_register_virtual_size
;
2973 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
2974 int deprecated_max_register_virtual_size
)
2976 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
2980 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
2982 gdb_assert (gdbarch
!= NULL
);
2983 return gdbarch
->unwind_dummy_id
!= NULL
;
2987 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
2989 gdb_assert (gdbarch
!= NULL
);
2990 gdb_assert (gdbarch
->unwind_dummy_id
!= NULL
);
2991 if (gdbarch_debug
>= 2)
2992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
2993 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
2997 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
2998 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
3000 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
3004 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3006 gdb_assert (gdbarch
!= NULL
);
3007 return gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
;
3011 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3013 gdb_assert (gdbarch
!= NULL
);
3014 gdb_assert (gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
);
3015 if (gdbarch_debug
>= 2)
3016 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3017 gdbarch
->deprecated_save_dummy_frame_tos (sp
);
3021 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3022 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos
)
3024 gdbarch
->deprecated_save_dummy_frame_tos
= deprecated_save_dummy_frame_tos
;
3028 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3030 gdb_assert (gdbarch
!= NULL
);
3031 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3032 if (gdbarch_debug
>= 2)
3033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3034 return gdbarch
->deprecated_fp_regnum
;
3038 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3039 int deprecated_fp_regnum
)
3041 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3045 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
3047 gdb_assert (gdbarch
!= NULL
);
3048 return gdbarch
->deprecated_target_read_fp
!= NULL
;
3052 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
3054 gdb_assert (gdbarch
!= NULL
);
3055 gdb_assert (gdbarch
->deprecated_target_read_fp
!= NULL
);
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
3058 return gdbarch
->deprecated_target_read_fp ();
3062 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
3063 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
3065 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
3069 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
3071 gdb_assert (gdbarch
!= NULL
);
3072 return gdbarch
->push_dummy_call
!= NULL
;
3076 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
)
3078 gdb_assert (gdbarch
!= NULL
);
3079 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
3080 if (gdbarch_debug
>= 2)
3081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
3082 return gdbarch
->push_dummy_call (gdbarch
, func_addr
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
3086 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
3087 gdbarch_push_dummy_call_ftype push_dummy_call
)
3089 gdbarch
->push_dummy_call
= push_dummy_call
;
3093 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
3095 gdb_assert (gdbarch
!= NULL
);
3096 return gdbarch
->deprecated_push_arguments
!= NULL
;
3100 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3102 gdb_assert (gdbarch
!= NULL
);
3103 gdb_assert (gdbarch
->deprecated_push_arguments
!= NULL
);
3104 if (gdbarch_debug
>= 2)
3105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
3106 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3110 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
3111 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
3113 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
3117 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
3119 gdb_assert (gdbarch
!= NULL
);
3120 return gdbarch
->deprecated_push_return_address
!= NULL
;
3124 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3126 gdb_assert (gdbarch
!= NULL
);
3127 gdb_assert (gdbarch
->deprecated_push_return_address
!= NULL
);
3128 if (gdbarch_debug
>= 2)
3129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
3130 return gdbarch
->deprecated_push_return_address (pc
, sp
);
3134 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
3135 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
3137 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
3141 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
3143 gdb_assert (gdbarch
!= NULL
);
3144 return gdbarch
->deprecated_dummy_write_sp
!= NULL
;
3148 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
3150 gdb_assert (gdbarch
!= NULL
);
3151 gdb_assert (gdbarch
->deprecated_dummy_write_sp
!= NULL
);
3152 if (gdbarch_debug
>= 2)
3153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
3154 gdbarch
->deprecated_dummy_write_sp (val
);
3158 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
3159 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
3161 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
3165 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
3167 gdb_assert (gdbarch
!= NULL
);
3168 if (gdbarch_debug
>= 2)
3169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
3170 return gdbarch
->deprecated_register_size
;
3174 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
3175 int deprecated_register_size
)
3177 gdbarch
->deprecated_register_size
= deprecated_register_size
;
3181 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3183 gdb_assert (gdbarch
!= NULL
);
3184 /* Skip verify of call_dummy_location, invalid_p == 0 */
3185 if (gdbarch_debug
>= 2)
3186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3187 return gdbarch
->call_dummy_location
;
3191 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3192 int call_dummy_location
)
3194 gdbarch
->call_dummy_location
= call_dummy_location
;
3198 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
3200 gdb_assert (gdbarch
!= NULL
);
3201 return gdbarch
->push_dummy_code
!= NULL
;
3205 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
)
3207 gdb_assert (gdbarch
!= NULL
);
3208 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
3209 if (gdbarch_debug
>= 2)
3210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
3211 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
3215 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
3216 gdbarch_push_dummy_code_ftype push_dummy_code
)
3218 gdbarch
->push_dummy_code
= push_dummy_code
;
3222 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3224 gdb_assert (gdbarch
!= NULL
);
3225 return gdbarch
->deprecated_do_registers_info
!= NULL
;
3229 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3231 gdb_assert (gdbarch
!= NULL
);
3232 gdb_assert (gdbarch
->deprecated_do_registers_info
!= NULL
);
3233 if (gdbarch_debug
>= 2)
3234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3235 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3239 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3240 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3242 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3246 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3248 gdb_assert (gdbarch
!= NULL
);
3249 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
3250 if (gdbarch_debug
>= 2)
3251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3252 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3256 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3257 gdbarch_print_registers_info_ftype print_registers_info
)
3259 gdbarch
->print_registers_info
= print_registers_info
;
3263 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3265 gdb_assert (gdbarch
!= NULL
);
3266 return gdbarch
->print_float_info
!= NULL
;
3270 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3272 gdb_assert (gdbarch
!= NULL
);
3273 gdb_assert (gdbarch
->print_float_info
!= NULL
);
3274 if (gdbarch_debug
>= 2)
3275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3276 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3280 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3281 gdbarch_print_float_info_ftype print_float_info
)
3283 gdbarch
->print_float_info
= print_float_info
;
3287 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3289 gdb_assert (gdbarch
!= NULL
);
3290 return gdbarch
->print_vector_info
!= NULL
;
3294 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3296 gdb_assert (gdbarch
!= NULL
);
3297 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
3298 if (gdbarch_debug
>= 2)
3299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3300 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3304 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3305 gdbarch_print_vector_info_ftype print_vector_info
)
3307 gdbarch
->print_vector_info
= print_vector_info
;
3311 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3313 gdb_assert (gdbarch
!= NULL
);
3314 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
3315 if (gdbarch_debug
>= 2)
3316 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3317 return gdbarch
->register_sim_regno (reg_nr
);
3321 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3322 gdbarch_register_sim_regno_ftype register_sim_regno
)
3324 gdbarch
->register_sim_regno
= register_sim_regno
;
3328 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3330 gdb_assert (gdbarch
!= NULL
);
3331 return gdbarch
->register_bytes_ok
!= NULL
;
3335 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3337 gdb_assert (gdbarch
!= NULL
);
3338 gdb_assert (gdbarch
->register_bytes_ok
!= NULL
);
3339 if (gdbarch_debug
>= 2)
3340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3341 return gdbarch
->register_bytes_ok (nr_bytes
);
3345 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3346 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3348 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3352 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3354 gdb_assert (gdbarch
!= NULL
);
3355 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
3356 if (gdbarch_debug
>= 2)
3357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3358 return gdbarch
->cannot_fetch_register (regnum
);
3362 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3363 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3365 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3369 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3371 gdb_assert (gdbarch
!= NULL
);
3372 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
3373 if (gdbarch_debug
>= 2)
3374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3375 return gdbarch
->cannot_store_register (regnum
);
3379 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3380 gdbarch_cannot_store_register_ftype cannot_store_register
)
3382 gdbarch
->cannot_store_register
= cannot_store_register
;
3386 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3388 gdb_assert (gdbarch
!= NULL
);
3389 return gdbarch
->get_longjmp_target
!= NULL
;
3393 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3395 gdb_assert (gdbarch
!= NULL
);
3396 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
3397 if (gdbarch_debug
>= 2)
3398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3399 return gdbarch
->get_longjmp_target (pc
);
3403 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3404 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3406 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3410 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3412 gdb_assert (gdbarch
!= NULL
);
3413 return gdbarch
->deprecated_pc_in_call_dummy
!= deprecated_pc_in_call_dummy
;
3417 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3419 gdb_assert (gdbarch
!= NULL
);
3420 gdb_assert (gdbarch
->deprecated_pc_in_call_dummy
!= NULL
);
3421 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3422 if (gdbarch_debug
>= 2)
3423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3424 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3428 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3429 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3431 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3435 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3437 gdb_assert (gdbarch
!= NULL
);
3438 return gdbarch
->deprecated_init_frame_pc
!= NULL
;
3442 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3444 gdb_assert (gdbarch
!= NULL
);
3445 gdb_assert (gdbarch
->deprecated_init_frame_pc
!= NULL
);
3446 if (gdbarch_debug
>= 2)
3447 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3448 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3452 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3453 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3455 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3459 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3461 gdb_assert (gdbarch
!= NULL
);
3462 if (gdbarch_debug
>= 2)
3463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3464 return gdbarch
->believe_pcc_promotion
;
3468 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3469 int believe_pcc_promotion
)
3471 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3475 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
3477 gdb_assert (gdbarch
!= NULL
);
3478 return gdbarch
->deprecated_get_saved_register
!= NULL
;
3482 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
)
3484 gdb_assert (gdbarch
!= NULL
);
3485 gdb_assert (gdbarch
->deprecated_get_saved_register
!= NULL
);
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
3488 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3492 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
3493 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
3495 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
3499 gdbarch_deprecated_register_convertible_p (struct gdbarch
*gdbarch
)
3501 gdb_assert (gdbarch
!= NULL
);
3502 return gdbarch
->deprecated_register_convertible
!= NULL
;
3506 gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3508 gdb_assert (gdbarch
!= NULL
);
3509 gdb_assert (gdbarch
->deprecated_register_convertible
!= NULL
);
3510 if (gdbarch_debug
>= 2)
3511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convertible called\n");
3512 return gdbarch
->deprecated_register_convertible (nr
);
3516 set_gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
,
3517 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible
)
3519 gdbarch
->deprecated_register_convertible
= deprecated_register_convertible
;
3523 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3525 gdb_assert (gdbarch
!= NULL
);
3526 gdb_assert (gdbarch
->deprecated_register_convert_to_virtual
!= NULL
);
3527 if (gdbarch_debug
>= 2)
3528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_virtual called\n");
3529 gdbarch
->deprecated_register_convert_to_virtual (regnum
, type
, from
, to
);
3533 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3534 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual
)
3536 gdbarch
->deprecated_register_convert_to_virtual
= deprecated_register_convert_to_virtual
;
3540 gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, const char *from
, char *to
)
3542 gdb_assert (gdbarch
!= NULL
);
3543 gdb_assert (gdbarch
->deprecated_register_convert_to_raw
!= NULL
);
3544 if (gdbarch_debug
>= 2)
3545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_raw called\n");
3546 gdbarch
->deprecated_register_convert_to_raw (type
, regnum
, from
, to
);
3550 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
,
3551 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw
)
3553 gdbarch
->deprecated_register_convert_to_raw
= deprecated_register_convert_to_raw
;
3557 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
3559 gdb_assert (gdbarch
!= NULL
);
3560 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
3561 if (gdbarch_debug
>= 2)
3562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3563 return gdbarch
->convert_register_p (regnum
, type
);
3567 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3568 gdbarch_convert_register_p_ftype convert_register_p
)
3570 gdbarch
->convert_register_p
= convert_register_p
;
3574 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, void *buf
)
3576 gdb_assert (gdbarch
!= NULL
);
3577 gdb_assert (gdbarch
->register_to_value
!= NULL
);
3578 if (gdbarch_debug
>= 2)
3579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3580 gdbarch
->register_to_value (frame
, regnum
, type
, buf
);
3584 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3585 gdbarch_register_to_value_ftype register_to_value
)
3587 gdbarch
->register_to_value
= register_to_value
;
3591 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const void *buf
)
3593 gdb_assert (gdbarch
!= NULL
);
3594 gdb_assert (gdbarch
->value_to_register
!= NULL
);
3595 if (gdbarch_debug
>= 2)
3596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3597 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
3601 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3602 gdbarch_value_to_register_ftype value_to_register
)
3604 gdbarch
->value_to_register
= value_to_register
;
3608 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
3610 gdb_assert (gdbarch
!= NULL
);
3611 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
3612 if (gdbarch_debug
>= 2)
3613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3614 return gdbarch
->pointer_to_address (type
, buf
);
3618 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3619 gdbarch_pointer_to_address_ftype pointer_to_address
)
3621 gdbarch
->pointer_to_address
= pointer_to_address
;
3625 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3627 gdb_assert (gdbarch
!= NULL
);
3628 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
3629 if (gdbarch_debug
>= 2)
3630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3631 gdbarch
->address_to_pointer (type
, buf
, addr
);
3635 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3636 gdbarch_address_to_pointer_ftype address_to_pointer
)
3638 gdbarch
->address_to_pointer
= address_to_pointer
;
3642 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3644 gdb_assert (gdbarch
!= NULL
);
3645 return gdbarch
->integer_to_address
!= NULL
;
3649 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3651 gdb_assert (gdbarch
!= NULL
);
3652 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
3653 if (gdbarch_debug
>= 2)
3654 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3655 return gdbarch
->integer_to_address (type
, buf
);
3659 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3660 gdbarch_integer_to_address_ftype integer_to_address
)
3662 gdbarch
->integer_to_address
= integer_to_address
;
3666 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
3668 gdb_assert (gdbarch
!= NULL
);
3669 return gdbarch
->deprecated_pop_frame
!= NULL
;
3673 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
3675 gdb_assert (gdbarch
!= NULL
);
3676 gdb_assert (gdbarch
->deprecated_pop_frame
!= NULL
);
3677 if (gdbarch_debug
>= 2)
3678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
3679 gdbarch
->deprecated_pop_frame ();
3683 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
3684 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
3686 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
3690 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
3692 gdb_assert (gdbarch
!= NULL
);
3693 return gdbarch
->deprecated_store_struct_return
!= NULL
;
3697 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3699 gdb_assert (gdbarch
!= NULL
);
3700 gdb_assert (gdbarch
->deprecated_store_struct_return
!= NULL
);
3701 if (gdbarch_debug
>= 2)
3702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
3703 gdbarch
->deprecated_store_struct_return (addr
, sp
);
3707 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
3708 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
3710 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
3714 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
3716 gdb_assert (gdbarch
!= NULL
);
3717 return gdbarch
->return_value
!= NULL
;
3720 enum return_value_convention
3721 gdbarch_return_value (struct gdbarch
*gdbarch
, struct type
*valtype
, struct regcache
*regcache
, void *readbuf
, const void *writebuf
)
3723 gdb_assert (gdbarch
!= NULL
);
3724 gdb_assert (gdbarch
->return_value
!= NULL
);
3725 if (gdbarch_debug
>= 2)
3726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
3727 return gdbarch
->return_value (gdbarch
, valtype
, regcache
, readbuf
, writebuf
);
3731 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
3732 gdbarch_return_value_ftype return_value
)
3734 gdbarch
->return_value
= return_value
;
3738 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3740 gdb_assert (gdbarch
!= NULL
);
3741 gdb_assert (gdbarch
->return_value_on_stack
!= NULL
);
3742 if (gdbarch_debug
>= 2)
3743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3744 return gdbarch
->return_value_on_stack (type
);
3748 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3749 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3751 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3755 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
3757 gdb_assert (gdbarch
!= NULL
);
3758 gdb_assert (gdbarch
->extract_return_value
!= NULL
);
3759 if (gdbarch_debug
>= 2)
3760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3761 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3765 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3766 gdbarch_extract_return_value_ftype extract_return_value
)
3768 gdbarch
->extract_return_value
= extract_return_value
;
3772 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
3774 gdb_assert (gdbarch
!= NULL
);
3775 gdb_assert (gdbarch
->store_return_value
!= NULL
);
3776 if (gdbarch_debug
>= 2)
3777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3778 gdbarch
->store_return_value (type
, regcache
, valbuf
);
3782 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3783 gdbarch_store_return_value_ftype store_return_value
)
3785 gdbarch
->store_return_value
= store_return_value
;
3789 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3791 gdb_assert (gdbarch
!= NULL
);
3792 gdb_assert (gdbarch
->deprecated_extract_return_value
!= NULL
);
3793 if (gdbarch_debug
>= 2)
3794 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3795 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3799 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3800 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3802 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3806 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3808 gdb_assert (gdbarch
!= NULL
);
3809 gdb_assert (gdbarch
->deprecated_store_return_value
!= NULL
);
3810 if (gdbarch_debug
>= 2)
3811 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
3812 gdbarch
->deprecated_store_return_value (type
, valbuf
);
3816 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
3817 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
3819 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
3823 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3825 gdb_assert (gdbarch
!= NULL
);
3826 gdb_assert (gdbarch
->use_struct_convention
!= NULL
);
3827 if (gdbarch_debug
>= 2)
3828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3829 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3833 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3834 gdbarch_use_struct_convention_ftype use_struct_convention
)
3836 gdbarch
->use_struct_convention
= use_struct_convention
;
3840 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3842 gdb_assert (gdbarch
!= NULL
);
3843 return gdbarch
->deprecated_extract_struct_value_address
!= NULL
;
3847 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3849 gdb_assert (gdbarch
!= NULL
);
3850 gdb_assert (gdbarch
->deprecated_extract_struct_value_address
!= NULL
);
3851 if (gdbarch_debug
>= 2)
3852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3853 return gdbarch
->deprecated_extract_struct_value_address (regcache
);
3857 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3858 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3860 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3864 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
3866 gdb_assert (gdbarch
!= NULL
);
3867 return gdbarch
->deprecated_frame_init_saved_regs
!= NULL
;
3871 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3873 gdb_assert (gdbarch
!= NULL
);
3874 gdb_assert (gdbarch
->deprecated_frame_init_saved_regs
!= NULL
);
3875 if (gdbarch_debug
>= 2)
3876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
3877 gdbarch
->deprecated_frame_init_saved_regs (frame
);
3881 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3882 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
3884 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
3888 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3890 gdb_assert (gdbarch
!= NULL
);
3891 return gdbarch
->deprecated_init_extra_frame_info
!= NULL
;
3895 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3897 gdb_assert (gdbarch
!= NULL
);
3898 gdb_assert (gdbarch
->deprecated_init_extra_frame_info
!= NULL
);
3899 if (gdbarch_debug
>= 2)
3900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
3901 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
3905 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
3906 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
3908 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
3912 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3914 gdb_assert (gdbarch
!= NULL
);
3915 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
3916 if (gdbarch_debug
>= 2)
3917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3918 return gdbarch
->skip_prologue (ip
);
3922 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3923 gdbarch_skip_prologue_ftype skip_prologue
)
3925 gdbarch
->skip_prologue
= skip_prologue
;
3929 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3931 gdb_assert (gdbarch
!= NULL
);
3932 gdb_assert (gdbarch
->inner_than
!= NULL
);
3933 if (gdbarch_debug
>= 2)
3934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3935 return gdbarch
->inner_than (lhs
, rhs
);
3939 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3940 gdbarch_inner_than_ftype inner_than
)
3942 gdbarch
->inner_than
= inner_than
;
3945 const unsigned char *
3946 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3948 gdb_assert (gdbarch
!= NULL
);
3949 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
3950 if (gdbarch_debug
>= 2)
3951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3952 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3956 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3957 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3959 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3963 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
3965 gdb_assert (gdbarch
!= NULL
);
3966 return gdbarch
->adjust_breakpoint_address
!= NULL
;
3970 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
3972 gdb_assert (gdbarch
!= NULL
);
3973 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
3974 if (gdbarch_debug
>= 2)
3975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
3976 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
3980 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
3981 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
3983 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
3987 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3989 gdb_assert (gdbarch
!= NULL
);
3990 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
3991 if (gdbarch_debug
>= 2)
3992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3993 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3997 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3998 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4000 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4004 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4006 gdb_assert (gdbarch
!= NULL
);
4007 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
4008 if (gdbarch_debug
>= 2)
4009 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4010 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4014 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4015 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4017 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4021 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4023 gdb_assert (gdbarch
!= NULL
);
4024 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4025 if (gdbarch_debug
>= 2)
4026 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4027 return gdbarch
->decr_pc_after_break
;
4031 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4032 CORE_ADDR decr_pc_after_break
)
4034 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4038 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4040 gdb_assert (gdbarch
!= NULL
);
4041 /* Skip verify of function_start_offset, invalid_p == 0 */
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4044 return gdbarch
->function_start_offset
;
4048 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4049 CORE_ADDR function_start_offset
)
4051 gdbarch
->function_start_offset
= function_start_offset
;
4055 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
)
4057 gdb_assert (gdbarch
!= NULL
);
4058 gdb_assert (gdbarch
->remote_translate_xfer_address
!= NULL
);
4059 if (gdbarch_debug
>= 2)
4060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4061 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4065 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4066 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4068 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4072 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4074 gdb_assert (gdbarch
!= NULL
);
4075 /* Skip verify of frame_args_skip, invalid_p == 0 */
4076 if (gdbarch_debug
>= 2)
4077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4078 return gdbarch
->frame_args_skip
;
4082 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4083 CORE_ADDR frame_args_skip
)
4085 gdbarch
->frame_args_skip
= frame_args_skip
;
4089 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch
*gdbarch
)
4091 gdb_assert (gdbarch
!= NULL
);
4092 return gdbarch
->deprecated_frameless_function_invocation
!= NULL
;
4096 gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4098 gdb_assert (gdbarch
!= NULL
);
4099 gdb_assert (gdbarch
->deprecated_frameless_function_invocation
!= NULL
);
4100 if (gdbarch_debug
>= 2)
4101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frameless_function_invocation called\n");
4102 return gdbarch
->deprecated_frameless_function_invocation (fi
);
4106 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
,
4107 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation
)
4109 gdbarch
->deprecated_frameless_function_invocation
= deprecated_frameless_function_invocation
;
4113 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4115 gdb_assert (gdbarch
!= NULL
);
4116 return gdbarch
->deprecated_frame_chain
!= NULL
;
4120 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4122 gdb_assert (gdbarch
!= NULL
);
4123 gdb_assert (gdbarch
->deprecated_frame_chain
!= NULL
);
4124 if (gdbarch_debug
>= 2)
4125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4126 return gdbarch
->deprecated_frame_chain (frame
);
4130 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4131 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4133 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4137 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4139 gdb_assert (gdbarch
!= NULL
);
4140 return gdbarch
->deprecated_frame_chain_valid
!= NULL
;
4144 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4146 gdb_assert (gdbarch
!= NULL
);
4147 gdb_assert (gdbarch
->deprecated_frame_chain_valid
!= NULL
);
4148 if (gdbarch_debug
>= 2)
4149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4150 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4154 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4155 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4157 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4161 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4163 gdb_assert (gdbarch
!= NULL
);
4164 return gdbarch
->deprecated_frame_saved_pc
!= NULL
;
4168 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4170 gdb_assert (gdbarch
!= NULL
);
4171 gdb_assert (gdbarch
->deprecated_frame_saved_pc
!= NULL
);
4172 if (gdbarch_debug
>= 2)
4173 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4174 return gdbarch
->deprecated_frame_saved_pc (fi
);
4178 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4179 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4181 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4185 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4187 gdb_assert (gdbarch
!= NULL
);
4188 return gdbarch
->unwind_pc
!= NULL
;
4192 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4194 gdb_assert (gdbarch
!= NULL
);
4195 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
4196 if (gdbarch_debug
>= 2)
4197 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4198 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4202 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4203 gdbarch_unwind_pc_ftype unwind_pc
)
4205 gdbarch
->unwind_pc
= unwind_pc
;
4209 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
4211 gdb_assert (gdbarch
!= NULL
);
4212 return gdbarch
->unwind_sp
!= NULL
;
4216 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4218 gdb_assert (gdbarch
!= NULL
);
4219 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
4220 if (gdbarch_debug
>= 2)
4221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
4222 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
4226 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
4227 gdbarch_unwind_sp_ftype unwind_sp
)
4229 gdbarch
->unwind_sp
= unwind_sp
;
4233 gdbarch_deprecated_frame_args_address_p (struct gdbarch
*gdbarch
)
4235 gdb_assert (gdbarch
!= NULL
);
4236 return gdbarch
->deprecated_frame_args_address
!= get_frame_base
;
4240 gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4242 gdb_assert (gdbarch
!= NULL
);
4243 gdb_assert (gdbarch
->deprecated_frame_args_address
!= NULL
);
4244 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4245 if (gdbarch_debug
>= 2)
4246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_args_address called\n");
4247 return gdbarch
->deprecated_frame_args_address (fi
);
4251 set_gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
,
4252 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address
)
4254 gdbarch
->deprecated_frame_args_address
= deprecated_frame_args_address
;
4258 gdbarch_deprecated_frame_locals_address_p (struct gdbarch
*gdbarch
)
4260 gdb_assert (gdbarch
!= NULL
);
4261 return gdbarch
->deprecated_frame_locals_address
!= get_frame_base
;
4265 gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4267 gdb_assert (gdbarch
!= NULL
);
4268 gdb_assert (gdbarch
->deprecated_frame_locals_address
!= NULL
);
4269 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4270 if (gdbarch_debug
>= 2)
4271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_locals_address called\n");
4272 return gdbarch
->deprecated_frame_locals_address (fi
);
4276 set_gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
,
4277 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address
)
4279 gdbarch
->deprecated_frame_locals_address
= deprecated_frame_locals_address
;
4283 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4285 gdb_assert (gdbarch
!= NULL
);
4286 return gdbarch
->deprecated_saved_pc_after_call
!= NULL
;
4290 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4292 gdb_assert (gdbarch
!= NULL
);
4293 gdb_assert (gdbarch
->deprecated_saved_pc_after_call
!= NULL
);
4294 if (gdbarch_debug
>= 2)
4295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
4296 return gdbarch
->deprecated_saved_pc_after_call (frame
);
4300 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
4301 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
4303 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
4307 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
4309 gdb_assert (gdbarch
!= NULL
);
4310 return gdbarch
->frame_num_args
!= NULL
;
4314 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4316 gdb_assert (gdbarch
!= NULL
);
4317 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
4318 if (gdbarch_debug
>= 2)
4319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4320 return gdbarch
->frame_num_args (frame
);
4324 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4325 gdbarch_frame_num_args_ftype frame_num_args
)
4327 gdbarch
->frame_num_args
= frame_num_args
;
4331 gdbarch_deprecated_stack_align_p (struct gdbarch
*gdbarch
)
4333 gdb_assert (gdbarch
!= NULL
);
4334 return gdbarch
->deprecated_stack_align
!= NULL
;
4338 gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4340 gdb_assert (gdbarch
!= NULL
);
4341 gdb_assert (gdbarch
->deprecated_stack_align
!= NULL
);
4342 if (gdbarch_debug
>= 2)
4343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_stack_align called\n");
4344 return gdbarch
->deprecated_stack_align (sp
);
4348 set_gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
,
4349 gdbarch_deprecated_stack_align_ftype deprecated_stack_align
)
4351 gdbarch
->deprecated_stack_align
= deprecated_stack_align
;
4355 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4357 gdb_assert (gdbarch
!= NULL
);
4358 return gdbarch
->frame_align
!= NULL
;
4362 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4364 gdb_assert (gdbarch
!= NULL
);
4365 gdb_assert (gdbarch
->frame_align
!= NULL
);
4366 if (gdbarch_debug
>= 2)
4367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4368 return gdbarch
->frame_align (gdbarch
, address
);
4372 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4373 gdbarch_frame_align_ftype frame_align
)
4375 gdbarch
->frame_align
= frame_align
;
4379 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4381 gdb_assert (gdbarch
!= NULL
);
4382 return gdbarch
->deprecated_reg_struct_has_addr
!= NULL
;
4386 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4388 gdb_assert (gdbarch
!= NULL
);
4389 gdb_assert (gdbarch
->deprecated_reg_struct_has_addr
!= NULL
);
4390 if (gdbarch_debug
>= 2)
4391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_reg_struct_has_addr called\n");
4392 return gdbarch
->deprecated_reg_struct_has_addr (gcc_p
, type
);
4396 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4397 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr
)
4399 gdbarch
->deprecated_reg_struct_has_addr
= deprecated_reg_struct_has_addr
;
4403 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
4405 gdb_assert (gdbarch
!= NULL
);
4406 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
4407 if (gdbarch_debug
>= 2)
4408 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
4409 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
4413 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
4414 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
4416 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
4420 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
4422 gdb_assert (gdbarch
!= NULL
);
4423 if (gdbarch_debug
>= 2)
4424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
4425 return gdbarch
->frame_red_zone_size
;
4429 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
4430 int frame_red_zone_size
)
4432 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
4435 const struct floatformat
*
4436 gdbarch_float_format (struct gdbarch
*gdbarch
)
4438 gdb_assert (gdbarch
!= NULL
);
4439 if (gdbarch_debug
>= 2)
4440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4441 return gdbarch
->float_format
;
4445 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4446 const struct floatformat
* float_format
)
4448 gdbarch
->float_format
= float_format
;
4451 const struct floatformat
*
4452 gdbarch_double_format (struct gdbarch
*gdbarch
)
4454 gdb_assert (gdbarch
!= NULL
);
4455 if (gdbarch_debug
>= 2)
4456 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4457 return gdbarch
->double_format
;
4461 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4462 const struct floatformat
* double_format
)
4464 gdbarch
->double_format
= double_format
;
4467 const struct floatformat
*
4468 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4470 gdb_assert (gdbarch
!= NULL
);
4471 if (gdbarch_debug
>= 2)
4472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4473 return gdbarch
->long_double_format
;
4477 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4478 const struct floatformat
* long_double_format
)
4480 gdbarch
->long_double_format
= long_double_format
;
4484 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
4486 gdb_assert (gdbarch
!= NULL
);
4487 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
4488 if (gdbarch_debug
>= 2)
4489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4490 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
4494 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4495 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4497 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4501 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4503 gdb_assert (gdbarch
!= NULL
);
4504 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
4505 if (gdbarch_debug
>= 2)
4506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4507 return gdbarch
->addr_bits_remove (addr
);
4511 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4512 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4514 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4518 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4520 gdb_assert (gdbarch
!= NULL
);
4521 gdb_assert (gdbarch
->smash_text_address
!= NULL
);
4522 if (gdbarch_debug
>= 2)
4523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4524 return gdbarch
->smash_text_address (addr
);
4528 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4529 gdbarch_smash_text_address_ftype smash_text_address
)
4531 gdbarch
->smash_text_address
= smash_text_address
;
4535 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4537 gdb_assert (gdbarch
!= NULL
);
4538 return gdbarch
->software_single_step
!= NULL
;
4542 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4544 gdb_assert (gdbarch
!= NULL
);
4545 gdb_assert (gdbarch
->software_single_step
!= NULL
);
4546 if (gdbarch_debug
>= 2)
4547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4548 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4552 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4553 gdbarch_software_single_step_ftype software_single_step
)
4555 gdbarch
->software_single_step
= software_single_step
;
4559 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
4561 gdb_assert (gdbarch
!= NULL
);
4562 gdb_assert (gdbarch
->print_insn
!= NULL
);
4563 if (gdbarch_debug
>= 2)
4564 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4565 return gdbarch
->print_insn (vma
, info
);
4569 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4570 gdbarch_print_insn_ftype print_insn
)
4572 gdbarch
->print_insn
= print_insn
;
4576 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4578 gdb_assert (gdbarch
!= NULL
);
4579 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
4580 if (gdbarch_debug
>= 2)
4581 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4582 return gdbarch
->skip_trampoline_code (pc
);
4586 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4587 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4589 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4593 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4595 gdb_assert (gdbarch
!= NULL
);
4596 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
4597 if (gdbarch_debug
>= 2)
4598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
4599 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
4603 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
4604 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
4606 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
4610 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4612 gdb_assert (gdbarch
!= NULL
);
4613 gdb_assert (gdbarch
->in_solib_call_trampoline
!= NULL
);
4614 if (gdbarch_debug
>= 2)
4615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4616 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4620 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4621 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4623 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4627 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4629 gdb_assert (gdbarch
!= NULL
);
4630 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
4631 if (gdbarch_debug
>= 2)
4632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4633 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4637 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4638 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4640 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4644 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4646 gdb_assert (gdbarch
!= NULL
);
4647 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
4648 if (gdbarch_debug
>= 2)
4649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4650 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4654 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4655 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4657 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4661 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4663 gdb_assert (gdbarch
!= NULL
);
4664 gdb_assert (gdbarch
->construct_inferior_arguments
!= NULL
);
4665 if (gdbarch_debug
>= 2)
4666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4667 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4671 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4672 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4674 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4678 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4680 gdb_assert (gdbarch
!= NULL
);
4681 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
4682 if (gdbarch_debug
>= 2)
4683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4684 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4688 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4689 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4691 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4695 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4697 gdb_assert (gdbarch
!= NULL
);
4698 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
4699 if (gdbarch_debug
>= 2)
4700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4701 gdbarch
->coff_make_msymbol_special (val
, msym
);
4705 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4706 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4708 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4712 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
4714 gdb_assert (gdbarch
!= NULL
);
4715 /* Skip verify of name_of_malloc, invalid_p == 0 */
4716 if (gdbarch_debug
>= 2)
4717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
4718 return gdbarch
->name_of_malloc
;
4722 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
4723 const char * name_of_malloc
)
4725 gdbarch
->name_of_malloc
= name_of_malloc
;
4729 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
4731 gdb_assert (gdbarch
!= NULL
);
4732 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4733 if (gdbarch_debug
>= 2)
4734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
4735 return gdbarch
->cannot_step_breakpoint
;
4739 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
4740 int cannot_step_breakpoint
)
4742 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
4746 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
4748 gdb_assert (gdbarch
!= NULL
);
4749 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4750 if (gdbarch_debug
>= 2)
4751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
4752 return gdbarch
->have_nonsteppable_watchpoint
;
4756 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
4757 int have_nonsteppable_watchpoint
)
4759 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
4763 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
4765 gdb_assert (gdbarch
!= NULL
);
4766 return gdbarch
->address_class_type_flags
!= NULL
;
4770 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
4772 gdb_assert (gdbarch
!= NULL
);
4773 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
4774 if (gdbarch_debug
>= 2)
4775 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
4776 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
4780 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
4781 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
4783 gdbarch
->address_class_type_flags
= address_class_type_flags
;
4787 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
4789 gdb_assert (gdbarch
!= NULL
);
4790 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
4794 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
4796 gdb_assert (gdbarch
!= NULL
);
4797 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
4798 if (gdbarch_debug
>= 2)
4799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
4800 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
4804 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
4805 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
4807 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
4811 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
4813 gdb_assert (gdbarch
!= NULL
);
4814 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
4818 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
4820 gdb_assert (gdbarch
!= NULL
);
4821 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
4822 if (gdbarch_debug
>= 2)
4823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
4824 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
4828 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
4829 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
4831 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
4835 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
4837 gdb_assert (gdbarch
!= NULL
);
4838 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
4839 if (gdbarch_debug
>= 2)
4840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
4841 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
4845 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
4846 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
4848 gdbarch
->register_reggroup_p
= register_reggroup_p
;
4852 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
4854 gdb_assert (gdbarch
!= NULL
);
4855 return gdbarch
->fetch_pointer_argument
!= NULL
;
4859 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
4861 gdb_assert (gdbarch
!= NULL
);
4862 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
4863 if (gdbarch_debug
>= 2)
4864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
4865 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
4869 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
4870 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
4872 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
4876 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
4878 gdb_assert (gdbarch
!= NULL
);
4879 return gdbarch
->regset_from_core_section
!= NULL
;
4882 const struct regset
*
4883 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
4885 gdb_assert (gdbarch
!= NULL
);
4886 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
4887 if (gdbarch_debug
>= 2)
4888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
4889 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
4893 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
4894 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
4896 gdbarch
->regset_from_core_section
= regset_from_core_section
;
4900 /* Keep a registry of per-architecture data-pointers required by GDB
4907 gdbarch_data_pre_init_ftype
*pre_init
;
4908 gdbarch_data_post_init_ftype
*post_init
;
4911 struct gdbarch_data_registration
4913 struct gdbarch_data
*data
;
4914 struct gdbarch_data_registration
*next
;
4917 struct gdbarch_data_registry
4920 struct gdbarch_data_registration
*registrations
;
4923 struct gdbarch_data_registry gdbarch_data_registry
=
4928 static struct gdbarch_data
*
4929 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4930 gdbarch_data_post_init_ftype
*post_init
)
4932 struct gdbarch_data_registration
**curr
;
4933 /* Append the new registraration. */
4934 for (curr
= &gdbarch_data_registry
.registrations
;
4936 curr
= &(*curr
)->next
);
4937 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4938 (*curr
)->next
= NULL
;
4939 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4940 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4941 (*curr
)->data
->pre_init
= pre_init
;
4942 (*curr
)->data
->post_init
= post_init
;
4943 (*curr
)->data
->init_p
= 1;
4944 return (*curr
)->data
;
4947 struct gdbarch_data
*
4948 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4950 return gdbarch_data_register (pre_init
, NULL
);
4953 struct gdbarch_data
*
4954 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
4956 return gdbarch_data_register (NULL
, post_init
);
4959 /* Create/delete the gdbarch data vector. */
4962 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4964 gdb_assert (gdbarch
->data
== NULL
);
4965 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4966 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
4969 /* Initialize the current value of the specified per-architecture
4973 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
4974 struct gdbarch_data
*data
,
4977 gdb_assert (data
->index
< gdbarch
->nr_data
);
4978 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
4979 gdb_assert (data
->pre_init
== NULL
);
4980 gdbarch
->data
[data
->index
] = pointer
;
4983 /* Return the current value of the specified per-architecture
4987 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
4989 gdb_assert (data
->index
< gdbarch
->nr_data
);
4990 if (gdbarch
->data
[data
->index
] == NULL
)
4992 /* The data-pointer isn't initialized, call init() to get a
4994 if (data
->pre_init
!= NULL
)
4995 /* Mid architecture creation: pass just the obstack, and not
4996 the entire architecture, as that way it isn't possible for
4997 pre-init code to refer to undefined architecture
4999 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
5000 else if (gdbarch
->initialized_p
5001 && data
->post_init
!= NULL
)
5002 /* Post architecture creation: pass the entire architecture
5003 (as all fields are valid), but be careful to also detect
5004 recursive references. */
5006 gdb_assert (data
->init_p
);
5008 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
5012 /* The architecture initialization hasn't completed - punt -
5013 hope that the caller knows what they are doing. Once
5014 deprecated_set_gdbarch_data has been initialized, this can be
5015 changed to an internal error. */
5017 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5019 return gdbarch
->data
[data
->index
];
5024 /* Keep a registry of swapped data required by GDB modules. */
5029 struct gdbarch_swap_registration
*source
;
5030 struct gdbarch_swap
*next
;
5033 struct gdbarch_swap_registration
5036 unsigned long sizeof_data
;
5037 gdbarch_swap_ftype
*init
;
5038 struct gdbarch_swap_registration
*next
;
5041 struct gdbarch_swap_registry
5044 struct gdbarch_swap_registration
*registrations
;
5047 struct gdbarch_swap_registry gdbarch_swap_registry
=
5053 deprecated_register_gdbarch_swap (void *data
,
5054 unsigned long sizeof_data
,
5055 gdbarch_swap_ftype
*init
)
5057 struct gdbarch_swap_registration
**rego
;
5058 for (rego
= &gdbarch_swap_registry
.registrations
;
5060 rego
= &(*rego
)->next
);
5061 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5062 (*rego
)->next
= NULL
;
5063 (*rego
)->init
= init
;
5064 (*rego
)->data
= data
;
5065 (*rego
)->sizeof_data
= sizeof_data
;
5069 current_gdbarch_swap_init_hack (void)
5071 struct gdbarch_swap_registration
*rego
;
5072 struct gdbarch_swap
**curr
= ¤t_gdbarch
->swap
;
5073 for (rego
= gdbarch_swap_registry
.registrations
;
5077 if (rego
->data
!= NULL
)
5079 (*curr
) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch
,
5080 struct gdbarch_swap
);
5081 (*curr
)->source
= rego
;
5082 (*curr
)->swap
= gdbarch_obstack_zalloc (current_gdbarch
,
5084 (*curr
)->next
= NULL
;
5085 curr
= &(*curr
)->next
;
5087 if (rego
->init
!= NULL
)
5092 static struct gdbarch
*
5093 current_gdbarch_swap_out_hack (void)
5095 struct gdbarch
*old_gdbarch
= current_gdbarch
;
5096 struct gdbarch_swap
*curr
;
5098 gdb_assert (old_gdbarch
!= NULL
);
5099 for (curr
= old_gdbarch
->swap
;
5103 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5104 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5106 current_gdbarch
= NULL
;
5111 current_gdbarch_swap_in_hack (struct gdbarch
*new_gdbarch
)
5113 struct gdbarch_swap
*curr
;
5115 gdb_assert (current_gdbarch
== NULL
);
5116 for (curr
= new_gdbarch
->swap
;
5119 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5120 current_gdbarch
= new_gdbarch
;
5124 /* Keep a registry of the architectures known by GDB. */
5126 struct gdbarch_registration
5128 enum bfd_architecture bfd_architecture
;
5129 gdbarch_init_ftype
*init
;
5130 gdbarch_dump_tdep_ftype
*dump_tdep
;
5131 struct gdbarch_list
*arches
;
5132 struct gdbarch_registration
*next
;
5135 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5138 append_name (const char ***buf
, int *nr
, const char *name
)
5140 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5146 gdbarch_printable_names (void)
5148 /* Accumulate a list of names based on the registed list of
5150 enum bfd_architecture a
;
5152 const char **arches
= NULL
;
5153 struct gdbarch_registration
*rego
;
5154 for (rego
= gdbarch_registry
;
5158 const struct bfd_arch_info
*ap
;
5159 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5161 internal_error (__FILE__
, __LINE__
,
5162 "gdbarch_architecture_names: multi-arch unknown");
5165 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5170 append_name (&arches
, &nr_arches
, NULL
);
5176 gdbarch_register (enum bfd_architecture bfd_architecture
,
5177 gdbarch_init_ftype
*init
,
5178 gdbarch_dump_tdep_ftype
*dump_tdep
)
5180 struct gdbarch_registration
**curr
;
5181 const struct bfd_arch_info
*bfd_arch_info
;
5182 /* Check that BFD recognizes this architecture */
5183 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5184 if (bfd_arch_info
== NULL
)
5186 internal_error (__FILE__
, __LINE__
,
5187 "gdbarch: Attempt to register unknown architecture (%d)",
5190 /* Check that we haven't seen this architecture before */
5191 for (curr
= &gdbarch_registry
;
5193 curr
= &(*curr
)->next
)
5195 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5196 internal_error (__FILE__
, __LINE__
,
5197 "gdbarch: Duplicate registraration of architecture (%s)",
5198 bfd_arch_info
->printable_name
);
5202 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5203 bfd_arch_info
->printable_name
,
5206 (*curr
) = XMALLOC (struct gdbarch_registration
);
5207 (*curr
)->bfd_architecture
= bfd_architecture
;
5208 (*curr
)->init
= init
;
5209 (*curr
)->dump_tdep
= dump_tdep
;
5210 (*curr
)->arches
= NULL
;
5211 (*curr
)->next
= NULL
;
5215 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5216 gdbarch_init_ftype
*init
)
5218 gdbarch_register (bfd_architecture
, init
, NULL
);
5222 /* Look for an architecture using gdbarch_info. Base search on only
5223 BFD_ARCH_INFO and BYTE_ORDER. */
5225 struct gdbarch_list
*
5226 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5227 const struct gdbarch_info
*info
)
5229 for (; arches
!= NULL
; arches
= arches
->next
)
5231 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5233 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5235 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5243 /* Find an architecture that matches the specified INFO. Create a new
5244 architecture if needed. Return that new architecture. Assumes
5245 that there is no current architecture. */
5247 static struct gdbarch
*
5248 find_arch_by_info (struct gdbarch
*old_gdbarch
, struct gdbarch_info info
)
5250 struct gdbarch
*new_gdbarch
;
5251 struct gdbarch_registration
*rego
;
5253 /* The existing architecture has been swapped out - all this code
5254 works from a clean slate. */
5255 gdb_assert (current_gdbarch
== NULL
);
5257 /* Fill in missing parts of the INFO struct using a number of
5258 sources: "set ..."; INFOabfd supplied; and the existing
5260 gdbarch_info_fill (old_gdbarch
, &info
);
5262 /* Must have found some sort of architecture. */
5263 gdb_assert (info
.bfd_arch_info
!= NULL
);
5267 fprintf_unfiltered (gdb_stdlog
,
5268 "find_arch_by_info: info.bfd_arch_info %s\n",
5269 (info
.bfd_arch_info
!= NULL
5270 ? info
.bfd_arch_info
->printable_name
5272 fprintf_unfiltered (gdb_stdlog
,
5273 "find_arch_by_info: info.byte_order %d (%s)\n",
5275 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5276 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5278 fprintf_unfiltered (gdb_stdlog
,
5279 "find_arch_by_info: info.osabi %d (%s)\n",
5280 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5281 fprintf_unfiltered (gdb_stdlog
,
5282 "find_arch_by_info: info.abfd 0x%lx\n",
5284 fprintf_unfiltered (gdb_stdlog
,
5285 "find_arch_by_info: info.tdep_info 0x%lx\n",
5286 (long) info
.tdep_info
);
5289 /* Find the tdep code that knows about this architecture. */
5290 for (rego
= gdbarch_registry
;
5293 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5298 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5299 "No matching architecture\n");
5303 /* Ask the tdep code for an architecture that matches "info". */
5304 new_gdbarch
= rego
->init (info
, rego
->arches
);
5306 /* Did the tdep code like it? No. Reject the change and revert to
5307 the old architecture. */
5308 if (new_gdbarch
== NULL
)
5311 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5312 "Target rejected architecture\n");
5316 /* Is this a pre-existing architecture (as determined by already
5317 being initialized)? Move it to the front of the architecture
5318 list (keeping the list sorted Most Recently Used). */
5319 if (new_gdbarch
->initialized_p
)
5321 struct gdbarch_list
**list
;
5322 struct gdbarch_list
*this;
5324 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5325 "Previous architecture 0x%08lx (%s) selected\n",
5327 new_gdbarch
->bfd_arch_info
->printable_name
);
5328 /* Find the existing arch in the list. */
5329 for (list
= ®o
->arches
;
5330 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5331 list
= &(*list
)->next
);
5332 /* It had better be in the list of architectures. */
5333 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5336 (*list
) = this->next
;
5337 /* Insert THIS at the front. */
5338 this->next
= rego
->arches
;
5339 rego
->arches
= this;
5344 /* It's a new architecture. */
5346 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5347 "New architecture 0x%08lx (%s) selected\n",
5349 new_gdbarch
->bfd_arch_info
->printable_name
);
5351 /* Insert the new architecture into the front of the architecture
5352 list (keep the list sorted Most Recently Used). */
5354 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5355 this->next
= rego
->arches
;
5356 this->gdbarch
= new_gdbarch
;
5357 rego
->arches
= this;
5360 /* Check that the newly installed architecture is valid. Plug in
5361 any post init values. */
5362 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5363 verify_gdbarch (new_gdbarch
);
5364 new_gdbarch
->initialized_p
= 1;
5366 /* Initialize any per-architecture swap areas. This phase requires
5367 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5368 swap the entire architecture out. */
5369 current_gdbarch
= new_gdbarch
;
5370 current_gdbarch_swap_init_hack ();
5371 current_gdbarch_swap_out_hack ();
5374 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5380 gdbarch_find_by_info (struct gdbarch_info info
)
5382 /* Save the previously selected architecture, setting the global to
5383 NULL. This stops things like gdbarch->init() trying to use the
5384 previous architecture's configuration. The previous architecture
5385 may not even be of the same architecture family. The most recent
5386 architecture of the same family is found at the head of the
5387 rego->arches list. */
5388 struct gdbarch
*old_gdbarch
= current_gdbarch_swap_out_hack ();
5390 /* Find the specified architecture. */
5391 struct gdbarch
*new_gdbarch
= find_arch_by_info (old_gdbarch
, info
);
5393 /* Restore the existing architecture. */
5394 gdb_assert (current_gdbarch
== NULL
);
5395 current_gdbarch_swap_in_hack (old_gdbarch
);
5400 /* Make the specified architecture current, swapping the existing one
5404 deprecated_current_gdbarch_select_hack (struct gdbarch
*new_gdbarch
)
5406 gdb_assert (new_gdbarch
!= NULL
);
5407 gdb_assert (current_gdbarch
!= NULL
);
5408 gdb_assert (new_gdbarch
->initialized_p
);
5409 current_gdbarch_swap_out_hack ();
5410 current_gdbarch_swap_in_hack (new_gdbarch
);
5411 architecture_changed_event ();
5414 extern void _initialize_gdbarch (void);
5417 _initialize_gdbarch (void)
5419 struct cmd_list_element
*c
;
5421 add_show_from_set (add_set_cmd ("arch",
5424 (char *)&gdbarch_debug
,
5425 "Set architecture debugging.\n\
5426 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5428 c
= add_set_cmd ("archdebug",
5431 (char *)&gdbarch_debug
,
5432 "Set architecture debugging.\n\
5433 When non-zero, architecture debugging is enabled.", &setlist
);
5435 deprecate_cmd (c
, "set debug arch");
5436 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");