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_deprecated_fix_call_dummy_ftype
*deprecated_fix_call_dummy
;
166 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
167 gdbarch_deprecated_do_registers_info_ftype
*deprecated_do_registers_info
;
168 gdbarch_print_registers_info_ftype
*print_registers_info
;
169 gdbarch_print_float_info_ftype
*print_float_info
;
170 gdbarch_print_vector_info_ftype
*print_vector_info
;
171 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
172 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
173 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
174 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
175 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
176 gdbarch_deprecated_pc_in_call_dummy_ftype
*deprecated_pc_in_call_dummy
;
177 gdbarch_deprecated_init_frame_pc_ftype
*deprecated_init_frame_pc
;
178 int believe_pcc_promotion
;
179 gdbarch_deprecated_get_saved_register_ftype
*deprecated_get_saved_register
;
180 gdbarch_deprecated_register_convertible_ftype
*deprecated_register_convertible
;
181 gdbarch_deprecated_register_convert_to_virtual_ftype
*deprecated_register_convert_to_virtual
;
182 gdbarch_deprecated_register_convert_to_raw_ftype
*deprecated_register_convert_to_raw
;
183 gdbarch_convert_register_p_ftype
*convert_register_p
;
184 gdbarch_register_to_value_ftype
*register_to_value
;
185 gdbarch_value_to_register_ftype
*value_to_register
;
186 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
187 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
188 gdbarch_integer_to_address_ftype
*integer_to_address
;
189 gdbarch_deprecated_pop_frame_ftype
*deprecated_pop_frame
;
190 gdbarch_deprecated_store_struct_return_ftype
*deprecated_store_struct_return
;
191 gdbarch_return_value_ftype
*return_value
;
192 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
193 gdbarch_extract_return_value_ftype
*extract_return_value
;
194 gdbarch_store_return_value_ftype
*store_return_value
;
195 gdbarch_deprecated_extract_return_value_ftype
*deprecated_extract_return_value
;
196 gdbarch_deprecated_store_return_value_ftype
*deprecated_store_return_value
;
197 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
198 gdbarch_deprecated_extract_struct_value_address_ftype
*deprecated_extract_struct_value_address
;
199 gdbarch_deprecated_frame_init_saved_regs_ftype
*deprecated_frame_init_saved_regs
;
200 gdbarch_deprecated_init_extra_frame_info_ftype
*deprecated_init_extra_frame_info
;
201 gdbarch_skip_prologue_ftype
*skip_prologue
;
202 gdbarch_inner_than_ftype
*inner_than
;
203 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
204 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
205 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
206 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
207 CORE_ADDR decr_pc_after_break
;
208 CORE_ADDR function_start_offset
;
209 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
210 CORE_ADDR frame_args_skip
;
211 gdbarch_deprecated_frameless_function_invocation_ftype
*deprecated_frameless_function_invocation
;
212 gdbarch_deprecated_frame_chain_ftype
*deprecated_frame_chain
;
213 gdbarch_deprecated_frame_chain_valid_ftype
*deprecated_frame_chain_valid
;
214 gdbarch_deprecated_frame_saved_pc_ftype
*deprecated_frame_saved_pc
;
215 gdbarch_unwind_pc_ftype
*unwind_pc
;
216 gdbarch_unwind_sp_ftype
*unwind_sp
;
217 gdbarch_deprecated_frame_args_address_ftype
*deprecated_frame_args_address
;
218 gdbarch_deprecated_frame_locals_address_ftype
*deprecated_frame_locals_address
;
219 gdbarch_deprecated_saved_pc_after_call_ftype
*deprecated_saved_pc_after_call
;
220 gdbarch_frame_num_args_ftype
*frame_num_args
;
221 gdbarch_deprecated_stack_align_ftype
*deprecated_stack_align
;
222 gdbarch_frame_align_ftype
*frame_align
;
223 gdbarch_deprecated_reg_struct_has_addr_ftype
*deprecated_reg_struct_has_addr
;
224 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
225 int frame_red_zone_size
;
226 const struct floatformat
* float_format
;
227 const struct floatformat
* double_format
;
228 const struct floatformat
* long_double_format
;
229 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
230 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
231 gdbarch_smash_text_address_ftype
*smash_text_address
;
232 gdbarch_software_single_step_ftype
*software_single_step
;
233 gdbarch_print_insn_ftype
*print_insn
;
234 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
235 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
236 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
237 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
238 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
239 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
240 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
241 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
242 const char * name_of_malloc
;
243 int cannot_step_breakpoint
;
244 int have_nonsteppable_watchpoint
;
245 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
246 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
247 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
248 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
249 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
250 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
254 /* The default architecture uses host values (for want of a better
257 extern const struct bfd_arch_info bfd_default_arch_struct
;
259 struct gdbarch startup_gdbarch
=
261 1, /* Always initialized. */
262 NULL
, /* The obstack. */
263 /* basic architecture information */
264 &bfd_default_arch_struct
, /* bfd_arch_info */
265 BFD_ENDIAN_BIG
, /* byte_order */
266 GDB_OSABI_UNKNOWN
, /* osabi */
267 /* target specific vector and its dump routine */
269 /*per-architecture data-pointers and swap regions */
271 /* Multi-arch values */
272 8 * sizeof (short), /* short_bit */
273 8 * sizeof (int), /* int_bit */
274 8 * sizeof (long), /* long_bit */
275 8 * sizeof (LONGEST
), /* long_long_bit */
276 8 * sizeof (float), /* float_bit */
277 8 * sizeof (double), /* double_bit */
278 8 * sizeof (long double), /* long_double_bit */
279 8 * sizeof (void*), /* ptr_bit */
280 8 * sizeof (void*), /* addr_bit */
281 8 * sizeof (void*), /* bfd_vma_bit */
286 0, /* virtual_frame_pointer */
287 0, /* pseudo_register_read */
288 0, /* pseudo_register_write */
290 0, /* num_pseudo_regs */
295 0, /* stab_reg_to_regnum */
296 0, /* ecoff_reg_to_regnum */
297 0, /* dwarf_reg_to_regnum */
298 0, /* sdb_reg_to_regnum */
299 0, /* dwarf2_reg_to_regnum */
300 0, /* register_name */
301 0, /* register_type */
302 0, /* deprecated_register_virtual_type */
303 0, /* deprecated_register_bytes */
304 generic_register_byte
, /* deprecated_register_byte */
305 generic_register_size
, /* deprecated_register_raw_size */
306 generic_register_size
, /* deprecated_register_virtual_size */
307 0, /* deprecated_max_register_raw_size */
308 0, /* deprecated_max_register_virtual_size */
309 0, /* unwind_dummy_id */
310 0, /* deprecated_save_dummy_frame_tos */
311 -1, /* deprecated_fp_regnum */
312 0, /* deprecated_target_read_fp */
313 0, /* push_dummy_call */
314 0, /* deprecated_push_arguments */
315 0, /* deprecated_push_return_address */
316 0, /* deprecated_dummy_write_sp */
317 0, /* deprecated_register_size */
318 0, /* call_dummy_location */
319 0, /* deprecated_fix_call_dummy */
320 0, /* push_dummy_code */
321 0, /* deprecated_do_registers_info */
322 default_print_registers_info
, /* print_registers_info */
323 0, /* print_float_info */
324 0, /* print_vector_info */
325 0, /* register_sim_regno */
326 0, /* register_bytes_ok */
327 0, /* cannot_fetch_register */
328 0, /* cannot_store_register */
329 0, /* get_longjmp_target */
330 deprecated_pc_in_call_dummy
, /* deprecated_pc_in_call_dummy */
331 0, /* deprecated_init_frame_pc */
332 0, /* believe_pcc_promotion */
333 0, /* deprecated_get_saved_register */
334 0, /* deprecated_register_convertible */
335 0, /* deprecated_register_convert_to_virtual */
336 0, /* deprecated_register_convert_to_raw */
337 0, /* convert_register_p */
338 0, /* register_to_value */
339 0, /* value_to_register */
340 0, /* pointer_to_address */
341 0, /* address_to_pointer */
342 0, /* integer_to_address */
343 0, /* deprecated_pop_frame */
344 0, /* deprecated_store_struct_return */
345 0, /* return_value */
346 0, /* return_value_on_stack */
347 0, /* extract_return_value */
348 0, /* store_return_value */
349 0, /* deprecated_extract_return_value */
350 0, /* deprecated_store_return_value */
351 0, /* use_struct_convention */
352 0, /* deprecated_extract_struct_value_address */
353 0, /* deprecated_frame_init_saved_regs */
354 0, /* deprecated_init_extra_frame_info */
355 0, /* skip_prologue */
357 0, /* breakpoint_from_pc */
358 0, /* adjust_breakpoint_address */
359 0, /* memory_insert_breakpoint */
360 0, /* memory_remove_breakpoint */
361 0, /* decr_pc_after_break */
362 0, /* function_start_offset */
363 generic_remote_translate_xfer_address
, /* remote_translate_xfer_address */
364 0, /* frame_args_skip */
365 0, /* deprecated_frameless_function_invocation */
366 0, /* deprecated_frame_chain */
367 0, /* deprecated_frame_chain_valid */
368 0, /* deprecated_frame_saved_pc */
371 get_frame_base
, /* deprecated_frame_args_address */
372 get_frame_base
, /* deprecated_frame_locals_address */
373 0, /* deprecated_saved_pc_after_call */
374 0, /* frame_num_args */
375 0, /* deprecated_stack_align */
377 0, /* deprecated_reg_struct_has_addr */
378 default_stabs_argument_has_addr
, /* stabs_argument_has_addr */
379 0, /* frame_red_zone_size */
380 0, /* float_format */
381 0, /* double_format */
382 0, /* long_double_format */
383 convert_from_func_ptr_addr_identity
, /* convert_from_func_ptr_addr */
384 0, /* addr_bits_remove */
385 0, /* smash_text_address */
386 0, /* software_single_step */
388 0, /* skip_trampoline_code */
389 generic_skip_solib_resolver
, /* skip_solib_resolver */
390 0, /* in_solib_call_trampoline */
391 0, /* in_solib_return_trampoline */
392 generic_in_function_epilogue_p
, /* in_function_epilogue_p */
393 construct_inferior_arguments
, /* construct_inferior_arguments */
394 0, /* elf_make_msymbol_special */
395 0, /* coff_make_msymbol_special */
396 "malloc", /* name_of_malloc */
397 0, /* cannot_step_breakpoint */
398 0, /* have_nonsteppable_watchpoint */
399 0, /* address_class_type_flags */
400 0, /* address_class_type_flags_to_name */
401 0, /* address_class_name_to_type_flags */
402 default_register_reggroup_p
, /* register_reggroup_p */
403 0, /* fetch_pointer_argument */
404 0, /* regset_from_core_section */
405 /* startup_gdbarch() */
408 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
410 /* Create a new ``struct gdbarch'' based on information provided by
411 ``struct gdbarch_info''. */
414 gdbarch_alloc (const struct gdbarch_info
*info
,
415 struct gdbarch_tdep
*tdep
)
417 /* NOTE: The new architecture variable is named ``current_gdbarch''
418 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
419 the current local architecture and not the previous global
420 architecture. This ensures that the new architectures initial
421 values are not influenced by the previous architecture. Once
422 everything is parameterised with gdbarch, this will go away. */
423 struct gdbarch
*current_gdbarch
;
425 /* Create an obstack for allocating all the per-architecture memory,
426 then use that to allocate the architecture vector. */
427 struct obstack
*obstack
= XMALLOC (struct obstack
);
428 obstack_init (obstack
);
429 current_gdbarch
= obstack_alloc (obstack
, sizeof (*current_gdbarch
));
430 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
431 current_gdbarch
->obstack
= obstack
;
433 alloc_gdbarch_data (current_gdbarch
);
435 current_gdbarch
->tdep
= tdep
;
437 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
438 current_gdbarch
->byte_order
= info
->byte_order
;
439 current_gdbarch
->osabi
= info
->osabi
;
441 /* Force the explicit initialization of these. */
442 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
443 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
444 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
445 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
446 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
447 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
448 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
449 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
450 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
451 current_gdbarch
->char_signed
= -1;
452 current_gdbarch
->write_pc
= generic_target_write_pc
;
453 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
454 current_gdbarch
->num_regs
= -1;
455 current_gdbarch
->sp_regnum
= -1;
456 current_gdbarch
->pc_regnum
= -1;
457 current_gdbarch
->ps_regnum
= -1;
458 current_gdbarch
->fp0_regnum
= -1;
459 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
460 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
461 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
462 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
463 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
464 current_gdbarch
->deprecated_register_byte
= generic_register_byte
;
465 current_gdbarch
->deprecated_register_raw_size
= generic_register_size
;
466 current_gdbarch
->deprecated_register_virtual_size
= generic_register_size
;
467 current_gdbarch
->deprecated_fp_regnum
= -1;
468 current_gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
469 current_gdbarch
->print_registers_info
= default_print_registers_info
;
470 current_gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
471 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
472 current_gdbarch
->cannot_store_register
= cannot_register_not
;
473 current_gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
474 current_gdbarch
->convert_register_p
= legacy_convert_register_p
;
475 current_gdbarch
->register_to_value
= legacy_register_to_value
;
476 current_gdbarch
->value_to_register
= legacy_value_to_register
;
477 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
478 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
479 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
480 current_gdbarch
->extract_return_value
= legacy_extract_return_value
;
481 current_gdbarch
->store_return_value
= legacy_store_return_value
;
482 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
483 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
484 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
485 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
486 current_gdbarch
->deprecated_frame_args_address
= get_frame_base
;
487 current_gdbarch
->deprecated_frame_locals_address
= get_frame_base
;
488 current_gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
489 current_gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
490 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
491 current_gdbarch
->smash_text_address
= core_addr_identity
;
492 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
493 current_gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
494 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
495 current_gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
496 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
497 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
498 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
499 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
500 current_gdbarch
->name_of_malloc
= "malloc";
501 current_gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
502 /* gdbarch_alloc() */
504 return current_gdbarch
;
508 /* Allocate extra space using the per-architecture obstack. */
511 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
513 void *data
= obstack_alloc (arch
->obstack
, size
);
514 memset (data
, 0, size
);
519 /* Free a gdbarch struct. This should never happen in normal
520 operation --- once you've created a gdbarch, you keep it around.
521 However, if an architecture's init function encounters an error
522 building the structure, it may need to clean up a partially
523 constructed gdbarch. */
526 gdbarch_free (struct gdbarch
*arch
)
528 struct obstack
*obstack
;
529 gdb_assert (arch
!= NULL
);
530 gdb_assert (!arch
->initialized_p
);
531 obstack
= arch
->obstack
;
532 obstack_free (obstack
, 0); /* Includes the ARCH. */
537 /* Ensure that all values in a GDBARCH are reasonable. */
539 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
540 just happens to match the global variable ``current_gdbarch''. That
541 way macros refering to that variable get the local and not the global
542 version - ulgh. Once everything is parameterised with gdbarch, this
546 verify_gdbarch (struct gdbarch
*current_gdbarch
)
549 struct cleanup
*cleanups
;
552 log
= mem_fileopen ();
553 cleanups
= make_cleanup_ui_file_delete (log
);
555 if (current_gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
556 fprintf_unfiltered (log
, "\n\tbyte-order");
557 if (current_gdbarch
->bfd_arch_info
== NULL
)
558 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
559 /* Check those that need to be defined for the given multi-arch level. */
560 /* Skip verify of short_bit, invalid_p == 0 */
561 /* Skip verify of int_bit, invalid_p == 0 */
562 /* Skip verify of long_bit, invalid_p == 0 */
563 /* Skip verify of long_long_bit, invalid_p == 0 */
564 /* Skip verify of float_bit, invalid_p == 0 */
565 /* Skip verify of double_bit, invalid_p == 0 */
566 /* Skip verify of long_double_bit, invalid_p == 0 */
567 /* Skip verify of ptr_bit, invalid_p == 0 */
568 if (current_gdbarch
->addr_bit
== 0)
569 current_gdbarch
->addr_bit
= TARGET_PTR_BIT
;
570 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
571 if (current_gdbarch
->char_signed
== -1)
572 current_gdbarch
->char_signed
= 1;
573 /* Skip verify of read_pc, has predicate */
574 /* Skip verify of write_pc, invalid_p == 0 */
575 /* Skip verify of read_sp, has predicate */
576 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
577 /* Skip verify of pseudo_register_read, has predicate */
578 /* Skip verify of pseudo_register_write, has predicate */
579 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
580 && (current_gdbarch
->num_regs
== -1))
581 fprintf_unfiltered (log
, "\n\tnum_regs");
582 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
583 /* Skip verify of sp_regnum, invalid_p == 0 */
584 /* Skip verify of pc_regnum, invalid_p == 0 */
585 /* Skip verify of ps_regnum, invalid_p == 0 */
586 /* Skip verify of fp0_regnum, invalid_p == 0 */
587 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
588 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
589 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
590 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
591 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
592 /* Skip verify of register_type, has predicate */
593 /* Skip verify of deprecated_register_virtual_type, has predicate */
594 /* Skip verify of deprecated_register_byte, has predicate */
595 /* Skip verify of deprecated_register_raw_size, has predicate */
596 /* Skip verify of deprecated_register_virtual_size, has predicate */
597 /* Skip verify of deprecated_max_register_raw_size, has predicate */
598 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
599 /* Skip verify of unwind_dummy_id, has predicate */
600 /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
601 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
602 /* Skip verify of deprecated_target_read_fp, has predicate */
603 /* Skip verify of push_dummy_call, has predicate */
604 /* Skip verify of deprecated_push_arguments, has predicate */
605 /* Skip verify of deprecated_push_return_address, has predicate */
606 /* Skip verify of deprecated_dummy_write_sp, has predicate */
607 /* Skip verify of call_dummy_location, invalid_p == 0 */
608 /* Skip verify of deprecated_fix_call_dummy, has predicate */
609 /* Skip verify of push_dummy_code, has predicate */
610 /* Skip verify of deprecated_do_registers_info, has predicate */
611 /* Skip verify of print_registers_info, invalid_p == 0 */
612 /* Skip verify of print_float_info, has predicate */
613 /* Skip verify of print_vector_info, has predicate */
614 /* Skip verify of register_sim_regno, invalid_p == 0 */
615 /* Skip verify of register_bytes_ok, has predicate */
616 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
617 /* Skip verify of cannot_store_register, invalid_p == 0 */
618 /* Skip verify of get_longjmp_target, has predicate */
619 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
620 /* Skip verify of deprecated_init_frame_pc, has predicate */
621 /* Skip verify of deprecated_get_saved_register, has predicate */
622 /* Skip verify of deprecated_register_convertible, has predicate */
623 /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
624 /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
625 /* Skip verify of convert_register_p, invalid_p == 0 */
626 /* Skip verify of register_to_value, invalid_p == 0 */
627 /* Skip verify of value_to_register, invalid_p == 0 */
628 /* Skip verify of pointer_to_address, invalid_p == 0 */
629 /* Skip verify of address_to_pointer, invalid_p == 0 */
630 /* Skip verify of integer_to_address, has predicate */
631 /* Skip verify of deprecated_pop_frame, has predicate */
632 /* Skip verify of deprecated_store_struct_return, has predicate */
633 /* Skip verify of return_value, has predicate */
634 /* Skip verify of return_value_on_stack, invalid_p == 0 */
635 /* Skip verify of extract_return_value, invalid_p == 0 */
636 /* Skip verify of store_return_value, invalid_p == 0 */
637 /* Skip verify of use_struct_convention, invalid_p == 0 */
638 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
639 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
640 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
641 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
642 && (current_gdbarch
->skip_prologue
== 0))
643 fprintf_unfiltered (log
, "\n\tskip_prologue");
644 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
645 && (current_gdbarch
->inner_than
== 0))
646 fprintf_unfiltered (log
, "\n\tinner_than");
647 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
648 && (current_gdbarch
->breakpoint_from_pc
== 0))
649 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
650 /* Skip verify of adjust_breakpoint_address, has predicate */
651 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
652 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
653 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
654 /* Skip verify of function_start_offset, invalid_p == 0 */
655 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
656 /* Skip verify of frame_args_skip, invalid_p == 0 */
657 /* Skip verify of deprecated_frameless_function_invocation, has predicate */
658 /* Skip verify of deprecated_frame_chain, has predicate */
659 /* Skip verify of deprecated_frame_chain_valid, has predicate */
660 /* Skip verify of deprecated_frame_saved_pc, has predicate */
661 /* Skip verify of unwind_pc, has predicate */
662 /* Skip verify of unwind_sp, has predicate */
663 /* Skip verify of deprecated_frame_args_address, has predicate */
664 /* Skip verify of deprecated_frame_locals_address, has predicate */
665 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
666 /* Skip verify of frame_num_args, has predicate */
667 /* Skip verify of deprecated_stack_align, has predicate */
668 /* Skip verify of frame_align, has predicate */
669 /* Skip verify of deprecated_reg_struct_has_addr, has predicate */
670 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
671 if (current_gdbarch
->float_format
== 0)
672 current_gdbarch
->float_format
= default_float_format (current_gdbarch
);
673 if (current_gdbarch
->double_format
== 0)
674 current_gdbarch
->double_format
= default_double_format (current_gdbarch
);
675 if (current_gdbarch
->long_double_format
== 0)
676 current_gdbarch
->long_double_format
= default_double_format (current_gdbarch
);
677 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
678 /* Skip verify of addr_bits_remove, invalid_p == 0 */
679 /* Skip verify of smash_text_address, invalid_p == 0 */
680 /* Skip verify of software_single_step, has predicate */
681 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
682 && (current_gdbarch
->print_insn
== 0))
683 fprintf_unfiltered (log
, "\n\tprint_insn");
684 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
685 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
686 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
687 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
688 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
689 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
690 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
691 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
692 /* Skip verify of name_of_malloc, invalid_p == 0 */
693 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
694 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
695 /* Skip verify of address_class_type_flags, has predicate */
696 /* Skip verify of address_class_type_flags_to_name, has predicate */
697 /* Skip verify of address_class_name_to_type_flags, has predicate */
698 /* Skip verify of register_reggroup_p, invalid_p == 0 */
699 /* Skip verify of fetch_pointer_argument, has predicate */
700 /* Skip verify of regset_from_core_section, has predicate */
701 buf
= ui_file_xstrdup (log
, &dummy
);
702 make_cleanup (xfree
, buf
);
703 if (strlen (buf
) > 0)
704 internal_error (__FILE__
, __LINE__
,
705 "verify_gdbarch: the following are invalid ...%s",
707 do_cleanups (cleanups
);
711 /* Print out the details of the current architecture. */
713 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
714 just happens to match the global variable ``current_gdbarch''. That
715 way macros refering to that variable get the local and not the global
716 version - ulgh. Once everything is parameterised with gdbarch, this
720 gdbarch_dump (struct gdbarch
*current_gdbarch
, struct ui_file
*file
)
722 fprintf_unfiltered (file
,
723 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
725 fprintf_unfiltered (file
,
726 "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n",
727 (long) current_gdbarch
->convert_from_func_ptr_addr
);
728 fprintf_unfiltered (file
,
729 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
730 gdbarch_frame_align_p (current_gdbarch
));
731 fprintf_unfiltered (file
,
732 "gdbarch_dump: frame_align = 0x%08lx\n",
733 (long) current_gdbarch
->frame_align
);
734 fprintf_unfiltered (file
,
735 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
736 gdbarch_regset_from_core_section_p (current_gdbarch
));
737 fprintf_unfiltered (file
,
738 "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
739 (long) current_gdbarch
->regset_from_core_section
);
740 fprintf_unfiltered (file
,
741 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
742 gdbarch_return_value_p (current_gdbarch
));
743 fprintf_unfiltered (file
,
744 "gdbarch_dump: return_value = 0x%08lx\n",
745 (long) current_gdbarch
->return_value
);
746 fprintf_unfiltered (file
,
747 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
748 (long) current_gdbarch
->in_function_epilogue_p
);
749 fprintf_unfiltered (file
,
750 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
751 (long) current_gdbarch
->register_reggroup_p
);
752 fprintf_unfiltered (file
,
753 "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
754 (long) current_gdbarch
->stabs_argument_has_addr
);
755 fprintf_unfiltered (file
,
756 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
757 gdbarch_pseudo_register_read_p (current_gdbarch
));
758 fprintf_unfiltered (file
,
759 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
760 (long) current_gdbarch
->pseudo_register_read
);
761 fprintf_unfiltered (file
,
762 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
763 gdbarch_pseudo_register_write_p (current_gdbarch
));
764 fprintf_unfiltered (file
,
765 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
766 (long) current_gdbarch
->pseudo_register_write
);
767 fprintf_unfiltered (file
,
768 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
769 gdbarch_address_class_name_to_type_flags_p (current_gdbarch
));
770 fprintf_unfiltered (file
,
771 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
772 (long) current_gdbarch
->address_class_name_to_type_flags
);
773 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
774 fprintf_unfiltered (file
,
775 "gdbarch_dump: %s # %s\n",
776 "ADDRESS_CLASS_TYPE_FLAGS_P()",
777 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
778 fprintf_unfiltered (file
,
779 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
780 ADDRESS_CLASS_TYPE_FLAGS_P ());
782 #ifdef ADDRESS_CLASS_TYPE_FLAGS
783 fprintf_unfiltered (file
,
784 "gdbarch_dump: %s # %s\n",
785 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
786 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size
, dwarf2_addr_class
)));
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
789 (long) current_gdbarch
->address_class_type_flags
790 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
792 fprintf_unfiltered (file
,
793 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
794 gdbarch_address_class_type_flags_to_name_p (current_gdbarch
));
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
797 (long) current_gdbarch
->address_class_type_flags_to_name
);
798 #ifdef ADDRESS_TO_POINTER
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: %s # %s\n",
801 "ADDRESS_TO_POINTER(type, buf, addr)",
802 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
805 (long) current_gdbarch
->address_to_pointer
806 /*ADDRESS_TO_POINTER ()*/);
808 #ifdef ADDR_BITS_REMOVE
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: %s # %s\n",
811 "ADDR_BITS_REMOVE(addr)",
812 XSTRING (ADDR_BITS_REMOVE (addr
)));
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
815 (long) current_gdbarch
->addr_bits_remove
816 /*ADDR_BITS_REMOVE ()*/);
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
820 gdbarch_adjust_breakpoint_address_p (current_gdbarch
));
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n",
823 (long) current_gdbarch
->adjust_breakpoint_address
);
824 #ifdef BELIEVE_PCC_PROMOTION
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
827 XSTRING (BELIEVE_PCC_PROMOTION
));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
830 BELIEVE_PCC_PROMOTION
);
832 #ifdef BREAKPOINT_FROM_PC
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: %s # %s\n",
835 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
836 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
839 (long) current_gdbarch
->breakpoint_from_pc
840 /*BREAKPOINT_FROM_PC ()*/);
842 #ifdef CALL_DUMMY_LOCATION
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
845 XSTRING (CALL_DUMMY_LOCATION
));
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
848 CALL_DUMMY_LOCATION
);
850 #ifdef CANNOT_FETCH_REGISTER
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: %s # %s\n",
853 "CANNOT_FETCH_REGISTER(regnum)",
854 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
857 (long) current_gdbarch
->cannot_fetch_register
858 /*CANNOT_FETCH_REGISTER ()*/);
860 #ifdef CANNOT_STEP_BREAKPOINT
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
863 XSTRING (CANNOT_STEP_BREAKPOINT
));
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
866 CANNOT_STEP_BREAKPOINT
);
868 #ifdef CANNOT_STORE_REGISTER
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: %s # %s\n",
871 "CANNOT_STORE_REGISTER(regnum)",
872 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
875 (long) current_gdbarch
->cannot_store_register
876 /*CANNOT_STORE_REGISTER ()*/);
878 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: %s # %s\n",
881 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
882 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
885 (long) current_gdbarch
->coff_make_msymbol_special
886 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
890 (long) current_gdbarch
->construct_inferior_arguments
);
891 #ifdef CONVERT_REGISTER_P
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: %s # %s\n",
894 "CONVERT_REGISTER_P(regnum, type)",
895 XSTRING (CONVERT_REGISTER_P (regnum
, type
)));
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
898 (long) current_gdbarch
->convert_register_p
899 /*CONVERT_REGISTER_P ()*/);
901 #ifdef DECR_PC_AFTER_BREAK
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
904 XSTRING (DECR_PC_AFTER_BREAK
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
907 (long) DECR_PC_AFTER_BREAK
);
909 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: %s # %s\n",
912 "DEPRECATED_DO_REGISTERS_INFO_P()",
913 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
916 DEPRECATED_DO_REGISTERS_INFO_P ());
918 #ifdef DEPRECATED_DO_REGISTERS_INFO
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: %s # %s\n",
921 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
922 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr
, fpregs
)));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
925 (long) current_gdbarch
->deprecated_do_registers_info
926 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
928 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: %s # %s\n",
931 "DEPRECATED_DUMMY_WRITE_SP_P()",
932 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
935 DEPRECATED_DUMMY_WRITE_SP_P ());
937 #ifdef DEPRECATED_DUMMY_WRITE_SP
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: %s # %s\n",
940 "DEPRECATED_DUMMY_WRITE_SP(val)",
941 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val
)));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
944 (long) current_gdbarch
->deprecated_dummy_write_sp
945 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
947 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: %s # %s\n",
950 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
951 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
954 (long) current_gdbarch
->deprecated_extract_return_value
955 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
957 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: %s # %s\n",
960 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
961 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
964 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
966 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: %s # %s\n",
969 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
970 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache
)));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
973 (long) current_gdbarch
->deprecated_extract_struct_value_address
974 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
976 #ifdef DEPRECATED_FIX_CALL_DUMMY_P
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: %s # %s\n",
979 "DEPRECATED_FIX_CALL_DUMMY_P()",
980 XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ()));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n",
983 DEPRECATED_FIX_CALL_DUMMY_P ());
985 #ifdef DEPRECATED_FIX_CALL_DUMMY
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: %s # %s\n",
988 "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
989 XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n",
992 (long) current_gdbarch
->deprecated_fix_call_dummy
993 /*DEPRECATED_FIX_CALL_DUMMY ()*/);
995 #ifdef DEPRECATED_FP_REGNUM
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
998 XSTRING (DEPRECATED_FP_REGNUM
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
1001 DEPRECATED_FP_REGNUM
);
1003 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: %s # %s\n",
1006 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
1007 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n",
1010 DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ());
1012 #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: %s # %s\n",
1015 "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
1016 XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi
)));
1017 fprintf_unfiltered (file
,
1018 "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1019 (long) current_gdbarch
->deprecated_frameless_function_invocation
1020 /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/);
1022 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: %s # %s\n",
1025 "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
1026 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
1029 DEPRECATED_FRAME_ARGS_ADDRESS_P ());
1031 #ifdef DEPRECATED_FRAME_ARGS_ADDRESS
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: %s # %s\n",
1034 "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
1035 XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi
)));
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1038 (long) current_gdbarch
->deprecated_frame_args_address
1039 /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
1041 #ifdef DEPRECATED_FRAME_CHAIN_P
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: %s # %s\n",
1044 "DEPRECATED_FRAME_CHAIN_P()",
1045 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1048 DEPRECATED_FRAME_CHAIN_P ());
1050 #ifdef DEPRECATED_FRAME_CHAIN
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: %s # %s\n",
1053 "DEPRECATED_FRAME_CHAIN(frame)",
1054 XSTRING (DEPRECATED_FRAME_CHAIN (frame
)));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1057 (long) current_gdbarch
->deprecated_frame_chain
1058 /*DEPRECATED_FRAME_CHAIN ()*/);
1060 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1061 fprintf_unfiltered (file
,
1062 "gdbarch_dump: %s # %s\n",
1063 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1064 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1067 DEPRECATED_FRAME_CHAIN_VALID_P ());
1069 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: %s # %s\n",
1072 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1073 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain
, thisframe
)));
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1076 (long) current_gdbarch
->deprecated_frame_chain_valid
1077 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1079 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: %s # %s\n",
1082 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1083 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1086 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1088 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: %s # %s\n",
1091 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1092 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame
)));
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1095 (long) current_gdbarch
->deprecated_frame_init_saved_regs
1096 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1098 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: %s # %s\n",
1101 "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
1102 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
1103 fprintf_unfiltered (file
,
1104 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
1105 DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
1107 #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: %s # %s\n",
1110 "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
1111 XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi
)));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1114 (long) current_gdbarch
->deprecated_frame_locals_address
1115 /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
1117 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: %s # %s\n",
1120 "DEPRECATED_FRAME_SAVED_PC_P()",
1121 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1124 DEPRECATED_FRAME_SAVED_PC_P ());
1126 #ifdef DEPRECATED_FRAME_SAVED_PC
1127 fprintf_unfiltered (file
,
1128 "gdbarch_dump: %s # %s\n",
1129 "DEPRECATED_FRAME_SAVED_PC(fi)",
1130 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi
)));
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1133 (long) current_gdbarch
->deprecated_frame_saved_pc
1134 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1136 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: %s # %s\n",
1139 "DEPRECATED_GET_SAVED_REGISTER_P()",
1140 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1143 DEPRECATED_GET_SAVED_REGISTER_P ());
1145 #ifdef DEPRECATED_GET_SAVED_REGISTER
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: %s # %s\n",
1148 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1149 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1152 (long) current_gdbarch
->deprecated_get_saved_register
1153 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1155 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: %s # %s\n",
1158 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1159 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1162 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1164 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: %s # %s\n",
1167 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1168 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1171 (long) current_gdbarch
->deprecated_init_extra_frame_info
1172 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1174 #ifdef DEPRECATED_INIT_FRAME_PC_P
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "DEPRECATED_INIT_FRAME_PC_P()",
1178 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1181 DEPRECATED_INIT_FRAME_PC_P ());
1183 #ifdef DEPRECATED_INIT_FRAME_PC
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1187 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf
, prev
)));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1190 (long) current_gdbarch
->deprecated_init_frame_pc
1191 /*DEPRECATED_INIT_FRAME_PC ()*/);
1193 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1197 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1200 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1202 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1205 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE
));
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1208 DEPRECATED_MAX_REGISTER_RAW_SIZE
);
1210 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1214 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1217 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1219 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1222 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
));
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1225 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
);
1227 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1228 fprintf_unfiltered (file
,
1229 "gdbarch_dump: %s # %s\n",
1230 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1231 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1234 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1236 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1240 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1243 (long) current_gdbarch
->deprecated_pc_in_call_dummy
1244 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1246 #ifdef DEPRECATED_POP_FRAME_P
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "DEPRECATED_POP_FRAME_P()",
1250 XSTRING (DEPRECATED_POP_FRAME_P ()));
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1253 DEPRECATED_POP_FRAME_P ());
1255 #ifdef DEPRECATED_POP_FRAME
1256 fprintf_unfiltered (file
,
1257 "gdbarch_dump: %s # %s\n",
1258 "DEPRECATED_POP_FRAME(-)",
1259 XSTRING (DEPRECATED_POP_FRAME (-)));
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1262 (long) current_gdbarch
->deprecated_pop_frame
1263 /*DEPRECATED_POP_FRAME ()*/);
1265 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: %s # %s\n",
1268 "DEPRECATED_PUSH_ARGUMENTS_P()",
1269 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1272 DEPRECATED_PUSH_ARGUMENTS_P ());
1274 #ifdef DEPRECATED_PUSH_ARGUMENTS
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: %s # %s\n",
1277 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1278 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1281 (long) current_gdbarch
->deprecated_push_arguments
1282 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1284 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1288 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1291 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1293 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1294 fprintf_unfiltered (file
,
1295 "gdbarch_dump: %s # %s\n",
1296 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1297 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc
, sp
)));
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1300 (long) current_gdbarch
->deprecated_push_return_address
1301 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1303 #ifdef DEPRECATED_REGISTER_BYTE_P
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: %s # %s\n",
1306 "DEPRECATED_REGISTER_BYTE_P()",
1307 XSTRING (DEPRECATED_REGISTER_BYTE_P ()));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n",
1310 DEPRECATED_REGISTER_BYTE_P ());
1312 #ifdef DEPRECATED_REGISTER_BYTE
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: %s # %s\n",
1315 "DEPRECATED_REGISTER_BYTE(reg_nr)",
1316 XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr
)));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n",
1319 (long) current_gdbarch
->deprecated_register_byte
1320 /*DEPRECATED_REGISTER_BYTE ()*/);
1322 #ifdef DEPRECATED_REGISTER_BYTES
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n",
1325 XSTRING (DEPRECATED_REGISTER_BYTES
));
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
1328 DEPRECATED_REGISTER_BYTES
);
1330 #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: %s # %s\n",
1333 "DEPRECATED_REGISTER_CONVERTIBLE_P()",
1334 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ()));
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n",
1337 DEPRECATED_REGISTER_CONVERTIBLE_P ());
1339 #ifdef DEPRECATED_REGISTER_CONVERTIBLE
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: %s # %s\n",
1342 "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
1343 XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr
)));
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
1346 (long) current_gdbarch
->deprecated_register_convertible
1347 /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
1349 #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: %s # %s\n",
1352 "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1353 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
1356 (long) current_gdbarch
->deprecated_register_convert_to_raw
1357 /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
1359 #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1363 XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
1366 (long) current_gdbarch
->deprecated_register_convert_to_virtual
1367 /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
1369 #ifdef DEPRECATED_REGISTER_RAW_SIZE_P
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: %s # %s\n",
1372 "DEPRECATED_REGISTER_RAW_SIZE_P()",
1373 XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n",
1376 DEPRECATED_REGISTER_RAW_SIZE_P ());
1378 #ifdef DEPRECATED_REGISTER_RAW_SIZE
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: %s # %s\n",
1381 "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
1382 XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr
)));
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n",
1385 (long) current_gdbarch
->deprecated_register_raw_size
1386 /*DEPRECATED_REGISTER_RAW_SIZE ()*/);
1388 #ifdef DEPRECATED_REGISTER_SIZE
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
1391 XSTRING (DEPRECATED_REGISTER_SIZE
));
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n",
1394 DEPRECATED_REGISTER_SIZE
);
1396 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: %s # %s\n",
1399 "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
1400 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1403 DEPRECATED_REGISTER_VIRTUAL_SIZE_P ());
1405 #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
1406 fprintf_unfiltered (file
,
1407 "gdbarch_dump: %s # %s\n",
1408 "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
1409 XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr
)));
1410 fprintf_unfiltered (file
,
1411 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
1412 (long) current_gdbarch
->deprecated_register_virtual_size
1413 /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/);
1415 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: %s # %s\n",
1418 "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()",
1419 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()));
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n",
1422 DEPRECATED_REGISTER_VIRTUAL_TYPE_P ());
1424 #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE
1425 fprintf_unfiltered (file
,
1426 "gdbarch_dump: %s # %s\n",
1427 "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)",
1428 XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr
)));
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
1431 (long) current_gdbarch
->deprecated_register_virtual_type
1432 /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/);
1434 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: %s # %s\n",
1437 "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
1438 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n",
1441 DEPRECATED_REG_STRUCT_HAS_ADDR_P ());
1443 #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: %s # %s\n",
1446 "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
1447 XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
1450 (long) current_gdbarch
->deprecated_reg_struct_has_addr
1451 /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/);
1453 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1457 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1460 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1462 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: %s # %s\n",
1465 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1466 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame
)));
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1469 (long) current_gdbarch
->deprecated_saved_pc_after_call
1470 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1472 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: %s # %s\n",
1475 "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
1476 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
1479 DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
1481 #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: %s # %s\n",
1484 "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
1485 XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp
)));
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
1488 (long) current_gdbarch
->deprecated_save_dummy_frame_tos
1489 /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
1491 #ifdef DEPRECATED_STACK_ALIGN_P
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: %s # %s\n",
1494 "DEPRECATED_STACK_ALIGN_P()",
1495 XSTRING (DEPRECATED_STACK_ALIGN_P ()));
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n",
1498 DEPRECATED_STACK_ALIGN_P ());
1500 #ifdef DEPRECATED_STACK_ALIGN
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: %s # %s\n",
1503 "DEPRECATED_STACK_ALIGN(sp)",
1504 XSTRING (DEPRECATED_STACK_ALIGN (sp
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n",
1507 (long) current_gdbarch
->deprecated_stack_align
1508 /*DEPRECATED_STACK_ALIGN ()*/);
1510 #ifdef DEPRECATED_STORE_RETURN_VALUE
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1514 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type
, valbuf
)));
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1517 (long) current_gdbarch
->deprecated_store_return_value
1518 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1520 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1521 fprintf_unfiltered (file
,
1522 "gdbarch_dump: %s # %s\n",
1523 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1524 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1527 DEPRECATED_STORE_STRUCT_RETURN_P ());
1529 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: %s # %s\n",
1532 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1533 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr
, sp
)));
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1536 (long) current_gdbarch
->deprecated_store_struct_return
1537 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1539 #ifdef DEPRECATED_TARGET_READ_FP_P
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: %s # %s\n",
1542 "DEPRECATED_TARGET_READ_FP_P()",
1543 XSTRING (DEPRECATED_TARGET_READ_FP_P ()));
1544 fprintf_unfiltered (file
,
1545 "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n",
1546 DEPRECATED_TARGET_READ_FP_P ());
1548 #ifdef DEPRECATED_TARGET_READ_FP
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: %s # %s\n",
1551 "DEPRECATED_TARGET_READ_FP()",
1552 XSTRING (DEPRECATED_TARGET_READ_FP ()));
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n",
1555 (long) current_gdbarch
->deprecated_target_read_fp
1556 /*DEPRECATED_TARGET_READ_FP ()*/);
1558 #ifdef DWARF2_REG_TO_REGNUM
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: %s # %s\n",
1561 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1562 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1565 (long) current_gdbarch
->dwarf2_reg_to_regnum
1566 /*DWARF2_REG_TO_REGNUM ()*/);
1568 #ifdef DWARF_REG_TO_REGNUM
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: %s # %s\n",
1571 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1572 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1575 (long) current_gdbarch
->dwarf_reg_to_regnum
1576 /*DWARF_REG_TO_REGNUM ()*/);
1578 #ifdef ECOFF_REG_TO_REGNUM
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: %s # %s\n",
1581 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1582 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1585 (long) current_gdbarch
->ecoff_reg_to_regnum
1586 /*ECOFF_REG_TO_REGNUM ()*/);
1588 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: %s # %s\n",
1591 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1592 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1595 (long) current_gdbarch
->elf_make_msymbol_special
1596 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1598 #ifdef EXTRACT_RETURN_VALUE
1599 fprintf_unfiltered (file
,
1600 "gdbarch_dump: %s # %s\n",
1601 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1602 XSTRING (EXTRACT_RETURN_VALUE (type
, regcache
, valbuf
)));
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1605 (long) current_gdbarch
->extract_return_value
1606 /*EXTRACT_RETURN_VALUE ()*/);
1608 #ifdef FETCH_POINTER_ARGUMENT_P
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: %s # %s\n",
1611 "FETCH_POINTER_ARGUMENT_P()",
1612 XSTRING (FETCH_POINTER_ARGUMENT_P ()));
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
1615 FETCH_POINTER_ARGUMENT_P ());
1617 #ifdef FETCH_POINTER_ARGUMENT
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: %s # %s\n",
1620 "FETCH_POINTER_ARGUMENT(frame, argi, type)",
1621 XSTRING (FETCH_POINTER_ARGUMENT (frame
, argi
, type
)));
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
1624 (long) current_gdbarch
->fetch_pointer_argument
1625 /*FETCH_POINTER_ARGUMENT ()*/);
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: FP0_REGNUM # %s\n",
1630 XSTRING (FP0_REGNUM
));
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: FP0_REGNUM = %d\n",
1635 #ifdef FRAME_ARGS_SKIP
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1638 XSTRING (FRAME_ARGS_SKIP
));
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1641 (long) FRAME_ARGS_SKIP
);
1643 #ifdef FRAME_NUM_ARGS_P
1644 fprintf_unfiltered (file
,
1645 "gdbarch_dump: %s # %s\n",
1646 "FRAME_NUM_ARGS_P()",
1647 XSTRING (FRAME_NUM_ARGS_P ()));
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
1650 FRAME_NUM_ARGS_P ());
1652 #ifdef FRAME_NUM_ARGS
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: %s # %s\n",
1655 "FRAME_NUM_ARGS(frame)",
1656 XSTRING (FRAME_NUM_ARGS (frame
)));
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1659 (long) current_gdbarch
->frame_num_args
1660 /*FRAME_NUM_ARGS ()*/);
1662 #ifdef FRAME_RED_ZONE_SIZE
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
1665 XSTRING (FRAME_RED_ZONE_SIZE
));
1666 fprintf_unfiltered (file
,
1667 "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
1668 FRAME_RED_ZONE_SIZE
);
1670 #ifdef FUNCTION_START_OFFSET
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1673 XSTRING (FUNCTION_START_OFFSET
));
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1676 (long) FUNCTION_START_OFFSET
);
1678 #ifdef GET_LONGJMP_TARGET_P
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: %s # %s\n",
1681 "GET_LONGJMP_TARGET_P()",
1682 XSTRING (GET_LONGJMP_TARGET_P ()));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1685 GET_LONGJMP_TARGET_P ());
1687 #ifdef GET_LONGJMP_TARGET
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: %s # %s\n",
1690 "GET_LONGJMP_TARGET(pc)",
1691 XSTRING (GET_LONGJMP_TARGET (pc
)));
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1694 (long) current_gdbarch
->get_longjmp_target
1695 /*GET_LONGJMP_TARGET ()*/);
1697 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1700 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT
));
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1703 HAVE_NONSTEPPABLE_WATCHPOINT
);
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: %s # %s\n",
1708 "INNER_THAN(lhs, rhs)",
1709 XSTRING (INNER_THAN (lhs
, rhs
)));
1710 fprintf_unfiltered (file
,
1711 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1712 (long) current_gdbarch
->inner_than
1715 #ifdef INTEGER_TO_ADDRESS_P
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: %s # %s\n",
1718 "INTEGER_TO_ADDRESS_P()",
1719 XSTRING (INTEGER_TO_ADDRESS_P ()));
1720 fprintf_unfiltered (file
,
1721 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1722 INTEGER_TO_ADDRESS_P ());
1724 #ifdef INTEGER_TO_ADDRESS
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: %s # %s\n",
1727 "INTEGER_TO_ADDRESS(type, buf)",
1728 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1731 (long) current_gdbarch
->integer_to_address
1732 /*INTEGER_TO_ADDRESS ()*/);
1734 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: %s # %s\n",
1737 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1738 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1741 (long) current_gdbarch
->in_solib_call_trampoline
1742 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1744 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1745 fprintf_unfiltered (file
,
1746 "gdbarch_dump: %s # %s\n",
1747 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1748 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc
, name
)));
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1751 (long) current_gdbarch
->in_solib_return_trampoline
1752 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1754 #ifdef MEMORY_INSERT_BREAKPOINT
1755 fprintf_unfiltered (file
,
1756 "gdbarch_dump: %s # %s\n",
1757 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1758 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1761 (long) current_gdbarch
->memory_insert_breakpoint
1762 /*MEMORY_INSERT_BREAKPOINT ()*/);
1764 #ifdef MEMORY_REMOVE_BREAKPOINT
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: %s # %s\n",
1767 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1768 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1771 (long) current_gdbarch
->memory_remove_breakpoint
1772 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1774 #ifdef NAME_OF_MALLOC
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1777 XSTRING (NAME_OF_MALLOC
));
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1782 #ifdef NUM_PSEUDO_REGS
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1785 XSTRING (NUM_PSEUDO_REGS
));
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: NUM_REGS # %s\n",
1793 XSTRING (NUM_REGS
));
1794 fprintf_unfiltered (file
,
1795 "gdbarch_dump: NUM_REGS = %d\n",
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: PC_REGNUM # %s\n",
1801 XSTRING (PC_REGNUM
));
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: PC_REGNUM = %d\n",
1806 #ifdef POINTER_TO_ADDRESS
1807 fprintf_unfiltered (file
,
1808 "gdbarch_dump: %s # %s\n",
1809 "POINTER_TO_ADDRESS(type, buf)",
1810 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1813 (long) current_gdbarch
->pointer_to_address
1814 /*POINTER_TO_ADDRESS ()*/);
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1818 gdbarch_print_float_info_p (current_gdbarch
));
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: print_float_info = 0x%08lx\n",
1821 (long) current_gdbarch
->print_float_info
);
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1824 (long) current_gdbarch
->print_registers_info
);
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1827 gdbarch_print_vector_info_p (current_gdbarch
));
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1830 (long) current_gdbarch
->print_vector_info
);
1832 fprintf_unfiltered (file
,
1833 "gdbarch_dump: PS_REGNUM # %s\n",
1834 XSTRING (PS_REGNUM
));
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: PS_REGNUM = %d\n",
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1841 gdbarch_push_dummy_call_p (current_gdbarch
));
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1844 (long) current_gdbarch
->push_dummy_call
);
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1847 gdbarch_push_dummy_code_p (current_gdbarch
));
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: push_dummy_code = 0x%08lx\n",
1850 (long) current_gdbarch
->push_dummy_code
);
1851 #ifdef REGISTER_BYTES_OK_P
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: %s # %s\n",
1854 "REGISTER_BYTES_OK_P()",
1855 XSTRING (REGISTER_BYTES_OK_P ()));
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1858 REGISTER_BYTES_OK_P ());
1860 #ifdef REGISTER_BYTES_OK
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: %s # %s\n",
1863 "REGISTER_BYTES_OK(nr_bytes)",
1864 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1867 (long) current_gdbarch
->register_bytes_ok
1868 /*REGISTER_BYTES_OK ()*/);
1870 #ifdef REGISTER_NAME
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: %s # %s\n",
1873 "REGISTER_NAME(regnr)",
1874 XSTRING (REGISTER_NAME (regnr
)));
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
1877 (long) current_gdbarch
->register_name
1878 /*REGISTER_NAME ()*/);
1880 #ifdef REGISTER_SIM_REGNO
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: %s # %s\n",
1883 "REGISTER_SIM_REGNO(reg_nr)",
1884 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
1887 (long) current_gdbarch
->register_sim_regno
1888 /*REGISTER_SIM_REGNO ()*/);
1890 #ifdef REGISTER_TO_VALUE
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: %s # %s\n",
1893 "REGISTER_TO_VALUE(frame, regnum, type, buf)",
1894 XSTRING (REGISTER_TO_VALUE (frame
, regnum
, type
, buf
)));
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
1897 (long) current_gdbarch
->register_to_value
1898 /*REGISTER_TO_VALUE ()*/);
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1902 gdbarch_register_type_p (current_gdbarch
));
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: register_type = 0x%08lx\n",
1905 (long) current_gdbarch
->register_type
);
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
1908 (long) current_gdbarch
->remote_translate_xfer_address
);
1909 #ifdef RETURN_VALUE_ON_STACK
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: %s # %s\n",
1912 "RETURN_VALUE_ON_STACK(type)",
1913 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
1916 (long) current_gdbarch
->return_value_on_stack
1917 /*RETURN_VALUE_ON_STACK ()*/);
1919 #ifdef SDB_REG_TO_REGNUM
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: %s # %s\n",
1922 "SDB_REG_TO_REGNUM(sdb_regnr)",
1923 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
1926 (long) current_gdbarch
->sdb_reg_to_regnum
1927 /*SDB_REG_TO_REGNUM ()*/);
1929 #ifdef SKIP_PROLOGUE
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: %s # %s\n",
1932 "SKIP_PROLOGUE(ip)",
1933 XSTRING (SKIP_PROLOGUE (ip
)));
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
1936 (long) current_gdbarch
->skip_prologue
1937 /*SKIP_PROLOGUE ()*/);
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: skip_solib_resolver = 0x%08lx\n",
1941 (long) current_gdbarch
->skip_solib_resolver
);
1942 #ifdef SKIP_TRAMPOLINE_CODE
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: %s # %s\n",
1945 "SKIP_TRAMPOLINE_CODE(pc)",
1946 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
1949 (long) current_gdbarch
->skip_trampoline_code
1950 /*SKIP_TRAMPOLINE_CODE ()*/);
1952 #ifdef SMASH_TEXT_ADDRESS
1953 fprintf_unfiltered (file
,
1954 "gdbarch_dump: %s # %s\n",
1955 "SMASH_TEXT_ADDRESS(addr)",
1956 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
1959 (long) current_gdbarch
->smash_text_address
1960 /*SMASH_TEXT_ADDRESS ()*/);
1962 #ifdef SOFTWARE_SINGLE_STEP_P
1963 fprintf_unfiltered (file
,
1964 "gdbarch_dump: %s # %s\n",
1965 "SOFTWARE_SINGLE_STEP_P()",
1966 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
1969 SOFTWARE_SINGLE_STEP_P ());
1971 #ifdef SOFTWARE_SINGLE_STEP
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: %s # %s\n",
1974 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1975 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
1978 (long) current_gdbarch
->software_single_step
1979 /*SOFTWARE_SINGLE_STEP ()*/);
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: SP_REGNUM # %s\n",
1984 XSTRING (SP_REGNUM
));
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: SP_REGNUM = %d\n",
1989 #ifdef STAB_REG_TO_REGNUM
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: %s # %s\n",
1992 "STAB_REG_TO_REGNUM(stab_regnr)",
1993 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
1996 (long) current_gdbarch
->stab_reg_to_regnum
1997 /*STAB_REG_TO_REGNUM ()*/);
1999 #ifdef STORE_RETURN_VALUE
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: %s # %s\n",
2002 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2003 XSTRING (STORE_RETURN_VALUE (type
, regcache
, valbuf
)));
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2006 (long) current_gdbarch
->store_return_value
2007 /*STORE_RETURN_VALUE ()*/);
2009 #ifdef TARGET_ADDR_BIT
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2012 XSTRING (TARGET_ADDR_BIT
));
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2017 #ifdef TARGET_ARCHITECTURE
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2020 XSTRING (TARGET_ARCHITECTURE
));
2021 if (TARGET_ARCHITECTURE
!= NULL
)
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2024 TARGET_ARCHITECTURE
->printable_name
);
2026 #ifdef TARGET_BFD_VMA_BIT
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2029 XSTRING (TARGET_BFD_VMA_BIT
));
2030 fprintf_unfiltered (file
,
2031 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2032 TARGET_BFD_VMA_BIT
);
2034 #ifdef TARGET_BYTE_ORDER
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2037 XSTRING (TARGET_BYTE_ORDER
));
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2040 (long) TARGET_BYTE_ORDER
);
2042 #ifdef TARGET_CHAR_SIGNED
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2045 XSTRING (TARGET_CHAR_SIGNED
));
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2048 TARGET_CHAR_SIGNED
);
2050 #ifdef TARGET_DOUBLE_BIT
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2053 XSTRING (TARGET_DOUBLE_BIT
));
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2058 #ifdef TARGET_DOUBLE_FORMAT
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2061 XSTRING (TARGET_DOUBLE_FORMAT
));
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2064 (TARGET_DOUBLE_FORMAT
)->name
);
2066 #ifdef TARGET_FLOAT_BIT
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2069 XSTRING (TARGET_FLOAT_BIT
));
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2074 #ifdef TARGET_FLOAT_FORMAT
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2077 XSTRING (TARGET_FLOAT_FORMAT
));
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2080 (TARGET_FLOAT_FORMAT
)->name
);
2082 #ifdef TARGET_INT_BIT
2083 fprintf_unfiltered (file
,
2084 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2085 XSTRING (TARGET_INT_BIT
));
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2090 #ifdef TARGET_LONG_BIT
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2093 XSTRING (TARGET_LONG_BIT
));
2094 fprintf_unfiltered (file
,
2095 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2098 #ifdef TARGET_LONG_DOUBLE_BIT
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2101 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2102 fprintf_unfiltered (file
,
2103 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2104 TARGET_LONG_DOUBLE_BIT
);
2106 #ifdef TARGET_LONG_DOUBLE_FORMAT
2107 fprintf_unfiltered (file
,
2108 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2109 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2112 (TARGET_LONG_DOUBLE_FORMAT
)->name
);
2114 #ifdef TARGET_LONG_LONG_BIT
2115 fprintf_unfiltered (file
,
2116 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2117 XSTRING (TARGET_LONG_LONG_BIT
));
2118 fprintf_unfiltered (file
,
2119 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2120 TARGET_LONG_LONG_BIT
);
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: TARGET_OSABI # %s\n",
2125 XSTRING (TARGET_OSABI
));
2126 fprintf_unfiltered (file
,
2127 "gdbarch_dump: TARGET_OSABI = %ld\n",
2128 (long) TARGET_OSABI
);
2130 #ifdef TARGET_PRINT_INSN
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: %s # %s\n",
2133 "TARGET_PRINT_INSN(vma, info)",
2134 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2137 (long) current_gdbarch
->print_insn
2138 /*TARGET_PRINT_INSN ()*/);
2140 #ifdef TARGET_PTR_BIT
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2143 XSTRING (TARGET_PTR_BIT
));
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2148 #ifdef TARGET_READ_PC_P
2149 fprintf_unfiltered (file
,
2150 "gdbarch_dump: %s # %s\n",
2151 "TARGET_READ_PC_P()",
2152 XSTRING (TARGET_READ_PC_P ()));
2153 fprintf_unfiltered (file
,
2154 "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
2155 TARGET_READ_PC_P ());
2157 #ifdef TARGET_READ_PC
2158 fprintf_unfiltered (file
,
2159 "gdbarch_dump: %s # %s\n",
2160 "TARGET_READ_PC(ptid)",
2161 XSTRING (TARGET_READ_PC (ptid
)));
2162 fprintf_unfiltered (file
,
2163 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2164 (long) current_gdbarch
->read_pc
2165 /*TARGET_READ_PC ()*/);
2167 #ifdef TARGET_READ_SP_P
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: %s # %s\n",
2170 "TARGET_READ_SP_P()",
2171 XSTRING (TARGET_READ_SP_P ()));
2172 fprintf_unfiltered (file
,
2173 "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
2174 TARGET_READ_SP_P ());
2176 #ifdef TARGET_READ_SP
2177 fprintf_unfiltered (file
,
2178 "gdbarch_dump: %s # %s\n",
2180 XSTRING (TARGET_READ_SP ()));
2181 fprintf_unfiltered (file
,
2182 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2183 (long) current_gdbarch
->read_sp
2184 /*TARGET_READ_SP ()*/);
2186 #ifdef TARGET_SHORT_BIT
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2189 XSTRING (TARGET_SHORT_BIT
));
2190 fprintf_unfiltered (file
,
2191 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2194 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2195 fprintf_unfiltered (file
,
2196 "gdbarch_dump: %s # %s\n",
2197 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2198 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2199 fprintf_unfiltered (file
,
2200 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2201 (long) current_gdbarch
->virtual_frame_pointer
2202 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2204 #ifdef TARGET_WRITE_PC
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: %s # %s\n",
2207 "TARGET_WRITE_PC(val, ptid)",
2208 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2209 fprintf_unfiltered (file
,
2210 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2211 (long) current_gdbarch
->write_pc
2212 /*TARGET_WRITE_PC ()*/);
2214 fprintf_unfiltered (file
,
2215 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2216 gdbarch_unwind_dummy_id_p (current_gdbarch
));
2217 fprintf_unfiltered (file
,
2218 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2219 (long) current_gdbarch
->unwind_dummy_id
);
2220 fprintf_unfiltered (file
,
2221 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2222 gdbarch_unwind_pc_p (current_gdbarch
));
2223 fprintf_unfiltered (file
,
2224 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2225 (long) current_gdbarch
->unwind_pc
);
2226 fprintf_unfiltered (file
,
2227 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
2228 gdbarch_unwind_sp_p (current_gdbarch
));
2229 fprintf_unfiltered (file
,
2230 "gdbarch_dump: unwind_sp = 0x%08lx\n",
2231 (long) current_gdbarch
->unwind_sp
);
2232 #ifdef USE_STRUCT_CONVENTION
2233 fprintf_unfiltered (file
,
2234 "gdbarch_dump: %s # %s\n",
2235 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2236 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2237 fprintf_unfiltered (file
,
2238 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2239 (long) current_gdbarch
->use_struct_convention
2240 /*USE_STRUCT_CONVENTION ()*/);
2242 #ifdef VALUE_TO_REGISTER
2243 fprintf_unfiltered (file
,
2244 "gdbarch_dump: %s # %s\n",
2245 "VALUE_TO_REGISTER(frame, regnum, type, buf)",
2246 XSTRING (VALUE_TO_REGISTER (frame
, regnum
, type
, buf
)));
2247 fprintf_unfiltered (file
,
2248 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2249 (long) current_gdbarch
->value_to_register
2250 /*VALUE_TO_REGISTER ()*/);
2252 if (current_gdbarch
->dump_tdep
!= NULL
)
2253 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2256 struct gdbarch_tdep
*
2257 gdbarch_tdep (struct gdbarch
*gdbarch
)
2259 if (gdbarch_debug
>= 2)
2260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2261 return gdbarch
->tdep
;
2265 const struct bfd_arch_info
*
2266 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2268 gdb_assert (gdbarch
!= NULL
);
2269 if (gdbarch_debug
>= 2)
2270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2271 return gdbarch
->bfd_arch_info
;
2275 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2277 gdb_assert (gdbarch
!= NULL
);
2278 if (gdbarch_debug
>= 2)
2279 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2280 return gdbarch
->byte_order
;
2284 gdbarch_osabi (struct gdbarch
*gdbarch
)
2286 gdb_assert (gdbarch
!= NULL
);
2287 if (gdbarch_debug
>= 2)
2288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
2289 return gdbarch
->osabi
;
2293 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2295 gdb_assert (gdbarch
!= NULL
);
2296 /* Skip verify of short_bit, invalid_p == 0 */
2297 if (gdbarch_debug
>= 2)
2298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2299 return gdbarch
->short_bit
;
2303 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2306 gdbarch
->short_bit
= short_bit
;
2310 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2312 gdb_assert (gdbarch
!= NULL
);
2313 /* Skip verify of int_bit, invalid_p == 0 */
2314 if (gdbarch_debug
>= 2)
2315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2316 return gdbarch
->int_bit
;
2320 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2323 gdbarch
->int_bit
= int_bit
;
2327 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2329 gdb_assert (gdbarch
!= NULL
);
2330 /* Skip verify of long_bit, invalid_p == 0 */
2331 if (gdbarch_debug
>= 2)
2332 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2333 return gdbarch
->long_bit
;
2337 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2340 gdbarch
->long_bit
= long_bit
;
2344 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2346 gdb_assert (gdbarch
!= NULL
);
2347 /* Skip verify of long_long_bit, invalid_p == 0 */
2348 if (gdbarch_debug
>= 2)
2349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2350 return gdbarch
->long_long_bit
;
2354 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2357 gdbarch
->long_long_bit
= long_long_bit
;
2361 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2363 gdb_assert (gdbarch
!= NULL
);
2364 /* Skip verify of float_bit, invalid_p == 0 */
2365 if (gdbarch_debug
>= 2)
2366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2367 return gdbarch
->float_bit
;
2371 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2374 gdbarch
->float_bit
= float_bit
;
2378 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2380 gdb_assert (gdbarch
!= NULL
);
2381 /* Skip verify of double_bit, invalid_p == 0 */
2382 if (gdbarch_debug
>= 2)
2383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2384 return gdbarch
->double_bit
;
2388 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2391 gdbarch
->double_bit
= double_bit
;
2395 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2397 gdb_assert (gdbarch
!= NULL
);
2398 /* Skip verify of long_double_bit, invalid_p == 0 */
2399 if (gdbarch_debug
>= 2)
2400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2401 return gdbarch
->long_double_bit
;
2405 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2406 int long_double_bit
)
2408 gdbarch
->long_double_bit
= long_double_bit
;
2412 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2414 gdb_assert (gdbarch
!= NULL
);
2415 /* Skip verify of ptr_bit, invalid_p == 0 */
2416 if (gdbarch_debug
>= 2)
2417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2418 return gdbarch
->ptr_bit
;
2422 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2425 gdbarch
->ptr_bit
= ptr_bit
;
2429 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2431 gdb_assert (gdbarch
!= NULL
);
2432 /* Check variable changed from pre-default. */
2433 gdb_assert (gdbarch
->addr_bit
!= 0);
2434 if (gdbarch_debug
>= 2)
2435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2436 return gdbarch
->addr_bit
;
2440 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2443 gdbarch
->addr_bit
= addr_bit
;
2447 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2449 gdb_assert (gdbarch
!= NULL
);
2450 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2451 if (gdbarch_debug
>= 2)
2452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2453 return gdbarch
->bfd_vma_bit
;
2457 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2460 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2464 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2466 gdb_assert (gdbarch
!= NULL
);
2467 /* Check variable changed from pre-default. */
2468 gdb_assert (gdbarch
->char_signed
!= -1);
2469 if (gdbarch_debug
>= 2)
2470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2471 return gdbarch
->char_signed
;
2475 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2478 gdbarch
->char_signed
= char_signed
;
2482 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
2484 gdb_assert (gdbarch
!= NULL
);
2485 return gdbarch
->read_pc
!= NULL
;
2489 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2491 gdb_assert (gdbarch
!= NULL
);
2492 gdb_assert (gdbarch
->read_pc
!= NULL
);
2493 if (gdbarch_debug
>= 2)
2494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2495 return gdbarch
->read_pc (ptid
);
2499 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2500 gdbarch_read_pc_ftype read_pc
)
2502 gdbarch
->read_pc
= read_pc
;
2506 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2508 gdb_assert (gdbarch
!= NULL
);
2509 gdb_assert (gdbarch
->write_pc
!= NULL
);
2510 if (gdbarch_debug
>= 2)
2511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2512 gdbarch
->write_pc (val
, ptid
);
2516 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2517 gdbarch_write_pc_ftype write_pc
)
2519 gdbarch
->write_pc
= write_pc
;
2523 gdbarch_read_sp_p (struct gdbarch
*gdbarch
)
2525 gdb_assert (gdbarch
!= NULL
);
2526 return gdbarch
->read_sp
!= NULL
;
2530 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2532 gdb_assert (gdbarch
!= NULL
);
2533 gdb_assert (gdbarch
->read_sp
!= NULL
);
2534 if (gdbarch_debug
>= 2)
2535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2536 return gdbarch
->read_sp ();
2540 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2541 gdbarch_read_sp_ftype read_sp
)
2543 gdbarch
->read_sp
= read_sp
;
2547 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2549 gdb_assert (gdbarch
!= NULL
);
2550 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
2551 if (gdbarch_debug
>= 2)
2552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2553 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2557 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2558 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2560 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2564 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
2566 gdb_assert (gdbarch
!= NULL
);
2567 return gdbarch
->pseudo_register_read
!= NULL
;
2571 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, void *buf
)
2573 gdb_assert (gdbarch
!= NULL
);
2574 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
2575 if (gdbarch_debug
>= 2)
2576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
2577 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
2581 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
2582 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
2584 gdbarch
->pseudo_register_read
= pseudo_register_read
;
2588 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
2590 gdb_assert (gdbarch
!= NULL
);
2591 return gdbarch
->pseudo_register_write
!= NULL
;
2595 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const void *buf
)
2597 gdb_assert (gdbarch
!= NULL
);
2598 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
2599 if (gdbarch_debug
>= 2)
2600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
2601 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
2605 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
2606 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
2608 gdbarch
->pseudo_register_write
= pseudo_register_write
;
2612 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2614 gdb_assert (gdbarch
!= NULL
);
2615 /* Check variable changed from pre-default. */
2616 gdb_assert (gdbarch
->num_regs
!= -1);
2617 if (gdbarch_debug
>= 2)
2618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2619 return gdbarch
->num_regs
;
2623 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2626 gdbarch
->num_regs
= num_regs
;
2630 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2632 gdb_assert (gdbarch
!= NULL
);
2633 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2634 if (gdbarch_debug
>= 2)
2635 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2636 return gdbarch
->num_pseudo_regs
;
2640 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2641 int num_pseudo_regs
)
2643 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2647 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2649 gdb_assert (gdbarch
!= NULL
);
2650 /* Skip verify of sp_regnum, invalid_p == 0 */
2651 if (gdbarch_debug
>= 2)
2652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2653 return gdbarch
->sp_regnum
;
2657 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2660 gdbarch
->sp_regnum
= sp_regnum
;
2664 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2666 gdb_assert (gdbarch
!= NULL
);
2667 /* Skip verify of pc_regnum, invalid_p == 0 */
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2670 return gdbarch
->pc_regnum
;
2674 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2677 gdbarch
->pc_regnum
= pc_regnum
;
2681 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2683 gdb_assert (gdbarch
!= NULL
);
2684 /* Skip verify of ps_regnum, invalid_p == 0 */
2685 if (gdbarch_debug
>= 2)
2686 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2687 return gdbarch
->ps_regnum
;
2691 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2694 gdbarch
->ps_regnum
= ps_regnum
;
2698 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2700 gdb_assert (gdbarch
!= NULL
);
2701 /* Skip verify of fp0_regnum, invalid_p == 0 */
2702 if (gdbarch_debug
>= 2)
2703 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2704 return gdbarch
->fp0_regnum
;
2708 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2711 gdbarch
->fp0_regnum
= fp0_regnum
;
2715 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2717 gdb_assert (gdbarch
!= NULL
);
2718 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2721 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2725 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2726 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2728 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2732 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2734 gdb_assert (gdbarch
!= NULL
);
2735 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
2736 if (gdbarch_debug
>= 2)
2737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2738 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2742 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2743 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2745 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2749 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2751 gdb_assert (gdbarch
!= NULL
);
2752 gdb_assert (gdbarch
->dwarf_reg_to_regnum
!= NULL
);
2753 if (gdbarch_debug
>= 2)
2754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2755 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2759 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2760 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2762 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2766 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2768 gdb_assert (gdbarch
!= NULL
);
2769 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
2770 if (gdbarch_debug
>= 2)
2771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2772 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2776 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2777 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2779 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2783 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2785 gdb_assert (gdbarch
!= NULL
);
2786 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
2787 if (gdbarch_debug
>= 2)
2788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2789 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2793 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2794 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2796 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2800 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2802 gdb_assert (gdbarch
!= NULL
);
2803 gdb_assert (gdbarch
->register_name
!= NULL
);
2804 if (gdbarch_debug
>= 2)
2805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2806 return gdbarch
->register_name (regnr
);
2810 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2811 gdbarch_register_name_ftype register_name
)
2813 gdbarch
->register_name
= register_name
;
2817 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
2819 gdb_assert (gdbarch
!= NULL
);
2820 return gdbarch
->register_type
!= NULL
;
2824 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
2826 gdb_assert (gdbarch
!= NULL
);
2827 gdb_assert (gdbarch
->register_type
!= NULL
);
2828 if (gdbarch_debug
>= 2)
2829 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
2830 return gdbarch
->register_type (gdbarch
, reg_nr
);
2834 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
2835 gdbarch_register_type_ftype register_type
)
2837 gdbarch
->register_type
= register_type
;
2841 gdbarch_deprecated_register_virtual_type_p (struct gdbarch
*gdbarch
)
2843 gdb_assert (gdbarch
!= NULL
);
2844 return gdbarch
->deprecated_register_virtual_type
!= NULL
;
2848 gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2850 gdb_assert (gdbarch
!= NULL
);
2851 gdb_assert (gdbarch
->deprecated_register_virtual_type
!= NULL
);
2852 if (gdbarch_debug
>= 2)
2853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_type called\n");
2854 return gdbarch
->deprecated_register_virtual_type (reg_nr
);
2858 set_gdbarch_deprecated_register_virtual_type (struct gdbarch
*gdbarch
,
2859 gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type
)
2861 gdbarch
->deprecated_register_virtual_type
= deprecated_register_virtual_type
;
2865 gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
)
2867 gdb_assert (gdbarch
!= NULL
);
2868 if (gdbarch_debug
>= 2)
2869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_bytes called\n");
2870 return gdbarch
->deprecated_register_bytes
;
2874 set_gdbarch_deprecated_register_bytes (struct gdbarch
*gdbarch
,
2875 int deprecated_register_bytes
)
2877 gdbarch
->deprecated_register_bytes
= deprecated_register_bytes
;
2881 gdbarch_deprecated_register_byte_p (struct gdbarch
*gdbarch
)
2883 gdb_assert (gdbarch
!= NULL
);
2884 return gdbarch
->deprecated_register_byte
!= generic_register_byte
;
2888 gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2890 gdb_assert (gdbarch
!= NULL
);
2891 gdb_assert (gdbarch
->deprecated_register_byte
!= NULL
);
2892 /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */
2893 if (gdbarch_debug
>= 2)
2894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_byte called\n");
2895 return gdbarch
->deprecated_register_byte (reg_nr
);
2899 set_gdbarch_deprecated_register_byte (struct gdbarch
*gdbarch
,
2900 gdbarch_deprecated_register_byte_ftype deprecated_register_byte
)
2902 gdbarch
->deprecated_register_byte
= deprecated_register_byte
;
2906 gdbarch_deprecated_register_raw_size_p (struct gdbarch
*gdbarch
)
2908 gdb_assert (gdbarch
!= NULL
);
2909 return gdbarch
->deprecated_register_raw_size
!= generic_register_size
;
2913 gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2915 gdb_assert (gdbarch
!= NULL
);
2916 gdb_assert (gdbarch
->deprecated_register_raw_size
!= NULL
);
2917 /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
2918 if (gdbarch_debug
>= 2)
2919 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_raw_size called\n");
2920 return gdbarch
->deprecated_register_raw_size (reg_nr
);
2924 set_gdbarch_deprecated_register_raw_size (struct gdbarch
*gdbarch
,
2925 gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size
)
2927 gdbarch
->deprecated_register_raw_size
= deprecated_register_raw_size
;
2931 gdbarch_deprecated_register_virtual_size_p (struct gdbarch
*gdbarch
)
2933 gdb_assert (gdbarch
!= NULL
);
2934 return gdbarch
->deprecated_register_virtual_size
!= generic_register_size
;
2938 gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2940 gdb_assert (gdbarch
!= NULL
);
2941 gdb_assert (gdbarch
->deprecated_register_virtual_size
!= NULL
);
2942 /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
2943 if (gdbarch_debug
>= 2)
2944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_virtual_size called\n");
2945 return gdbarch
->deprecated_register_virtual_size (reg_nr
);
2949 set_gdbarch_deprecated_register_virtual_size (struct gdbarch
*gdbarch
,
2950 gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size
)
2952 gdbarch
->deprecated_register_virtual_size
= deprecated_register_virtual_size
;
2956 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch
*gdbarch
)
2958 gdb_assert (gdbarch
!= NULL
);
2959 return gdbarch
->deprecated_max_register_raw_size
!= 0;
2963 gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
)
2965 gdb_assert (gdbarch
!= NULL
);
2966 if (gdbarch_debug
>= 2)
2967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_raw_size called\n");
2968 return gdbarch
->deprecated_max_register_raw_size
;
2972 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch
*gdbarch
,
2973 int deprecated_max_register_raw_size
)
2975 gdbarch
->deprecated_max_register_raw_size
= deprecated_max_register_raw_size
;
2979 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch
*gdbarch
)
2981 gdb_assert (gdbarch
!= NULL
);
2982 return gdbarch
->deprecated_max_register_virtual_size
!= 0;
2986 gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
)
2988 gdb_assert (gdbarch
!= NULL
);
2989 if (gdbarch_debug
>= 2)
2990 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_max_register_virtual_size called\n");
2991 return gdbarch
->deprecated_max_register_virtual_size
;
2995 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch
*gdbarch
,
2996 int deprecated_max_register_virtual_size
)
2998 gdbarch
->deprecated_max_register_virtual_size
= deprecated_max_register_virtual_size
;
3002 gdbarch_unwind_dummy_id_p (struct gdbarch
*gdbarch
)
3004 gdb_assert (gdbarch
!= NULL
);
3005 return gdbarch
->unwind_dummy_id
!= NULL
;
3009 gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*info
)
3011 gdb_assert (gdbarch
!= NULL
);
3012 gdb_assert (gdbarch
->unwind_dummy_id
!= NULL
);
3013 if (gdbarch_debug
>= 2)
3014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_dummy_id called\n");
3015 return gdbarch
->unwind_dummy_id (gdbarch
, info
);
3019 set_gdbarch_unwind_dummy_id (struct gdbarch
*gdbarch
,
3020 gdbarch_unwind_dummy_id_ftype unwind_dummy_id
)
3022 gdbarch
->unwind_dummy_id
= unwind_dummy_id
;
3026 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
3028 gdb_assert (gdbarch
!= NULL
);
3029 return gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
;
3033 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3035 gdb_assert (gdbarch
!= NULL
);
3036 gdb_assert (gdbarch
->deprecated_save_dummy_frame_tos
!= NULL
);
3037 if (gdbarch_debug
>= 2)
3038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_save_dummy_frame_tos called\n");
3039 gdbarch
->deprecated_save_dummy_frame_tos (sp
);
3043 set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
3044 gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos
)
3046 gdbarch
->deprecated_save_dummy_frame_tos
= deprecated_save_dummy_frame_tos
;
3050 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
3052 gdb_assert (gdbarch
!= NULL
);
3053 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
3054 if (gdbarch_debug
>= 2)
3055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
3056 return gdbarch
->deprecated_fp_regnum
;
3060 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
3061 int deprecated_fp_regnum
)
3063 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
3067 gdbarch_deprecated_target_read_fp_p (struct gdbarch
*gdbarch
)
3069 gdb_assert (gdbarch
!= NULL
);
3070 return gdbarch
->deprecated_target_read_fp
!= NULL
;
3074 gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
)
3076 gdb_assert (gdbarch
!= NULL
);
3077 gdb_assert (gdbarch
->deprecated_target_read_fp
!= NULL
);
3078 if (gdbarch_debug
>= 2)
3079 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_target_read_fp called\n");
3080 return gdbarch
->deprecated_target_read_fp ();
3084 set_gdbarch_deprecated_target_read_fp (struct gdbarch
*gdbarch
,
3085 gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp
)
3087 gdbarch
->deprecated_target_read_fp
= deprecated_target_read_fp
;
3091 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
3093 gdb_assert (gdbarch
!= NULL
);
3094 return gdbarch
->push_dummy_call
!= NULL
;
3098 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
)
3100 gdb_assert (gdbarch
!= NULL
);
3101 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
3102 if (gdbarch_debug
>= 2)
3103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
3104 return gdbarch
->push_dummy_call (gdbarch
, func_addr
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
3108 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
3109 gdbarch_push_dummy_call_ftype push_dummy_call
)
3111 gdbarch
->push_dummy_call
= push_dummy_call
;
3115 gdbarch_deprecated_push_arguments_p (struct gdbarch
*gdbarch
)
3117 gdb_assert (gdbarch
!= NULL
);
3118 return gdbarch
->deprecated_push_arguments
!= NULL
;
3122 gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3124 gdb_assert (gdbarch
!= NULL
);
3125 gdb_assert (gdbarch
->deprecated_push_arguments
!= NULL
);
3126 if (gdbarch_debug
>= 2)
3127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_arguments called\n");
3128 return gdbarch
->deprecated_push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3132 set_gdbarch_deprecated_push_arguments (struct gdbarch
*gdbarch
,
3133 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments
)
3135 gdbarch
->deprecated_push_arguments
= deprecated_push_arguments
;
3139 gdbarch_deprecated_push_return_address_p (struct gdbarch
*gdbarch
)
3141 gdb_assert (gdbarch
!= NULL
);
3142 return gdbarch
->deprecated_push_return_address
!= NULL
;
3146 gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3148 gdb_assert (gdbarch
!= NULL
);
3149 gdb_assert (gdbarch
->deprecated_push_return_address
!= NULL
);
3150 if (gdbarch_debug
>= 2)
3151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_push_return_address called\n");
3152 return gdbarch
->deprecated_push_return_address (pc
, sp
);
3156 set_gdbarch_deprecated_push_return_address (struct gdbarch
*gdbarch
,
3157 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address
)
3159 gdbarch
->deprecated_push_return_address
= deprecated_push_return_address
;
3163 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch
*gdbarch
)
3165 gdb_assert (gdbarch
!= NULL
);
3166 return gdbarch
->deprecated_dummy_write_sp
!= NULL
;
3170 gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
3172 gdb_assert (gdbarch
!= NULL
);
3173 gdb_assert (gdbarch
->deprecated_dummy_write_sp
!= NULL
);
3174 if (gdbarch_debug
>= 2)
3175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_dummy_write_sp called\n");
3176 gdbarch
->deprecated_dummy_write_sp (val
);
3180 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch
*gdbarch
,
3181 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp
)
3183 gdbarch
->deprecated_dummy_write_sp
= deprecated_dummy_write_sp
;
3187 gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
)
3189 gdb_assert (gdbarch
!= NULL
);
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_size called\n");
3192 return gdbarch
->deprecated_register_size
;
3196 set_gdbarch_deprecated_register_size (struct gdbarch
*gdbarch
,
3197 int deprecated_register_size
)
3199 gdbarch
->deprecated_register_size
= deprecated_register_size
;
3203 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3205 gdb_assert (gdbarch
!= NULL
);
3206 /* Skip verify of call_dummy_location, invalid_p == 0 */
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3209 return gdbarch
->call_dummy_location
;
3213 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3214 int call_dummy_location
)
3216 gdbarch
->call_dummy_location
= call_dummy_location
;
3220 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch
*gdbarch
)
3222 gdb_assert (gdbarch
!= NULL
);
3223 return gdbarch
->deprecated_fix_call_dummy
!= NULL
;
3227 gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
, char *dummy
, CORE_ADDR pc
, CORE_ADDR fun
, int nargs
, struct value
**args
, struct type
*type
, int gcc_p
)
3229 gdb_assert (gdbarch
!= NULL
);
3230 gdb_assert (gdbarch
->deprecated_fix_call_dummy
!= NULL
);
3231 if (gdbarch_debug
>= 2)
3232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fix_call_dummy called\n");
3233 gdbarch
->deprecated_fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3237 set_gdbarch_deprecated_fix_call_dummy (struct gdbarch
*gdbarch
,
3238 gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy
)
3240 gdbarch
->deprecated_fix_call_dummy
= deprecated_fix_call_dummy
;
3244 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
3246 gdb_assert (gdbarch
!= NULL
);
3247 return gdbarch
->push_dummy_code
!= NULL
;
3251 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
)
3253 gdb_assert (gdbarch
!= NULL
);
3254 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
3255 if (gdbarch_debug
>= 2)
3256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
3257 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, using_gcc
, args
, nargs
, value_type
, real_pc
, bp_addr
);
3261 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
3262 gdbarch_push_dummy_code_ftype push_dummy_code
)
3264 gdbarch
->push_dummy_code
= push_dummy_code
;
3268 gdbarch_deprecated_do_registers_info_p (struct gdbarch
*gdbarch
)
3270 gdb_assert (gdbarch
!= NULL
);
3271 return gdbarch
->deprecated_do_registers_info
!= NULL
;
3275 gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3277 gdb_assert (gdbarch
!= NULL
);
3278 gdb_assert (gdbarch
->deprecated_do_registers_info
!= NULL
);
3279 if (gdbarch_debug
>= 2)
3280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_do_registers_info called\n");
3281 gdbarch
->deprecated_do_registers_info (reg_nr
, fpregs
);
3285 set_gdbarch_deprecated_do_registers_info (struct gdbarch
*gdbarch
,
3286 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info
)
3288 gdbarch
->deprecated_do_registers_info
= deprecated_do_registers_info
;
3292 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
3294 gdb_assert (gdbarch
!= NULL
);
3295 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
3296 if (gdbarch_debug
>= 2)
3297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
3298 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
3302 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
3303 gdbarch_print_registers_info_ftype print_registers_info
)
3305 gdbarch
->print_registers_info
= print_registers_info
;
3309 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
3311 gdb_assert (gdbarch
!= NULL
);
3312 return gdbarch
->print_float_info
!= NULL
;
3316 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3318 gdb_assert (gdbarch
!= NULL
);
3319 gdb_assert (gdbarch
->print_float_info
!= NULL
);
3320 if (gdbarch_debug
>= 2)
3321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
3322 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
3326 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
3327 gdbarch_print_float_info_ftype print_float_info
)
3329 gdbarch
->print_float_info
= print_float_info
;
3333 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
3335 gdb_assert (gdbarch
!= NULL
);
3336 return gdbarch
->print_vector_info
!= NULL
;
3340 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
3342 gdb_assert (gdbarch
!= NULL
);
3343 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
3344 if (gdbarch_debug
>= 2)
3345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
3346 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
3350 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
3351 gdbarch_print_vector_info_ftype print_vector_info
)
3353 gdbarch
->print_vector_info
= print_vector_info
;
3357 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3359 gdb_assert (gdbarch
!= NULL
);
3360 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
3361 if (gdbarch_debug
>= 2)
3362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3363 return gdbarch
->register_sim_regno (reg_nr
);
3367 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3368 gdbarch_register_sim_regno_ftype register_sim_regno
)
3370 gdbarch
->register_sim_regno
= register_sim_regno
;
3374 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3376 gdb_assert (gdbarch
!= NULL
);
3377 return gdbarch
->register_bytes_ok
!= NULL
;
3381 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3383 gdb_assert (gdbarch
!= NULL
);
3384 gdb_assert (gdbarch
->register_bytes_ok
!= NULL
);
3385 if (gdbarch_debug
>= 2)
3386 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3387 return gdbarch
->register_bytes_ok (nr_bytes
);
3391 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3392 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3394 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3398 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3400 gdb_assert (gdbarch
!= NULL
);
3401 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
3402 if (gdbarch_debug
>= 2)
3403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3404 return gdbarch
->cannot_fetch_register (regnum
);
3408 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3409 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3411 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3415 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3417 gdb_assert (gdbarch
!= NULL
);
3418 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
3419 if (gdbarch_debug
>= 2)
3420 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3421 return gdbarch
->cannot_store_register (regnum
);
3425 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3426 gdbarch_cannot_store_register_ftype cannot_store_register
)
3428 gdbarch
->cannot_store_register
= cannot_store_register
;
3432 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3434 gdb_assert (gdbarch
!= NULL
);
3435 return gdbarch
->get_longjmp_target
!= NULL
;
3439 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3441 gdb_assert (gdbarch
!= NULL
);
3442 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
3443 if (gdbarch_debug
>= 2)
3444 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3445 return gdbarch
->get_longjmp_target (pc
);
3449 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3450 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3452 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3456 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch
*gdbarch
)
3458 gdb_assert (gdbarch
!= NULL
);
3459 return gdbarch
->deprecated_pc_in_call_dummy
!= deprecated_pc_in_call_dummy
;
3463 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3465 gdb_assert (gdbarch
!= NULL
);
3466 gdb_assert (gdbarch
->deprecated_pc_in_call_dummy
!= NULL
);
3467 /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */
3468 if (gdbarch_debug
>= 2)
3469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pc_in_call_dummy called\n");
3470 return gdbarch
->deprecated_pc_in_call_dummy (pc
, sp
, frame_address
);
3474 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3475 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy
)
3477 gdbarch
->deprecated_pc_in_call_dummy
= deprecated_pc_in_call_dummy
;
3481 gdbarch_deprecated_init_frame_pc_p (struct gdbarch
*gdbarch
)
3483 gdb_assert (gdbarch
!= NULL
);
3484 return gdbarch
->deprecated_init_frame_pc
!= NULL
;
3488 gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3490 gdb_assert (gdbarch
!= NULL
);
3491 gdb_assert (gdbarch
->deprecated_init_frame_pc
!= NULL
);
3492 if (gdbarch_debug
>= 2)
3493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_frame_pc called\n");
3494 return gdbarch
->deprecated_init_frame_pc (fromleaf
, prev
);
3498 set_gdbarch_deprecated_init_frame_pc (struct gdbarch
*gdbarch
,
3499 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc
)
3501 gdbarch
->deprecated_init_frame_pc
= deprecated_init_frame_pc
;
3505 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3507 gdb_assert (gdbarch
!= NULL
);
3508 if (gdbarch_debug
>= 2)
3509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3510 return gdbarch
->believe_pcc_promotion
;
3514 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3515 int believe_pcc_promotion
)
3517 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3521 gdbarch_deprecated_get_saved_register_p (struct gdbarch
*gdbarch
)
3523 gdb_assert (gdbarch
!= NULL
);
3524 return gdbarch
->deprecated_get_saved_register
!= NULL
;
3528 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
)
3530 gdb_assert (gdbarch
!= NULL
);
3531 gdb_assert (gdbarch
->deprecated_get_saved_register
!= NULL
);
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_get_saved_register called\n");
3534 gdbarch
->deprecated_get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3538 set_gdbarch_deprecated_get_saved_register (struct gdbarch
*gdbarch
,
3539 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register
)
3541 gdbarch
->deprecated_get_saved_register
= deprecated_get_saved_register
;
3545 gdbarch_deprecated_register_convertible_p (struct gdbarch
*gdbarch
)
3547 gdb_assert (gdbarch
!= NULL
);
3548 return gdbarch
->deprecated_register_convertible
!= NULL
;
3552 gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3554 gdb_assert (gdbarch
!= NULL
);
3555 gdb_assert (gdbarch
->deprecated_register_convertible
!= NULL
);
3556 if (gdbarch_debug
>= 2)
3557 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convertible called\n");
3558 return gdbarch
->deprecated_register_convertible (nr
);
3562 set_gdbarch_deprecated_register_convertible (struct gdbarch
*gdbarch
,
3563 gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible
)
3565 gdbarch
->deprecated_register_convertible
= deprecated_register_convertible
;
3569 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3571 gdb_assert (gdbarch
!= NULL
);
3572 gdb_assert (gdbarch
->deprecated_register_convert_to_virtual
!= NULL
);
3573 if (gdbarch_debug
>= 2)
3574 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_virtual called\n");
3575 gdbarch
->deprecated_register_convert_to_virtual (regnum
, type
, from
, to
);
3579 set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3580 gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual
)
3582 gdbarch
->deprecated_register_convert_to_virtual
= deprecated_register_convert_to_virtual
;
3586 gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, const char *from
, char *to
)
3588 gdb_assert (gdbarch
!= NULL
);
3589 gdb_assert (gdbarch
->deprecated_register_convert_to_raw
!= NULL
);
3590 if (gdbarch_debug
>= 2)
3591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_register_convert_to_raw called\n");
3592 gdbarch
->deprecated_register_convert_to_raw (type
, regnum
, from
, to
);
3596 set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch
*gdbarch
,
3597 gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw
)
3599 gdbarch
->deprecated_register_convert_to_raw
= deprecated_register_convert_to_raw
;
3603 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
3605 gdb_assert (gdbarch
!= NULL
);
3606 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
3607 if (gdbarch_debug
>= 2)
3608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
3609 return gdbarch
->convert_register_p (regnum
, type
);
3613 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
3614 gdbarch_convert_register_p_ftype convert_register_p
)
3616 gdbarch
->convert_register_p
= convert_register_p
;
3620 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, void *buf
)
3622 gdb_assert (gdbarch
!= NULL
);
3623 gdb_assert (gdbarch
->register_to_value
!= NULL
);
3624 if (gdbarch_debug
>= 2)
3625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
3626 gdbarch
->register_to_value (frame
, regnum
, type
, buf
);
3630 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
3631 gdbarch_register_to_value_ftype register_to_value
)
3633 gdbarch
->register_to_value
= register_to_value
;
3637 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const void *buf
)
3639 gdb_assert (gdbarch
!= NULL
);
3640 gdb_assert (gdbarch
->value_to_register
!= NULL
);
3641 if (gdbarch_debug
>= 2)
3642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
3643 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
3647 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
3648 gdbarch_value_to_register_ftype value_to_register
)
3650 gdbarch
->value_to_register
= value_to_register
;
3654 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const void *buf
)
3656 gdb_assert (gdbarch
!= NULL
);
3657 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
3658 if (gdbarch_debug
>= 2)
3659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3660 return gdbarch
->pointer_to_address (type
, buf
);
3664 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3665 gdbarch_pointer_to_address_ftype pointer_to_address
)
3667 gdbarch
->pointer_to_address
= pointer_to_address
;
3671 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3673 gdb_assert (gdbarch
!= NULL
);
3674 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
3675 if (gdbarch_debug
>= 2)
3676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3677 gdbarch
->address_to_pointer (type
, buf
, addr
);
3681 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3682 gdbarch_address_to_pointer_ftype address_to_pointer
)
3684 gdbarch
->address_to_pointer
= address_to_pointer
;
3688 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3690 gdb_assert (gdbarch
!= NULL
);
3691 return gdbarch
->integer_to_address
!= NULL
;
3695 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3697 gdb_assert (gdbarch
!= NULL
);
3698 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
3699 if (gdbarch_debug
>= 2)
3700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3701 return gdbarch
->integer_to_address (type
, buf
);
3705 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3706 gdbarch_integer_to_address_ftype integer_to_address
)
3708 gdbarch
->integer_to_address
= integer_to_address
;
3712 gdbarch_deprecated_pop_frame_p (struct gdbarch
*gdbarch
)
3714 gdb_assert (gdbarch
!= NULL
);
3715 return gdbarch
->deprecated_pop_frame
!= NULL
;
3719 gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
)
3721 gdb_assert (gdbarch
!= NULL
);
3722 gdb_assert (gdbarch
->deprecated_pop_frame
!= NULL
);
3723 if (gdbarch_debug
>= 2)
3724 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_pop_frame called\n");
3725 gdbarch
->deprecated_pop_frame ();
3729 set_gdbarch_deprecated_pop_frame (struct gdbarch
*gdbarch
,
3730 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame
)
3732 gdbarch
->deprecated_pop_frame
= deprecated_pop_frame
;
3736 gdbarch_deprecated_store_struct_return_p (struct gdbarch
*gdbarch
)
3738 gdb_assert (gdbarch
!= NULL
);
3739 return gdbarch
->deprecated_store_struct_return
!= NULL
;
3743 gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3745 gdb_assert (gdbarch
!= NULL
);
3746 gdb_assert (gdbarch
->deprecated_store_struct_return
!= NULL
);
3747 if (gdbarch_debug
>= 2)
3748 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_struct_return called\n");
3749 gdbarch
->deprecated_store_struct_return (addr
, sp
);
3753 set_gdbarch_deprecated_store_struct_return (struct gdbarch
*gdbarch
,
3754 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return
)
3756 gdbarch
->deprecated_store_struct_return
= deprecated_store_struct_return
;
3760 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
3762 gdb_assert (gdbarch
!= NULL
);
3763 return gdbarch
->return_value
!= NULL
;
3766 enum return_value_convention
3767 gdbarch_return_value (struct gdbarch
*gdbarch
, struct type
*valtype
, struct regcache
*regcache
, void *readbuf
, const void *writebuf
)
3769 gdb_assert (gdbarch
!= NULL
);
3770 gdb_assert (gdbarch
->return_value
!= NULL
);
3771 if (gdbarch_debug
>= 2)
3772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
3773 return gdbarch
->return_value (gdbarch
, valtype
, regcache
, readbuf
, writebuf
);
3777 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
3778 gdbarch_return_value_ftype return_value
)
3780 gdbarch
->return_value
= return_value
;
3784 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3786 gdb_assert (gdbarch
!= NULL
);
3787 gdb_assert (gdbarch
->return_value_on_stack
!= NULL
);
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3790 return gdbarch
->return_value_on_stack (type
);
3794 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3795 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3797 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3801 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, void *valbuf
)
3803 gdb_assert (gdbarch
!= NULL
);
3804 gdb_assert (gdbarch
->extract_return_value
!= NULL
);
3805 if (gdbarch_debug
>= 2)
3806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3807 gdbarch
->extract_return_value (type
, regcache
, valbuf
);
3811 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3812 gdbarch_extract_return_value_ftype extract_return_value
)
3814 gdbarch
->extract_return_value
= extract_return_value
;
3818 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, struct regcache
*regcache
, const void *valbuf
)
3820 gdb_assert (gdbarch
!= NULL
);
3821 gdb_assert (gdbarch
->store_return_value
!= NULL
);
3822 if (gdbarch_debug
>= 2)
3823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3824 gdbarch
->store_return_value (type
, regcache
, valbuf
);
3828 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3829 gdbarch_store_return_value_ftype store_return_value
)
3831 gdbarch
->store_return_value
= store_return_value
;
3835 gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3837 gdb_assert (gdbarch
!= NULL
);
3838 gdb_assert (gdbarch
->deprecated_extract_return_value
!= NULL
);
3839 if (gdbarch_debug
>= 2)
3840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_return_value called\n");
3841 gdbarch
->deprecated_extract_return_value (type
, regbuf
, valbuf
);
3845 set_gdbarch_deprecated_extract_return_value (struct gdbarch
*gdbarch
,
3846 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value
)
3848 gdbarch
->deprecated_extract_return_value
= deprecated_extract_return_value
;
3852 gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3854 gdb_assert (gdbarch
!= NULL
);
3855 gdb_assert (gdbarch
->deprecated_store_return_value
!= NULL
);
3856 if (gdbarch_debug
>= 2)
3857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_store_return_value called\n");
3858 gdbarch
->deprecated_store_return_value (type
, valbuf
);
3862 set_gdbarch_deprecated_store_return_value (struct gdbarch
*gdbarch
,
3863 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value
)
3865 gdbarch
->deprecated_store_return_value
= deprecated_store_return_value
;
3869 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3871 gdb_assert (gdbarch
!= NULL
);
3872 gdb_assert (gdbarch
->use_struct_convention
!= NULL
);
3873 if (gdbarch_debug
>= 2)
3874 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3875 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3879 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3880 gdbarch_use_struct_convention_ftype use_struct_convention
)
3882 gdbarch
->use_struct_convention
= use_struct_convention
;
3886 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3888 gdb_assert (gdbarch
!= NULL
);
3889 return gdbarch
->deprecated_extract_struct_value_address
!= NULL
;
3893 gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3895 gdb_assert (gdbarch
!= NULL
);
3896 gdb_assert (gdbarch
->deprecated_extract_struct_value_address
!= NULL
);
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_extract_struct_value_address called\n");
3899 return gdbarch
->deprecated_extract_struct_value_address (regcache
);
3903 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
*gdbarch
,
3904 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address
)
3906 gdbarch
->deprecated_extract_struct_value_address
= deprecated_extract_struct_value_address
;
3910 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch
*gdbarch
)
3912 gdb_assert (gdbarch
!= NULL
);
3913 return gdbarch
->deprecated_frame_init_saved_regs
!= NULL
;
3917 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3919 gdb_assert (gdbarch
!= NULL
);
3920 gdb_assert (gdbarch
->deprecated_frame_init_saved_regs
!= NULL
);
3921 if (gdbarch_debug
>= 2)
3922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_init_saved_regs called\n");
3923 gdbarch
->deprecated_frame_init_saved_regs (frame
);
3927 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3928 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs
)
3930 gdbarch
->deprecated_frame_init_saved_regs
= deprecated_frame_init_saved_regs
;
3934 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3936 gdb_assert (gdbarch
!= NULL
);
3937 return gdbarch
->deprecated_init_extra_frame_info
!= NULL
;
3941 gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3943 gdb_assert (gdbarch
!= NULL
);
3944 gdb_assert (gdbarch
->deprecated_init_extra_frame_info
!= NULL
);
3945 if (gdbarch_debug
>= 2)
3946 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_init_extra_frame_info called\n");
3947 gdbarch
->deprecated_init_extra_frame_info (fromleaf
, frame
);
3951 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch
*gdbarch
,
3952 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info
)
3954 gdbarch
->deprecated_init_extra_frame_info
= deprecated_init_extra_frame_info
;
3958 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3960 gdb_assert (gdbarch
!= NULL
);
3961 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
3962 if (gdbarch_debug
>= 2)
3963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3964 return gdbarch
->skip_prologue (ip
);
3968 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3969 gdbarch_skip_prologue_ftype skip_prologue
)
3971 gdbarch
->skip_prologue
= skip_prologue
;
3975 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3977 gdb_assert (gdbarch
!= NULL
);
3978 gdb_assert (gdbarch
->inner_than
!= NULL
);
3979 if (gdbarch_debug
>= 2)
3980 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3981 return gdbarch
->inner_than (lhs
, rhs
);
3985 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3986 gdbarch_inner_than_ftype inner_than
)
3988 gdbarch
->inner_than
= inner_than
;
3991 const unsigned char *
3992 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3994 gdb_assert (gdbarch
!= NULL
);
3995 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
3996 if (gdbarch_debug
>= 2)
3997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3998 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
4002 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4003 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4005 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4009 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
4011 gdb_assert (gdbarch
!= NULL
);
4012 return gdbarch
->adjust_breakpoint_address
!= NULL
;
4016 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
4018 gdb_assert (gdbarch
!= NULL
);
4019 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
4020 if (gdbarch_debug
>= 2)
4021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
4022 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
4026 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
4027 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
4029 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
4033 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4035 gdb_assert (gdbarch
!= NULL
);
4036 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
4037 if (gdbarch_debug
>= 2)
4038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4039 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4043 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4044 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4046 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4050 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4052 gdb_assert (gdbarch
!= NULL
);
4053 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
4054 if (gdbarch_debug
>= 2)
4055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4056 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4060 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4061 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4063 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4067 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4069 gdb_assert (gdbarch
!= NULL
);
4070 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
4071 if (gdbarch_debug
>= 2)
4072 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4073 return gdbarch
->decr_pc_after_break
;
4077 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4078 CORE_ADDR decr_pc_after_break
)
4080 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4084 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4086 gdb_assert (gdbarch
!= NULL
);
4087 /* Skip verify of function_start_offset, invalid_p == 0 */
4088 if (gdbarch_debug
>= 2)
4089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4090 return gdbarch
->function_start_offset
;
4094 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4095 CORE_ADDR function_start_offset
)
4097 gdbarch
->function_start_offset
= function_start_offset
;
4101 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
)
4103 gdb_assert (gdbarch
!= NULL
);
4104 gdb_assert (gdbarch
->remote_translate_xfer_address
!= NULL
);
4105 if (gdbarch_debug
>= 2)
4106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4107 gdbarch
->remote_translate_xfer_address (gdbarch
, regcache
, gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4111 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4112 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4114 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4118 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4120 gdb_assert (gdbarch
!= NULL
);
4121 /* Skip verify of frame_args_skip, invalid_p == 0 */
4122 if (gdbarch_debug
>= 2)
4123 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4124 return gdbarch
->frame_args_skip
;
4128 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4129 CORE_ADDR frame_args_skip
)
4131 gdbarch
->frame_args_skip
= frame_args_skip
;
4135 gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch
*gdbarch
)
4137 gdb_assert (gdbarch
!= NULL
);
4138 return gdbarch
->deprecated_frameless_function_invocation
!= NULL
;
4142 gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4144 gdb_assert (gdbarch
!= NULL
);
4145 gdb_assert (gdbarch
->deprecated_frameless_function_invocation
!= NULL
);
4146 if (gdbarch_debug
>= 2)
4147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frameless_function_invocation called\n");
4148 return gdbarch
->deprecated_frameless_function_invocation (fi
);
4152 set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch
*gdbarch
,
4153 gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation
)
4155 gdbarch
->deprecated_frameless_function_invocation
= deprecated_frameless_function_invocation
;
4159 gdbarch_deprecated_frame_chain_p (struct gdbarch
*gdbarch
)
4161 gdb_assert (gdbarch
!= NULL
);
4162 return gdbarch
->deprecated_frame_chain
!= NULL
;
4166 gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4168 gdb_assert (gdbarch
!= NULL
);
4169 gdb_assert (gdbarch
->deprecated_frame_chain
!= NULL
);
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain called\n");
4172 return gdbarch
->deprecated_frame_chain (frame
);
4176 set_gdbarch_deprecated_frame_chain (struct gdbarch
*gdbarch
,
4177 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain
)
4179 gdbarch
->deprecated_frame_chain
= deprecated_frame_chain
;
4183 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch
*gdbarch
)
4185 gdb_assert (gdbarch
!= NULL
);
4186 return gdbarch
->deprecated_frame_chain_valid
!= NULL
;
4190 gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4192 gdb_assert (gdbarch
!= NULL
);
4193 gdb_assert (gdbarch
->deprecated_frame_chain_valid
!= NULL
);
4194 if (gdbarch_debug
>= 2)
4195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_chain_valid called\n");
4196 return gdbarch
->deprecated_frame_chain_valid (chain
, thisframe
);
4200 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch
*gdbarch
,
4201 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid
)
4203 gdbarch
->deprecated_frame_chain_valid
= deprecated_frame_chain_valid
;
4207 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch
*gdbarch
)
4209 gdb_assert (gdbarch
!= NULL
);
4210 return gdbarch
->deprecated_frame_saved_pc
!= NULL
;
4214 gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4216 gdb_assert (gdbarch
!= NULL
);
4217 gdb_assert (gdbarch
->deprecated_frame_saved_pc
!= NULL
);
4218 if (gdbarch_debug
>= 2)
4219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_saved_pc called\n");
4220 return gdbarch
->deprecated_frame_saved_pc (fi
);
4224 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch
*gdbarch
,
4225 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc
)
4227 gdbarch
->deprecated_frame_saved_pc
= deprecated_frame_saved_pc
;
4231 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
4233 gdb_assert (gdbarch
!= NULL
);
4234 return gdbarch
->unwind_pc
!= NULL
;
4238 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4240 gdb_assert (gdbarch
!= NULL
);
4241 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
4242 if (gdbarch_debug
>= 2)
4243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
4244 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
4248 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
4249 gdbarch_unwind_pc_ftype unwind_pc
)
4251 gdbarch
->unwind_pc
= unwind_pc
;
4255 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
4257 gdb_assert (gdbarch
!= NULL
);
4258 return gdbarch
->unwind_sp
!= NULL
;
4262 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
4264 gdb_assert (gdbarch
!= NULL
);
4265 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
4266 if (gdbarch_debug
>= 2)
4267 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
4268 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
4272 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
4273 gdbarch_unwind_sp_ftype unwind_sp
)
4275 gdbarch
->unwind_sp
= unwind_sp
;
4279 gdbarch_deprecated_frame_args_address_p (struct gdbarch
*gdbarch
)
4281 gdb_assert (gdbarch
!= NULL
);
4282 return gdbarch
->deprecated_frame_args_address
!= get_frame_base
;
4286 gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4288 gdb_assert (gdbarch
!= NULL
);
4289 gdb_assert (gdbarch
->deprecated_frame_args_address
!= NULL
);
4290 /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */
4291 if (gdbarch_debug
>= 2)
4292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_args_address called\n");
4293 return gdbarch
->deprecated_frame_args_address (fi
);
4297 set_gdbarch_deprecated_frame_args_address (struct gdbarch
*gdbarch
,
4298 gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address
)
4300 gdbarch
->deprecated_frame_args_address
= deprecated_frame_args_address
;
4304 gdbarch_deprecated_frame_locals_address_p (struct gdbarch
*gdbarch
)
4306 gdb_assert (gdbarch
!= NULL
);
4307 return gdbarch
->deprecated_frame_locals_address
!= get_frame_base
;
4311 gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4313 gdb_assert (gdbarch
!= NULL
);
4314 gdb_assert (gdbarch
->deprecated_frame_locals_address
!= NULL
);
4315 /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */
4316 if (gdbarch_debug
>= 2)
4317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_frame_locals_address called\n");
4318 return gdbarch
->deprecated_frame_locals_address (fi
);
4322 set_gdbarch_deprecated_frame_locals_address (struct gdbarch
*gdbarch
,
4323 gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address
)
4325 gdbarch
->deprecated_frame_locals_address
= deprecated_frame_locals_address
;
4329 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch
*gdbarch
)
4331 gdb_assert (gdbarch
!= NULL
);
4332 return gdbarch
->deprecated_saved_pc_after_call
!= NULL
;
4336 gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4338 gdb_assert (gdbarch
!= NULL
);
4339 gdb_assert (gdbarch
->deprecated_saved_pc_after_call
!= NULL
);
4340 if (gdbarch_debug
>= 2)
4341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_saved_pc_after_call called\n");
4342 return gdbarch
->deprecated_saved_pc_after_call (frame
);
4346 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch
*gdbarch
,
4347 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call
)
4349 gdbarch
->deprecated_saved_pc_after_call
= deprecated_saved_pc_after_call
;
4353 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
4355 gdb_assert (gdbarch
!= NULL
);
4356 return gdbarch
->frame_num_args
!= NULL
;
4360 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4362 gdb_assert (gdbarch
!= NULL
);
4363 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
4364 if (gdbarch_debug
>= 2)
4365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4366 return gdbarch
->frame_num_args (frame
);
4370 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4371 gdbarch_frame_num_args_ftype frame_num_args
)
4373 gdbarch
->frame_num_args
= frame_num_args
;
4377 gdbarch_deprecated_stack_align_p (struct gdbarch
*gdbarch
)
4379 gdb_assert (gdbarch
!= NULL
);
4380 return gdbarch
->deprecated_stack_align
!= NULL
;
4384 gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4386 gdb_assert (gdbarch
!= NULL
);
4387 gdb_assert (gdbarch
->deprecated_stack_align
!= NULL
);
4388 if (gdbarch_debug
>= 2)
4389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_stack_align called\n");
4390 return gdbarch
->deprecated_stack_align (sp
);
4394 set_gdbarch_deprecated_stack_align (struct gdbarch
*gdbarch
,
4395 gdbarch_deprecated_stack_align_ftype deprecated_stack_align
)
4397 gdbarch
->deprecated_stack_align
= deprecated_stack_align
;
4401 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
4403 gdb_assert (gdbarch
!= NULL
);
4404 return gdbarch
->frame_align
!= NULL
;
4408 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
4410 gdb_assert (gdbarch
!= NULL
);
4411 gdb_assert (gdbarch
->frame_align
!= NULL
);
4412 if (gdbarch_debug
>= 2)
4413 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
4414 return gdbarch
->frame_align (gdbarch
, address
);
4418 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
4419 gdbarch_frame_align_ftype frame_align
)
4421 gdbarch
->frame_align
= frame_align
;
4425 gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4427 gdb_assert (gdbarch
!= NULL
);
4428 return gdbarch
->deprecated_reg_struct_has_addr
!= NULL
;
4432 gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4434 gdb_assert (gdbarch
!= NULL
);
4435 gdb_assert (gdbarch
->deprecated_reg_struct_has_addr
!= NULL
);
4436 if (gdbarch_debug
>= 2)
4437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_reg_struct_has_addr called\n");
4438 return gdbarch
->deprecated_reg_struct_has_addr (gcc_p
, type
);
4442 set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4443 gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr
)
4445 gdbarch
->deprecated_reg_struct_has_addr
= deprecated_reg_struct_has_addr
;
4449 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
4451 gdb_assert (gdbarch
!= NULL
);
4452 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
4453 if (gdbarch_debug
>= 2)
4454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
4455 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
4459 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
4460 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
4462 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
4466 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
4468 gdb_assert (gdbarch
!= NULL
);
4469 if (gdbarch_debug
>= 2)
4470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
4471 return gdbarch
->frame_red_zone_size
;
4475 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
4476 int frame_red_zone_size
)
4478 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
4481 const struct floatformat
*
4482 gdbarch_float_format (struct gdbarch
*gdbarch
)
4484 gdb_assert (gdbarch
!= NULL
);
4485 if (gdbarch_debug
>= 2)
4486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4487 return gdbarch
->float_format
;
4491 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4492 const struct floatformat
* float_format
)
4494 gdbarch
->float_format
= float_format
;
4497 const struct floatformat
*
4498 gdbarch_double_format (struct gdbarch
*gdbarch
)
4500 gdb_assert (gdbarch
!= NULL
);
4501 if (gdbarch_debug
>= 2)
4502 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4503 return gdbarch
->double_format
;
4507 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4508 const struct floatformat
* double_format
)
4510 gdbarch
->double_format
= double_format
;
4513 const struct floatformat
*
4514 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4516 gdb_assert (gdbarch
!= NULL
);
4517 if (gdbarch_debug
>= 2)
4518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4519 return gdbarch
->long_double_format
;
4523 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4524 const struct floatformat
* long_double_format
)
4526 gdbarch
->long_double_format
= long_double_format
;
4530 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
4532 gdb_assert (gdbarch
!= NULL
);
4533 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
4534 if (gdbarch_debug
>= 2)
4535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4536 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
4540 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4541 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4543 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4547 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4549 gdb_assert (gdbarch
!= NULL
);
4550 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
4551 if (gdbarch_debug
>= 2)
4552 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4553 return gdbarch
->addr_bits_remove (addr
);
4557 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4558 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4560 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4564 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4566 gdb_assert (gdbarch
!= NULL
);
4567 gdb_assert (gdbarch
->smash_text_address
!= NULL
);
4568 if (gdbarch_debug
>= 2)
4569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4570 return gdbarch
->smash_text_address (addr
);
4574 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4575 gdbarch_smash_text_address_ftype smash_text_address
)
4577 gdbarch
->smash_text_address
= smash_text_address
;
4581 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4583 gdb_assert (gdbarch
!= NULL
);
4584 return gdbarch
->software_single_step
!= NULL
;
4588 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4590 gdb_assert (gdbarch
!= NULL
);
4591 gdb_assert (gdbarch
->software_single_step
!= NULL
);
4592 if (gdbarch_debug
>= 2)
4593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4594 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4598 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4599 gdbarch_software_single_step_ftype software_single_step
)
4601 gdbarch
->software_single_step
= software_single_step
;
4605 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
4607 gdb_assert (gdbarch
!= NULL
);
4608 gdb_assert (gdbarch
->print_insn
!= NULL
);
4609 if (gdbarch_debug
>= 2)
4610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4611 return gdbarch
->print_insn (vma
, info
);
4615 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4616 gdbarch_print_insn_ftype print_insn
)
4618 gdbarch
->print_insn
= print_insn
;
4622 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4624 gdb_assert (gdbarch
!= NULL
);
4625 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
4626 if (gdbarch_debug
>= 2)
4627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4628 return gdbarch
->skip_trampoline_code (pc
);
4632 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4633 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4635 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4639 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4641 gdb_assert (gdbarch
!= NULL
);
4642 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
4643 if (gdbarch_debug
>= 2)
4644 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
4645 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
4649 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
4650 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
4652 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
4656 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4658 gdb_assert (gdbarch
!= NULL
);
4659 gdb_assert (gdbarch
->in_solib_call_trampoline
!= NULL
);
4660 if (gdbarch_debug
>= 2)
4661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4662 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4666 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4667 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4669 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4673 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4675 gdb_assert (gdbarch
!= NULL
);
4676 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
4677 if (gdbarch_debug
>= 2)
4678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
4679 return gdbarch
->in_solib_return_trampoline (pc
, name
);
4683 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
4684 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
4686 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
4690 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4692 gdb_assert (gdbarch
!= NULL
);
4693 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
4694 if (gdbarch_debug
>= 2)
4695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4696 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4700 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4701 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4703 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4707 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4709 gdb_assert (gdbarch
!= NULL
);
4710 gdb_assert (gdbarch
->construct_inferior_arguments
!= NULL
);
4711 if (gdbarch_debug
>= 2)
4712 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4713 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4717 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4718 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4720 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4724 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4726 gdb_assert (gdbarch
!= NULL
);
4727 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
4728 if (gdbarch_debug
>= 2)
4729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4730 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4734 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4735 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4737 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4741 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4743 gdb_assert (gdbarch
!= NULL
);
4744 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
4745 if (gdbarch_debug
>= 2)
4746 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4747 gdbarch
->coff_make_msymbol_special (val
, msym
);
4751 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4752 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4754 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4758 gdbarch_name_of_malloc (struct gdbarch
*gdbarch
)
4760 gdb_assert (gdbarch
!= NULL
);
4761 /* Skip verify of name_of_malloc, invalid_p == 0 */
4762 if (gdbarch_debug
>= 2)
4763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_name_of_malloc called\n");
4764 return gdbarch
->name_of_malloc
;
4768 set_gdbarch_name_of_malloc (struct gdbarch
*gdbarch
,
4769 const char * name_of_malloc
)
4771 gdbarch
->name_of_malloc
= name_of_malloc
;
4775 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
4777 gdb_assert (gdbarch
!= NULL
);
4778 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
4779 if (gdbarch_debug
>= 2)
4780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
4781 return gdbarch
->cannot_step_breakpoint
;
4785 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
4786 int cannot_step_breakpoint
)
4788 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
4792 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
4794 gdb_assert (gdbarch
!= NULL
);
4795 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
4796 if (gdbarch_debug
>= 2)
4797 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
4798 return gdbarch
->have_nonsteppable_watchpoint
;
4802 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
4803 int have_nonsteppable_watchpoint
)
4805 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
4809 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
4811 gdb_assert (gdbarch
!= NULL
);
4812 return gdbarch
->address_class_type_flags
!= NULL
;
4816 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
4818 gdb_assert (gdbarch
!= NULL
);
4819 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
4820 if (gdbarch_debug
>= 2)
4821 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
4822 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
4826 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
4827 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
4829 gdbarch
->address_class_type_flags
= address_class_type_flags
;
4833 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
4835 gdb_assert (gdbarch
!= NULL
);
4836 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
4840 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
4842 gdb_assert (gdbarch
!= NULL
);
4843 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
4844 if (gdbarch_debug
>= 2)
4845 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
4846 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
4850 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
4851 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
4853 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
4857 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
4859 gdb_assert (gdbarch
!= NULL
);
4860 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
4864 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
4866 gdb_assert (gdbarch
!= NULL
);
4867 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
4868 if (gdbarch_debug
>= 2)
4869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
4870 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
4874 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
4875 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
4877 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
4881 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
4883 gdb_assert (gdbarch
!= NULL
);
4884 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
4885 if (gdbarch_debug
>= 2)
4886 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
4887 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
4891 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
4892 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
4894 gdbarch
->register_reggroup_p
= register_reggroup_p
;
4898 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
4900 gdb_assert (gdbarch
!= NULL
);
4901 return gdbarch
->fetch_pointer_argument
!= NULL
;
4905 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
4907 gdb_assert (gdbarch
!= NULL
);
4908 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
4909 if (gdbarch_debug
>= 2)
4910 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
4911 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
4915 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
4916 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
4918 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
4922 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
4924 gdb_assert (gdbarch
!= NULL
);
4925 return gdbarch
->regset_from_core_section
!= NULL
;
4928 const struct regset
*
4929 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
4931 gdb_assert (gdbarch
!= NULL
);
4932 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
4933 if (gdbarch_debug
>= 2)
4934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
4935 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
4939 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
4940 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
4942 gdbarch
->regset_from_core_section
= regset_from_core_section
;
4946 /* Keep a registry of per-architecture data-pointers required by GDB
4953 gdbarch_data_pre_init_ftype
*pre_init
;
4954 gdbarch_data_post_init_ftype
*post_init
;
4957 struct gdbarch_data_registration
4959 struct gdbarch_data
*data
;
4960 struct gdbarch_data_registration
*next
;
4963 struct gdbarch_data_registry
4966 struct gdbarch_data_registration
*registrations
;
4969 struct gdbarch_data_registry gdbarch_data_registry
=
4974 static struct gdbarch_data
*
4975 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
4976 gdbarch_data_post_init_ftype
*post_init
)
4978 struct gdbarch_data_registration
**curr
;
4979 /* Append the new registraration. */
4980 for (curr
= &gdbarch_data_registry
.registrations
;
4982 curr
= &(*curr
)->next
);
4983 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4984 (*curr
)->next
= NULL
;
4985 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4986 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4987 (*curr
)->data
->pre_init
= pre_init
;
4988 (*curr
)->data
->post_init
= post_init
;
4989 (*curr
)->data
->init_p
= 1;
4990 return (*curr
)->data
;
4993 struct gdbarch_data
*
4994 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
4996 return gdbarch_data_register (pre_init
, NULL
);
4999 struct gdbarch_data
*
5000 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
5002 return gdbarch_data_register (NULL
, post_init
);
5005 /* Create/delete the gdbarch data vector. */
5008 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
5010 gdb_assert (gdbarch
->data
== NULL
);
5011 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
5012 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
5015 /* Initialize the current value of the specified per-architecture
5019 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
5020 struct gdbarch_data
*data
,
5023 gdb_assert (data
->index
< gdbarch
->nr_data
);
5024 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
5025 gdb_assert (data
->pre_init
== NULL
);
5026 gdbarch
->data
[data
->index
] = pointer
;
5029 /* Return the current value of the specified per-architecture
5033 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
5035 gdb_assert (data
->index
< gdbarch
->nr_data
);
5036 if (gdbarch
->data
[data
->index
] == NULL
)
5038 /* The data-pointer isn't initialized, call init() to get a
5040 if (data
->pre_init
!= NULL
)
5041 /* Mid architecture creation: pass just the obstack, and not
5042 the entire architecture, as that way it isn't possible for
5043 pre-init code to refer to undefined architecture
5045 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
5046 else if (gdbarch
->initialized_p
5047 && data
->post_init
!= NULL
)
5048 /* Post architecture creation: pass the entire architecture
5049 (as all fields are valid), but be careful to also detect
5050 recursive references. */
5052 gdb_assert (data
->init_p
);
5054 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
5058 /* The architecture initialization hasn't completed - punt -
5059 hope that the caller knows what they are doing. Once
5060 deprecated_set_gdbarch_data has been initialized, this can be
5061 changed to an internal error. */
5063 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
5065 return gdbarch
->data
[data
->index
];
5070 /* Keep a registry of swapped data required by GDB modules. */
5075 struct gdbarch_swap_registration
*source
;
5076 struct gdbarch_swap
*next
;
5079 struct gdbarch_swap_registration
5082 unsigned long sizeof_data
;
5083 gdbarch_swap_ftype
*init
;
5084 struct gdbarch_swap_registration
*next
;
5087 struct gdbarch_swap_registry
5090 struct gdbarch_swap_registration
*registrations
;
5093 struct gdbarch_swap_registry gdbarch_swap_registry
=
5099 deprecated_register_gdbarch_swap (void *data
,
5100 unsigned long sizeof_data
,
5101 gdbarch_swap_ftype
*init
)
5103 struct gdbarch_swap_registration
**rego
;
5104 for (rego
= &gdbarch_swap_registry
.registrations
;
5106 rego
= &(*rego
)->next
);
5107 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
5108 (*rego
)->next
= NULL
;
5109 (*rego
)->init
= init
;
5110 (*rego
)->data
= data
;
5111 (*rego
)->sizeof_data
= sizeof_data
;
5115 current_gdbarch_swap_init_hack (void)
5117 struct gdbarch_swap_registration
*rego
;
5118 struct gdbarch_swap
**curr
= ¤t_gdbarch
->swap
;
5119 for (rego
= gdbarch_swap_registry
.registrations
;
5123 if (rego
->data
!= NULL
)
5125 (*curr
) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch
,
5126 struct gdbarch_swap
);
5127 (*curr
)->source
= rego
;
5128 (*curr
)->swap
= gdbarch_obstack_zalloc (current_gdbarch
,
5130 (*curr
)->next
= NULL
;
5131 curr
= &(*curr
)->next
;
5133 if (rego
->init
!= NULL
)
5138 static struct gdbarch
*
5139 current_gdbarch_swap_out_hack (void)
5141 struct gdbarch
*old_gdbarch
= current_gdbarch
;
5142 struct gdbarch_swap
*curr
;
5144 gdb_assert (old_gdbarch
!= NULL
);
5145 for (curr
= old_gdbarch
->swap
;
5149 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
5150 memset (curr
->source
->data
, 0, curr
->source
->sizeof_data
);
5152 current_gdbarch
= NULL
;
5157 current_gdbarch_swap_in_hack (struct gdbarch
*new_gdbarch
)
5159 struct gdbarch_swap
*curr
;
5161 gdb_assert (current_gdbarch
== NULL
);
5162 for (curr
= new_gdbarch
->swap
;
5165 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
5166 current_gdbarch
= new_gdbarch
;
5170 /* Keep a registry of the architectures known by GDB. */
5172 struct gdbarch_registration
5174 enum bfd_architecture bfd_architecture
;
5175 gdbarch_init_ftype
*init
;
5176 gdbarch_dump_tdep_ftype
*dump_tdep
;
5177 struct gdbarch_list
*arches
;
5178 struct gdbarch_registration
*next
;
5181 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
5184 append_name (const char ***buf
, int *nr
, const char *name
)
5186 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
5192 gdbarch_printable_names (void)
5194 /* Accumulate a list of names based on the registed list of
5196 enum bfd_architecture a
;
5198 const char **arches
= NULL
;
5199 struct gdbarch_registration
*rego
;
5200 for (rego
= gdbarch_registry
;
5204 const struct bfd_arch_info
*ap
;
5205 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
5207 internal_error (__FILE__
, __LINE__
,
5208 "gdbarch_architecture_names: multi-arch unknown");
5211 append_name (&arches
, &nr_arches
, ap
->printable_name
);
5216 append_name (&arches
, &nr_arches
, NULL
);
5222 gdbarch_register (enum bfd_architecture bfd_architecture
,
5223 gdbarch_init_ftype
*init
,
5224 gdbarch_dump_tdep_ftype
*dump_tdep
)
5226 struct gdbarch_registration
**curr
;
5227 const struct bfd_arch_info
*bfd_arch_info
;
5228 /* Check that BFD recognizes this architecture */
5229 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
5230 if (bfd_arch_info
== NULL
)
5232 internal_error (__FILE__
, __LINE__
,
5233 "gdbarch: Attempt to register unknown architecture (%d)",
5236 /* Check that we haven't seen this architecture before */
5237 for (curr
= &gdbarch_registry
;
5239 curr
= &(*curr
)->next
)
5241 if (bfd_architecture
== (*curr
)->bfd_architecture
)
5242 internal_error (__FILE__
, __LINE__
,
5243 "gdbarch: Duplicate registraration of architecture (%s)",
5244 bfd_arch_info
->printable_name
);
5248 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
5249 bfd_arch_info
->printable_name
,
5252 (*curr
) = XMALLOC (struct gdbarch_registration
);
5253 (*curr
)->bfd_architecture
= bfd_architecture
;
5254 (*curr
)->init
= init
;
5255 (*curr
)->dump_tdep
= dump_tdep
;
5256 (*curr
)->arches
= NULL
;
5257 (*curr
)->next
= NULL
;
5261 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
5262 gdbarch_init_ftype
*init
)
5264 gdbarch_register (bfd_architecture
, init
, NULL
);
5268 /* Look for an architecture using gdbarch_info. Base search on only
5269 BFD_ARCH_INFO and BYTE_ORDER. */
5271 struct gdbarch_list
*
5272 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
5273 const struct gdbarch_info
*info
)
5275 for (; arches
!= NULL
; arches
= arches
->next
)
5277 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
5279 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
5281 if (info
->osabi
!= arches
->gdbarch
->osabi
)
5289 /* Find an architecture that matches the specified INFO. Create a new
5290 architecture if needed. Return that new architecture. Assumes
5291 that there is no current architecture. */
5293 static struct gdbarch
*
5294 find_arch_by_info (struct gdbarch
*old_gdbarch
, struct gdbarch_info info
)
5296 struct gdbarch
*new_gdbarch
;
5297 struct gdbarch_registration
*rego
;
5299 /* The existing architecture has been swapped out - all this code
5300 works from a clean slate. */
5301 gdb_assert (current_gdbarch
== NULL
);
5303 /* Fill in missing parts of the INFO struct using a number of
5304 sources: "set ..."; INFOabfd supplied; and the existing
5306 gdbarch_info_fill (old_gdbarch
, &info
);
5308 /* Must have found some sort of architecture. */
5309 gdb_assert (info
.bfd_arch_info
!= NULL
);
5313 fprintf_unfiltered (gdb_stdlog
,
5314 "find_arch_by_info: info.bfd_arch_info %s\n",
5315 (info
.bfd_arch_info
!= NULL
5316 ? info
.bfd_arch_info
->printable_name
5318 fprintf_unfiltered (gdb_stdlog
,
5319 "find_arch_by_info: info.byte_order %d (%s)\n",
5321 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
5322 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
5324 fprintf_unfiltered (gdb_stdlog
,
5325 "find_arch_by_info: info.osabi %d (%s)\n",
5326 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
5327 fprintf_unfiltered (gdb_stdlog
,
5328 "find_arch_by_info: info.abfd 0x%lx\n",
5330 fprintf_unfiltered (gdb_stdlog
,
5331 "find_arch_by_info: info.tdep_info 0x%lx\n",
5332 (long) info
.tdep_info
);
5335 /* Find the tdep code that knows about this architecture. */
5336 for (rego
= gdbarch_registry
;
5339 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
5344 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5345 "No matching architecture\n");
5349 /* Ask the tdep code for an architecture that matches "info". */
5350 new_gdbarch
= rego
->init (info
, rego
->arches
);
5352 /* Did the tdep code like it? No. Reject the change and revert to
5353 the old architecture. */
5354 if (new_gdbarch
== NULL
)
5357 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5358 "Target rejected architecture\n");
5362 /* Is this a pre-existing architecture (as determined by already
5363 being initialized)? Move it to the front of the architecture
5364 list (keeping the list sorted Most Recently Used). */
5365 if (new_gdbarch
->initialized_p
)
5367 struct gdbarch_list
**list
;
5368 struct gdbarch_list
*this;
5370 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5371 "Previous architecture 0x%08lx (%s) selected\n",
5373 new_gdbarch
->bfd_arch_info
->printable_name
);
5374 /* Find the existing arch in the list. */
5375 for (list
= ®o
->arches
;
5376 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
5377 list
= &(*list
)->next
);
5378 /* It had better be in the list of architectures. */
5379 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
5382 (*list
) = this->next
;
5383 /* Insert THIS at the front. */
5384 this->next
= rego
->arches
;
5385 rego
->arches
= this;
5390 /* It's a new architecture. */
5392 fprintf_unfiltered (gdb_stdlog
, "find_arch_by_info: "
5393 "New architecture 0x%08lx (%s) selected\n",
5395 new_gdbarch
->bfd_arch_info
->printable_name
);
5397 /* Insert the new architecture into the front of the architecture
5398 list (keep the list sorted Most Recently Used). */
5400 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5401 this->next
= rego
->arches
;
5402 this->gdbarch
= new_gdbarch
;
5403 rego
->arches
= this;
5406 /* Check that the newly installed architecture is valid. Plug in
5407 any post init values. */
5408 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5409 verify_gdbarch (new_gdbarch
);
5410 new_gdbarch
->initialized_p
= 1;
5412 /* Initialize any per-architecture swap areas. This phase requires
5413 a valid global CURRENT_GDBARCH. Set it momentarially, and then
5414 swap the entire architecture out. */
5415 current_gdbarch
= new_gdbarch
;
5416 current_gdbarch_swap_init_hack ();
5417 current_gdbarch_swap_out_hack ();
5420 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
5426 gdbarch_find_by_info (struct gdbarch_info info
)
5428 /* Save the previously selected architecture, setting the global to
5429 NULL. This stops things like gdbarch->init() trying to use the
5430 previous architecture's configuration. The previous architecture
5431 may not even be of the same architecture family. The most recent
5432 architecture of the same family is found at the head of the
5433 rego->arches list. */
5434 struct gdbarch
*old_gdbarch
= current_gdbarch_swap_out_hack ();
5436 /* Find the specified architecture. */
5437 struct gdbarch
*new_gdbarch
= find_arch_by_info (old_gdbarch
, info
);
5439 /* Restore the existing architecture. */
5440 gdb_assert (current_gdbarch
== NULL
);
5441 current_gdbarch_swap_in_hack (old_gdbarch
);
5446 /* Make the specified architecture current, swapping the existing one
5450 deprecated_current_gdbarch_select_hack (struct gdbarch
*new_gdbarch
)
5452 gdb_assert (new_gdbarch
!= NULL
);
5453 gdb_assert (current_gdbarch
!= NULL
);
5454 gdb_assert (new_gdbarch
->initialized_p
);
5455 current_gdbarch_swap_out_hack ();
5456 current_gdbarch_swap_in_hack (new_gdbarch
);
5457 architecture_changed_event ();
5460 extern void _initialize_gdbarch (void);
5463 _initialize_gdbarch (void)
5465 struct cmd_list_element
*c
;
5467 add_show_from_set (add_set_cmd ("arch",
5470 (char *)&gdbarch_debug
,
5471 "Set architecture debugging.\n\
5472 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5474 c
= add_set_cmd ("archdebug",
5477 (char *)&gdbarch_debug
,
5478 "Set architecture debugging.\n\
5479 When non-zero, architecture debugging is enabled.", &setlist
);
5481 deprecate_cmd (c
, "set debug arch");
5482 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");