1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
5 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2007, 2008, 2009 Free 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 3 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, see <http://www.gnu.org/licenses/>. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
43 #include "floatformat.h"
45 #include "gdb_assert.h"
46 #include "gdb_string.h"
47 #include "reggroups.h"
49 #include "gdb_obstack.h"
53 /* Static function declarations */
55 static void alloc_gdbarch_data (struct gdbarch
*);
57 /* Non-zero if we want to trace architecture code. */
60 #define GDBARCH_DEBUG 0
62 int gdbarch_debug
= GDBARCH_DEBUG
;
64 show_gdbarch_debug (struct ui_file
*file
, int from_tty
,
65 struct cmd_list_element
*c
, const char *value
)
67 fprintf_filtered (file
, _("Architecture debugging is %s.\n"), value
);
71 pformat (const struct floatformat
**format
)
76 /* Just print out one of them - this is only for diagnostics. */
77 return format
[0]->name
;
81 /* Maintain the struct gdbarch object */
85 /* Has this architecture been fully initialized? */
88 /* An obstack bound to the lifetime of the architecture. */
89 struct obstack
*obstack
;
91 /* basic architectural information */
92 const struct bfd_arch_info
* bfd_arch_info
;
94 int byte_order_for_code
;
96 const struct target_desc
* target_desc
;
98 /* target specific vector. */
99 struct gdbarch_tdep
*tdep
;
100 gdbarch_dump_tdep_ftype
*dump_tdep
;
102 /* per-architecture data-pointers */
106 /* per-architecture swap-regions */
107 struct gdbarch_swap
*swap
;
109 /* Multi-arch values.
111 When extending this structure you must:
115 Declare set/get functions and define the corresponding
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
121 verify_gdbarch(): Confirm that the target updated the field
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
141 const struct floatformat
** float_format
;
143 const struct floatformat
** double_format
;
145 const struct floatformat
** long_double_format
;
149 gdbarch_read_pc_ftype
*read_pc
;
150 gdbarch_write_pc_ftype
*write_pc
;
151 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
152 gdbarch_pseudo_register_read_ftype
*pseudo_register_read
;
153 gdbarch_pseudo_register_write_ftype
*pseudo_register_write
;
160 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
161 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
162 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
163 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
164 gdbarch_register_name_ftype
*register_name
;
165 gdbarch_register_type_ftype
*register_type
;
166 gdbarch_dummy_id_ftype
*dummy_id
;
167 int deprecated_fp_regnum
;
168 gdbarch_push_dummy_call_ftype
*push_dummy_call
;
169 int call_dummy_location
;
170 gdbarch_push_dummy_code_ftype
*push_dummy_code
;
171 gdbarch_print_registers_info_ftype
*print_registers_info
;
172 gdbarch_print_float_info_ftype
*print_float_info
;
173 gdbarch_print_vector_info_ftype
*print_vector_info
;
174 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
175 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
176 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
177 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
178 int believe_pcc_promotion
;
179 gdbarch_convert_register_p_ftype
*convert_register_p
;
180 gdbarch_register_to_value_ftype
*register_to_value
;
181 gdbarch_value_to_register_ftype
*value_to_register
;
182 gdbarch_value_from_register_ftype
*value_from_register
;
183 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
184 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
185 gdbarch_integer_to_address_ftype
*integer_to_address
;
186 gdbarch_return_value_ftype
*return_value
;
187 gdbarch_skip_prologue_ftype
*skip_prologue
;
188 gdbarch_skip_main_prologue_ftype
*skip_main_prologue
;
189 gdbarch_inner_than_ftype
*inner_than
;
190 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
191 gdbarch_remote_breakpoint_from_pc_ftype
*remote_breakpoint_from_pc
;
192 gdbarch_adjust_breakpoint_address_ftype
*adjust_breakpoint_address
;
193 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
194 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
195 CORE_ADDR decr_pc_after_break
;
196 CORE_ADDR deprecated_function_start_offset
;
197 gdbarch_remote_register_number_ftype
*remote_register_number
;
198 gdbarch_fetch_tls_load_module_address_ftype
*fetch_tls_load_module_address
;
199 CORE_ADDR frame_args_skip
;
200 gdbarch_unwind_pc_ftype
*unwind_pc
;
201 gdbarch_unwind_sp_ftype
*unwind_sp
;
202 gdbarch_frame_num_args_ftype
*frame_num_args
;
203 gdbarch_frame_align_ftype
*frame_align
;
204 gdbarch_stabs_argument_has_addr_ftype
*stabs_argument_has_addr
;
205 int frame_red_zone_size
;
206 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
207 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
208 gdbarch_smash_text_address_ftype
*smash_text_address
;
209 gdbarch_software_single_step_ftype
*software_single_step
;
210 gdbarch_single_step_through_delay_ftype
*single_step_through_delay
;
211 gdbarch_print_insn_ftype
*print_insn
;
212 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
213 gdbarch_skip_solib_resolver_ftype
*skip_solib_resolver
;
214 gdbarch_in_solib_return_trampoline_ftype
*in_solib_return_trampoline
;
215 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
216 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
217 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
218 int cannot_step_breakpoint
;
219 int have_nonsteppable_watchpoint
;
220 gdbarch_address_class_type_flags_ftype
*address_class_type_flags
;
221 gdbarch_address_class_type_flags_to_name_ftype
*address_class_type_flags_to_name
;
222 gdbarch_address_class_name_to_type_flags_ftype
*address_class_name_to_type_flags
;
223 gdbarch_register_reggroup_p_ftype
*register_reggroup_p
;
224 gdbarch_fetch_pointer_argument_ftype
*fetch_pointer_argument
;
225 gdbarch_regset_from_core_section_ftype
*regset_from_core_section
;
226 int core_reg_section_encodes_pid
;
227 struct core_regset_section
* core_regset_sections
;
228 gdbarch_core_xfer_shared_libraries_ftype
*core_xfer_shared_libraries
;
229 gdbarch_core_pid_to_str_ftype
*core_pid_to_str
;
230 const char * gcore_bfd_target
;
231 int vtable_function_descriptors
;
233 gdbarch_skip_permanent_breakpoint_ftype
*skip_permanent_breakpoint
;
234 ULONGEST max_insn_length
;
235 gdbarch_displaced_step_copy_insn_ftype
*displaced_step_copy_insn
;
236 gdbarch_displaced_step_hw_singlestep_ftype
*displaced_step_hw_singlestep
;
237 gdbarch_displaced_step_fixup_ftype
*displaced_step_fixup
;
238 gdbarch_displaced_step_free_closure_ftype
*displaced_step_free_closure
;
239 gdbarch_displaced_step_location_ftype
*displaced_step_location
;
240 gdbarch_overlay_update_ftype
*overlay_update
;
241 gdbarch_core_read_description_ftype
*core_read_description
;
242 gdbarch_static_transform_name_ftype
*static_transform_name
;
243 int sofun_address_maybe_missing
;
244 gdbarch_process_record_ftype
*process_record
;
245 gdbarch_process_record_signal_ftype
*process_record_signal
;
246 gdbarch_target_signal_from_host_ftype
*target_signal_from_host
;
247 gdbarch_target_signal_to_host_ftype
*target_signal_to_host
;
248 gdbarch_get_siginfo_type_ftype
*get_siginfo_type
;
249 gdbarch_record_special_symbol_ftype
*record_special_symbol
;
250 gdbarch_get_syscall_number_ftype
*get_syscall_number
;
251 int has_global_solist
;
252 int has_global_breakpoints
;
253 gdbarch_has_shared_address_space_ftype
*has_shared_address_space
;
254 gdbarch_fast_tracepoint_valid_at_ftype
*fast_tracepoint_valid_at
;
255 const char * qsupported
;
256 gdbarch_auto_charset_ftype
*auto_charset
;
257 gdbarch_auto_wide_charset_ftype
*auto_wide_charset
;
261 /* The default architecture uses host values (for want of a better
264 extern const struct bfd_arch_info bfd_default_arch_struct
;
266 struct gdbarch startup_gdbarch
=
268 1, /* Always initialized. */
269 NULL
, /* The obstack. */
270 /* basic architecture information */
271 &bfd_default_arch_struct
, /* bfd_arch_info */
272 BFD_ENDIAN_BIG
, /* byte_order */
273 BFD_ENDIAN_BIG
, /* byte_order_for_code */
274 GDB_OSABI_UNKNOWN
, /* osabi */
276 /* target specific vector and its dump routine */
278 /*per-architecture data-pointers and swap regions */
280 /* Multi-arch values */
281 1, /* bits_big_endian */
282 8 * sizeof (short), /* short_bit */
283 8 * sizeof (int), /* int_bit */
284 8 * sizeof (long), /* long_bit */
285 8 * sizeof (LONGEST
), /* long_long_bit */
286 8 * sizeof (float), /* float_bit */
287 0, /* float_format */
288 8 * sizeof (double), /* double_bit */
289 0, /* double_format */
290 8 * sizeof (long double), /* long_double_bit */
291 0, /* long_double_format */
292 8 * sizeof (void*), /* ptr_bit */
293 8 * sizeof (void*), /* addr_bit */
297 legacy_virtual_frame_pointer
, /* virtual_frame_pointer */
298 0, /* pseudo_register_read */
299 0, /* pseudo_register_write */
301 0, /* num_pseudo_regs */
306 no_op_reg_to_regnum
, /* stab_reg_to_regnum */
307 no_op_reg_to_regnum
, /* ecoff_reg_to_regnum */
308 no_op_reg_to_regnum
, /* sdb_reg_to_regnum */
309 no_op_reg_to_regnum
, /* dwarf2_reg_to_regnum */
310 0, /* register_name */
311 0, /* register_type */
313 -1, /* deprecated_fp_regnum */
314 0, /* push_dummy_call */
315 0, /* call_dummy_location */
316 0, /* push_dummy_code */
317 default_print_registers_info
, /* print_registers_info */
318 0, /* print_float_info */
319 0, /* print_vector_info */
320 legacy_register_sim_regno
, /* register_sim_regno */
321 cannot_register_not
, /* cannot_fetch_register */
322 cannot_register_not
, /* cannot_store_register */
323 0, /* get_longjmp_target */
324 0, /* believe_pcc_promotion */
325 generic_convert_register_p
, /* convert_register_p */
326 0, /* register_to_value */
327 0, /* value_to_register */
328 0, /* value_from_register */
329 unsigned_pointer_to_address
, /* pointer_to_address */
330 unsigned_address_to_pointer
, /* address_to_pointer */
331 0, /* integer_to_address */
332 0, /* return_value */
333 0, /* skip_prologue */
334 0, /* skip_main_prologue */
336 0, /* breakpoint_from_pc */
337 default_remote_breakpoint_from_pc
, /* remote_breakpoint_from_pc */
338 0, /* adjust_breakpoint_address */
339 default_memory_insert_breakpoint
, /* memory_insert_breakpoint */
340 default_memory_remove_breakpoint
, /* memory_remove_breakpoint */
341 0, /* decr_pc_after_break */
342 0, /* deprecated_function_start_offset */
343 default_remote_register_number
, /* remote_register_number */
344 0, /* fetch_tls_load_module_address */
345 0, /* frame_args_skip */
348 0, /* frame_num_args */
350 default_stabs_argument_has_addr
, /* stabs_argument_has_addr */
351 0, /* frame_red_zone_size */
352 convert_from_func_ptr_addr_identity
, /* convert_from_func_ptr_addr */
353 core_addr_identity
, /* addr_bits_remove */
354 core_addr_identity
, /* smash_text_address */
355 0, /* software_single_step */
356 0, /* single_step_through_delay */
358 0, /* skip_trampoline_code */
359 generic_skip_solib_resolver
, /* skip_solib_resolver */
360 generic_in_solib_return_trampoline
, /* in_solib_return_trampoline */
361 generic_in_function_epilogue_p
, /* in_function_epilogue_p */
362 0, /* elf_make_msymbol_special */
363 0, /* coff_make_msymbol_special */
364 0, /* cannot_step_breakpoint */
365 0, /* have_nonsteppable_watchpoint */
366 0, /* address_class_type_flags */
367 0, /* address_class_type_flags_to_name */
368 0, /* address_class_name_to_type_flags */
369 default_register_reggroup_p
, /* register_reggroup_p */
370 0, /* fetch_pointer_argument */
371 0, /* regset_from_core_section */
372 0, /* core_reg_section_encodes_pid */
373 0, /* core_regset_sections */
374 0, /* core_xfer_shared_libraries */
375 0, /* core_pid_to_str */
376 0, /* gcore_bfd_target */
377 0, /* vtable_function_descriptors */
378 0, /* vbit_in_delta */
379 0, /* skip_permanent_breakpoint */
380 0, /* max_insn_length */
381 0, /* displaced_step_copy_insn */
382 default_displaced_step_hw_singlestep
, /* displaced_step_hw_singlestep */
383 0, /* displaced_step_fixup */
384 NULL
, /* displaced_step_free_closure */
385 NULL
, /* displaced_step_location */
386 0, /* overlay_update */
387 0, /* core_read_description */
388 0, /* static_transform_name */
389 0, /* sofun_address_maybe_missing */
390 0, /* process_record */
391 0, /* process_record_signal */
392 default_target_signal_from_host
, /* target_signal_from_host */
393 default_target_signal_to_host
, /* target_signal_to_host */
394 0, /* get_siginfo_type */
395 0, /* record_special_symbol */
396 0, /* get_syscall_number */
397 0, /* has_global_solist */
398 0, /* has_global_breakpoints */
399 default_has_shared_address_space
, /* has_shared_address_space */
400 default_fast_tracepoint_valid_at
, /* fast_tracepoint_valid_at */
402 default_auto_charset
, /* auto_charset */
403 default_auto_wide_charset
, /* auto_wide_charset */
404 /* startup_gdbarch() */
407 struct gdbarch
*target_gdbarch
= &startup_gdbarch
;
409 /* Create a new ``struct gdbarch'' based on information provided by
410 ``struct gdbarch_info''. */
413 gdbarch_alloc (const struct gdbarch_info
*info
,
414 struct gdbarch_tdep
*tdep
)
416 struct gdbarch
*gdbarch
;
418 /* Create an obstack for allocating all the per-architecture memory,
419 then use that to allocate the architecture vector. */
420 struct obstack
*obstack
= XMALLOC (struct obstack
);
421 obstack_init (obstack
);
422 gdbarch
= obstack_alloc (obstack
, sizeof (*gdbarch
));
423 memset (gdbarch
, 0, sizeof (*gdbarch
));
424 gdbarch
->obstack
= obstack
;
426 alloc_gdbarch_data (gdbarch
);
428 gdbarch
->tdep
= tdep
;
430 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
431 gdbarch
->byte_order
= info
->byte_order
;
432 gdbarch
->byte_order_for_code
= info
->byte_order_for_code
;
433 gdbarch
->osabi
= info
->osabi
;
434 gdbarch
->target_desc
= info
->target_desc
;
436 /* Force the explicit initialization of these. */
437 gdbarch
->bits_big_endian
= (gdbarch
->byte_order
== BFD_ENDIAN_BIG
);
438 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
439 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
440 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
441 gdbarch
->long_long_bit
= 2*gdbarch
->long_bit
;
442 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
443 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
444 gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
445 gdbarch
->ptr_bit
= gdbarch
->int_bit
;
446 gdbarch
->char_signed
= -1;
447 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
448 gdbarch
->num_regs
= -1;
449 gdbarch
->sp_regnum
= -1;
450 gdbarch
->pc_regnum
= -1;
451 gdbarch
->ps_regnum
= -1;
452 gdbarch
->fp0_regnum
= -1;
453 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
454 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
455 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
456 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
457 gdbarch
->deprecated_fp_regnum
= -1;
458 gdbarch
->call_dummy_location
= AT_ENTRY_POINT
;
459 gdbarch
->print_registers_info
= default_print_registers_info
;
460 gdbarch
->register_sim_regno
= legacy_register_sim_regno
;
461 gdbarch
->cannot_fetch_register
= cannot_register_not
;
462 gdbarch
->cannot_store_register
= cannot_register_not
;
463 gdbarch
->convert_register_p
= generic_convert_register_p
;
464 gdbarch
->value_from_register
= default_value_from_register
;
465 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
466 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
467 gdbarch
->remote_breakpoint_from_pc
= default_remote_breakpoint_from_pc
;
468 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
469 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
470 gdbarch
->remote_register_number
= default_remote_register_number
;
471 gdbarch
->stabs_argument_has_addr
= default_stabs_argument_has_addr
;
472 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr_identity
;
473 gdbarch
->addr_bits_remove
= core_addr_identity
;
474 gdbarch
->smash_text_address
= core_addr_identity
;
475 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
476 gdbarch
->skip_solib_resolver
= generic_skip_solib_resolver
;
477 gdbarch
->in_solib_return_trampoline
= generic_in_solib_return_trampoline
;
478 gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
479 gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
480 gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
481 gdbarch
->register_reggroup_p
= default_register_reggroup_p
;
482 gdbarch
->displaced_step_hw_singlestep
= default_displaced_step_hw_singlestep
;
483 gdbarch
->displaced_step_fixup
= NULL
;
484 gdbarch
->displaced_step_free_closure
= NULL
;
485 gdbarch
->displaced_step_location
= NULL
;
486 gdbarch
->target_signal_from_host
= default_target_signal_from_host
;
487 gdbarch
->target_signal_to_host
= default_target_signal_to_host
;
488 gdbarch
->has_shared_address_space
= default_has_shared_address_space
;
489 gdbarch
->fast_tracepoint_valid_at
= default_fast_tracepoint_valid_at
;
490 gdbarch
->auto_charset
= default_auto_charset
;
491 gdbarch
->auto_wide_charset
= default_auto_wide_charset
;
492 /* gdbarch_alloc() */
498 /* Allocate extra space using the per-architecture obstack. */
501 gdbarch_obstack_zalloc (struct gdbarch
*arch
, long size
)
503 void *data
= obstack_alloc (arch
->obstack
, size
);
504 memset (data
, 0, size
);
509 /* Free a gdbarch struct. This should never happen in normal
510 operation --- once you've created a gdbarch, you keep it around.
511 However, if an architecture's init function encounters an error
512 building the structure, it may need to clean up a partially
513 constructed gdbarch. */
516 gdbarch_free (struct gdbarch
*arch
)
518 struct obstack
*obstack
;
519 gdb_assert (arch
!= NULL
);
520 gdb_assert (!arch
->initialized_p
);
521 obstack
= arch
->obstack
;
522 obstack_free (obstack
, 0); /* Includes the ARCH. */
527 /* Ensure that all values in a GDBARCH are reasonable. */
530 verify_gdbarch (struct gdbarch
*gdbarch
)
533 struct cleanup
*cleanups
;
536 log
= mem_fileopen ();
537 cleanups
= make_cleanup_ui_file_delete (log
);
539 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
540 fprintf_unfiltered (log
, "\n\tbyte-order");
541 if (gdbarch
->bfd_arch_info
== NULL
)
542 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
543 /* Check those that need to be defined for the given multi-arch level. */
544 /* Skip verify of bits_big_endian, invalid_p == 0 */
545 /* Skip verify of short_bit, invalid_p == 0 */
546 /* Skip verify of int_bit, invalid_p == 0 */
547 /* Skip verify of long_bit, invalid_p == 0 */
548 /* Skip verify of long_long_bit, invalid_p == 0 */
549 /* Skip verify of float_bit, invalid_p == 0 */
550 if (gdbarch
->float_format
== 0)
551 gdbarch
->float_format
= floatformats_ieee_single
;
552 /* Skip verify of double_bit, invalid_p == 0 */
553 if (gdbarch
->double_format
== 0)
554 gdbarch
->double_format
= floatformats_ieee_double
;
555 /* Skip verify of long_double_bit, invalid_p == 0 */
556 if (gdbarch
->long_double_format
== 0)
557 gdbarch
->long_double_format
= floatformats_ieee_double
;
558 /* Skip verify of ptr_bit, invalid_p == 0 */
559 if (gdbarch
->addr_bit
== 0)
560 gdbarch
->addr_bit
= gdbarch_ptr_bit (gdbarch
);
561 if (gdbarch
->char_signed
== -1)
562 gdbarch
->char_signed
= 1;
563 /* Skip verify of read_pc, has predicate */
564 /* Skip verify of write_pc, has predicate */
565 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
566 /* Skip verify of pseudo_register_read, has predicate */
567 /* Skip verify of pseudo_register_write, has predicate */
568 if (gdbarch
->num_regs
== -1)
569 fprintf_unfiltered (log
, "\n\tnum_regs");
570 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
571 /* Skip verify of sp_regnum, invalid_p == 0 */
572 /* Skip verify of pc_regnum, invalid_p == 0 */
573 /* Skip verify of ps_regnum, invalid_p == 0 */
574 /* Skip verify of fp0_regnum, invalid_p == 0 */
575 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
576 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
577 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
578 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
579 if (gdbarch
->register_name
== 0)
580 fprintf_unfiltered (log
, "\n\tregister_name");
581 /* Skip verify of register_type, has predicate */
582 /* Skip verify of dummy_id, has predicate */
583 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
584 /* Skip verify of push_dummy_call, has predicate */
585 /* Skip verify of call_dummy_location, invalid_p == 0 */
586 /* Skip verify of push_dummy_code, has predicate */
587 /* Skip verify of print_registers_info, invalid_p == 0 */
588 /* Skip verify of print_float_info, has predicate */
589 /* Skip verify of print_vector_info, has predicate */
590 /* Skip verify of register_sim_regno, invalid_p == 0 */
591 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
592 /* Skip verify of cannot_store_register, invalid_p == 0 */
593 /* Skip verify of get_longjmp_target, has predicate */
594 /* Skip verify of convert_register_p, invalid_p == 0 */
595 /* Skip verify of value_from_register, invalid_p == 0 */
596 /* Skip verify of pointer_to_address, invalid_p == 0 */
597 /* Skip verify of address_to_pointer, invalid_p == 0 */
598 /* Skip verify of integer_to_address, has predicate */
599 /* Skip verify of return_value, has predicate */
600 if (gdbarch
->skip_prologue
== 0)
601 fprintf_unfiltered (log
, "\n\tskip_prologue");
602 /* Skip verify of skip_main_prologue, has predicate */
603 if (gdbarch
->inner_than
== 0)
604 fprintf_unfiltered (log
, "\n\tinner_than");
605 if (gdbarch
->breakpoint_from_pc
== 0)
606 fprintf_unfiltered (log
, "\n\tbreakpoint_from_pc");
607 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
608 /* Skip verify of adjust_breakpoint_address, has predicate */
609 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
610 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
611 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
612 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
613 /* Skip verify of remote_register_number, invalid_p == 0 */
614 /* Skip verify of fetch_tls_load_module_address, has predicate */
615 /* Skip verify of frame_args_skip, invalid_p == 0 */
616 /* Skip verify of unwind_pc, has predicate */
617 /* Skip verify of unwind_sp, has predicate */
618 /* Skip verify of frame_num_args, has predicate */
619 /* Skip verify of frame_align, has predicate */
620 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
621 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
622 /* Skip verify of addr_bits_remove, invalid_p == 0 */
623 /* Skip verify of smash_text_address, invalid_p == 0 */
624 /* Skip verify of software_single_step, has predicate */
625 /* Skip verify of single_step_through_delay, has predicate */
626 if (gdbarch
->print_insn
== 0)
627 fprintf_unfiltered (log
, "\n\tprint_insn");
628 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
629 /* Skip verify of skip_solib_resolver, invalid_p == 0 */
630 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
631 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
632 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
633 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
634 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
635 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
636 /* Skip verify of address_class_type_flags, has predicate */
637 /* Skip verify of address_class_type_flags_to_name, has predicate */
638 /* Skip verify of address_class_name_to_type_flags, has predicate */
639 /* Skip verify of register_reggroup_p, invalid_p == 0 */
640 /* Skip verify of fetch_pointer_argument, has predicate */
641 /* Skip verify of regset_from_core_section, has predicate */
642 /* Skip verify of core_reg_section_encodes_pid, invalid_p == 0 */
643 /* Skip verify of core_xfer_shared_libraries, has predicate */
644 /* Skip verify of core_pid_to_str, has predicate */
645 /* Skip verify of gcore_bfd_target, has predicate */
646 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
647 /* Skip verify of vbit_in_delta, invalid_p == 0 */
648 /* Skip verify of skip_permanent_breakpoint, has predicate */
649 /* Skip verify of max_insn_length, has predicate */
650 /* Skip verify of displaced_step_copy_insn, has predicate */
651 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
652 /* Skip verify of displaced_step_fixup, has predicate */
653 if ((! gdbarch
->displaced_step_free_closure
) != (! gdbarch
->displaced_step_copy_insn
))
654 fprintf_unfiltered (log
, "\n\tdisplaced_step_free_closure");
655 if ((! gdbarch
->displaced_step_location
) != (! gdbarch
->displaced_step_copy_insn
))
656 fprintf_unfiltered (log
, "\n\tdisplaced_step_location");
657 /* Skip verify of overlay_update, has predicate */
658 /* Skip verify of core_read_description, has predicate */
659 /* Skip verify of static_transform_name, has predicate */
660 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
661 /* Skip verify of process_record, has predicate */
662 /* Skip verify of process_record_signal, has predicate */
663 /* Skip verify of target_signal_from_host, invalid_p == 0 */
664 /* Skip verify of target_signal_to_host, invalid_p == 0 */
665 /* Skip verify of get_siginfo_type, has predicate */
666 /* Skip verify of record_special_symbol, has predicate */
667 /* Skip verify of get_syscall_number, has predicate */
668 /* Skip verify of has_global_solist, invalid_p == 0 */
669 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
670 /* Skip verify of has_shared_address_space, invalid_p == 0 */
671 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */
672 /* Skip verify of qsupported, invalid_p == 0 */
673 /* Skip verify of auto_charset, invalid_p == 0 */
674 /* Skip verify of auto_wide_charset, invalid_p == 0 */
675 buf
= ui_file_xstrdup (log
, &length
);
676 make_cleanup (xfree
, buf
);
678 internal_error (__FILE__
, __LINE__
,
679 _("verify_gdbarch: the following are invalid ...%s"),
681 do_cleanups (cleanups
);
685 /* Print out the details of the current architecture. */
688 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
690 const char *gdb_nm_file
= "<not-defined>";
691 #if defined (GDB_NM_FILE)
692 gdb_nm_file
= GDB_NM_FILE
;
694 fprintf_unfiltered (file
,
695 "gdbarch_dump: GDB_NM_FILE = %s\n",
697 fprintf_unfiltered (file
,
698 "gdbarch_dump: addr_bit = %s\n",
699 plongest (gdbarch
->addr_bit
));
700 fprintf_unfiltered (file
,
701 "gdbarch_dump: addr_bits_remove = <%s>\n",
702 host_address_to_string (gdbarch
->addr_bits_remove
));
703 fprintf_unfiltered (file
,
704 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
705 gdbarch_address_class_name_to_type_flags_p (gdbarch
));
706 fprintf_unfiltered (file
,
707 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n",
708 host_address_to_string (gdbarch
->address_class_name_to_type_flags
));
709 fprintf_unfiltered (file
,
710 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n",
711 gdbarch_address_class_type_flags_p (gdbarch
));
712 fprintf_unfiltered (file
,
713 "gdbarch_dump: address_class_type_flags = <%s>\n",
714 host_address_to_string (gdbarch
->address_class_type_flags
));
715 fprintf_unfiltered (file
,
716 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
717 gdbarch_address_class_type_flags_to_name_p (gdbarch
));
718 fprintf_unfiltered (file
,
719 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n",
720 host_address_to_string (gdbarch
->address_class_type_flags_to_name
));
721 fprintf_unfiltered (file
,
722 "gdbarch_dump: address_to_pointer = <%s>\n",
723 host_address_to_string (gdbarch
->address_to_pointer
));
724 fprintf_unfiltered (file
,
725 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n",
726 gdbarch_adjust_breakpoint_address_p (gdbarch
));
727 fprintf_unfiltered (file
,
728 "gdbarch_dump: adjust_breakpoint_address = <%s>\n",
729 host_address_to_string (gdbarch
->adjust_breakpoint_address
));
730 fprintf_unfiltered (file
,
731 "gdbarch_dump: auto_charset = <%s>\n",
732 host_address_to_string (gdbarch
->auto_charset
));
733 fprintf_unfiltered (file
,
734 "gdbarch_dump: auto_wide_charset = <%s>\n",
735 host_address_to_string (gdbarch
->auto_wide_charset
));
736 fprintf_unfiltered (file
,
737 "gdbarch_dump: believe_pcc_promotion = %s\n",
738 plongest (gdbarch
->believe_pcc_promotion
));
739 fprintf_unfiltered (file
,
740 "gdbarch_dump: bfd_arch_info = %s\n",
741 gdbarch_bfd_arch_info (gdbarch
)->printable_name
);
742 fprintf_unfiltered (file
,
743 "gdbarch_dump: bits_big_endian = %s\n",
744 plongest (gdbarch
->bits_big_endian
));
745 fprintf_unfiltered (file
,
746 "gdbarch_dump: breakpoint_from_pc = <%s>\n",
747 host_address_to_string (gdbarch
->breakpoint_from_pc
));
748 fprintf_unfiltered (file
,
749 "gdbarch_dump: byte_order = %s\n",
750 plongest (gdbarch
->byte_order
));
751 fprintf_unfiltered (file
,
752 "gdbarch_dump: byte_order_for_code = %s\n",
753 plongest (gdbarch
->byte_order_for_code
));
754 fprintf_unfiltered (file
,
755 "gdbarch_dump: call_dummy_location = %s\n",
756 plongest (gdbarch
->call_dummy_location
));
757 fprintf_unfiltered (file
,
758 "gdbarch_dump: cannot_fetch_register = <%s>\n",
759 host_address_to_string (gdbarch
->cannot_fetch_register
));
760 fprintf_unfiltered (file
,
761 "gdbarch_dump: cannot_step_breakpoint = %s\n",
762 plongest (gdbarch
->cannot_step_breakpoint
));
763 fprintf_unfiltered (file
,
764 "gdbarch_dump: cannot_store_register = <%s>\n",
765 host_address_to_string (gdbarch
->cannot_store_register
));
766 fprintf_unfiltered (file
,
767 "gdbarch_dump: char_signed = %s\n",
768 plongest (gdbarch
->char_signed
));
769 fprintf_unfiltered (file
,
770 "gdbarch_dump: coff_make_msymbol_special = <%s>\n",
771 host_address_to_string (gdbarch
->coff_make_msymbol_special
));
772 fprintf_unfiltered (file
,
773 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n",
774 host_address_to_string (gdbarch
->convert_from_func_ptr_addr
));
775 fprintf_unfiltered (file
,
776 "gdbarch_dump: convert_register_p = <%s>\n",
777 host_address_to_string (gdbarch
->convert_register_p
));
778 fprintf_unfiltered (file
,
779 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n",
780 gdbarch_core_pid_to_str_p (gdbarch
));
781 fprintf_unfiltered (file
,
782 "gdbarch_dump: core_pid_to_str = <%s>\n",
783 host_address_to_string (gdbarch
->core_pid_to_str
));
784 fprintf_unfiltered (file
,
785 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n",
786 gdbarch_core_read_description_p (gdbarch
));
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: core_read_description = <%s>\n",
789 host_address_to_string (gdbarch
->core_read_description
));
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: core_reg_section_encodes_pid = %s\n",
792 plongest (gdbarch
->core_reg_section_encodes_pid
));
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: core_regset_sections = %s\n",
795 host_address_to_string (gdbarch
->core_regset_sections
));
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n",
798 gdbarch_core_xfer_shared_libraries_p (gdbarch
));
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n",
801 host_address_to_string (gdbarch
->core_xfer_shared_libraries
));
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: decr_pc_after_break = %s\n",
804 core_addr_to_string_nz (gdbarch
->decr_pc_after_break
));
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: deprecated_fp_regnum = %s\n",
807 plongest (gdbarch
->deprecated_fp_regnum
));
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: deprecated_function_start_offset = %s\n",
810 core_addr_to_string_nz (gdbarch
->deprecated_function_start_offset
));
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
813 gdbarch_displaced_step_copy_insn_p (gdbarch
));
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: displaced_step_copy_insn = <%s>\n",
816 host_address_to_string (gdbarch
->displaced_step_copy_insn
));
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n",
819 gdbarch_displaced_step_fixup_p (gdbarch
));
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: displaced_step_fixup = <%s>\n",
822 host_address_to_string (gdbarch
->displaced_step_fixup
));
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: displaced_step_free_closure = <%s>\n",
825 host_address_to_string (gdbarch
->displaced_step_free_closure
));
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n",
828 host_address_to_string (gdbarch
->displaced_step_hw_singlestep
));
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: displaced_step_location = <%s>\n",
831 host_address_to_string (gdbarch
->displaced_step_location
));
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: double_bit = %s\n",
834 plongest (gdbarch
->double_bit
));
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: double_format = %s\n",
837 pformat (gdbarch
->double_format
));
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n",
840 gdbarch_dummy_id_p (gdbarch
));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: dummy_id = <%s>\n",
843 host_address_to_string (gdbarch
->dummy_id
));
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n",
846 host_address_to_string (gdbarch
->dwarf2_reg_to_regnum
));
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n",
849 host_address_to_string (gdbarch
->ecoff_reg_to_regnum
));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: elf_make_msymbol_special = <%s>\n",
852 host_address_to_string (gdbarch
->elf_make_msymbol_special
));
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n",
855 host_address_to_string (gdbarch
->fast_tracepoint_valid_at
));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n",
858 gdbarch_fetch_pointer_argument_p (gdbarch
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: fetch_pointer_argument = <%s>\n",
861 host_address_to_string (gdbarch
->fetch_pointer_argument
));
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n",
864 gdbarch_fetch_tls_load_module_address_p (gdbarch
));
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n",
867 host_address_to_string (gdbarch
->fetch_tls_load_module_address
));
868 fprintf_unfiltered (file
,
869 "gdbarch_dump: float_bit = %s\n",
870 plongest (gdbarch
->float_bit
));
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: float_format = %s\n",
873 pformat (gdbarch
->float_format
));
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: fp0_regnum = %s\n",
876 plongest (gdbarch
->fp0_regnum
));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
879 gdbarch_frame_align_p (gdbarch
));
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: frame_align = <%s>\n",
882 host_address_to_string (gdbarch
->frame_align
));
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: frame_args_skip = %s\n",
885 core_addr_to_string_nz (gdbarch
->frame_args_skip
));
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
888 gdbarch_frame_num_args_p (gdbarch
));
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: frame_num_args = <%s>\n",
891 host_address_to_string (gdbarch
->frame_num_args
));
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: frame_red_zone_size = %s\n",
894 plongest (gdbarch
->frame_red_zone_size
));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n",
897 gdbarch_gcore_bfd_target_p (gdbarch
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: gcore_bfd_target = %s\n",
900 gdbarch
->gcore_bfd_target
);
901 fprintf_unfiltered (file
,
902 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
903 gdbarch_get_longjmp_target_p (gdbarch
));
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: get_longjmp_target = <%s>\n",
906 host_address_to_string (gdbarch
->get_longjmp_target
));
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
909 gdbarch_get_siginfo_type_p (gdbarch
));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: get_siginfo_type = <%s>\n",
912 host_address_to_string (gdbarch
->get_siginfo_type
));
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n",
915 gdbarch_get_syscall_number_p (gdbarch
));
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: get_syscall_number = <%s>\n",
918 host_address_to_string (gdbarch
->get_syscall_number
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: has_global_breakpoints = %s\n",
921 plongest (gdbarch
->has_global_breakpoints
));
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: has_global_solist = %s\n",
924 plongest (gdbarch
->has_global_solist
));
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: has_shared_address_space = <%s>\n",
927 host_address_to_string (gdbarch
->has_shared_address_space
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
930 plongest (gdbarch
->have_nonsteppable_watchpoint
));
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: in_function_epilogue_p = <%s>\n",
933 host_address_to_string (gdbarch
->in_function_epilogue_p
));
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: in_solib_return_trampoline = <%s>\n",
936 host_address_to_string (gdbarch
->in_solib_return_trampoline
));
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: inner_than = <%s>\n",
939 host_address_to_string (gdbarch
->inner_than
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: int_bit = %s\n",
942 plongest (gdbarch
->int_bit
));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
945 gdbarch_integer_to_address_p (gdbarch
));
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: integer_to_address = <%s>\n",
948 host_address_to_string (gdbarch
->integer_to_address
));
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: long_bit = %s\n",
951 plongest (gdbarch
->long_bit
));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: long_double_bit = %s\n",
954 plongest (gdbarch
->long_double_bit
));
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: long_double_format = %s\n",
957 pformat (gdbarch
->long_double_format
));
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: long_long_bit = %s\n",
960 plongest (gdbarch
->long_long_bit
));
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
963 gdbarch_max_insn_length_p (gdbarch
));
964 fprintf_unfiltered (file
,
965 "gdbarch_dump: max_insn_length = %s\n",
966 plongest (gdbarch
->max_insn_length
));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: memory_insert_breakpoint = <%s>\n",
969 host_address_to_string (gdbarch
->memory_insert_breakpoint
));
970 fprintf_unfiltered (file
,
971 "gdbarch_dump: memory_remove_breakpoint = <%s>\n",
972 host_address_to_string (gdbarch
->memory_remove_breakpoint
));
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: num_pseudo_regs = %s\n",
975 plongest (gdbarch
->num_pseudo_regs
));
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: num_regs = %s\n",
978 plongest (gdbarch
->num_regs
));
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: osabi = %s\n",
981 plongest (gdbarch
->osabi
));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
984 gdbarch_overlay_update_p (gdbarch
));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: overlay_update = <%s>\n",
987 host_address_to_string (gdbarch
->overlay_update
));
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: pc_regnum = %s\n",
990 plongest (gdbarch
->pc_regnum
));
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: pointer_to_address = <%s>\n",
993 host_address_to_string (gdbarch
->pointer_to_address
));
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
996 gdbarch_print_float_info_p (gdbarch
));
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: print_float_info = <%s>\n",
999 host_address_to_string (gdbarch
->print_float_info
));
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: print_insn = <%s>\n",
1002 host_address_to_string (gdbarch
->print_insn
));
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: print_registers_info = <%s>\n",
1005 host_address_to_string (gdbarch
->print_registers_info
));
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1008 gdbarch_print_vector_info_p (gdbarch
));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: print_vector_info = <%s>\n",
1011 host_address_to_string (gdbarch
->print_vector_info
));
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: gdbarch_process_record_p() = %d\n",
1014 gdbarch_process_record_p (gdbarch
));
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: process_record = <%s>\n",
1017 host_address_to_string (gdbarch
->process_record
));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n",
1020 gdbarch_process_record_signal_p (gdbarch
));
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: process_record_signal = <%s>\n",
1023 host_address_to_string (gdbarch
->process_record_signal
));
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: ps_regnum = %s\n",
1026 plongest (gdbarch
->ps_regnum
));
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
1029 gdbarch_pseudo_register_read_p (gdbarch
));
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: pseudo_register_read = <%s>\n",
1032 host_address_to_string (gdbarch
->pseudo_register_read
));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
1035 gdbarch_pseudo_register_write_p (gdbarch
));
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: pseudo_register_write = <%s>\n",
1038 host_address_to_string (gdbarch
->pseudo_register_write
));
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: ptr_bit = %s\n",
1041 plongest (gdbarch
->ptr_bit
));
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1044 gdbarch_push_dummy_call_p (gdbarch
));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: push_dummy_call = <%s>\n",
1047 host_address_to_string (gdbarch
->push_dummy_call
));
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n",
1050 gdbarch_push_dummy_code_p (gdbarch
));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: push_dummy_code = <%s>\n",
1053 host_address_to_string (gdbarch
->push_dummy_code
));
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: qsupported = %s\n",
1056 gdbarch
->qsupported
);
1057 fprintf_unfiltered (file
,
1058 "gdbarch_dump: gdbarch_read_pc_p() = %d\n",
1059 gdbarch_read_pc_p (gdbarch
));
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: read_pc = <%s>\n",
1062 host_address_to_string (gdbarch
->read_pc
));
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n",
1065 gdbarch_record_special_symbol_p (gdbarch
));
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: record_special_symbol = <%s>\n",
1068 host_address_to_string (gdbarch
->record_special_symbol
));
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: register_name = <%s>\n",
1071 host_address_to_string (gdbarch
->register_name
));
1072 fprintf_unfiltered (file
,
1073 "gdbarch_dump: register_reggroup_p = <%s>\n",
1074 host_address_to_string (gdbarch
->register_reggroup_p
));
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: register_sim_regno = <%s>\n",
1077 host_address_to_string (gdbarch
->register_sim_regno
));
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: register_to_value = <%s>\n",
1080 host_address_to_string (gdbarch
->register_to_value
));
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
1083 gdbarch_register_type_p (gdbarch
));
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: register_type = <%s>\n",
1086 host_address_to_string (gdbarch
->register_type
));
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
1089 gdbarch_regset_from_core_section_p (gdbarch
));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: regset_from_core_section = <%s>\n",
1092 host_address_to_string (gdbarch
->regset_from_core_section
));
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n",
1095 host_address_to_string (gdbarch
->remote_breakpoint_from_pc
));
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: remote_register_number = <%s>\n",
1098 host_address_to_string (gdbarch
->remote_register_number
));
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: gdbarch_return_value_p() = %d\n",
1101 gdbarch_return_value_p (gdbarch
));
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: return_value = <%s>\n",
1104 host_address_to_string (gdbarch
->return_value
));
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n",
1107 host_address_to_string (gdbarch
->sdb_reg_to_regnum
));
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: short_bit = %s\n",
1110 plongest (gdbarch
->short_bit
));
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
1113 gdbarch_single_step_through_delay_p (gdbarch
));
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: single_step_through_delay = <%s>\n",
1116 host_address_to_string (gdbarch
->single_step_through_delay
));
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n",
1119 gdbarch_skip_main_prologue_p (gdbarch
));
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: skip_main_prologue = <%s>\n",
1122 host_address_to_string (gdbarch
->skip_main_prologue
));
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n",
1125 gdbarch_skip_permanent_breakpoint_p (gdbarch
));
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
1128 host_address_to_string (gdbarch
->skip_permanent_breakpoint
));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: skip_prologue = <%s>\n",
1131 host_address_to_string (gdbarch
->skip_prologue
));
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: skip_solib_resolver = <%s>\n",
1134 host_address_to_string (gdbarch
->skip_solib_resolver
));
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: skip_trampoline_code = <%s>\n",
1137 host_address_to_string (gdbarch
->skip_trampoline_code
));
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: smash_text_address = <%s>\n",
1140 host_address_to_string (gdbarch
->smash_text_address
));
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
1143 gdbarch_software_single_step_p (gdbarch
));
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: software_single_step = <%s>\n",
1146 host_address_to_string (gdbarch
->software_single_step
));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: sofun_address_maybe_missing = %s\n",
1149 plongest (gdbarch
->sofun_address_maybe_missing
));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: sp_regnum = %s\n",
1152 plongest (gdbarch
->sp_regnum
));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: stab_reg_to_regnum = <%s>\n",
1155 host_address_to_string (gdbarch
->stab_reg_to_regnum
));
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: stabs_argument_has_addr = <%s>\n",
1158 host_address_to_string (gdbarch
->stabs_argument_has_addr
));
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
1161 gdbarch_static_transform_name_p (gdbarch
));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: static_transform_name = <%s>\n",
1164 host_address_to_string (gdbarch
->static_transform_name
));
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: target_desc = %s\n",
1167 host_address_to_string (gdbarch
->target_desc
));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: target_signal_from_host = <%s>\n",
1170 host_address_to_string (gdbarch
->target_signal_from_host
));
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: target_signal_to_host = <%s>\n",
1173 host_address_to_string (gdbarch
->target_signal_to_host
));
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
1176 gdbarch_unwind_pc_p (gdbarch
));
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: unwind_pc = <%s>\n",
1179 host_address_to_string (gdbarch
->unwind_pc
));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
1182 gdbarch_unwind_sp_p (gdbarch
));
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: unwind_sp = <%s>\n",
1185 host_address_to_string (gdbarch
->unwind_sp
));
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: value_from_register = <%s>\n",
1188 host_address_to_string (gdbarch
->value_from_register
));
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: value_to_register = <%s>\n",
1191 host_address_to_string (gdbarch
->value_to_register
));
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: vbit_in_delta = %s\n",
1194 plongest (gdbarch
->vbit_in_delta
));
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: virtual_frame_pointer = <%s>\n",
1197 host_address_to_string (gdbarch
->virtual_frame_pointer
));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: vtable_function_descriptors = %s\n",
1200 plongest (gdbarch
->vtable_function_descriptors
));
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: gdbarch_write_pc_p() = %d\n",
1203 gdbarch_write_pc_p (gdbarch
));
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: write_pc = <%s>\n",
1206 host_address_to_string (gdbarch
->write_pc
));
1207 if (gdbarch
->dump_tdep
!= NULL
)
1208 gdbarch
->dump_tdep (gdbarch
, file
);
1211 struct gdbarch_tdep
*
1212 gdbarch_tdep (struct gdbarch
*gdbarch
)
1214 if (gdbarch_debug
>= 2)
1215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
1216 return gdbarch
->tdep
;
1220 const struct bfd_arch_info
*
1221 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
1223 gdb_assert (gdbarch
!= NULL
);
1224 if (gdbarch_debug
>= 2)
1225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
1226 return gdbarch
->bfd_arch_info
;
1230 gdbarch_byte_order (struct gdbarch
*gdbarch
)
1232 gdb_assert (gdbarch
!= NULL
);
1233 if (gdbarch_debug
>= 2)
1234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
1235 return gdbarch
->byte_order
;
1239 gdbarch_byte_order_for_code (struct gdbarch
*gdbarch
)
1241 gdb_assert (gdbarch
!= NULL
);
1242 if (gdbarch_debug
>= 2)
1243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order_for_code called\n");
1244 return gdbarch
->byte_order_for_code
;
1248 gdbarch_osabi (struct gdbarch
*gdbarch
)
1250 gdb_assert (gdbarch
!= NULL
);
1251 if (gdbarch_debug
>= 2)
1252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_osabi called\n");
1253 return gdbarch
->osabi
;
1256 const struct target_desc
*
1257 gdbarch_target_desc (struct gdbarch
*gdbarch
)
1259 gdb_assert (gdbarch
!= NULL
);
1260 if (gdbarch_debug
>= 2)
1261 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_desc called\n");
1262 return gdbarch
->target_desc
;
1266 gdbarch_bits_big_endian (struct gdbarch
*gdbarch
)
1268 gdb_assert (gdbarch
!= NULL
);
1269 /* Skip verify of bits_big_endian, invalid_p == 0 */
1270 if (gdbarch_debug
>= 2)
1271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bits_big_endian called\n");
1272 return gdbarch
->bits_big_endian
;
1276 set_gdbarch_bits_big_endian (struct gdbarch
*gdbarch
,
1277 int bits_big_endian
)
1279 gdbarch
->bits_big_endian
= bits_big_endian
;
1283 gdbarch_short_bit (struct gdbarch
*gdbarch
)
1285 gdb_assert (gdbarch
!= NULL
);
1286 /* Skip verify of short_bit, invalid_p == 0 */
1287 if (gdbarch_debug
>= 2)
1288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
1289 return gdbarch
->short_bit
;
1293 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
1296 gdbarch
->short_bit
= short_bit
;
1300 gdbarch_int_bit (struct gdbarch
*gdbarch
)
1302 gdb_assert (gdbarch
!= NULL
);
1303 /* Skip verify of int_bit, invalid_p == 0 */
1304 if (gdbarch_debug
>= 2)
1305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
1306 return gdbarch
->int_bit
;
1310 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
1313 gdbarch
->int_bit
= int_bit
;
1317 gdbarch_long_bit (struct gdbarch
*gdbarch
)
1319 gdb_assert (gdbarch
!= NULL
);
1320 /* Skip verify of long_bit, invalid_p == 0 */
1321 if (gdbarch_debug
>= 2)
1322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
1323 return gdbarch
->long_bit
;
1327 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
1330 gdbarch
->long_bit
= long_bit
;
1334 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
1336 gdb_assert (gdbarch
!= NULL
);
1337 /* Skip verify of long_long_bit, invalid_p == 0 */
1338 if (gdbarch_debug
>= 2)
1339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
1340 return gdbarch
->long_long_bit
;
1344 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
1347 gdbarch
->long_long_bit
= long_long_bit
;
1351 gdbarch_float_bit (struct gdbarch
*gdbarch
)
1353 gdb_assert (gdbarch
!= NULL
);
1354 /* Skip verify of float_bit, invalid_p == 0 */
1355 if (gdbarch_debug
>= 2)
1356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
1357 return gdbarch
->float_bit
;
1361 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
1364 gdbarch
->float_bit
= float_bit
;
1367 const struct floatformat
**
1368 gdbarch_float_format (struct gdbarch
*gdbarch
)
1370 gdb_assert (gdbarch
!= NULL
);
1371 if (gdbarch_debug
>= 2)
1372 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
1373 return gdbarch
->float_format
;
1377 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
1378 const struct floatformat
** float_format
)
1380 gdbarch
->float_format
= float_format
;
1384 gdbarch_double_bit (struct gdbarch
*gdbarch
)
1386 gdb_assert (gdbarch
!= NULL
);
1387 /* Skip verify of double_bit, invalid_p == 0 */
1388 if (gdbarch_debug
>= 2)
1389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
1390 return gdbarch
->double_bit
;
1394 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
1397 gdbarch
->double_bit
= double_bit
;
1400 const struct floatformat
**
1401 gdbarch_double_format (struct gdbarch
*gdbarch
)
1403 gdb_assert (gdbarch
!= NULL
);
1404 if (gdbarch_debug
>= 2)
1405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
1406 return gdbarch
->double_format
;
1410 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
1411 const struct floatformat
** double_format
)
1413 gdbarch
->double_format
= double_format
;
1417 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
1419 gdb_assert (gdbarch
!= NULL
);
1420 /* Skip verify of long_double_bit, invalid_p == 0 */
1421 if (gdbarch_debug
>= 2)
1422 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
1423 return gdbarch
->long_double_bit
;
1427 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
1428 int long_double_bit
)
1430 gdbarch
->long_double_bit
= long_double_bit
;
1433 const struct floatformat
**
1434 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
1436 gdb_assert (gdbarch
!= NULL
);
1437 if (gdbarch_debug
>= 2)
1438 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
1439 return gdbarch
->long_double_format
;
1443 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
1444 const struct floatformat
** long_double_format
)
1446 gdbarch
->long_double_format
= long_double_format
;
1450 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
1452 gdb_assert (gdbarch
!= NULL
);
1453 /* Skip verify of ptr_bit, invalid_p == 0 */
1454 if (gdbarch_debug
>= 2)
1455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
1456 return gdbarch
->ptr_bit
;
1460 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
1463 gdbarch
->ptr_bit
= ptr_bit
;
1467 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
1469 gdb_assert (gdbarch
!= NULL
);
1470 /* Check variable changed from pre-default. */
1471 gdb_assert (gdbarch
->addr_bit
!= 0);
1472 if (gdbarch_debug
>= 2)
1473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
1474 return gdbarch
->addr_bit
;
1478 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
1481 gdbarch
->addr_bit
= addr_bit
;
1485 gdbarch_char_signed (struct gdbarch
*gdbarch
)
1487 gdb_assert (gdbarch
!= NULL
);
1488 /* Check variable changed from pre-default. */
1489 gdb_assert (gdbarch
->char_signed
!= -1);
1490 if (gdbarch_debug
>= 2)
1491 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
1492 return gdbarch
->char_signed
;
1496 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
1499 gdbarch
->char_signed
= char_signed
;
1503 gdbarch_read_pc_p (struct gdbarch
*gdbarch
)
1505 gdb_assert (gdbarch
!= NULL
);
1506 return gdbarch
->read_pc
!= NULL
;
1510 gdbarch_read_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
1512 gdb_assert (gdbarch
!= NULL
);
1513 gdb_assert (gdbarch
->read_pc
!= NULL
);
1514 if (gdbarch_debug
>= 2)
1515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
1516 return gdbarch
->read_pc (regcache
);
1520 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
1521 gdbarch_read_pc_ftype read_pc
)
1523 gdbarch
->read_pc
= read_pc
;
1527 gdbarch_write_pc_p (struct gdbarch
*gdbarch
)
1529 gdb_assert (gdbarch
!= NULL
);
1530 return gdbarch
->write_pc
!= NULL
;
1534 gdbarch_write_pc (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR val
)
1536 gdb_assert (gdbarch
!= NULL
);
1537 gdb_assert (gdbarch
->write_pc
!= NULL
);
1538 if (gdbarch_debug
>= 2)
1539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
1540 gdbarch
->write_pc (regcache
, val
);
1544 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
1545 gdbarch_write_pc_ftype write_pc
)
1547 gdbarch
->write_pc
= write_pc
;
1551 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
1553 gdb_assert (gdbarch
!= NULL
);
1554 gdb_assert (gdbarch
->virtual_frame_pointer
!= NULL
);
1555 if (gdbarch_debug
>= 2)
1556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
1557 gdbarch
->virtual_frame_pointer (gdbarch
, pc
, frame_regnum
, frame_offset
);
1561 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
1562 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
1564 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
1568 gdbarch_pseudo_register_read_p (struct gdbarch
*gdbarch
)
1570 gdb_assert (gdbarch
!= NULL
);
1571 return gdbarch
->pseudo_register_read
!= NULL
;
1575 gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, gdb_byte
*buf
)
1577 gdb_assert (gdbarch
!= NULL
);
1578 gdb_assert (gdbarch
->pseudo_register_read
!= NULL
);
1579 if (gdbarch_debug
>= 2)
1580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_read called\n");
1581 gdbarch
->pseudo_register_read (gdbarch
, regcache
, cookednum
, buf
);
1585 set_gdbarch_pseudo_register_read (struct gdbarch
*gdbarch
,
1586 gdbarch_pseudo_register_read_ftype pseudo_register_read
)
1588 gdbarch
->pseudo_register_read
= pseudo_register_read
;
1592 gdbarch_pseudo_register_write_p (struct gdbarch
*gdbarch
)
1594 gdb_assert (gdbarch
!= NULL
);
1595 return gdbarch
->pseudo_register_write
!= NULL
;
1599 gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
, struct regcache
*regcache
, int cookednum
, const gdb_byte
*buf
)
1601 gdb_assert (gdbarch
!= NULL
);
1602 gdb_assert (gdbarch
->pseudo_register_write
!= NULL
);
1603 if (gdbarch_debug
>= 2)
1604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pseudo_register_write called\n");
1605 gdbarch
->pseudo_register_write (gdbarch
, regcache
, cookednum
, buf
);
1609 set_gdbarch_pseudo_register_write (struct gdbarch
*gdbarch
,
1610 gdbarch_pseudo_register_write_ftype pseudo_register_write
)
1612 gdbarch
->pseudo_register_write
= pseudo_register_write
;
1616 gdbarch_num_regs (struct gdbarch
*gdbarch
)
1618 gdb_assert (gdbarch
!= NULL
);
1619 /* Check variable changed from pre-default. */
1620 gdb_assert (gdbarch
->num_regs
!= -1);
1621 if (gdbarch_debug
>= 2)
1622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
1623 return gdbarch
->num_regs
;
1627 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
1630 gdbarch
->num_regs
= num_regs
;
1634 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
1636 gdb_assert (gdbarch
!= NULL
);
1637 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
1638 if (gdbarch_debug
>= 2)
1639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
1640 return gdbarch
->num_pseudo_regs
;
1644 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
1645 int num_pseudo_regs
)
1647 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
1651 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
1653 gdb_assert (gdbarch
!= NULL
);
1654 /* Skip verify of sp_regnum, invalid_p == 0 */
1655 if (gdbarch_debug
>= 2)
1656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
1657 return gdbarch
->sp_regnum
;
1661 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
1664 gdbarch
->sp_regnum
= sp_regnum
;
1668 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
1670 gdb_assert (gdbarch
!= NULL
);
1671 /* Skip verify of pc_regnum, invalid_p == 0 */
1672 if (gdbarch_debug
>= 2)
1673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
1674 return gdbarch
->pc_regnum
;
1678 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
1681 gdbarch
->pc_regnum
= pc_regnum
;
1685 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
1687 gdb_assert (gdbarch
!= NULL
);
1688 /* Skip verify of ps_regnum, invalid_p == 0 */
1689 if (gdbarch_debug
>= 2)
1690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
1691 return gdbarch
->ps_regnum
;
1695 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
1698 gdbarch
->ps_regnum
= ps_regnum
;
1702 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
1704 gdb_assert (gdbarch
!= NULL
);
1705 /* Skip verify of fp0_regnum, invalid_p == 0 */
1706 if (gdbarch_debug
>= 2)
1707 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
1708 return gdbarch
->fp0_regnum
;
1712 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
1715 gdbarch
->fp0_regnum
= fp0_regnum
;
1719 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
1721 gdb_assert (gdbarch
!= NULL
);
1722 gdb_assert (gdbarch
->stab_reg_to_regnum
!= NULL
);
1723 if (gdbarch_debug
>= 2)
1724 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
1725 return gdbarch
->stab_reg_to_regnum (gdbarch
, stab_regnr
);
1729 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
1730 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
1732 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
1736 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
1738 gdb_assert (gdbarch
!= NULL
);
1739 gdb_assert (gdbarch
->ecoff_reg_to_regnum
!= NULL
);
1740 if (gdbarch_debug
>= 2)
1741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
1742 return gdbarch
->ecoff_reg_to_regnum (gdbarch
, ecoff_regnr
);
1746 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
1747 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
1749 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
1753 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
1755 gdb_assert (gdbarch
!= NULL
);
1756 gdb_assert (gdbarch
->sdb_reg_to_regnum
!= NULL
);
1757 if (gdbarch_debug
>= 2)
1758 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
1759 return gdbarch
->sdb_reg_to_regnum (gdbarch
, sdb_regnr
);
1763 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
1764 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
1766 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
1770 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
1772 gdb_assert (gdbarch
!= NULL
);
1773 gdb_assert (gdbarch
->dwarf2_reg_to_regnum
!= NULL
);
1774 if (gdbarch_debug
>= 2)
1775 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
1776 return gdbarch
->dwarf2_reg_to_regnum (gdbarch
, dwarf2_regnr
);
1780 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
1781 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
1783 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
1787 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
1789 gdb_assert (gdbarch
!= NULL
);
1790 gdb_assert (gdbarch
->register_name
!= NULL
);
1791 if (gdbarch_debug
>= 2)
1792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
1793 return gdbarch
->register_name (gdbarch
, regnr
);
1797 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
1798 gdbarch_register_name_ftype register_name
)
1800 gdbarch
->register_name
= register_name
;
1804 gdbarch_register_type_p (struct gdbarch
*gdbarch
)
1806 gdb_assert (gdbarch
!= NULL
);
1807 return gdbarch
->register_type
!= NULL
;
1811 gdbarch_register_type (struct gdbarch
*gdbarch
, int reg_nr
)
1813 gdb_assert (gdbarch
!= NULL
);
1814 gdb_assert (gdbarch
->register_type
!= NULL
);
1815 if (gdbarch_debug
>= 2)
1816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_type called\n");
1817 return gdbarch
->register_type (gdbarch
, reg_nr
);
1821 set_gdbarch_register_type (struct gdbarch
*gdbarch
,
1822 gdbarch_register_type_ftype register_type
)
1824 gdbarch
->register_type
= register_type
;
1828 gdbarch_dummy_id_p (struct gdbarch
*gdbarch
)
1830 gdb_assert (gdbarch
!= NULL
);
1831 return gdbarch
->dummy_id
!= NULL
;
1835 gdbarch_dummy_id (struct gdbarch
*gdbarch
, struct frame_info
*this_frame
)
1837 gdb_assert (gdbarch
!= NULL
);
1838 gdb_assert (gdbarch
->dummy_id
!= NULL
);
1839 if (gdbarch_debug
>= 2)
1840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dummy_id called\n");
1841 return gdbarch
->dummy_id (gdbarch
, this_frame
);
1845 set_gdbarch_dummy_id (struct gdbarch
*gdbarch
,
1846 gdbarch_dummy_id_ftype dummy_id
)
1848 gdbarch
->dummy_id
= dummy_id
;
1852 gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
)
1854 gdb_assert (gdbarch
!= NULL
);
1855 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
1856 if (gdbarch_debug
>= 2)
1857 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_fp_regnum called\n");
1858 return gdbarch
->deprecated_fp_regnum
;
1862 set_gdbarch_deprecated_fp_regnum (struct gdbarch
*gdbarch
,
1863 int deprecated_fp_regnum
)
1865 gdbarch
->deprecated_fp_regnum
= deprecated_fp_regnum
;
1869 gdbarch_push_dummy_call_p (struct gdbarch
*gdbarch
)
1871 gdb_assert (gdbarch
!= NULL
);
1872 return gdbarch
->push_dummy_call
!= NULL
;
1876 gdbarch_push_dummy_call (struct gdbarch
*gdbarch
, struct value
*function
, struct regcache
*regcache
, CORE_ADDR bp_addr
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
1878 gdb_assert (gdbarch
!= NULL
);
1879 gdb_assert (gdbarch
->push_dummy_call
!= NULL
);
1880 if (gdbarch_debug
>= 2)
1881 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_call called\n");
1882 return gdbarch
->push_dummy_call (gdbarch
, function
, regcache
, bp_addr
, nargs
, args
, sp
, struct_return
, struct_addr
);
1886 set_gdbarch_push_dummy_call (struct gdbarch
*gdbarch
,
1887 gdbarch_push_dummy_call_ftype push_dummy_call
)
1889 gdbarch
->push_dummy_call
= push_dummy_call
;
1893 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
1895 gdb_assert (gdbarch
!= NULL
);
1896 /* Skip verify of call_dummy_location, invalid_p == 0 */
1897 if (gdbarch_debug
>= 2)
1898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
1899 return gdbarch
->call_dummy_location
;
1903 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
1904 int call_dummy_location
)
1906 gdbarch
->call_dummy_location
= call_dummy_location
;
1910 gdbarch_push_dummy_code_p (struct gdbarch
*gdbarch
)
1912 gdb_assert (gdbarch
!= NULL
);
1913 return gdbarch
->push_dummy_code
!= NULL
;
1917 gdbarch_push_dummy_code (struct gdbarch
*gdbarch
, CORE_ADDR sp
, CORE_ADDR funaddr
, struct value
**args
, int nargs
, struct type
*value_type
, CORE_ADDR
*real_pc
, CORE_ADDR
*bp_addr
, struct regcache
*regcache
)
1919 gdb_assert (gdbarch
!= NULL
);
1920 gdb_assert (gdbarch
->push_dummy_code
!= NULL
);
1921 if (gdbarch_debug
>= 2)
1922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_code called\n");
1923 return gdbarch
->push_dummy_code (gdbarch
, sp
, funaddr
, args
, nargs
, value_type
, real_pc
, bp_addr
, regcache
);
1927 set_gdbarch_push_dummy_code (struct gdbarch
*gdbarch
,
1928 gdbarch_push_dummy_code_ftype push_dummy_code
)
1930 gdbarch
->push_dummy_code
= push_dummy_code
;
1934 gdbarch_print_registers_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, int regnum
, int all
)
1936 gdb_assert (gdbarch
!= NULL
);
1937 gdb_assert (gdbarch
->print_registers_info
!= NULL
);
1938 if (gdbarch_debug
>= 2)
1939 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_registers_info called\n");
1940 gdbarch
->print_registers_info (gdbarch
, file
, frame
, regnum
, all
);
1944 set_gdbarch_print_registers_info (struct gdbarch
*gdbarch
,
1945 gdbarch_print_registers_info_ftype print_registers_info
)
1947 gdbarch
->print_registers_info
= print_registers_info
;
1951 gdbarch_print_float_info_p (struct gdbarch
*gdbarch
)
1953 gdb_assert (gdbarch
!= NULL
);
1954 return gdbarch
->print_float_info
!= NULL
;
1958 gdbarch_print_float_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
1960 gdb_assert (gdbarch
!= NULL
);
1961 gdb_assert (gdbarch
->print_float_info
!= NULL
);
1962 if (gdbarch_debug
>= 2)
1963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
1964 gdbarch
->print_float_info (gdbarch
, file
, frame
, args
);
1968 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
1969 gdbarch_print_float_info_ftype print_float_info
)
1971 gdbarch
->print_float_info
= print_float_info
;
1975 gdbarch_print_vector_info_p (struct gdbarch
*gdbarch
)
1977 gdb_assert (gdbarch
!= NULL
);
1978 return gdbarch
->print_vector_info
!= NULL
;
1982 gdbarch_print_vector_info (struct gdbarch
*gdbarch
, struct ui_file
*file
, struct frame_info
*frame
, const char *args
)
1984 gdb_assert (gdbarch
!= NULL
);
1985 gdb_assert (gdbarch
->print_vector_info
!= NULL
);
1986 if (gdbarch_debug
>= 2)
1987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_vector_info called\n");
1988 gdbarch
->print_vector_info (gdbarch
, file
, frame
, args
);
1992 set_gdbarch_print_vector_info (struct gdbarch
*gdbarch
,
1993 gdbarch_print_vector_info_ftype print_vector_info
)
1995 gdbarch
->print_vector_info
= print_vector_info
;
1999 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2001 gdb_assert (gdbarch
!= NULL
);
2002 gdb_assert (gdbarch
->register_sim_regno
!= NULL
);
2003 if (gdbarch_debug
>= 2)
2004 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2005 return gdbarch
->register_sim_regno (gdbarch
, reg_nr
);
2009 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2010 gdbarch_register_sim_regno_ftype register_sim_regno
)
2012 gdbarch
->register_sim_regno
= register_sim_regno
;
2016 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2018 gdb_assert (gdbarch
!= NULL
);
2019 gdb_assert (gdbarch
->cannot_fetch_register
!= NULL
);
2020 if (gdbarch_debug
>= 2)
2021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2022 return gdbarch
->cannot_fetch_register (gdbarch
, regnum
);
2026 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2027 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2029 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2033 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2035 gdb_assert (gdbarch
!= NULL
);
2036 gdb_assert (gdbarch
->cannot_store_register
!= NULL
);
2037 if (gdbarch_debug
>= 2)
2038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2039 return gdbarch
->cannot_store_register (gdbarch
, regnum
);
2043 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2044 gdbarch_cannot_store_register_ftype cannot_store_register
)
2046 gdbarch
->cannot_store_register
= cannot_store_register
;
2050 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
2052 gdb_assert (gdbarch
!= NULL
);
2053 return gdbarch
->get_longjmp_target
!= NULL
;
2057 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR
*pc
)
2059 gdb_assert (gdbarch
!= NULL
);
2060 gdb_assert (gdbarch
->get_longjmp_target
!= NULL
);
2061 if (gdbarch_debug
>= 2)
2062 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
2063 return gdbarch
->get_longjmp_target (frame
, pc
);
2067 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
2068 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
2070 gdbarch
->get_longjmp_target
= get_longjmp_target
;
2074 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
2076 gdb_assert (gdbarch
!= NULL
);
2077 if (gdbarch_debug
>= 2)
2078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
2079 return gdbarch
->believe_pcc_promotion
;
2083 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
2084 int believe_pcc_promotion
)
2086 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
2090 gdbarch_convert_register_p (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
)
2092 gdb_assert (gdbarch
!= NULL
);
2093 gdb_assert (gdbarch
->convert_register_p
!= NULL
);
2094 if (gdbarch_debug
>= 2)
2095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_register_p called\n");
2096 return gdbarch
->convert_register_p (gdbarch
, regnum
, type
);
2100 set_gdbarch_convert_register_p (struct gdbarch
*gdbarch
,
2101 gdbarch_convert_register_p_ftype convert_register_p
)
2103 gdbarch
->convert_register_p
= convert_register_p
;
2107 gdbarch_register_to_value (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, gdb_byte
*buf
)
2109 gdb_assert (gdbarch
!= NULL
);
2110 gdb_assert (gdbarch
->register_to_value
!= NULL
);
2111 if (gdbarch_debug
>= 2)
2112 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_to_value called\n");
2113 gdbarch
->register_to_value (frame
, regnum
, type
, buf
);
2117 set_gdbarch_register_to_value (struct gdbarch
*gdbarch
,
2118 gdbarch_register_to_value_ftype register_to_value
)
2120 gdbarch
->register_to_value
= register_to_value
;
2124 gdbarch_value_to_register (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int regnum
, struct type
*type
, const gdb_byte
*buf
)
2126 gdb_assert (gdbarch
!= NULL
);
2127 gdb_assert (gdbarch
->value_to_register
!= NULL
);
2128 if (gdbarch_debug
>= 2)
2129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_to_register called\n");
2130 gdbarch
->value_to_register (frame
, regnum
, type
, buf
);
2134 set_gdbarch_value_to_register (struct gdbarch
*gdbarch
,
2135 gdbarch_value_to_register_ftype value_to_register
)
2137 gdbarch
->value_to_register
= value_to_register
;
2141 gdbarch_value_from_register (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, struct frame_info
*frame
)
2143 gdb_assert (gdbarch
!= NULL
);
2144 gdb_assert (gdbarch
->value_from_register
!= NULL
);
2145 if (gdbarch_debug
>= 2)
2146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_value_from_register called\n");
2147 return gdbarch
->value_from_register (type
, regnum
, frame
);
2151 set_gdbarch_value_from_register (struct gdbarch
*gdbarch
,
2152 gdbarch_value_from_register_ftype value_from_register
)
2154 gdbarch
->value_from_register
= value_from_register
;
2158 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2160 gdb_assert (gdbarch
!= NULL
);
2161 gdb_assert (gdbarch
->pointer_to_address
!= NULL
);
2162 if (gdbarch_debug
>= 2)
2163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
2164 return gdbarch
->pointer_to_address (gdbarch
, type
, buf
);
2168 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
2169 gdbarch_pointer_to_address_ftype pointer_to_address
)
2171 gdbarch
->pointer_to_address
= pointer_to_address
;
2175 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, gdb_byte
*buf
, CORE_ADDR addr
)
2177 gdb_assert (gdbarch
!= NULL
);
2178 gdb_assert (gdbarch
->address_to_pointer
!= NULL
);
2179 if (gdbarch_debug
>= 2)
2180 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
2181 gdbarch
->address_to_pointer (gdbarch
, type
, buf
, addr
);
2185 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
2186 gdbarch_address_to_pointer_ftype address_to_pointer
)
2188 gdbarch
->address_to_pointer
= address_to_pointer
;
2192 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
2194 gdb_assert (gdbarch
!= NULL
);
2195 return gdbarch
->integer_to_address
!= NULL
;
2199 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, const gdb_byte
*buf
)
2201 gdb_assert (gdbarch
!= NULL
);
2202 gdb_assert (gdbarch
->integer_to_address
!= NULL
);
2203 if (gdbarch_debug
>= 2)
2204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
2205 return gdbarch
->integer_to_address (gdbarch
, type
, buf
);
2209 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
2210 gdbarch_integer_to_address_ftype integer_to_address
)
2212 gdbarch
->integer_to_address
= integer_to_address
;
2216 gdbarch_return_value_p (struct gdbarch
*gdbarch
)
2218 gdb_assert (gdbarch
!= NULL
);
2219 return gdbarch
->return_value
!= NULL
;
2222 enum return_value_convention
2223 gdbarch_return_value (struct gdbarch
*gdbarch
, struct type
*functype
, struct type
*valtype
, struct regcache
*regcache
, gdb_byte
*readbuf
, const gdb_byte
*writebuf
)
2225 gdb_assert (gdbarch
!= NULL
);
2226 gdb_assert (gdbarch
->return_value
!= NULL
);
2227 if (gdbarch_debug
>= 2)
2228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value called\n");
2229 return gdbarch
->return_value (gdbarch
, functype
, valtype
, regcache
, readbuf
, writebuf
);
2233 set_gdbarch_return_value (struct gdbarch
*gdbarch
,
2234 gdbarch_return_value_ftype return_value
)
2236 gdbarch
->return_value
= return_value
;
2240 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2242 gdb_assert (gdbarch
!= NULL
);
2243 gdb_assert (gdbarch
->skip_prologue
!= NULL
);
2244 if (gdbarch_debug
>= 2)
2245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
2246 return gdbarch
->skip_prologue (gdbarch
, ip
);
2250 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
2251 gdbarch_skip_prologue_ftype skip_prologue
)
2253 gdbarch
->skip_prologue
= skip_prologue
;
2257 gdbarch_skip_main_prologue_p (struct gdbarch
*gdbarch
)
2259 gdb_assert (gdbarch
!= NULL
);
2260 return gdbarch
->skip_main_prologue
!= NULL
;
2264 gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
2266 gdb_assert (gdbarch
!= NULL
);
2267 gdb_assert (gdbarch
->skip_main_prologue
!= NULL
);
2268 if (gdbarch_debug
>= 2)
2269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_main_prologue called\n");
2270 return gdbarch
->skip_main_prologue (gdbarch
, ip
);
2274 set_gdbarch_skip_main_prologue (struct gdbarch
*gdbarch
,
2275 gdbarch_skip_main_prologue_ftype skip_main_prologue
)
2277 gdbarch
->skip_main_prologue
= skip_main_prologue
;
2281 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
2283 gdb_assert (gdbarch
!= NULL
);
2284 gdb_assert (gdbarch
->inner_than
!= NULL
);
2285 if (gdbarch_debug
>= 2)
2286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
2287 return gdbarch
->inner_than (lhs
, rhs
);
2291 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
2292 gdbarch_inner_than_ftype inner_than
)
2294 gdbarch
->inner_than
= inner_than
;
2298 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
2300 gdb_assert (gdbarch
!= NULL
);
2301 gdb_assert (gdbarch
->breakpoint_from_pc
!= NULL
);
2302 if (gdbarch_debug
>= 2)
2303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
2304 return gdbarch
->breakpoint_from_pc (gdbarch
, pcptr
, lenptr
);
2308 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2309 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
2311 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
2315 gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *kindptr
)
2317 gdb_assert (gdbarch
!= NULL
);
2318 gdb_assert (gdbarch
->remote_breakpoint_from_pc
!= NULL
);
2319 if (gdbarch_debug
>= 2)
2320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_breakpoint_from_pc called\n");
2321 gdbarch
->remote_breakpoint_from_pc (gdbarch
, pcptr
, kindptr
);
2325 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch
*gdbarch
,
2326 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc
)
2328 gdbarch
->remote_breakpoint_from_pc
= remote_breakpoint_from_pc
;
2332 gdbarch_adjust_breakpoint_address_p (struct gdbarch
*gdbarch
)
2334 gdb_assert (gdbarch
!= NULL
);
2335 return gdbarch
->adjust_breakpoint_address
!= NULL
;
2339 gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
, CORE_ADDR bpaddr
)
2341 gdb_assert (gdbarch
!= NULL
);
2342 gdb_assert (gdbarch
->adjust_breakpoint_address
!= NULL
);
2343 if (gdbarch_debug
>= 2)
2344 fprintf_unfiltered (gdb_stdlog
, "gdbarch_adjust_breakpoint_address called\n");
2345 return gdbarch
->adjust_breakpoint_address (gdbarch
, bpaddr
);
2349 set_gdbarch_adjust_breakpoint_address (struct gdbarch
*gdbarch
,
2350 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address
)
2352 gdbarch
->adjust_breakpoint_address
= adjust_breakpoint_address
;
2356 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2358 gdb_assert (gdbarch
!= NULL
);
2359 gdb_assert (gdbarch
->memory_insert_breakpoint
!= NULL
);
2360 if (gdbarch_debug
>= 2)
2361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
2362 return gdbarch
->memory_insert_breakpoint (gdbarch
, bp_tgt
);
2366 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
2367 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
2369 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
2373 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, struct bp_target_info
*bp_tgt
)
2375 gdb_assert (gdbarch
!= NULL
);
2376 gdb_assert (gdbarch
->memory_remove_breakpoint
!= NULL
);
2377 if (gdbarch_debug
>= 2)
2378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
2379 return gdbarch
->memory_remove_breakpoint (gdbarch
, bp_tgt
);
2383 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
2384 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
2386 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
2390 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
2392 gdb_assert (gdbarch
!= NULL
);
2393 /* Skip verify of decr_pc_after_break, invalid_p == 0 */
2394 if (gdbarch_debug
>= 2)
2395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
2396 return gdbarch
->decr_pc_after_break
;
2400 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
2401 CORE_ADDR decr_pc_after_break
)
2403 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
2407 gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
)
2409 gdb_assert (gdbarch
!= NULL
);
2410 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
2411 if (gdbarch_debug
>= 2)
2412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_deprecated_function_start_offset called\n");
2413 return gdbarch
->deprecated_function_start_offset
;
2417 set_gdbarch_deprecated_function_start_offset (struct gdbarch
*gdbarch
,
2418 CORE_ADDR deprecated_function_start_offset
)
2420 gdbarch
->deprecated_function_start_offset
= deprecated_function_start_offset
;
2424 gdbarch_remote_register_number (struct gdbarch
*gdbarch
, int regno
)
2426 gdb_assert (gdbarch
!= NULL
);
2427 gdb_assert (gdbarch
->remote_register_number
!= NULL
);
2428 if (gdbarch_debug
>= 2)
2429 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_register_number called\n");
2430 return gdbarch
->remote_register_number (gdbarch
, regno
);
2434 set_gdbarch_remote_register_number (struct gdbarch
*gdbarch
,
2435 gdbarch_remote_register_number_ftype remote_register_number
)
2437 gdbarch
->remote_register_number
= remote_register_number
;
2441 gdbarch_fetch_tls_load_module_address_p (struct gdbarch
*gdbarch
)
2443 gdb_assert (gdbarch
!= NULL
);
2444 return gdbarch
->fetch_tls_load_module_address
!= NULL
;
2448 gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
2450 gdb_assert (gdbarch
!= NULL
);
2451 gdb_assert (gdbarch
->fetch_tls_load_module_address
!= NULL
);
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_tls_load_module_address called\n");
2454 return gdbarch
->fetch_tls_load_module_address (objfile
);
2458 set_gdbarch_fetch_tls_load_module_address (struct gdbarch
*gdbarch
,
2459 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address
)
2461 gdbarch
->fetch_tls_load_module_address
= fetch_tls_load_module_address
;
2465 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
2467 gdb_assert (gdbarch
!= NULL
);
2468 /* Skip verify of frame_args_skip, invalid_p == 0 */
2469 if (gdbarch_debug
>= 2)
2470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
2471 return gdbarch
->frame_args_skip
;
2475 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
2476 CORE_ADDR frame_args_skip
)
2478 gdbarch
->frame_args_skip
= frame_args_skip
;
2482 gdbarch_unwind_pc_p (struct gdbarch
*gdbarch
)
2484 gdb_assert (gdbarch
!= NULL
);
2485 return gdbarch
->unwind_pc
!= NULL
;
2489 gdbarch_unwind_pc (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2491 gdb_assert (gdbarch
!= NULL
);
2492 gdb_assert (gdbarch
->unwind_pc
!= NULL
);
2493 if (gdbarch_debug
>= 2)
2494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_pc called\n");
2495 return gdbarch
->unwind_pc (gdbarch
, next_frame
);
2499 set_gdbarch_unwind_pc (struct gdbarch
*gdbarch
,
2500 gdbarch_unwind_pc_ftype unwind_pc
)
2502 gdbarch
->unwind_pc
= unwind_pc
;
2506 gdbarch_unwind_sp_p (struct gdbarch
*gdbarch
)
2508 gdb_assert (gdbarch
!= NULL
);
2509 return gdbarch
->unwind_sp
!= NULL
;
2513 gdbarch_unwind_sp (struct gdbarch
*gdbarch
, struct frame_info
*next_frame
)
2515 gdb_assert (gdbarch
!= NULL
);
2516 gdb_assert (gdbarch
->unwind_sp
!= NULL
);
2517 if (gdbarch_debug
>= 2)
2518 fprintf_unfiltered (gdb_stdlog
, "gdbarch_unwind_sp called\n");
2519 return gdbarch
->unwind_sp (gdbarch
, next_frame
);
2523 set_gdbarch_unwind_sp (struct gdbarch
*gdbarch
,
2524 gdbarch_unwind_sp_ftype unwind_sp
)
2526 gdbarch
->unwind_sp
= unwind_sp
;
2530 gdbarch_frame_num_args_p (struct gdbarch
*gdbarch
)
2532 gdb_assert (gdbarch
!= NULL
);
2533 return gdbarch
->frame_num_args
!= NULL
;
2537 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2539 gdb_assert (gdbarch
!= NULL
);
2540 gdb_assert (gdbarch
->frame_num_args
!= NULL
);
2541 if (gdbarch_debug
>= 2)
2542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
2543 return gdbarch
->frame_num_args (frame
);
2547 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
2548 gdbarch_frame_num_args_ftype frame_num_args
)
2550 gdbarch
->frame_num_args
= frame_num_args
;
2554 gdbarch_frame_align_p (struct gdbarch
*gdbarch
)
2556 gdb_assert (gdbarch
!= NULL
);
2557 return gdbarch
->frame_align
!= NULL
;
2561 gdbarch_frame_align (struct gdbarch
*gdbarch
, CORE_ADDR address
)
2563 gdb_assert (gdbarch
!= NULL
);
2564 gdb_assert (gdbarch
->frame_align
!= NULL
);
2565 if (gdbarch_debug
>= 2)
2566 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_align called\n");
2567 return gdbarch
->frame_align (gdbarch
, address
);
2571 set_gdbarch_frame_align (struct gdbarch
*gdbarch
,
2572 gdbarch_frame_align_ftype frame_align
)
2574 gdbarch
->frame_align
= frame_align
;
2578 gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
, struct type
*type
)
2580 gdb_assert (gdbarch
!= NULL
);
2581 gdb_assert (gdbarch
->stabs_argument_has_addr
!= NULL
);
2582 if (gdbarch_debug
>= 2)
2583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stabs_argument_has_addr called\n");
2584 return gdbarch
->stabs_argument_has_addr (gdbarch
, type
);
2588 set_gdbarch_stabs_argument_has_addr (struct gdbarch
*gdbarch
,
2589 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr
)
2591 gdbarch
->stabs_argument_has_addr
= stabs_argument_has_addr
;
2595 gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
)
2597 gdb_assert (gdbarch
!= NULL
);
2598 if (gdbarch_debug
>= 2)
2599 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_red_zone_size called\n");
2600 return gdbarch
->frame_red_zone_size
;
2604 set_gdbarch_frame_red_zone_size (struct gdbarch
*gdbarch
,
2605 int frame_red_zone_size
)
2607 gdbarch
->frame_red_zone_size
= frame_red_zone_size
;
2611 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
, struct target_ops
*targ
)
2613 gdb_assert (gdbarch
!= NULL
);
2614 gdb_assert (gdbarch
->convert_from_func_ptr_addr
!= NULL
);
2615 if (gdbarch_debug
>= 2)
2616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
2617 return gdbarch
->convert_from_func_ptr_addr (gdbarch
, addr
, targ
);
2621 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
2622 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
2624 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
2628 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2630 gdb_assert (gdbarch
!= NULL
);
2631 gdb_assert (gdbarch
->addr_bits_remove
!= NULL
);
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
2634 return gdbarch
->addr_bits_remove (gdbarch
, addr
);
2638 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
2639 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
2641 gdbarch
->addr_bits_remove
= addr_bits_remove
;
2645 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2647 gdb_assert (gdbarch
!= NULL
);
2648 gdb_assert (gdbarch
->smash_text_address
!= NULL
);
2649 if (gdbarch_debug
>= 2)
2650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
2651 return gdbarch
->smash_text_address (gdbarch
, addr
);
2655 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
2656 gdbarch_smash_text_address_ftype smash_text_address
)
2658 gdbarch
->smash_text_address
= smash_text_address
;
2662 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
2664 gdb_assert (gdbarch
!= NULL
);
2665 return gdbarch
->software_single_step
!= NULL
;
2669 gdbarch_software_single_step (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2671 gdb_assert (gdbarch
!= NULL
);
2672 gdb_assert (gdbarch
->software_single_step
!= NULL
);
2673 if (gdbarch_debug
>= 2)
2674 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
2675 return gdbarch
->software_single_step (frame
);
2679 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
2680 gdbarch_software_single_step_ftype software_single_step
)
2682 gdbarch
->software_single_step
= software_single_step
;
2686 gdbarch_single_step_through_delay_p (struct gdbarch
*gdbarch
)
2688 gdb_assert (gdbarch
!= NULL
);
2689 return gdbarch
->single_step_through_delay
!= NULL
;
2693 gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
2695 gdb_assert (gdbarch
!= NULL
);
2696 gdb_assert (gdbarch
->single_step_through_delay
!= NULL
);
2697 if (gdbarch_debug
>= 2)
2698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_single_step_through_delay called\n");
2699 return gdbarch
->single_step_through_delay (gdbarch
, frame
);
2703 set_gdbarch_single_step_through_delay (struct gdbarch
*gdbarch
,
2704 gdbarch_single_step_through_delay_ftype single_step_through_delay
)
2706 gdbarch
->single_step_through_delay
= single_step_through_delay
;
2710 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, struct disassemble_info
*info
)
2712 gdb_assert (gdbarch
!= NULL
);
2713 gdb_assert (gdbarch
->print_insn
!= NULL
);
2714 if (gdbarch_debug
>= 2)
2715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
2716 return gdbarch
->print_insn (vma
, info
);
2720 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
2721 gdbarch_print_insn_ftype print_insn
)
2723 gdbarch
->print_insn
= print_insn
;
2727 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, struct frame_info
*frame
, CORE_ADDR pc
)
2729 gdb_assert (gdbarch
!= NULL
);
2730 gdb_assert (gdbarch
->skip_trampoline_code
!= NULL
);
2731 if (gdbarch_debug
>= 2)
2732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
2733 return gdbarch
->skip_trampoline_code (frame
, pc
);
2737 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
2738 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
2740 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
2744 gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
2746 gdb_assert (gdbarch
!= NULL
);
2747 gdb_assert (gdbarch
->skip_solib_resolver
!= NULL
);
2748 if (gdbarch_debug
>= 2)
2749 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_solib_resolver called\n");
2750 return gdbarch
->skip_solib_resolver (gdbarch
, pc
);
2754 set_gdbarch_skip_solib_resolver (struct gdbarch
*gdbarch
,
2755 gdbarch_skip_solib_resolver_ftype skip_solib_resolver
)
2757 gdbarch
->skip_solib_resolver
= skip_solib_resolver
;
2761 gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
2763 gdb_assert (gdbarch
!= NULL
);
2764 gdb_assert (gdbarch
->in_solib_return_trampoline
!= NULL
);
2765 if (gdbarch_debug
>= 2)
2766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_return_trampoline called\n");
2767 return gdbarch
->in_solib_return_trampoline (gdbarch
, pc
, name
);
2771 set_gdbarch_in_solib_return_trampoline (struct gdbarch
*gdbarch
,
2772 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline
)
2774 gdbarch
->in_solib_return_trampoline
= in_solib_return_trampoline
;
2778 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
2780 gdb_assert (gdbarch
!= NULL
);
2781 gdb_assert (gdbarch
->in_function_epilogue_p
!= NULL
);
2782 if (gdbarch_debug
>= 2)
2783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
2784 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
2788 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
2789 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
2791 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
2795 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
2797 gdb_assert (gdbarch
!= NULL
);
2798 gdb_assert (gdbarch
->elf_make_msymbol_special
!= NULL
);
2799 if (gdbarch_debug
>= 2)
2800 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
2801 gdbarch
->elf_make_msymbol_special (sym
, msym
);
2805 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
2806 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
2808 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
2812 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
2814 gdb_assert (gdbarch
!= NULL
);
2815 gdb_assert (gdbarch
->coff_make_msymbol_special
!= NULL
);
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
2818 gdbarch
->coff_make_msymbol_special (val
, msym
);
2822 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
2823 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
2825 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
2829 gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
)
2831 gdb_assert (gdbarch
!= NULL
);
2832 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
2833 if (gdbarch_debug
>= 2)
2834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_step_breakpoint called\n");
2835 return gdbarch
->cannot_step_breakpoint
;
2839 set_gdbarch_cannot_step_breakpoint (struct gdbarch
*gdbarch
,
2840 int cannot_step_breakpoint
)
2842 gdbarch
->cannot_step_breakpoint
= cannot_step_breakpoint
;
2846 gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
)
2848 gdb_assert (gdbarch
!= NULL
);
2849 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
2850 if (gdbarch_debug
>= 2)
2851 fprintf_unfiltered (gdb_stdlog
, "gdbarch_have_nonsteppable_watchpoint called\n");
2852 return gdbarch
->have_nonsteppable_watchpoint
;
2856 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch
*gdbarch
,
2857 int have_nonsteppable_watchpoint
)
2859 gdbarch
->have_nonsteppable_watchpoint
= have_nonsteppable_watchpoint
;
2863 gdbarch_address_class_type_flags_p (struct gdbarch
*gdbarch
)
2865 gdb_assert (gdbarch
!= NULL
);
2866 return gdbarch
->address_class_type_flags
!= NULL
;
2870 gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
, int byte_size
, int dwarf2_addr_class
)
2872 gdb_assert (gdbarch
!= NULL
);
2873 gdb_assert (gdbarch
->address_class_type_flags
!= NULL
);
2874 if (gdbarch_debug
>= 2)
2875 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags called\n");
2876 return gdbarch
->address_class_type_flags (byte_size
, dwarf2_addr_class
);
2880 set_gdbarch_address_class_type_flags (struct gdbarch
*gdbarch
,
2881 gdbarch_address_class_type_flags_ftype address_class_type_flags
)
2883 gdbarch
->address_class_type_flags
= address_class_type_flags
;
2887 gdbarch_address_class_type_flags_to_name_p (struct gdbarch
*gdbarch
)
2889 gdb_assert (gdbarch
!= NULL
);
2890 return gdbarch
->address_class_type_flags_to_name
!= NULL
;
2894 gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
, int type_flags
)
2896 gdb_assert (gdbarch
!= NULL
);
2897 gdb_assert (gdbarch
->address_class_type_flags_to_name
!= NULL
);
2898 if (gdbarch_debug
>= 2)
2899 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_type_flags_to_name called\n");
2900 return gdbarch
->address_class_type_flags_to_name (gdbarch
, type_flags
);
2904 set_gdbarch_address_class_type_flags_to_name (struct gdbarch
*gdbarch
,
2905 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name
)
2907 gdbarch
->address_class_type_flags_to_name
= address_class_type_flags_to_name
;
2911 gdbarch_address_class_name_to_type_flags_p (struct gdbarch
*gdbarch
)
2913 gdb_assert (gdbarch
!= NULL
);
2914 return gdbarch
->address_class_name_to_type_flags
!= NULL
;
2918 gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
, const char *name
, int *type_flags_ptr
)
2920 gdb_assert (gdbarch
!= NULL
);
2921 gdb_assert (gdbarch
->address_class_name_to_type_flags
!= NULL
);
2922 if (gdbarch_debug
>= 2)
2923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_class_name_to_type_flags called\n");
2924 return gdbarch
->address_class_name_to_type_flags (gdbarch
, name
, type_flags_ptr
);
2928 set_gdbarch_address_class_name_to_type_flags (struct gdbarch
*gdbarch
,
2929 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags
)
2931 gdbarch
->address_class_name_to_type_flags
= address_class_name_to_type_flags
;
2935 gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
, int regnum
, struct reggroup
*reggroup
)
2937 gdb_assert (gdbarch
!= NULL
);
2938 gdb_assert (gdbarch
->register_reggroup_p
!= NULL
);
2939 if (gdbarch_debug
>= 2)
2940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_reggroup_p called\n");
2941 return gdbarch
->register_reggroup_p (gdbarch
, regnum
, reggroup
);
2945 set_gdbarch_register_reggroup_p (struct gdbarch
*gdbarch
,
2946 gdbarch_register_reggroup_p_ftype register_reggroup_p
)
2948 gdbarch
->register_reggroup_p
= register_reggroup_p
;
2952 gdbarch_fetch_pointer_argument_p (struct gdbarch
*gdbarch
)
2954 gdb_assert (gdbarch
!= NULL
);
2955 return gdbarch
->fetch_pointer_argument
!= NULL
;
2959 gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
, struct frame_info
*frame
, int argi
, struct type
*type
)
2961 gdb_assert (gdbarch
!= NULL
);
2962 gdb_assert (gdbarch
->fetch_pointer_argument
!= NULL
);
2963 if (gdbarch_debug
>= 2)
2964 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pointer_argument called\n");
2965 return gdbarch
->fetch_pointer_argument (frame
, argi
, type
);
2969 set_gdbarch_fetch_pointer_argument (struct gdbarch
*gdbarch
,
2970 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument
)
2972 gdbarch
->fetch_pointer_argument
= fetch_pointer_argument
;
2976 gdbarch_regset_from_core_section_p (struct gdbarch
*gdbarch
)
2978 gdb_assert (gdbarch
!= NULL
);
2979 return gdbarch
->regset_from_core_section
!= NULL
;
2982 const struct regset
*
2983 gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
, const char *sect_name
, size_t sect_size
)
2985 gdb_assert (gdbarch
!= NULL
);
2986 gdb_assert (gdbarch
->regset_from_core_section
!= NULL
);
2987 if (gdbarch_debug
>= 2)
2988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_regset_from_core_section called\n");
2989 return gdbarch
->regset_from_core_section (gdbarch
, sect_name
, sect_size
);
2993 set_gdbarch_regset_from_core_section (struct gdbarch
*gdbarch
,
2994 gdbarch_regset_from_core_section_ftype regset_from_core_section
)
2996 gdbarch
->regset_from_core_section
= regset_from_core_section
;
3000 gdbarch_core_reg_section_encodes_pid (struct gdbarch
*gdbarch
)
3002 gdb_assert (gdbarch
!= NULL
);
3003 /* Skip verify of core_reg_section_encodes_pid, invalid_p == 0 */
3004 if (gdbarch_debug
>= 2)
3005 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_reg_section_encodes_pid called\n");
3006 return gdbarch
->core_reg_section_encodes_pid
;
3010 set_gdbarch_core_reg_section_encodes_pid (struct gdbarch
*gdbarch
,
3011 int core_reg_section_encodes_pid
)
3013 gdbarch
->core_reg_section_encodes_pid
= core_reg_section_encodes_pid
;
3016 struct core_regset_section
*
3017 gdbarch_core_regset_sections (struct gdbarch
*gdbarch
)
3019 gdb_assert (gdbarch
!= NULL
);
3020 if (gdbarch_debug
>= 2)
3021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_regset_sections called\n");
3022 return gdbarch
->core_regset_sections
;
3026 set_gdbarch_core_regset_sections (struct gdbarch
*gdbarch
,
3027 struct core_regset_section
* core_regset_sections
)
3029 gdbarch
->core_regset_sections
= core_regset_sections
;
3033 gdbarch_core_xfer_shared_libraries_p (struct gdbarch
*gdbarch
)
3035 gdb_assert (gdbarch
!= NULL
);
3036 return gdbarch
->core_xfer_shared_libraries
!= NULL
;
3040 gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
, gdb_byte
*readbuf
, ULONGEST offset
, LONGEST len
)
3042 gdb_assert (gdbarch
!= NULL
);
3043 gdb_assert (gdbarch
->core_xfer_shared_libraries
!= NULL
);
3044 if (gdbarch_debug
>= 2)
3045 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_xfer_shared_libraries called\n");
3046 return gdbarch
->core_xfer_shared_libraries (gdbarch
, readbuf
, offset
, len
);
3050 set_gdbarch_core_xfer_shared_libraries (struct gdbarch
*gdbarch
,
3051 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries
)
3053 gdbarch
->core_xfer_shared_libraries
= core_xfer_shared_libraries
;
3057 gdbarch_core_pid_to_str_p (struct gdbarch
*gdbarch
)
3059 gdb_assert (gdbarch
!= NULL
);
3060 return gdbarch
->core_pid_to_str
!= NULL
;
3064 gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
, ptid_t ptid
)
3066 gdb_assert (gdbarch
!= NULL
);
3067 gdb_assert (gdbarch
->core_pid_to_str
!= NULL
);
3068 if (gdbarch_debug
>= 2)
3069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_pid_to_str called\n");
3070 return gdbarch
->core_pid_to_str (gdbarch
, ptid
);
3074 set_gdbarch_core_pid_to_str (struct gdbarch
*gdbarch
,
3075 gdbarch_core_pid_to_str_ftype core_pid_to_str
)
3077 gdbarch
->core_pid_to_str
= core_pid_to_str
;
3081 gdbarch_gcore_bfd_target_p (struct gdbarch
*gdbarch
)
3083 gdb_assert (gdbarch
!= NULL
);
3084 return gdbarch
->gcore_bfd_target
!= 0;
3088 gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
)
3090 gdb_assert (gdbarch
!= NULL
);
3091 /* Check variable changed from pre-default. */
3092 gdb_assert (gdbarch
->gcore_bfd_target
!= 0);
3093 if (gdbarch_debug
>= 2)
3094 fprintf_unfiltered (gdb_stdlog
, "gdbarch_gcore_bfd_target called\n");
3095 return gdbarch
->gcore_bfd_target
;
3099 set_gdbarch_gcore_bfd_target (struct gdbarch
*gdbarch
,
3100 const char * gcore_bfd_target
)
3102 gdbarch
->gcore_bfd_target
= gcore_bfd_target
;
3106 gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
)
3108 gdb_assert (gdbarch
!= NULL
);
3109 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */
3110 if (gdbarch_debug
>= 2)
3111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vtable_function_descriptors called\n");
3112 return gdbarch
->vtable_function_descriptors
;
3116 set_gdbarch_vtable_function_descriptors (struct gdbarch
*gdbarch
,
3117 int vtable_function_descriptors
)
3119 gdbarch
->vtable_function_descriptors
= vtable_function_descriptors
;
3123 gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
)
3125 gdb_assert (gdbarch
!= NULL
);
3126 /* Skip verify of vbit_in_delta, invalid_p == 0 */
3127 if (gdbarch_debug
>= 2)
3128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_vbit_in_delta called\n");
3129 return gdbarch
->vbit_in_delta
;
3133 set_gdbarch_vbit_in_delta (struct gdbarch
*gdbarch
,
3136 gdbarch
->vbit_in_delta
= vbit_in_delta
;
3140 gdbarch_skip_permanent_breakpoint_p (struct gdbarch
*gdbarch
)
3142 gdb_assert (gdbarch
!= NULL
);
3143 return gdbarch
->skip_permanent_breakpoint
!= NULL
;
3147 gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
, struct regcache
*regcache
)
3149 gdb_assert (gdbarch
!= NULL
);
3150 gdb_assert (gdbarch
->skip_permanent_breakpoint
!= NULL
);
3151 if (gdbarch_debug
>= 2)
3152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_permanent_breakpoint called\n");
3153 gdbarch
->skip_permanent_breakpoint (regcache
);
3157 set_gdbarch_skip_permanent_breakpoint (struct gdbarch
*gdbarch
,
3158 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint
)
3160 gdbarch
->skip_permanent_breakpoint
= skip_permanent_breakpoint
;
3164 gdbarch_max_insn_length_p (struct gdbarch
*gdbarch
)
3166 gdb_assert (gdbarch
!= NULL
);
3167 return gdbarch
->max_insn_length
!= 0;
3171 gdbarch_max_insn_length (struct gdbarch
*gdbarch
)
3173 gdb_assert (gdbarch
!= NULL
);
3174 /* Check variable changed from pre-default. */
3175 gdb_assert (gdbarch
->max_insn_length
!= 0);
3176 if (gdbarch_debug
>= 2)
3177 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_insn_length called\n");
3178 return gdbarch
->max_insn_length
;
3182 set_gdbarch_max_insn_length (struct gdbarch
*gdbarch
,
3183 ULONGEST max_insn_length
)
3185 gdbarch
->max_insn_length
= max_insn_length
;
3189 gdbarch_displaced_step_copy_insn_p (struct gdbarch
*gdbarch
)
3191 gdb_assert (gdbarch
!= NULL
);
3192 return gdbarch
->displaced_step_copy_insn
!= NULL
;
3195 struct displaced_step_closure
*
3196 gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3198 gdb_assert (gdbarch
!= NULL
);
3199 gdb_assert (gdbarch
->displaced_step_copy_insn
!= NULL
);
3200 if (gdbarch_debug
>= 2)
3201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_copy_insn called\n");
3202 return gdbarch
->displaced_step_copy_insn (gdbarch
, from
, to
, regs
);
3206 set_gdbarch_displaced_step_copy_insn (struct gdbarch
*gdbarch
,
3207 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn
)
3209 gdbarch
->displaced_step_copy_insn
= displaced_step_copy_insn
;
3213 gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3215 gdb_assert (gdbarch
!= NULL
);
3216 gdb_assert (gdbarch
->displaced_step_hw_singlestep
!= NULL
);
3217 if (gdbarch_debug
>= 2)
3218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_hw_singlestep called\n");
3219 return gdbarch
->displaced_step_hw_singlestep (gdbarch
, closure
);
3223 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch
*gdbarch
,
3224 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep
)
3226 gdbarch
->displaced_step_hw_singlestep
= displaced_step_hw_singlestep
;
3230 gdbarch_displaced_step_fixup_p (struct gdbarch
*gdbarch
)
3232 gdb_assert (gdbarch
!= NULL
);
3233 return gdbarch
->displaced_step_fixup
!= NULL
;
3237 gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
, CORE_ADDR from
, CORE_ADDR to
, struct regcache
*regs
)
3239 gdb_assert (gdbarch
!= NULL
);
3240 gdb_assert (gdbarch
->displaced_step_fixup
!= NULL
);
3241 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */
3242 if (gdbarch_debug
>= 2)
3243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_fixup called\n");
3244 gdbarch
->displaced_step_fixup (gdbarch
, closure
, from
, to
, regs
);
3248 set_gdbarch_displaced_step_fixup (struct gdbarch
*gdbarch
,
3249 gdbarch_displaced_step_fixup_ftype displaced_step_fixup
)
3251 gdbarch
->displaced_step_fixup
= displaced_step_fixup
;
3255 gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
, struct displaced_step_closure
*closure
)
3257 gdb_assert (gdbarch
!= NULL
);
3258 gdb_assert (gdbarch
->displaced_step_free_closure
!= NULL
);
3259 if (gdbarch_debug
>= 2)
3260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_free_closure called\n");
3261 gdbarch
->displaced_step_free_closure (gdbarch
, closure
);
3265 set_gdbarch_displaced_step_free_closure (struct gdbarch
*gdbarch
,
3266 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure
)
3268 gdbarch
->displaced_step_free_closure
= displaced_step_free_closure
;
3272 gdbarch_displaced_step_location (struct gdbarch
*gdbarch
)
3274 gdb_assert (gdbarch
!= NULL
);
3275 gdb_assert (gdbarch
->displaced_step_location
!= NULL
);
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_displaced_step_location called\n");
3278 return gdbarch
->displaced_step_location (gdbarch
);
3282 set_gdbarch_displaced_step_location (struct gdbarch
*gdbarch
,
3283 gdbarch_displaced_step_location_ftype displaced_step_location
)
3285 gdbarch
->displaced_step_location
= displaced_step_location
;
3289 gdbarch_overlay_update_p (struct gdbarch
*gdbarch
)
3291 gdb_assert (gdbarch
!= NULL
);
3292 return gdbarch
->overlay_update
!= NULL
;
3296 gdbarch_overlay_update (struct gdbarch
*gdbarch
, struct obj_section
*osect
)
3298 gdb_assert (gdbarch
!= NULL
);
3299 gdb_assert (gdbarch
->overlay_update
!= NULL
);
3300 if (gdbarch_debug
>= 2)
3301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_overlay_update called\n");
3302 gdbarch
->overlay_update (osect
);
3306 set_gdbarch_overlay_update (struct gdbarch
*gdbarch
,
3307 gdbarch_overlay_update_ftype overlay_update
)
3309 gdbarch
->overlay_update
= overlay_update
;
3313 gdbarch_core_read_description_p (struct gdbarch
*gdbarch
)
3315 gdb_assert (gdbarch
!= NULL
);
3316 return gdbarch
->core_read_description
!= NULL
;
3319 const struct target_desc
*
3320 gdbarch_core_read_description (struct gdbarch
*gdbarch
, struct target_ops
*target
, bfd
*abfd
)
3322 gdb_assert (gdbarch
!= NULL
);
3323 gdb_assert (gdbarch
->core_read_description
!= NULL
);
3324 if (gdbarch_debug
>= 2)
3325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_core_read_description called\n");
3326 return gdbarch
->core_read_description (gdbarch
, target
, abfd
);
3330 set_gdbarch_core_read_description (struct gdbarch
*gdbarch
,
3331 gdbarch_core_read_description_ftype core_read_description
)
3333 gdbarch
->core_read_description
= core_read_description
;
3337 gdbarch_static_transform_name_p (struct gdbarch
*gdbarch
)
3339 gdb_assert (gdbarch
!= NULL
);
3340 return gdbarch
->static_transform_name
!= NULL
;
3344 gdbarch_static_transform_name (struct gdbarch
*gdbarch
, char *name
)
3346 gdb_assert (gdbarch
!= NULL
);
3347 gdb_assert (gdbarch
->static_transform_name
!= NULL
);
3348 if (gdbarch_debug
>= 2)
3349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_static_transform_name called\n");
3350 return gdbarch
->static_transform_name (name
);
3354 set_gdbarch_static_transform_name (struct gdbarch
*gdbarch
,
3355 gdbarch_static_transform_name_ftype static_transform_name
)
3357 gdbarch
->static_transform_name
= static_transform_name
;
3361 gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
)
3363 gdb_assert (gdbarch
!= NULL
);
3364 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
3365 if (gdbarch_debug
>= 2)
3366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sofun_address_maybe_missing called\n");
3367 return gdbarch
->sofun_address_maybe_missing
;
3371 set_gdbarch_sofun_address_maybe_missing (struct gdbarch
*gdbarch
,
3372 int sofun_address_maybe_missing
)
3374 gdbarch
->sofun_address_maybe_missing
= sofun_address_maybe_missing
;
3378 gdbarch_process_record_p (struct gdbarch
*gdbarch
)
3380 gdb_assert (gdbarch
!= NULL
);
3381 return gdbarch
->process_record
!= NULL
;
3385 gdbarch_process_record (struct gdbarch
*gdbarch
, struct regcache
*regcache
, CORE_ADDR addr
)
3387 gdb_assert (gdbarch
!= NULL
);
3388 gdb_assert (gdbarch
->process_record
!= NULL
);
3389 if (gdbarch_debug
>= 2)
3390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record called\n");
3391 return gdbarch
->process_record (gdbarch
, regcache
, addr
);
3395 set_gdbarch_process_record (struct gdbarch
*gdbarch
,
3396 gdbarch_process_record_ftype process_record
)
3398 gdbarch
->process_record
= process_record
;
3402 gdbarch_process_record_signal_p (struct gdbarch
*gdbarch
)
3404 gdb_assert (gdbarch
!= NULL
);
3405 return gdbarch
->process_record_signal
!= NULL
;
3409 gdbarch_process_record_signal (struct gdbarch
*gdbarch
, struct regcache
*regcache
, enum target_signal signal
)
3411 gdb_assert (gdbarch
!= NULL
);
3412 gdb_assert (gdbarch
->process_record_signal
!= NULL
);
3413 if (gdbarch_debug
>= 2)
3414 fprintf_unfiltered (gdb_stdlog
, "gdbarch_process_record_signal called\n");
3415 return gdbarch
->process_record_signal (gdbarch
, regcache
, signal
);
3419 set_gdbarch_process_record_signal (struct gdbarch
*gdbarch
,
3420 gdbarch_process_record_signal_ftype process_record_signal
)
3422 gdbarch
->process_record_signal
= process_record_signal
;
3426 gdbarch_target_signal_from_host (struct gdbarch
*gdbarch
, int signo
)
3428 gdb_assert (gdbarch
!= NULL
);
3429 gdb_assert (gdbarch
->target_signal_from_host
!= NULL
);
3430 if (gdbarch_debug
>= 2)
3431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_signal_from_host called\n");
3432 return gdbarch
->target_signal_from_host (gdbarch
, signo
);
3436 set_gdbarch_target_signal_from_host (struct gdbarch
*gdbarch
,
3437 gdbarch_target_signal_from_host_ftype target_signal_from_host
)
3439 gdbarch
->target_signal_from_host
= target_signal_from_host
;
3443 gdbarch_target_signal_to_host (struct gdbarch
*gdbarch
, enum target_signal ts
)
3445 gdb_assert (gdbarch
!= NULL
);
3446 gdb_assert (gdbarch
->target_signal_to_host
!= NULL
);
3447 if (gdbarch_debug
>= 2)
3448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_target_signal_to_host called\n");
3449 return gdbarch
->target_signal_to_host (gdbarch
, ts
);
3453 set_gdbarch_target_signal_to_host (struct gdbarch
*gdbarch
,
3454 gdbarch_target_signal_to_host_ftype target_signal_to_host
)
3456 gdbarch
->target_signal_to_host
= target_signal_to_host
;
3460 gdbarch_get_siginfo_type_p (struct gdbarch
*gdbarch
)
3462 gdb_assert (gdbarch
!= NULL
);
3463 return gdbarch
->get_siginfo_type
!= NULL
;
3467 gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
)
3469 gdb_assert (gdbarch
!= NULL
);
3470 gdb_assert (gdbarch
->get_siginfo_type
!= NULL
);
3471 if (gdbarch_debug
>= 2)
3472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_siginfo_type called\n");
3473 return gdbarch
->get_siginfo_type (gdbarch
);
3477 set_gdbarch_get_siginfo_type (struct gdbarch
*gdbarch
,
3478 gdbarch_get_siginfo_type_ftype get_siginfo_type
)
3480 gdbarch
->get_siginfo_type
= get_siginfo_type
;
3484 gdbarch_record_special_symbol_p (struct gdbarch
*gdbarch
)
3486 gdb_assert (gdbarch
!= NULL
);
3487 return gdbarch
->record_special_symbol
!= NULL
;
3491 gdbarch_record_special_symbol (struct gdbarch
*gdbarch
, struct objfile
*objfile
, asymbol
*sym
)
3493 gdb_assert (gdbarch
!= NULL
);
3494 gdb_assert (gdbarch
->record_special_symbol
!= NULL
);
3495 if (gdbarch_debug
>= 2)
3496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_record_special_symbol called\n");
3497 gdbarch
->record_special_symbol (gdbarch
, objfile
, sym
);
3501 set_gdbarch_record_special_symbol (struct gdbarch
*gdbarch
,
3502 gdbarch_record_special_symbol_ftype record_special_symbol
)
3504 gdbarch
->record_special_symbol
= record_special_symbol
;
3508 gdbarch_get_syscall_number_p (struct gdbarch
*gdbarch
)
3510 gdb_assert (gdbarch
!= NULL
);
3511 return gdbarch
->get_syscall_number
!= NULL
;
3515 gdbarch_get_syscall_number (struct gdbarch
*gdbarch
, ptid_t ptid
)
3517 gdb_assert (gdbarch
!= NULL
);
3518 gdb_assert (gdbarch
->get_syscall_number
!= NULL
);
3519 if (gdbarch_debug
>= 2)
3520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_syscall_number called\n");
3521 return gdbarch
->get_syscall_number (gdbarch
, ptid
);
3525 set_gdbarch_get_syscall_number (struct gdbarch
*gdbarch
,
3526 gdbarch_get_syscall_number_ftype get_syscall_number
)
3528 gdbarch
->get_syscall_number
= get_syscall_number
;
3532 gdbarch_has_global_solist (struct gdbarch
*gdbarch
)
3534 gdb_assert (gdbarch
!= NULL
);
3535 /* Skip verify of has_global_solist, invalid_p == 0 */
3536 if (gdbarch_debug
>= 2)
3537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_solist called\n");
3538 return gdbarch
->has_global_solist
;
3542 set_gdbarch_has_global_solist (struct gdbarch
*gdbarch
,
3543 int has_global_solist
)
3545 gdbarch
->has_global_solist
= has_global_solist
;
3549 gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
)
3551 gdb_assert (gdbarch
!= NULL
);
3552 /* Skip verify of has_global_breakpoints, invalid_p == 0 */
3553 if (gdbarch_debug
>= 2)
3554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_global_breakpoints called\n");
3555 return gdbarch
->has_global_breakpoints
;
3559 set_gdbarch_has_global_breakpoints (struct gdbarch
*gdbarch
,
3560 int has_global_breakpoints
)
3562 gdbarch
->has_global_breakpoints
= has_global_breakpoints
;
3566 gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
)
3568 gdb_assert (gdbarch
!= NULL
);
3569 gdb_assert (gdbarch
->has_shared_address_space
!= NULL
);
3570 if (gdbarch_debug
>= 2)
3571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_has_shared_address_space called\n");
3572 return gdbarch
->has_shared_address_space (gdbarch
);
3576 set_gdbarch_has_shared_address_space (struct gdbarch
*gdbarch
,
3577 gdbarch_has_shared_address_space_ftype has_shared_address_space
)
3579 gdbarch
->has_shared_address_space
= has_shared_address_space
;
3583 gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
, CORE_ADDR addr
, int *isize
, char **msg
)
3585 gdb_assert (gdbarch
!= NULL
);
3586 gdb_assert (gdbarch
->fast_tracepoint_valid_at
!= NULL
);
3587 if (gdbarch_debug
>= 2)
3588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fast_tracepoint_valid_at called\n");
3589 return gdbarch
->fast_tracepoint_valid_at (gdbarch
, addr
, isize
, msg
);
3593 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch
*gdbarch
,
3594 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at
)
3596 gdbarch
->fast_tracepoint_valid_at
= fast_tracepoint_valid_at
;
3600 gdbarch_qsupported (struct gdbarch
*gdbarch
)
3602 gdb_assert (gdbarch
!= NULL
);
3603 /* Skip verify of qsupported, invalid_p == 0 */
3604 if (gdbarch_debug
>= 2)
3605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_qsupported called\n");
3606 return gdbarch
->qsupported
;
3610 set_gdbarch_qsupported (struct gdbarch
*gdbarch
,
3611 const char * qsupported
)
3613 gdbarch
->qsupported
= qsupported
;
3617 gdbarch_auto_charset (struct gdbarch
*gdbarch
)
3619 gdb_assert (gdbarch
!= NULL
);
3620 gdb_assert (gdbarch
->auto_charset
!= NULL
);
3621 if (gdbarch_debug
>= 2)
3622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_charset called\n");
3623 return gdbarch
->auto_charset ();
3627 set_gdbarch_auto_charset (struct gdbarch
*gdbarch
,
3628 gdbarch_auto_charset_ftype auto_charset
)
3630 gdbarch
->auto_charset
= auto_charset
;
3634 gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
)
3636 gdb_assert (gdbarch
!= NULL
);
3637 gdb_assert (gdbarch
->auto_wide_charset
!= NULL
);
3638 if (gdbarch_debug
>= 2)
3639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_auto_wide_charset called\n");
3640 return gdbarch
->auto_wide_charset ();
3644 set_gdbarch_auto_wide_charset (struct gdbarch
*gdbarch
,
3645 gdbarch_auto_wide_charset_ftype auto_wide_charset
)
3647 gdbarch
->auto_wide_charset
= auto_wide_charset
;
3651 /* Keep a registry of per-architecture data-pointers required by GDB
3658 gdbarch_data_pre_init_ftype
*pre_init
;
3659 gdbarch_data_post_init_ftype
*post_init
;
3662 struct gdbarch_data_registration
3664 struct gdbarch_data
*data
;
3665 struct gdbarch_data_registration
*next
;
3668 struct gdbarch_data_registry
3671 struct gdbarch_data_registration
*registrations
;
3674 struct gdbarch_data_registry gdbarch_data_registry
=
3679 static struct gdbarch_data
*
3680 gdbarch_data_register (gdbarch_data_pre_init_ftype
*pre_init
,
3681 gdbarch_data_post_init_ftype
*post_init
)
3683 struct gdbarch_data_registration
**curr
;
3684 /* Append the new registraration. */
3685 for (curr
= &gdbarch_data_registry
.registrations
;
3687 curr
= &(*curr
)->next
);
3688 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
3689 (*curr
)->next
= NULL
;
3690 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
3691 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
3692 (*curr
)->data
->pre_init
= pre_init
;
3693 (*curr
)->data
->post_init
= post_init
;
3694 (*curr
)->data
->init_p
= 1;
3695 return (*curr
)->data
;
3698 struct gdbarch_data
*
3699 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype
*pre_init
)
3701 return gdbarch_data_register (pre_init
, NULL
);
3704 struct gdbarch_data
*
3705 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype
*post_init
)
3707 return gdbarch_data_register (NULL
, post_init
);
3710 /* Create/delete the gdbarch data vector. */
3713 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
3715 gdb_assert (gdbarch
->data
== NULL
);
3716 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
3717 gdbarch
->data
= GDBARCH_OBSTACK_CALLOC (gdbarch
, gdbarch
->nr_data
, void *);
3720 /* Initialize the current value of the specified per-architecture
3724 deprecated_set_gdbarch_data (struct gdbarch
*gdbarch
,
3725 struct gdbarch_data
*data
,
3728 gdb_assert (data
->index
< gdbarch
->nr_data
);
3729 gdb_assert (gdbarch
->data
[data
->index
] == NULL
);
3730 gdb_assert (data
->pre_init
== NULL
);
3731 gdbarch
->data
[data
->index
] = pointer
;
3734 /* Return the current value of the specified per-architecture
3738 gdbarch_data (struct gdbarch
*gdbarch
, struct gdbarch_data
*data
)
3740 gdb_assert (data
->index
< gdbarch
->nr_data
);
3741 if (gdbarch
->data
[data
->index
] == NULL
)
3743 /* The data-pointer isn't initialized, call init() to get a
3745 if (data
->pre_init
!= NULL
)
3746 /* Mid architecture creation: pass just the obstack, and not
3747 the entire architecture, as that way it isn't possible for
3748 pre-init code to refer to undefined architecture
3750 gdbarch
->data
[data
->index
] = data
->pre_init (gdbarch
->obstack
);
3751 else if (gdbarch
->initialized_p
3752 && data
->post_init
!= NULL
)
3753 /* Post architecture creation: pass the entire architecture
3754 (as all fields are valid), but be careful to also detect
3755 recursive references. */
3757 gdb_assert (data
->init_p
);
3759 gdbarch
->data
[data
->index
] = data
->post_init (gdbarch
);
3763 /* The architecture initialization hasn't completed - punt -
3764 hope that the caller knows what they are doing. Once
3765 deprecated_set_gdbarch_data has been initialized, this can be
3766 changed to an internal error. */
3768 gdb_assert (gdbarch
->data
[data
->index
] != NULL
);
3770 return gdbarch
->data
[data
->index
];
3774 /* Keep a registry of the architectures known by GDB. */
3776 struct gdbarch_registration
3778 enum bfd_architecture bfd_architecture
;
3779 gdbarch_init_ftype
*init
;
3780 gdbarch_dump_tdep_ftype
*dump_tdep
;
3781 struct gdbarch_list
*arches
;
3782 struct gdbarch_registration
*next
;
3785 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
3788 append_name (const char ***buf
, int *nr
, const char *name
)
3790 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
3796 gdbarch_printable_names (void)
3798 /* Accumulate a list of names based on the registed list of
3800 enum bfd_architecture a
;
3802 const char **arches
= NULL
;
3803 struct gdbarch_registration
*rego
;
3804 for (rego
= gdbarch_registry
;
3808 const struct bfd_arch_info
*ap
;
3809 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
3811 internal_error (__FILE__
, __LINE__
,
3812 _("gdbarch_architecture_names: multi-arch unknown"));
3815 append_name (&arches
, &nr_arches
, ap
->printable_name
);
3820 append_name (&arches
, &nr_arches
, NULL
);
3826 gdbarch_register (enum bfd_architecture bfd_architecture
,
3827 gdbarch_init_ftype
*init
,
3828 gdbarch_dump_tdep_ftype
*dump_tdep
)
3830 struct gdbarch_registration
**curr
;
3831 const struct bfd_arch_info
*bfd_arch_info
;
3832 /* Check that BFD recognizes this architecture */
3833 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
3834 if (bfd_arch_info
== NULL
)
3836 internal_error (__FILE__
, __LINE__
,
3837 _("gdbarch: Attempt to register unknown architecture (%d)"),
3840 /* Check that we haven't seen this architecture before */
3841 for (curr
= &gdbarch_registry
;
3843 curr
= &(*curr
)->next
)
3845 if (bfd_architecture
== (*curr
)->bfd_architecture
)
3846 internal_error (__FILE__
, __LINE__
,
3847 _("gdbarch: Duplicate registraration of architecture (%s)"),
3848 bfd_arch_info
->printable_name
);
3852 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, %s)\n",
3853 bfd_arch_info
->printable_name
,
3854 host_address_to_string (init
));
3856 (*curr
) = XMALLOC (struct gdbarch_registration
);
3857 (*curr
)->bfd_architecture
= bfd_architecture
;
3858 (*curr
)->init
= init
;
3859 (*curr
)->dump_tdep
= dump_tdep
;
3860 (*curr
)->arches
= NULL
;
3861 (*curr
)->next
= NULL
;
3865 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
3866 gdbarch_init_ftype
*init
)
3868 gdbarch_register (bfd_architecture
, init
, NULL
);
3872 /* Look for an architecture using gdbarch_info. */
3874 struct gdbarch_list
*
3875 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
3876 const struct gdbarch_info
*info
)
3878 for (; arches
!= NULL
; arches
= arches
->next
)
3880 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
3882 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
3884 if (info
->osabi
!= arches
->gdbarch
->osabi
)
3886 if (info
->target_desc
!= arches
->gdbarch
->target_desc
)
3894 /* Find an architecture that matches the specified INFO. Create a new
3895 architecture if needed. Return that new architecture. */
3898 gdbarch_find_by_info (struct gdbarch_info info
)
3900 struct gdbarch
*new_gdbarch
;
3901 struct gdbarch_registration
*rego
;
3903 /* Fill in missing parts of the INFO struct using a number of
3904 sources: "set ..."; INFOabfd supplied; and the global
3906 gdbarch_info_fill (&info
);
3908 /* Must have found some sort of architecture. */
3909 gdb_assert (info
.bfd_arch_info
!= NULL
);
3913 fprintf_unfiltered (gdb_stdlog
,
3914 "gdbarch_find_by_info: info.bfd_arch_info %s\n",
3915 (info
.bfd_arch_info
!= NULL
3916 ? info
.bfd_arch_info
->printable_name
3918 fprintf_unfiltered (gdb_stdlog
,
3919 "gdbarch_find_by_info: info.byte_order %d (%s)\n",
3921 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
3922 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
3924 fprintf_unfiltered (gdb_stdlog
,
3925 "gdbarch_find_by_info: info.osabi %d (%s)\n",
3926 info
.osabi
, gdbarch_osabi_name (info
.osabi
));
3927 fprintf_unfiltered (gdb_stdlog
,
3928 "gdbarch_find_by_info: info.abfd %s\n",
3929 host_address_to_string (info
.abfd
));
3930 fprintf_unfiltered (gdb_stdlog
,
3931 "gdbarch_find_by_info: info.tdep_info %s\n",
3932 host_address_to_string (info
.tdep_info
));
3935 /* Find the tdep code that knows about this architecture. */
3936 for (rego
= gdbarch_registry
;
3939 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
3944 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
3945 "No matching architecture\n");
3949 /* Ask the tdep code for an architecture that matches "info". */
3950 new_gdbarch
= rego
->init (info
, rego
->arches
);
3952 /* Did the tdep code like it? No. Reject the change and revert to
3953 the old architecture. */
3954 if (new_gdbarch
== NULL
)
3957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
3958 "Target rejected architecture\n");
3962 /* Is this a pre-existing architecture (as determined by already
3963 being initialized)? Move it to the front of the architecture
3964 list (keeping the list sorted Most Recently Used). */
3965 if (new_gdbarch
->initialized_p
)
3967 struct gdbarch_list
**list
;
3968 struct gdbarch_list
*this;
3970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
3971 "Previous architecture %s (%s) selected\n",
3972 host_address_to_string (new_gdbarch
),
3973 new_gdbarch
->bfd_arch_info
->printable_name
);
3974 /* Find the existing arch in the list. */
3975 for (list
= ®o
->arches
;
3976 (*list
) != NULL
&& (*list
)->gdbarch
!= new_gdbarch
;
3977 list
= &(*list
)->next
);
3978 /* It had better be in the list of architectures. */
3979 gdb_assert ((*list
) != NULL
&& (*list
)->gdbarch
== new_gdbarch
);
3982 (*list
) = this->next
;
3983 /* Insert THIS at the front. */
3984 this->next
= rego
->arches
;
3985 rego
->arches
= this;
3990 /* It's a new architecture. */
3992 fprintf_unfiltered (gdb_stdlog
, "gdbarch_find_by_info: "
3993 "New architecture %s (%s) selected\n",
3994 host_address_to_string (new_gdbarch
),
3995 new_gdbarch
->bfd_arch_info
->printable_name
);
3997 /* Insert the new architecture into the front of the architecture
3998 list (keep the list sorted Most Recently Used). */
4000 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
4001 this->next
= rego
->arches
;
4002 this->gdbarch
= new_gdbarch
;
4003 rego
->arches
= this;
4006 /* Check that the newly installed architecture is valid. Plug in
4007 any post init values. */
4008 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4009 verify_gdbarch (new_gdbarch
);
4010 new_gdbarch
->initialized_p
= 1;
4013 gdbarch_dump (new_gdbarch
, gdb_stdlog
);
4018 /* Make the specified architecture current. */
4021 deprecated_target_gdbarch_select_hack (struct gdbarch
*new_gdbarch
)
4023 gdb_assert (new_gdbarch
!= NULL
);
4024 gdb_assert (new_gdbarch
->initialized_p
);
4025 target_gdbarch
= new_gdbarch
;
4026 observer_notify_architecture_changed (new_gdbarch
);
4027 registers_changed ();
4030 extern void _initialize_gdbarch (void);
4033 _initialize_gdbarch (void)
4035 struct cmd_list_element
*c
;
4037 add_setshow_zinteger_cmd ("arch", class_maintenance
, &gdbarch_debug
, _("\
4038 Set architecture debugging."), _("\
4039 Show architecture debugging."), _("\
4040 When non-zero, architecture debugging is enabled."),
4043 &setdebuglist
, &showdebuglist
);